Elastic Security Labs has officially released nightMARE version 0.16, a comprehensive Python library designed to streamline malware analysis and reverse engineering workflows.
The open-source tool consolidates multiple analysis capabilities into a single framework, enabling security researchers to extract configuration data and intelligence indicators from widespread malware families more efficiently.
The development of nightMARE addresses a critical challenge faced by malware analysts: managing numerous dependencies and reducing code duplication across analysis tools.
Previously, Elastic Security Labs noted on separate Python modules including LIEF for executable parsing, Capstone for disassembly, and SMDA for cross-reference analysis. This fragmented approach created maintenance complexities and workflow inefficiencies.
To solve this problem, the development team integrated Rizin, an open-source reverse engineering framework forked from Radare2, as the primary backend.

Rizin’s modular architecture, extensive feature set, and command-based interface provide researchers with powerful analysis capabilities through the rz-pipe module, which enables seamless Python integration.
This consolidation significantly reduces third-party dependencies while expanding analytical functionality.
The library’s architecture is organized into three core modules. The analysis module handles static binary analysis through disassembly and instruction emulation.
The core module provides essential utilities for bitwise operations, integer casting, and configuration extraction using recurring regex patterns.


The malware module contains algorithm implementations organized by malware family and version, covering cryptographic functions, unpacking routines, and configuration extractors.
Emulation and Reversing
nightMARE offers two complementary analysis techniques that address different reverse engineering scenarios. The reversing module provides an abstraction layer over Rizin’s functionality, exposing commonly used features without requiring deep framework knowledge.
Analysts can perform pattern matching, disassembly, cross-reference analysis, and data extraction through straightforward function calls that handle the underlying Rizin commands automatically.
The emulation module, rebuilt in version 0.16, leverages Rizin’s capabilities alongside the Unicorn engine to execute code snippets from malware samples. The binary uses the Sleep import at address 0x140006404


The WindowsEmulator class provides lightweight PE emulation focused on executing specific code sequences rather than full system emulation.
This approach proves particularly valuable when analyzing obfuscated malware that manually constructs data on the stack or implements custom cryptographic functions.
Instead of manually reimplementing complex algorithms, analysts can directly call the malware’s own functions within a controlled emulation environment.
This emulation capability demonstrates significant practical advantages. For example, when analyzing malware that manually pushes encrypted data onto the stack, researchers can emulate the entire code block and read the decrypted result rather than painstakingly tracing each instruction.
Similarly, when encountering proprietary cryptographic implementations, analysts can invoke the malware’s existing decryption functions rather than reverse-engineering and reimplementing the algorithms from scratch.
To demonstrate nightMARE’s capabilities, Elastic Security Labs provided a detailed tutorial for extracting configuration data from LUMMA Stealer, an information-stealing malware that remained active in infection campaigns despite a takedown operation in May 2025.
LUMMA incorporates control flow obfuscation and ChaCha20 encryption to complicate both static and dynamic analysis.


The extraction process involves four key steps. First, pattern matching locates the ChaCha20 initialization code and extracts the decryption key and nonce from instruction operands.
Second, the decryption function is identified by matching hex patterns from code that loads WinHTTP imports. Third, cross-reference analysis from the decryption function reveals the base address where encrypted command-and-control domains are stored.
Finally, the emulation module directly calls the malware’s own ChaCha20 decryption function to decrypt domain names, eliminating the need to reimplement the custom cryptographic algorithm.
This methodology successfully extracted nine command-and-control URLs from the analyzed sample, showcasing how nightMARE reduces analysis time by combining pattern matching, disassembly, and emulation in a cohesive workflow.
The complete implementation is available in the project’s GitHub repository, providing researchers with a practical reference for building their own extractors.
With version 0.16, nightMARE supports configuration extraction and analysis for thirteen malware families including Blister, GhostPulse, Latrodectus, Lobshot, LUMMA, NetWire, RedLine Stealer, Remcos, SmokeLoader, StealC, Strela Stealer, and XorDDos. Each family’s algorithms are implemented as sub-modules that demonstrate practical applications of the library’s analysis capabilities.
Elastic Security Labs acknowledges that the rapidly evolving nature of malware presents ongoing maintenance challenges.
Threat actors frequently modify malware code to evade detection and analysis, requiring continuous updates to configuration extractors and algorithm implementations.
The development team welcomes community contributions through direct code submissions or issue reports to help expand coverage and maintain compatibility with emerging malware variants.
nightMARE represents a significant contribution to the open-source security community, providing researchers with enterprise-grade malware analysis capabilities previously scattered across multiple tools.
By consolidating reverse engineering functions into a unified, Rizin-powered framework, the library enables more efficient threat intelligence extraction and malware research workflows.
Follow us on Google News, LinkedIn, and X to Get Instant Updates and Set GBH as a Preferred Source in Google.