A Python desktop tool for static malware analysis, feature extraction, local dataset building, and Intel-assisted sample ingestion.
- Static scan for PE/APK/ELF-like binaries
- Hashing: MD5/SHA1/SHA256/TLSH/ssdeep/imphash (when available)
- String extraction, URL/IP extraction
- Lightweight CFG metrics: nodes/edges/cyclomatic
- Opcode profile and API import extraction
- Packer hints (UPX/MPRESS/ASPACK/PETITE/high entropy)
- Intel fetch from MalwareBazaar
- Download malware ZIP samples and optional auto-scan
- Explorer filtering, bulk flag/remove, and dataset export
- Report tab with sample detail and dataset export scopes
- Dark high-contrast GUI theme for long triage sessions
- Centralized logging to console and rotating file logs
main.py: CLI entrypoint and GUI launchermalware_analyzer/: main packagescripts/: helper scripts (benchmark and screenshot capture)tests/: unit/integration/e2e test skeletonoutput/: runtime outputs (DB and generated artifacts)malware_samples/: default downloaded sample folder
- Python 3.11+
- Git
- OS-specific runtime packages:
- Windows: no extra system package required
- Ubuntu/Debian: Qt/XCB and libmagic packages (see below)
- macOS: Homebrew packages
libmagicandlibomp
- Create and activate virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1- Install Python dependencies
pip install --upgrade wheel setuptools
pip install -e ".[dev,packaging]"- Install system packages
sudo apt update
sudo apt install python3.11 python3.11-venv python3.11-dev \
libxcb-cursor0 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 \
libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 \
libxcb-shape0 libmagic1 libmagic-dev -y- Create and activate virtual environment
python3.11 -m venv .venv
source .venv/bin/activate- Install Python dependencies
pip install --upgrade wheel setuptools
pip install -e ".[dev,packaging]"- Install system packages
brew update
brew install libmagic libomp- Create and activate virtual environment
python3.11 -m venv .venv
source .venv/bin/activate- Install Python dependencies
pip install --upgrade wheel setuptools
pip install -e ".[dev,packaging]"python main.py --help
pytest -qpython main.py guiMain commands:
python main.py scan <path> [--recursive] [--workers N] [--format json|csv|both] [--yara <dir>] [--no-heuristic] [--watch]python main.py guipython main.py serve --host 127.0.0.1 --port 8000python main.py db stats|list|show|delete|export|import|tag|dedupe|rescore|reclusterpython main.py intel fetch --mode "By Tag" --value exe --limit 100python main.py report <sha256> --format html|pdfpython main.py watch <folder> --recursivepython main.py ml train --input-csv output/phase11_features.csv --production-presetpython main.py ml train-security-gate --input-csv output/phase11_features.csv --threshold-recall-target 0.95python main.py ml backfill-security-gate --model-path models/security_gate.joblib --platform All --source All
Production note for family model:
- For production-oriented family attribution, use
--production-presetto enforce stronger class-balance defaults. - The preset keeps your explicit values if stricter, but raises weak settings to safer minimums (min class samples >= 10, and max class samples = 300 when uncapped).
DB import accepts both JSONL and CSV datasets:
python main.py db import dataset.jsonlpython main.py db import dataset.csvpython main.py db import dataset.any --format jsonl|csv
Use --help for command details:
python main.py --help
python main.py scan --help
python main.py db --helpTo regenerate screenshot locally:
python scripts/capture_gui_screenshot.py- Open
Inteltab - Set filter, for example
Keyword Syntax+file_type:apk - Enable
Download samples ZIP - Optionally enable
Auto-scan after download - Click
Fetch Now
Notes:
- Downloaded ZIP files are password-protected archives from MalwareBazaar.
- Intel metadata can only be applied to rows that already exist in local DB.
- If entries are not in local DB yet, scan them first (or enable auto-scan).
- In
Explorer:- Export Filtered JSONL/CSV
- Export Selected JSONL/CSV
- In
Report:- Save Dataset JSONL/CSV with scope:
- All Samples
- Windows Only
- Android Only
- Source Local
- Source MalwareBazaar
- Current Family
- Save Dataset JSONL/CSV with scope:
- Static analysis only; no sample execution.
- Keep malware archives in isolated folders.
- Do not upload live samples to public systems.
- Review
malware_samples/.noexecbefore handling downloaded artifacts.
- Script:
scripts/benchmark_scan_1000_pe.py - Output:
output/benchmarks/scan_1000_pe_*.json - Report:
docs/benchmark-scan-1000-pe.md
See the docs/ folder:
docs/setup-env.mddocs/user-guide.mddocs/intel-and-dataset.mddocs/troubleshooting.mddocs/packaging.mddocs/benchmark-scan-1000-pe.md
CI and release pipelines are in:
.github/workflows/ci.yml.github/workflows/release.yml
For full packaging details and fresh VM validation checklist, see docs/packaging.md.
This project includes a LICENSE file in the repository root.
