Endpoint Security

Legacy Windows Tool MSHTA Fuels Surge in Silent Malware Attacks

Attackers are increasingly abusing Microsoft’s decades-old MSHTA utility to stealthily deliver stealers, loaders, and persistent malware through phishing, fake software downloads, and LOLBIN-based attack chains.

Windows security

Good intentions can have unintended consequences. MSHTA is an example.

MSHTA (Microsoft HTML Application) has been a part of Windows since 1999 and the release of Win98 SE and Internet Explorer 5.0. It has remained part of Windows throughout, including the latest current releases. It also continues to run with the Edge browser through the IE mode. The purpose is to conform to Microsoft’s policy of prioritizing backward compatibility.

Over the years, legitimate use of MSHTA has declined. Abuse, however, has grown. MSHTA is increasingly used by bad actors as a Living-off-the-Land binary (LOLBIN) to silently deliver a growing range of malware – ranging from commodity stealers and loaders to advanced and persistent malware such as PurpleFox

Since the start of this year, Bitdefender has detected a dramatic rise in MSHTA-related activity. The firm believes this reflects increased threat actor use rather than renewed administrative adoption.

MSHTA

MSHTA is designed to execute HTML application (HTA) files, which are programs written in HTML, VBScript or JavaScript. An HTA file loaded from an offsite server can be manipulated to run VBScript in memory. The local server would only see the activity of a trusted and MS-signed binary, not what is happening in memory. Because of that trust and the continued legitimate use, it would be difficult to block automatically. The result is that invisible malicious code could be introduced, and that code could then download further LOLBIN components ultimately leading to the implementation of dangerous malware.

“MSHTA provides attackers with a built-in, Microsoft-signed utility that can retrieve and execute remote script content during the initial or intermediate stages of an infection chain,” reports Bitdefender.

Attackers start the process through basic social engineering.

Advertisement. Scroll to continue reading.

Delivering malware

One common abuse of MSHTA detected by Bitdefender involved the use of the HTA CountLoader to deliver the Lumma and Amatera stealers. In one Lumma campaign, victims were targeted through messages, social media posts, or SEO-poisoned websites that promise free or cracked software.

If successfully phished, the victim would execute a setup file which is really a Python interpreter, and load Python runtime. The downloaded ‘free software’ archive includes all the necessary scripts together with an MSHTA executable to contact the attacker’s C2 and retrieve the HTA loader.

The HTA then decodes the next payload and launches it. This downloads and executes the stealer.

The Emmenhtal loader was also observed in delivering Lumma and other stealers. This campaign started with phishing messages via Discord. The victim is tricked into visiting a page designed to hijack the clipboard and trick the user into executing a malicious command line as part of a fake human verification process. If the user is subsequently further tricked into pressing Win + R to open the Run dialog, followed by Ctrl + V and Enter to paste and execute the command, then explorer.exe seems to legitimately launch MSHTA.

Ultimately, a PowerShell script is downloaded from a remote location and runs in memory without saving the script to disk.

Other MSHTA-driven campaigns have included the delivery of ClipBanker and PurpleFox. ClipBanker is a malware family primarily designed to replace wallet addresses in the clipboard to steal cryptocurrency. “In this infection chain, MSHTA is used as an early-stage execution mechanism that launches a remote HTA and quickly transitions to PowerShell-based persistence and payload delivery,” explains Bitdefender.

PurpleFox is a more advanced and persistent malware family that has been active since 2018. “One of its long-standing delivery methods, however, has remained consistent: launching msiexec from an MSHTA command line in order to download and execute an MSI package disguised as a .png file,” says Bitdefender.

While the report gives details of IOCs, It is clear that social engineering is a vital part of MSHTA abuse – but the uptick in that abuse also demonstrates that social engineering remains effective. 

“The main defense against this type of attack is user awareness,” said Silviu Stahie, Security Analyst at Bitdefender. “If we can convince people to stop running commands in their terminals, in PowerShell and stuff like that, we could solve most of these issues. The same goes for downloading cracked applications, pirated games. There’s a good chance you’re going to get infected in this way. I would say over 90% of attacks would stop the next day, if we just stop falling for these attacks.”

Defending against MSHTA abuse should obviously include user awareness training, but technical mitigations are also important. “Protection needs to cover multiple points in the attack chain, from attack surface reduction to pre-execution detection and runtime behavioral blocking,” warn the researchers. 

“As for organizations,” continued Stahie, “blocking all these legacy binaries should be the default stance. Unless you have some critical application that still needs access to MSHTA users should not have access to it. It should be blocked in firewalls.”

Related: Infostealers: The Silent Smash-and-Grab Driving Modern Cybercrime

Related: Cloned AI Tool Sites Distribute Malware in ‘InstallFix’ Campaign

Related: RATs in the Machine: Inside a Pakistan-Linked Cyber Assault on India

Related: Living off the AI: The Next Evolution of Attacker Tradecraft

Related Content

Cybercrime

The defendants unsuccessfully attempted to physically install malware on ATMs to force them to dispense cash.

Artificial Intelligence

The AI giant is logging customers out of their accounts and removing payment data to prevent unauthorized Claude usage.

Artificial Intelligence

Palo Alto Networks Unit 42 analyzed 405 AI-linked malware samples and found only 12 reached production endpoints.

Malware & Threats

The spyware-equipped Manic, a persistent Grandoreiro campaign in Latin America and Europe, and an expanded ToxicPanda 2.0 malware.

Malware & Threats

The Rust-based macOS infostealer harvests users’ passwords, keychain information, Chromium-based browser data, and Safari cookies.

Vulnerabilities

Dropped on Patch Tuesday, the exploit allows any user to spawn a shell with System privileges.

Vulnerabilities

The bug allowed attackers to gain full control of the victims’ systems and deploy the ForestTiger backdoor.

Malware & Threats

The malware was designed to steal and exfiltrate secrets, and to propagate itself via stolen NPM and GitHub credentials.

Copyright © 2026 SecurityWeek ®, a Wired Business Media Publication. All Rights Reserved.

Exit mobile version