Malware Analysis

Overview


Room URL: https://tryhackme.com/room/htapowershell-aoc2025-p2l5k8j1h4
Difficulty: Easy
Category: Malware Analysis
Date Completed: 12/21/2025

Objectives


Table of Contents

Introduction
Walk Through
Lessons Learned
Resources


Introduction

This challenge is part of TryHackMe's Advent of Cyber 2025 event, focusing on malware analysis of HTML Application (HTA) files. In the narrative context of "Wareville," several elves' laptops were compromised after they received a phishing email containing an HTA file disguised as a salary survey. The challenge tasks defenders with performing static analysis on the malicious HTA attachment to understand its true purpose, identify indicators of compromise, and uncover the adversary's tactics.

HTA files, while originally designed as legitimate administrative tools for Windows environments, have become a popular delivery mechanism for malware due to their ability to execute VBScript and PowerShell directly through the built-in mshta.exe process. This challenge demonstrates how attackers leverage social engineering combined with multi-layered obfuscation to weaponize these seemingly harmless file types.

Key Information

HTA File Structure

<html>
<head>
    <title>TBFC Utility Tool</title>
    <HTA:APPLICATION 
        ID="TBFCApp"
        APPLICATIONNAME="Utility Tool"
        BORDER="thin"
        CAPTION="yes"
        SHOWINTASKBAR="yes"
    />
</head>

<body>
    <h3>Welcome to the TBFC Utility Tool</h3>
    <input type="button" value="Say Hello" onclick="MsgBox('Hello from Wareville!')">
</body>
</html>

Common Purposes of Malicious HTA

Functions


Walk Through

  1. Download the files
  2. What is the title of the HTA application?
    1. Open the file in vs code
    2. Pasted image 20251221133003.png
  3. What VBScript function is acting as if it is downloading the survey questions?
    1. Pasted image 20251221133436.png
  4. What URL domain (including sub-domain) is the "questions" being downloaded from?
    1. Pasted image 20251221133628.png
  5. Malhare seems to be using typosquatting, domains that look the same as the real one, in an attempt to hide the fact that the domain is not the inteded one, what character in the domain gives this away?
    1. survey.bestfestiivalcompany.com
    2. there are 2 i's
  6. Malicious HTAs often include real-looking data, like survey questions, to make the file seem authentic. How many questions does the survey have?
    1. Pasted image 20251221133821.png
  7. Notice how even in code, social engineering persists, fake incentives like contests or trips hide in plain sight to build trust. The survey entices participation by promising a chance to win a trip to where?
    1. Pasted image 20251221133918.png
  8. The HTA is enumerating information from the local host executing the application. What two pieces of information about the computer it is running on are being exfiltrated? You should provide the two object names separated by commas.
    1. Pasted image 20251221134105.png
  9. What endpoint is the enumerated data being exfiltrated to?
    1. Pasted image 20251221134217.png
  10. What HTTP method is being used to exfiltrate the data?
    1. This is a GET request to this domain. The end of the domain indicates the user and host
    2. Pasted image 20251221134416.png
  11. After reviewing the function intended to get the survey questions, it seems that the data from the download of the questions is actually being executed. What is the line of code that executes the contents of the download?
    1. Pasted image 20251221134635.png
  12. It seems as if the malware site has been taken down, so we cannot download the contents that the malware was executing. Fortunately, one of the elves created a copy when the site was still active. Download the contents from here. What popular encoding scheme was used in an attempt to obfuscate the download?
    1. Base64
    2. Pasted image 20251221134816.png
  13. Decode the payload. It seems as if additional steps where taken to hide the malware! What common encryption scheme was used in the script?
    1. ROT13
    2. Pasted image 20251221135215.png
  14. Either run the script or decrypt the flag value using online tools such as CyberChef. What is the flag value?
    1. Pasted image 20251221135033.png

Lessons Learned


Resources

TryHackMe
What is a HTA File
FileFix Attack
ClickFix


Revision #1
Created 2025-12-21 19:08:45 UTC by David Rizzo
Updated 2025-12-21 19:15:55 UTC by David Rizzo