Legacy Windows Tool MSHTA Fuels Surge in Silent Malware Attacks
Attackers increasingly abuse legacy MSHTA tool to deliver stealers, loaders, and persistent malware via phishing.
Summary
Microsoft's decades-old MSHTA (HTML Application) utility is being weaponized by threat actors as a Living-off-the-Land Binary (LOLBIN) to silently deliver malware including stealers, loaders, and advanced persistent threats like PurpleFox. Bitdefender reports a dramatic surge in MSHTA-based attacks since early 2024, with threat actors leveraging the tool's Microsoft-signed status and continued legitimate use to bypass security controls. Attack chains typically begin with social engineering via phishing, fake software downloads, or clipboard hijacking that trick users into executing malicious commands or HTA files.
Full text
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 Written By Kevin Townsend Kevin Townsend is a Senior Contributor at SecurityWeek. He has been writing about high tech issues since before the birth of Microsoft. For the last 15 years he has specialized in information security; and has had many thousands of articles published in dozens of different magazines – from The Times and the Financial Times to current and long-gone computer magazines. Daily Briefing Newsletter Subscribe to the SecurityWeek Email Briefing for the latest cybersecurity threats, trends, and expert insights. More from Kevin Townsend AppOmni’s Marlin AI Brings Autonomous Investigation to SaaS SecurityOpen Source DockSec Uses AI to Cut Through Vulnerability Noise in Docker ImagesSupply Chain Security Crisis: Too Many Vulnerabilities, Too Little VisibilityAI-Powered App Attacks Are Faster, More Frequent and Harder to Stop1Password Teams With OpenAI to Stop AI Coding Agents From Leaking CredentialsMythos Proves Potent in Vulnerability Discovery, Less Convincing ElsewhereSweet Security Launches Agentic AI Red Teaming to Counter ‘Mythos Moment’Free OnlyFans Lure Used to Spread Cross-Platform CRPx0 Malware Latest News UK Cyberspying Chief Calls AI ‘an Unstoppable Force’ and Warns About RussiaVulnerability in Popular Conference Software Granted Attackers a 100% Talk Acceptance RateSecurityWeek to Host AI Risk Summit August 11-12 at the Ritz-Carlton, Half Moon BayRevEng.AI Raises $15 Million to Hunt for Flaws and Backdoors in Software BinariesRomanian Hacker Sentenced to Prison in US for Selling Access to State NetworkLastwall Raises $11.5 Million for Quantum-Resilient Identity PlatformThe Credential Crisis: How Stolen Credentials Defeat Modern Security‘SymJack’ Attack Turns AI Coding Agents Into Supply Chain Attack Delivery Systems Trending Daily Briefing NewsletterSubscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts. Virtual Event: Threat Detection and Incident Response Summit On-Demand Delve into big-picture strategies to reduce attack surfaces, improve patch management, conduct post-incident forensics, and tools and tricks needed in a modern organization. Register Webinar: Third-Party Risk in Practice June 4, 2026 Organizations are investing heavily in third-party risk management, but breaches, delays, and blind spots continue to persist. Join this live webinar as we examine the gap between how organizations think their third-party risk programs are per
Indicators of Compromise
- malware — Lumma stealer
- malware — Amatera stealer
- malware — CountLoader
- malware — Emmenhtal loader
- malware — ClipBanker
- malware — PurpleFox