smda
A recursive disassmbler optimized for CFG recovery from memory dumps. Based on capstone.
What it is and what it does
SMDA is a Python library for analyzing compiled binaries and memory dumps by recovering their control flow structure. It reads PE, ELF, Mach-O, and raw memory files, then disassembles them using Capstone (for x86/x64 and ARM64) or specialized backends (for .NET CIL and Dalvik), producing a structured report of functions, basic blocks, instructions, and the edges between them. The library is optimized for accurate CFG recovery rather than speed, making it useful for malware analysis, reverse engineering, and binary instrumentation workflows.
The package includes both a single-file API and a batch processor for analyzing corpora in parallel. It can optionally infer Windows API references, integrate with IDA Pro to augment existing analysis, and export results as JSON or reconstruct binaries from recovered CFGs. Memory usage is dominated by the largest file in flight rather than accumulating across files, and performance can be tuned by disabling optional metadata calculations (hashing, nesting depth, strongly connected components) that downstream consumers may not need.
Use it for:
- Analyze malware samples to extract function boundaries and control flow for behavioral analysis or signature generation.
- Process memory dumps from running processes to recover function structure without relying on debug symbols.
- Batch-process a corpus of binaries in parallel to extract CFGs for machine learning or statistical analysis.
- Augment IDA Pro's conservative function detection by running SMDA's independent analysis and importing missing function starts back into IDA.
- Extract Windows API call patterns from PE binaries by using the ApiScout method to infer API references.
- Analyze Dalvik bytecode from raw DEX files to understand Android application control flow.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SMDA is a recursive disassembler library that recovers control flow graphs from binary files and memory dumps, supporting x86/x64, AArch64, .NET CIL, and Dalvik bytecode with output as functions, basic blocks, and instruction-level edges.
Yes. SMDA is actively maintained, has no known vulnerabilities, uses a permissive license, and offers a well-designed API for CFG recovery across multiple architectures and file formats. Install it if you need to extract control flow structure from binaries or memory dumps; avoid it if you only need basic disassembly without CFG analysis or if you require Python versions below 3.11.
Install
smda on PyPI
pip
pip install smdauv
uv add smdapoetry
poetry add smdaInstalling smda
Before you install
Installation is straightforward with low friction; the package is actively maintained with a release 3 days ago and requires Python 3.11 or newer. Five runtime dependencies (capstone, dncil, dnfile, lief, pycxxfilt) are all standard tools in the binary analysis ecosystem.
License in practice
BSD 2-Clause is a permissive license with minimal restrictions, allowing commercial and private use without requiring source disclosure of derivative works.
Quickstart
pip install smda
from smda.Disassembler import Disassembler
disassembler = Disassembler()
report = disassembler.disassembleFile("/bin/cat")
for fn in report.getFunctions():
for ins in fn.getInstructions():
print(ins)
Requires Python 3.11 or newer; disassembly is CPU-bound and memory usage scales with the largest binary being analyzed (one 3 MB binary reached ~1.8 GB resident memory).
Verify before relying
- Performance characteristics on binaries larger than the measured 3 MB test case.
- Whether IDA Pro integration (IDA 8.4+) is available in standard installations or requires the optional ida-domain package.
- Accuracy metrics for CFG recovery compared to other disassemblers on real-world binaries.
Package facts
| License | BSD 2-Clause (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — capstone, dncil, dnfile, lief, pycxxfilt |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 173,554/month — #10,304 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: smda-4.4.7-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
evmdasmevmdasm provides a lightweight registry of…
copyleft · top 15,000 on PyPI
idaproEnables programmatic binary analysis and…
permissive · top 15,000 on PyPI
dncildncil is a Python library for disassembling…
permissive · top 15,000 on PyPI
capstoneCapstone is a disassembly engine that decodes…
permissive · top 5,000 on PyPI
xdisDisassembles Python bytecode from any Python…
copyleft · top 15,000 on PyPI
ida-hcliida-hcli is a command-line interface for…
permissive · top 15,000 on PyPI
nvidia-cuda-nvdisasmnvdisasm disassembles NVIDIA CUDA cubin files…
unclear · top 5,000 on PyPI
ropperRopper displays binary file metadata and…
permissive · top 15,000 on PyPI
vivisectVivisect is a pure-Python disassembler,…
permissive · top 15,000 on PyPI
binsizeAnalyzes symbol sizes in compiled binaries by…
permissive · top 15,000 on PyPI