Case Library / Phishing / LAMEHUG (PROMPTSTEAL): APT28 malware that asks an AI what to do (2025)

LAMEHUG (PROMPTSTEAL): APT28 malware that asks an AI what to do (2025)

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.

Share:

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.

Key takeaways

  • The one documented lure was an email posing as a ministry official, sent from a hacked real mailbox.
  • The attachment was "Appendix.pdf.zip". Inside was a program with a .pif extension, not a PDF.
  • The commands change. The prompts don't. They sit inside the file, and that's something defenders can catch.
  • The popular "AI image generator phishing" story isn't in CERT-UA's documents.

Timeline

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.

How the malware worked

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.

The lure, and a myth

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.

What stops it

  • Be suspicious of zipped "official documents", especially ones that unpack to .pif or other program files. A familiar sender proves nothing if the mailbox was hacked.
  • Watch outbound calls to AI APIs like Hugging Face from machines with no reason to make them.
  • Flag recon commands (systeminfo, wmic, whoami, dsquery, xcopy) that run right after a call to an AI service.
  • Look for staging folders such as C:\ProgramData\info.
  • Use the static prompts inside the samples as detection material.
  • Block executables inside archives and sandbox attachments.

See also AI-generated malware, PromptFlux and spear phishing.

Common questions

What is LAMEHUG malware?

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.

Which AI model did it use?

Qwen2.5-Coder-32B-Instruct, through the Hugging Face API.

How was it delivered?

The documented route was an email posing as a ministry official, with a ZIP attachment hiding a .pif program.

Was it spread as an AI image generator?

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.

Sources
  • GTIG AI Threat Tracker: Advances in Threat Actor Usage of AI Tools. Google Cloud / Google Threat Intelligence Group (primary). Fetched and verified live 2026-07-29; confirms June 2025 discovery of PROMPTSTEAL, Qwen2.5-Coder-32B-Instruct/Hugging Face mechanism, first-observation-of-LLM-in-live-ops claim, and continued-development note.
  • GTIG AI Threat Tracker (PDF). Google Cloud (primary). Fetched and verified live; PDF full text confirms PROMPTSTEAL table entry, June 2025 identification date, APT28/FROZENLAKE attribution, and 'likely uses stolen API tokens' language.
  • UAC-0001 cyberattacks on the security and defense sector using the LAMEHUG software tool, which uses LLM (large language model) (CERT-UA#16039). CERT-UA (Ukraine Government CERT) (primary). The technical advisory, dated 17 July 2025, and the document our technical claims rest on. Not fetched directly: cert.gov.ua renders client side and returns a page containing only the string "CERT-UA" to WebFetch and to Exa, and the Wayback capture returns Archive Team boilerplate rather than the article. The URL and article number are confirmed by GTIG, which hyperlinks this exact address for LAMEHUG, and by BleepingComputer, which cites article 6284730. Text read via the verbatim republication below.
  • AI Incident Database report 6242: verbatim republication of CERT-UA#16039. AI Incident Database (secondary). Fetched and verified live 2026-09-02; carries the full text of the CERT-UA advisory, including the "additionally discovered" wording for the image-generator variants, the "based on statically entered text (description)" description of the LLM use, the compromised-mailbox note, and the moderate-confidence UAC-0001 attribution. Its editor's note records that the extra technical data, including indicators, is in the original.
  • APT28 Targets Security and Defence Sector with AI-Powered Software. SSSCIP / CERT-UA (Ukraine Government CSIRT) (primary). Fetched and verified live 2026-09-02. This is the SSSCIP press release of 28.07.2025 summarizing CERT-UA#16039 for a general audience, not the advisory itself: it confirms the Додаток.pdf.zip lure, the .pif PyInstaller executable, the LLM command-generation description and the moderate-confidence UAC-0001/APT28 attribution, but contains no hashes, domains or IP addresses, and does not mention the image-generator samples.
  • АРТ28 атакує сектор безпеки та оборони за допомогою програмного засобу, що використовує штучний інтелект. SSSCIP / CERT-UA (Ukraine Government CSIRT) (primary). The same press release in Ukrainian; page loads on the official csirt.csi.cip.gov.ua domain and mirrors the English-language text.
  • Cato CTRL Threat Research: Analyzing LAMEHUG. Cato Networks (secondary). Fetched and verified live, dated July 23, 2025; confirms exact exfil infrastructure (144.126.202.227 SFTP, stayathomeclasses[.]com/slpw/up.php HTTP POST), full LLM-generated command string (systeminfo/wmic/whoami/dsquery), the pre-defined base64-encoded prompts, the sending infrastructure 192.36.27.37 via LeVPN, and the assessment that "APT28 used approximately 270 Hugging Face tokens for authentication", which Cato states as its own analysis with no method given and which is therefore a claim rather than a measurement. Re-fetched 2026-09-02.
  • From Prompt to Payload: LAMEHUG's LLM-Driven Cyber Intrusion. Splunk (secondary). Fetched and verified live 2026-09-02, dated 25 September 2025; confirms LLM_QUERY_EX function mechanics, C:ProgramDatainfo staging, the systeminfo/wmic/whoami/dsquery/xcopy command set, and that Splunk reconstructed the commands by intercepting the model's responses. Use with care on delivery: its sentence "According to CERT-UA, this malware was distributed as a phishing attachment disguised as an AI canvas or image generator application" is not supported by either CERT-UA document and is the origin of a claim this case file previously carried.
  • LameHug malware uses AI LLM to craft Windows data-theft commands in real-time. BleepingComputer (secondary). Fetched and verified live, dated July 17, 2025; confirms July 10 CERT-UA report receipt date, three malware variant names, and the explicit line 'CERT-UA did not state whether the LLM-generated commands executed by LameHug were successful.'
Cite this case

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

Attack Chain & Defense
1Tooling and access setup
What happened

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.

The control that would have stopped it

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.

2Delivery and C2 infrastructure setup
What happened

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.

The control that would have stopped it

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.

3Phishing lure delivery
What happened

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.

The control that would have stopped it

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.

4Execution via double-extension/decoy trick
What happened

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.

The control that would have stopped it

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.

5Runtime command generation via LLM
What happened

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.

The control that would have stopped it

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.

6Local execution of AI-generated commands
What happened

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.

The control that would have stopped it

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.

7Exfiltration and objective completion
What happened

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.

The control that would have stopped it

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.

Quick Facts
Victim
Ukrainian executive authorities, government officials, and security/defense-sector organizations
Location
Ukraine
Date
2025-06
(GTIG's first observation of the malware in live operations); CERT-UA received incident reports 2025-07-10; CERT-UA technical advisory CERT-UA#16039 published 2025-07-17; SSSCIP press release summarizing it published 2025-07-28; GTIG report published 2025-11-05
Impact
No monetary loss has been publicly quantified.
Basisnot-a-lossEspionage operation with no confirmed exfiltration
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; per BleepingComputer, CERT-UA did not state whether the LLM-generated commands executed by LAMEHUG were successful.
Status
Documented incident
Case Type
Real-World Incident
Sector
Defense & Aerospace, Government & Public Sector
Threat Actor
nation-state
Explore more

Related Cases

Browse by what this case has in common with others in the library.