Malduck is a Python utility library designed for malware researchers, offering a comprehensive suite of tools for malware analysis. It provides functionalities for cryptography, compression, memory model objects (for PE/ELF/raw files and IDA dumps), a modular extraction engine for configuration, fixed integer types, and string operations. Currently at version 4.4.1, the project is actively maintained with frequent updates addressing bugfixes and introducing new features.
pip install malduckVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic AES-CBC encryption and decryption using Malduck's built-in cryptography functions. This is a common task in malware analysis for handling encrypted configuration data.
Upgrade Python environment to 3.8 or newer. Malduck recommends Python 3.8+ due to EOL of older versions.
For Malduck v4.3.1, manually install `yara-python==4.2.3`. For Malduck versions >=4.3.2, ensure `yara-python` is updated to a compatible version (e.g., `pip install --upgrade yara-python`).
Review the `malduck.extractor` documentation for the specific version being used. Ensure extractor methods are correctly decorated as per the new API (e.g., `@Extractor.string("string_identifier")`).Ensure `pefile` is updated to `2022.5.30` or newer: `pip install --upgrade pefile`.
If using Malduck v4.3.1, downgrade `yara-python` to `4.2.3` (`pip install "yara-python==4.2.3"`). If using a newer Malduck version, ensure `yara-python` is updated (`pip install --upgrade yara-python`).
Upgrade `malduck` to version 4.4.1 or later to get the fix: `pip install --upgrade malduck`.
Ensure your custom `Extractor` class inherits from `malduck.Extractor` and its methods are decorated correctly (e.g., `@Extractor.string('rule_name')`). Consult the official Malduck extractor documentation for the correct method signatures and decorator usage for your specific version.