APT28's LAMEHUG malware asked an AI model on Hugging Face to write the spy commands it ran on Ukrainian government PCs. How it worked and how to catch it.
Social Engineering Examples·9 sources
LAMEHUG malware, which Google calls PROMPTSTEAL, asks an AI model what to do next. Russia's APT28 used it against Ukrainian government and defence targets in mid-2025. Instead of carrying its own commands, the malware sent fixed text prompts to the Qwen2.5-Coder-32B-Instruct model through the Hugging Face API, got back Windows commands for spying and copying documents, and ran them. Ukraine's CERT-UA published an advisory on 17 July 2025. Google's threat team, which had spotted the malware in June, called it "our first observation of malware querying an LLM deployed in live operations." Status: Documented, attributed with moderate confidence.
| Date (2025) | Event |
|---|---|
| June | Google's Threat Intelligence Group (GTIG) first sees the malware in live operations |
| 10 July | CERT-UA receives reports of the emails sent to executive authorities |
| 17 July | CERT-UA publishes advisory CERT-UA#16039, linking the activity to APT28 (UAC-0001) with moderate confidence |
| 28 July | Ukraine's SSSCIP publishes a plain-language summary |
| 5 November | GTIG publishes its analysis and confirms PROMPTSTEAL is the same as LAMEHUG |
Two organisations, consistent findings. But they aren't fully independent. GTIG's report cites CERT-UA's when it introduces the malware.
| Step | What happened |
|---|---|
| Run | A Python program packed with PyInstaller starts on the victim's PC |
| Ask | It sends a base64-encoded, plain-language prompt to Qwen2.5-Coder-32B-Instruct via Hugging Face |
| Recon | The model returns commands like systeminfo, wmic, whoami and dsquery. Results go into C:\ProgramData\info\info.txt |
| Collect | More commands copy Office, PDF and TXT files from Documents, Downloads and Desktop into the same folder |
| Send | The haul goes out over SFTP/SSH or an HTTP POST to attacker servers |
The malware runs whatever text comes back, without checking. Did it work? CERT-UA didn't say whether the generated commands succeeded, and no loss has been put on it.
Here's the part worth remembering. Vendors like Cato Networks say signatures fail because the commands are made up on the fly. Maybe. But CERT-UA says the commands come from "statically entered text", and Cato recovered those prompts from the binary. The intent is fixed, so the prompts themselves are a detection target.
Tip: an "appendix" that turns out to be a program is never a document. Check the real file type before you open anything from a ZIP.
Only one lure is documented. Emails went to executive authorities, claiming to come from a ministry representative. They were sent from a compromised real mailbox, so the sender looked trustworthy. The attachment, "Додаток.pdf.zip" ("Appendix.pdf.zip"), unpacked to "Додаток.pif", a classic double-extension trick. No source shows the email text.
During the investigation, CERT-UA also found variants posing as AI image tools, with names like "AI_generator_uncensored_Canvas_PRO_v0.9.exe". How they reached anyone isn't documented. A Splunk write-up from September 2025 said CERT-UA described the malware as a phishing attachment disguised as an AI image generator. That sentence isn't in either CERT-UA document. Treat it as a vendor paraphrase. Cato found the image prompt inside those samples was sexually explicit, which hardly fits government and defence recipients.
See also AI-generated malware, PromptFlux and spear phishing.
Python malware used by Russia's APT28 against Ukrainian targets in 2025. It asks an AI model on Hugging Face to write the Windows commands it then runs. Google tracks it as PROMPTSTEAL.
Qwen2.5-Coder-32B-Instruct, through the Hugging Face API.
The documented route was an email posing as a ministry official, with a ZIP attachment hiding a .pif program.
Some variants were named like AI image tools, but no source documents how they were delivered. The claim that CERT-UA said so isn't in CERT-UA's documents.
Social Engineering Examples. “LAMEHUG (PROMPTSTEAL): APT28 malware that asks an AI what to do (2025)”. Accessed 22 November 2026. https://socialengineeringexamples.com/promptsteal-lamehug-apt28-ukraine-2025
GTIG assesses that PROMPTSTEAL "likely uses stolen API tokens" to call the publicly hosted Qwen2.5-Coder-32B-Instruct model. Cato Networks assesses that APT28 used approximately 270 Hugging Face tokens for authentication, but gives no method for the figure, so it is a vendor claim rather than a measured count. APT28 built the malware itself as a PyInstaller-packaged Python binary with its recon and harvesting instructions written as static, base64-encoded natural-language prompts rather than hard-coded commands.
An attacker acquiring LLM API access and building AI-calling malware happens entirely off victim networks before any contact, so there is no direct control here; the realistic control sits at Stage 5, monitoring and restricting outbound calls to public LLM inference APIs from hosts with no legitimate AI or developer use case.
The actor prepared exfiltration endpoints, an SFTP/SSH server and a compromised legitimate website used for HTTP POST uploads. Per CERT-UA, "a compromised email account was used to distribute emails, and the management infrastructure was deployed on legitimate, but compromised resources." CERT-UA gives no reason for that choice. Cato's indicator list adds the sending infrastructure, 192.36.27.37 via LeVPN.
Threat-intel sharing and CERT advisories (like CERT-UA's) that publish observed C2 endpoints and compromised-sender indicators let mail providers and network defenders block the specific infrastructure quickly once one target reports it, shortening the window before other targets are protected.
Emails sent allegedly on behalf of a representative of the relevant ministry, carrying a ZIP attachment named "Додаток.pdf.zip" ("Appendix.pdf.zip"), were distributed among Ukrainian executive authorities. This is the only delivery method any source documents. CERT-UA states that two further variants of the tool were "additionally discovered" during the investigation of the incident, and does not say how those were delivered.
Government email security gateways should flag messages purporting to come from ministry representatives and unsolicited document-styled ZIP attachments as high-risk, and staff in conflict-exposed government and defense organizations should be trained to treat an unexpected "official document" attachment with particular suspicion. Because the emails were sent from a compromised legitimate mailbox, a familiar sender address and clean sender reputation authenticate nothing here.
A victim who opened the ZIP and ran the enclosed file, which carried a disguised .pif extension, launched a PyInstaller executable that displayed a decoy PDF to mask its background activity. The separately recovered image-generator samples instead present a working image-generation prompt box while running the same collection routines in the background.
Endpoint controls should block or sandbox execution of compiled Python/PyInstaller binaries arriving inside archives, and specifically flag files with disguised or double extensions (e.g., .pdf.zip unpacking to .pif), since this packaging trick is the point where the payload actually starts running.
The malware sent its base64-encoded prompts to Qwen2.5-Coder-32B-Instruct over the Hugging Face API, asking it to return one-line Windows commands for system/network/Active Directory reconnaissance and for locating Office, PDF, and TXT documents, rather than shipping those commands hard-coded in the binary.
Egress allow-listing and monitoring for connections to LLM inference endpoints (such as Hugging Face) from machines without an approved AI/development use case directly catches this stage, since the malware cannot get its instructions without reaching that API.
PROMPTSTEAL executed whatever command text the model returned, running systeminfo, wmic, whoami, and dsquery for reconnaissance and xcopy to stage harvested documents under C:\ProgramData\info\, without any human operator reviewing the generated commands first.
Behavioral EDR rules that flag native recon and file-copy utilities (systeminfo, wmic, whoami, dsquery, xcopy) launching immediately after a process calls out to a generative-AI API give defenders a detection path that rests on the behavioral sequence rather than on the exact command text, which is not present in the binary. The static, base64-encoded prompts inside the sample are the durable artifact here: the commands are generated at runtime, the intent is hard-coded.
Staged data was sent to attacker infrastructure via SFTP/SSH (an observed server at 144.126.202.227) or HTTP POST (to stayathomeclasses[.]com/slpw/up.php), completing the espionage/data-theft objective; CERT-UA did not state whether the LLM-generated commands executed by LAMEHUG were successful.
Egress filtering and DLP rules that catch unexpected outbound SFTP/SSH or HTTP POST traffic to non-approved external destinations, plus monitoring for unusual staging directories such as C:\ProgramData\info\, can stop or flag the exfiltration step even after earlier stages succeeded.
Browse by what this case has in common with others in the library.
ESET found PromptLock, ransomware that had a local AI model write its scripts at runtime. It turned out to be…
Scammers hijacked a real invoice thread with a lookalike domain and got an Arkansas school district to wire $3.2M. $1.1M…
Fraudsters faked WPP CEO Mark Read on WhatsApp and staged a Teams call with a cloned executive voice. The agency…
A phone-record pretexting incident involving a retired U.S. Army general was followed by FTC enforcement and broader privacy-policy scrutiny.
In 2019 Yujing Zhang got onto Mar-a-Lago's grounds with a pool story and a shared surname. How she got past…
A 2024 email campaign against Ukrainian organisations used a fake 'verify you are human' page to make victims run PowerShell…
A hijacked Puerto Rico government mailbox said the remittance bank account had changed. PRIDCO wired $2.6M, Tourism $1.5M. How it…
Hours before Maharashtra's 2024 assembly election polling, BJP-amplified audio clips purporting to catch two opposition leaders discussing a bitcoin-funded election…
A Singapore businessman sent at least S$4.9M after a fake Zoom "government meeting" built from real footage of PM Lawrence…
Emails in the CEO's name had FACC wire €52.8M for a secret acquisition. €10.9M frozen, €41.9M gone, both executives sacked…
US prosecutors jailed three FIN7 members who hacked 100+ US companies. How the group phished restaurant chains and hired hackers…
Two New Jersey men ran laptop farms so North Korean IT workers could hold US jobs under stolen identities. $5M…
Microsoft and OpenAI said Russia's GRU-linked APT28 used GPT-4 to research satellite comms and radar and write scripts. No breach;…
A 2024 email campaign against Ukrainian organisations used a fake 'verify you are human' page to make victims run PowerShell…
Sandworm used stolen credentials over VPN to open breakers at three Ukrainian utilities on 23 Dec 2015. What the phishing…
In 2025 the US sanctioned North Korean fronts that place fake IT workers abroad, and a US laptop farm operator…
A subsidiary employee opened a phishing email in Feb 2014. Eleven months later Anthem found attackers holding 78.8M people's details.…
Operation Aurora, the 2009 Aurora cyber attack, used trusted-looking links and an IE zero-day to breach Google, Adobe, and 20+…
A '2011 Recruitment Plan' email with a booby-trapped Excel file breached RSA in 2011. SecurID data was stolen and later…
Russian GRU officers spoofed Google security-alert emails with Bitly-masked links to phish 300+ individuals affiliated with the Clinton campaign, DCCC,…
APT29 hijacked a Constant Contact account USAID used and sent USAID-branded phishing with a Cobalt Strike payload to thousands of…