Case Library / Phishing / PROMPTSTEAL/LAMEHUG: APT28's LLM-Powered Malware Against Ukraine

PROMPTSTEAL/LAMEHUG: APT28's LLM-Powered Malware Against Ukraine

Google's GTIG and Ukraine's CERT-UA documented PROMPTSTEAL (aka LAMEHUG), Russian APT28 malware that queries an LLM (Qwen2.5-Coder via the Hugging Face API) at runtime to dynamically generate the Windows recon and data-theft commands it then executes against Ukrainian government targets, the first publicly documented malware to call an LLM live in operations.

Share:

Reviewed by the Social Engineering Examples team.

What Happened

Between June and July 2025, Russian state-sponsored actor APT28 deployed PROMPTSTEAL (CERT-UA designation: LAMEHUG) against Ukrainian government and defense-sector targets. Victims received phishing emails impersonating a ministry official, carrying a ZIP attachment ("Appendix.pdf.zip") that dropped a PyInstaller-packaged Python executable; a second lure variant masqueraded as an "AI image generator" tool. Once running, the malware queried Qwen2.5-Coder-32B-Instruct via the Hugging Face API to generate, on the fly, Windows commands for system reconnaissance (systeminfo, wmic, whoami, dsquery) and document harvesting (xcopy of Office/PDF/TXT files from Documents, Downloads, and Desktop), staged the results under C:ProgramDatainfo, and exfiltrated them via SFTP/SSH or HTTP POST to attacker infrastructure. CERT-UA received the initial incident reports on 10 July 2025 and published its advisory (attributing the activity with moderate confidence to UAC-0001/APT28) around 17-28 July 2025. Google's GTIG independently corroborated the campaign in its 5 November 2025 "Advances in Threat Actor Usage of AI Tools" report, describing PROMPTSTEAL as GTIG's first observed case of malware calling an LLM during live operations to dynamically generate malicious functionality rather than having it hard-coded.

How the Attack Worked

PROMPTSTEAL (tracked by CERT-UA as LAMEHUG) is a Python data-miner packaged with PyInstaller and disguised as an AI image-generation tool (samples included "AI_generator_uncensored_Canvas_PRO_v0.9.exe" and "image.py"). Instead of hard-coding its reconnaissance and exfiltration logic, the malware sends a prompt (base64-encoded in some samples) to the Hugging Face-hosted Qwen2.5-Coder-32B-Instruct model at runtime, asking it to generate one-line Windows commands. The malware then blindly executes whatever command text the model returns. Reconstructed prompts asked the model to produce commands that: (1) gather system/hardware/process/service/network/Active Directory information and write it to C:ProgramDatainfoinfo.txt using tools like systeminfo, wmic, whoami, and dsquery; and (2) recursively copy Office, PDF, and TXT documents from the Documents, Downloads, and Desktop folders into C:ProgramDatainfo using xcopy. The staged data was then exfiltrated to attacker-controlled infrastructure via SFTP/SSH (an observed server at 144.126.202.227) or via HTTP POST (an observed endpoint at stayathomeclasses[.]com/slpw/up.php).

The Lure & the Tell

The lure was a phishing email impersonating a ministry representative, carrying a ZIP attachment named "Додаток.pdf.zip" / "Appendix.pdf.zip" that unpacked to a PyInstaller executable (one variant with a .pif extension), a classic double-extension/fake-document trick to get past casual inspection. A second observed variant disguised the payload as an "AI image generator" tool (e.g., "AI_generator_uncensored_Canvas_PRO_v0.9.exe"), exploiting curiosity about generative-AI tools as the pretext. The giveaway, in retrospect: a "PDF appendix" or "AI art generator" that is actually a compiled Python/PyInstaller binary with an unusual extension, and a process that reaches out to a public LLM inference API (Hugging Face) and then immediately runs system-recon and file-copy commands.

Outcome

