
Detection rules for the MIOU MCP-server malware operation and the Beretta stealer
Detection content for MIOU, a malware operation that ships trojanized Python MCP servers and crypto tools on GitHub. Starting the server (for example from an MCP client such as Claude Desktop, Cursor or Cline) fetches an encrypted payload that maps the private "Beretta" stealer in memory and installs a persistent clipboard clipper (msedgeview.dll, per-user COM hijack, rundll32 …,#3).
Write-up: Your Coding Agent Started the MCP Server. The Server Started a Stealer.
| Path | What |
|---|---|
yara/failproxy_python_loader.yar | 4 rules for the Python loader in the repos (hidden stdin stager, ctypes PE mapper, Cloudflare/curl fallback transport, kit material) |
yara/miou_beretta.yar | 6 rules for binaries: stage 3 crypter, stage 4 loader, Beretta image and in-memory image, clipper DLL, app-bound-encryption helper DLL |
sigma/ | 6 Sigma rules: hidden Python child fed over stdin, rundll32 ordinal #3 from AppData, clipper file drop, COM hijack registry write, browser started with a %TEMP%\v20_* profile, CrHlp_* named pipe (app-bound encryption bypass) |
semgrep/mcp_hidden_loader.semgrep.yml | 4 Semgrep rules for Python MCP server repos, aimed at the technique (decorator-started background job, hidden interpreter fed over stdin, ctypes PE mapper, pinned IP with TLS verification off) rather than this kit's literals |
kql/miou_mde.kql | Microsoft Defender for Endpoint hunting queries |
TECHNICAL.md | Technical notes: key derived from anti-debug checks, build key leaking through the API hash, MIOU container format, Beretta config, C2 protocol, Chrome app-bound key theft, targets |
scripts/ | extract_k.py (derive the build key from a stage 4), stage4_api_hash.py, brt_config_unpack.py, fnv_api_scan.py |
IOCS.md, iocs.csv | Indicators: domains, exfil server, hashes, file paths, registry, clipper wallets, and the 36 reported repos with their status |
targets.tsv | Beretta's target list |
tests/ | Test results: recall on known family samples and false positives on benign corpora |
yara -r yara/ <path-to-cloned-repo-or-sample>
semgrep --config semgrep/ <path-to-cloned-mcp-server>
Author: Shmulik Cohen (Apiiro).

Open-source XDR and SIEM platform for threat detection, log analysis, file integrity monitoring, vulnerability assessment, and compliance management across endpoints and cloud workloads.

Open-source network IDS/IPS/NSM engine for real-time traffic inspection, intrusion detection and prevention, protocol analysis, and rule-based threat hunting.

Zeek is a powerful network analysis framework that is much different from the typical IDS you may know.