malduck
Malduck is your ducky companion in malware analysis journeys
What it is and what it does
Malduck is a Python library for malware analysis that bundles cryptographic primitives (AES, Blowfish, ChaCha20, Serpent), compression algorithms (aPLib, gzip, LZNT1), and memory-model abstractions to work uniformly across PE executables, ELF binaries, raw memory dumps, and IDA output. It originated as a fork of the Roach project to decouple it from Cuckoo Sandbox while retaining support for Cuckoo's procmem format.
The library is designed to reduce boilerplate in malware research scripts by providing fixed-width integer types, string utilities, hashing functions, and a modular extraction engine for config recovery. You work with memory or binary objects using the same API regardless of source format, and can define custom extractors using YARA rules and pattern matching to identify and parse malware families.
Use it for:
- Decrypt and analyze malware communications encrypted with AES, Blowfish, or ChaCha20.
- Decompress packed malware samples using aPLib or LZNT1 algorithms.
- Extract configuration data from memory dumps or PE files using the Extractor framework with YARA rules.
- Parse and inspect PE and ELF binaries and memory dumps with a unified memory-model API.
- Implement custom malware family signatures and extraction logic for automated analysis pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Malduck provides cryptographic, compression, and memory-analysis utilities for malware research, including AES, Blowfish, ChaCha20, Serpent, aPLib decompression, and tools to parse PE/ELF binaries and memory dumps.
Yes, if you are doing malware analysis or reverse engineering and need a compact toolkit for cryptography, decompression, and memory parsing. The copyleft license is acceptable for research and internal tools but problematic for closed-source products. Maintenance is aging (last release over a year ago), so expect to maintain patches yourself if critical issues arise, but the codebase is stable and no known vulnerabilities are recorded.
Install
malduck on PyPI
pip
pip install malduckuv
uv add malduckpoetry
poetry add malduckInstalling malduck
Before you install
Low install friction with a pure-Python wheel. Maintenance is aging—last release was 2024-05-10, over a year ago—but the repository remains active with recent commits and no archived status.
License in practice
GPLv3 copyleft license requires that any derivative work or distribution must also be licensed under GPLv3 and provide source code; suitable for internal malware research but restrictive for closed-source commercial tools.
Quickstart
pip install malduck
from malduck import aes
key = b'A'*16
iv = b'B'*16
plaintext = b'data'*16
ciphertext = aes.cbc.encrypt(key, iv, plaintext)
Requires Python 3.8 or later; yara-python and pycryptodomex are compiled dependencies that may require build tools on some systems.
Verify before relying
- Whether yara-python and other binary dependencies install smoothly on Windows and macOS without additional setup.
- Current maintenance cadence and likelihood of future updates beyond the 2024-05-10 release.
Package facts
| License | GPLv3 (copyleft) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — capstone, click, cryptography, dnfile, pefile, pycryptodomex, pyelftools, typing-extensions, yara-python |
| Maintenance | aging — 826 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 88,995/month — #13,688 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: malduck-4.4.1-py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
deflateThin Python wrapper around libdeflate for fast…
permissive · top 15,000 on PyPI
maco-extractorMaco is a framework for standardizing malware…
permissive · top 15,000 on PyPI
eth-keyfileLoads, creates, and decrypts Ethereum…
permissive · top 5,000 on PyPI
membrowseAnalyzes binary size and memory footprint of…
unclear · top 15,000 on PyPI
esp-coredumpRetrieves and analyzes core dumps from ESP32…
permissive · top 5,000 on PyPI
ropperRopper displays binary file metadata and…
permissive · top 15,000 on PyPI
liefLIEF parses, modifies, and abstracts binary…
permissive · top 5,000 on PyPI
binsizeAnalyzes symbol sizes in compiled binaries by…
permissive · top 15,000 on PyPI
yara-xPython bindings for YARA-X, a pattern-matching…
permissive · top 15,000 on PyPI
ROPGadgetROPGadget searches for ROP (Return-Oriented…
permissive · top 5,000 on PyPI