Kramer
- Type
- Crypter
- Capabilities
- Defense evasionProcess injection
- Delivery
- Lure
- Platforms
- Windows
Kramer is a Python obfuscation framework whose name is also used to classify obfuscated Python malware. It conceals malicious code using compiled Python bytecode and runtime deobfuscation through exec() and eval(). Observed Windows deployments have used Python 3.12 bytecode disguised as Python source files and distributed with bundled Python runtimes. Kramer-associated payloads include remote-access and information-stealing components; observed Python components have performed memory injection, shellcode execution, and outbound network communication.
Kramer-protected payloads have appeared in multistage cybercrime campaigns targeting UK and German-speaking victims with invoice and scanned-document lures. Delivery chains use disguised shortcuts or Windows script files, batch stagers, and downloaded archives, with payloads hosted through WebDAV-accessible infrastructure and Cloudflare Quick Tunnels. Supporting scripts establish persistence through the Windows Startup folder, conceal staging directories, and remove intermediate scripts. One associated campaign was linked to the operator behind Operation Nutten Tunnel. Kramer denotes the obfuscation layer and associated detection label, rather than establishing that every protected payload belongs to the same remote-access malware family.
Techniques & procedures
11 distinct techniques documented for this family, organized by ATT&CK tactic.
Execution
5 techniques
Execution
This execution pattern shows a separation of responsibilities: VBS file acts as an obfuscated launcher, PowerShell serves as a fileless delivery mechanism... Combined with batch scripting and PowerShell, this multi-language approach provides resilience against partial detection or containment.
The batch script was encoded in UTF-16LE... Upon execution, it ran in a hidden context and established outbound connections to external URLs hosting additional ZIP, BAT, and TXT-based payloads.
Sandbox detonation of these files confirmed that this delivery chain facilitated the deployment of Python-based payloads in addition to script-based components.
The ZIP file did not contain a legitimate document, but an Internet Shortcut file disguised as a PDF. When executed, the shortcut redirected the system to attacker-controlled, Cloudflare domains...
The /invoice/ directory hosted a separate attack chain with a malicious batch script and a ZIP folder containing a fake PDF internet shortcut file.
Privilege Escalation
1 technique
Privilege Escalation
Behavioral telemetry associated with the Python components included indicators of memory injection, shellcode execution, and outbound network activity...
Stealth
3 techniques
Stealth
All five use a custom "Kramer" obfuscator that compiles Python source to .pyc bytecode and disguises the compiled files with .py extensions. Static analysis tools that parse Python source code see garbage.
Behavioral telemetry associated with the Python components included indicators of memory injection, shellcode execution, and outbound network activity...
Only a Python bytecode decompiler reveals the actual logic.
Collection
1 technique
Collection
Artifacts within this directory included a batch script (44rrr.bat) and a compressed archive masquerading as a PDF (Invoice-JL1852586778.pdf.zip).
Command and Control
1 technique
Command and Control
The decoded PowerShell command exhibited behavior consistent with a fileless malware loader. It explicitly enforced the use of TLS 1.2 and leveraged the Net.WebClient class to retrieve remote content over HTTP.
Exfiltration
1 technique
Exfiltration
At the network level, blocking or tightly controlling WebDAV traffic would disrupt Internet Shortcut–based delivery methods... bacteria-spent-endless-grammar.trycloudflare[.]com@SSL\DavWWWRoot\okl\Scan704370326.wsh
Observables
22 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.