Analytics Story: LAMEHUG
Description
The following analytic detects LAMEHUG by monitoring unusual endpoint behavior where a Python (often PyInstaller-packaged) process initiates outbound requests to the Hugging Face API, specifically the Qwen 2.5-Coder-32B-Instruct model. Such traffic is abnormal in most enterprise environments and may be embedded with base64-encoded prompts that instruct the malware to generate and execute dynamic Windows commands for reconnaissance and data theft. Detection should also flag execution of AI-generated command chains invoking utilities like systeminfo, net start, tasklist, dsquery, and recursive file copy operations into the %ProgramData%\info\ directory. Additional heuristics include spotting phishing ZIP attachments with .pif binaries disguised as PDF or image viewers, which are commonly used for initial delivery of LameHug.
Why it matters
LAMEHUG is a Python-based infostealer discovered by CERT-UA in 2025 and linked with moderate confidence to APT28. It is distributed through spear-phishing emails impersonating Ukrainian government officials, where malicious ZIP archives contain decoy .pif executables. Once executed, the malware communicates with an LLM hosted on Hugging Face (Qwen 2.5-Coder-32B-Instruct) to dynamically generate Windows commands for reconnaissance, credential harvesting, and document collection. Stolen data is staged locally and later exfiltrated via SFTP or HTTP POST to attacker-controlled servers. LameHug represents a new evolution in malware design, leveraging AI for real-time adaptability, making it harder to detect using static signatures or traditional defensive methods.
Detections
Data Sources
Name | Platform | Sourcetype | Source |
---|---|---|---|
CrowdStrike ProcessRollup2 | N/A | crowdstrike:events:sensor |
crowdstrike |
Sysmon EventID 1 | XmlWinEventLog |
XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
|
Sysmon EventID 22 | XmlWinEventLog |
XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
|
Windows Event Log Security 4688 | XmlWinEventLog |
XmlWinEventLog:Security |
References
Source: GitHub | Version: 1