CERT-UA disrupted/detected the campaign and published a public advisory with indicators of compromise and moderate-confidence attribution to UAC-0001 (APT28). Google's GTIG independently corroborated the malware's AI-runtime behavior in its November 2025 report. The report does not document a specific Google-side asset-disabling action for PROMPTSTEAL itself (it operates via third-party Hugging Face/Qwen infrastructure, not Google's own AI platform); the report's disabled-assets mitigations apply to other malware/actors in the same report (e.g., PROMPTFLUX, which abuses Google's Gemini API, and a Gemini-abusing CTF actor) and should not be attributed to this incident. For PROMPTSTEAL specifically, GTIG instead notes continued malware development, with newer samples adding obfuscation and changing the C2 method. No breach notification, litigation, or quantified loss has been publicly reported; the operation is characterized by researchers as espionage-oriented and still experimental/proof-of-concept in its use of AI.

Why It Matters

This is one of the first publicly documented, attributed cases of "just-in-time" AI-enabled malware: malware that outsources command generation to a live LLM at execution time instead of shipping hard-coded logic. That architecture makes static signature-based detection harder (the actual commands executed vary per run, generated fresh from the model) and signals a maturing trend among state-sponsored actors of embedding commercial/open LLMs directly into intrusion tooling rather than only using AI for offline development support. For defenders, it shifts part of the detection surface toward monitoring outbound calls to LLM inference APIs and behavioral/EDR rules rather than static IOCs, and underscores that nation-state phishing operations against government targets in active conflict zones (Ukraine) are early adopters of this technique.

Defenses

Treat unsolicited ZIP attachments claiming to be government/ministry documents (e.g., "Appendix.pdf.zip") as high-risk, especially those unpacking to executables with unusual extensions (.pif) or PyInstaller-built binaries disguised as "AI image generator" tools. Monitor for outbound traffic to LLM inference APIs (e.g., Hugging Face) from endpoints that have no legitimate developer/AI use case, and for staging directories such as C:ProgramDatainfo. Flag processes that spawn native recon/exfil commands (systeminfo, wmic, whoami, dsquery, xcopy) shortly after network calls to generative-AI API endpoints, since this command-generation-then-execution pattern is atypical of conventional scripted malware. Organizations should apply egress controls/allow-listing for AI API endpoints and behavioral EDR rules rather than relying on static signatures, since the LLM generates commands dynamically at runtime, evading hard-coded-IOC detection. Government/defense-sector organizations in conflict zones should assume nation-state phishing lures will keep pace with AI tooling and prioritize attachment sandboxing and macro/executable-in-archive blocking.

Sources
Attack Chain & Defense
The sequence the attacker ran
How it could have been stopped
1
Tooling and access setup: GTIG assesses that PROMPTSTEAL likely used stolen or attacker-controlled Hugging Face API tokens (Cato Networks counted roughly 270 tokens' worth of authentication activity) to call the publicly hosted Qwen2.5-Coder-32B-Instruct model, and APT28 built the malware itself as a PyInstaller-packaged Python binary with its recon/harvesting instructions written as base64-encoded natural-language prompts rather than hard-coded commands.
Countering Stage 1: 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.
2
Delivery and C2 infrastructure setup: The actor prepared exfiltration endpoints, an SFTP/SSH server and a compromised legitimate website used for HTTP POST uploads, and, per CERT-UA, sent the phishing emails from a compromised email account rather than attacker-registered infrastructure, likely to improve deliverability against Ukrainian government mail defenses.
Countering Stage 2: 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.
3
Phishing lure delivery: Emails impersonating a ministry official, carrying a ZIP attachment ("Appendix.pdf.zip") or, in a second variant, framed as a free "AI image generator" tool, were sent to Ukrainian executive-authority and defense-sector staff.
Countering Stage 3: Government email security gateways should flag messages impersonating ministry officials and unsolicited document-styled ZIP attachments as high-risk, and staff in conflict-exposed government and defense organizations should be trained to treat unexpected "official document" or free AI-tool download emails with particular suspicion.
4
Execution via double-extension/decoy trick: A victim who opened the ZIP and ran the enclosed file (one variant used a disguised .pif extension) launched a PyInstaller executable that displayed a decoy PDF or a working AI image-generation prompt box to mask its background activity.
Countering Stage 4: 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.
5
Runtime command generation via LLM: 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.
Countering Stage 5: 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.
6
Local execution of AI-generated commands: PROMPTSTEAL executed whatever command text the model returned, running systeminfo, wmic, whoami, and dsquery for reconnaissance and xcopy to stage harvested documents under C:ProgramDatainfo, without any human operator reviewing the generated commands first.
Countering Stage 6: 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 does not depend on knowing the exact command text in advance, since that text is generated fresh per run.
7
Exfiltration and objective completion: 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 publicly confirm whether every observed run exfiltrated successfully.
Countering Stage 7: 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:ProgramDatainfo, can stop or flag the exfiltration step even after earlier stages succeeded.
Quick Facts
Victim
Ukrainian executive authorities, government officials, and security/defense-sector organizations
Location
Ukraine
Date
2025-06 (first observed by GTIG in live operations); CERT-UA received incident reports 2025-07-10; CERT-UA advisory published 2025-07-17/28; GTIG report published 2025-11-05
Impact
No monetary loss has been publicly quantified. Public reporting (Google GTIG, CERT-UA, Cato Networks, Splunk) describes an espionage/data-theft operation without confirming successful large-scale exfiltration or measurable financial damage; CERT-UA did not publicly confirm whether the LLM-generated commands executed successfully in every observed case.
Status
Confirmed
Case Type
Real-World Incident
Sector
Defense & Aerospace, Government & Public Sector
Threat Actor
Nation-State / APT
Related

Related Cases

PromptLock: AI-Generated Ransomware Proof-of-Concept Discovered on VirusTotal

ESET researchers found "PromptLock," a Go-based ransomware sample on VirusTotal that used a locally-run open-weight AI model (gpt-oss:20b via Ollama)…

Incident 2025Read →

WPP Deepfake CEO Scam Attempt

Fraudsters built a fake WhatsApp profile of WPP CEO Mark Read and staged a Microsoft Teams call using an AI…

Incident 2024Read →

Deepfake Candidate Interview Fraud at Vidoc Security Lab (Polish-Founded/US-HQ, 2024-2025)

Vidoc Security Lab, a Polish-founded, US-headquartered cybersecurity startup, caught two separate job candidates using real-time AI deepfake video filters to…

Incident 2024Read →