← Lab /Security & privacy

nightMARE can extract LUMMA stealer C2 domains using Rizin and Unicorn

The nightMARE library can reliably extract configuration data from LUMMA malware samples.

Security & privacy Elastic Security Labs 14 Oct 2025 Tooling Prototype evidence

Published as “NightMARE on 0xelm Street, a guided tour”

Why it matters

Provides a reusable framework that reduces duplicated code for malware configuration extraction.

Summary

The authors released nightMARE version 0.16, a Python library that wraps Rizin for static analysis and Unicorn for lightweight PE emulation. They demonstrate its use by extracting the ChaCha20 key, nonce, and encrypted C2 list from a real LUMMA sample, then decrypting the domains via emulation. The resulting list of C2 URLs is shown, confirming the library can automate configuration extraction. Evidence is limited to a single sample and the emulation is intentionally lightweight.

What they found 1

  1. nightMARE successfully decrypted LUMMA C2 domains

    “https://mocadia[.]com/iuew https://mastwin[.]in/qsaz https://ordinarniyvrach[.]ru/xiur https://yamakrug[.]ru/lzka https://vishneviyjazz[.]ru/neco https://yrokistorii[.]ru/uqya https://stolevnica[.]ru/xjuf https://visokiykaf[.]ru/mntn https://kletkamozga[.]ru/iwqq”

Caveats 5

  • The WindowsEmulator is described as "light" and does not perform relocations, load DLLs, or emulate the OS
  • The authors note that "the rapidly evolving nature of malware makes maintaining these modules difficult"
  • Only a strict minimum is done to load a PE: no relocations, no DLLs, no OS emulation
  • Maintaining malware modules is difficult due to rapid evolution of malware
  • Hook functions must return via do_return to continue execution

What’s new here 4

  • Integration with Rizin via rz-pipe to replace multiple disassembly dependencies
  • Lightweight Windows PE emulation built on Unicorn
  • Built-in modules for many malware families, including LUMMA
  • Tutorial showing end-to-end configuration extraction for LUMMA