
Multi-engine framework for unpacking and analyzing VM-protected binaries using dynamic taint tracking, symbolic execution, pattern classification, and ML-driven prioritization to automate reverse engineering of commercial and custom protectors.
Project will be public by mid-October Refactoring In Progress
Advanced Virtual Machine Detection and Analysis Framework
VMDragonSlayer is a comprehensive framework for analyzing binaries protected by Virtual Machine (VM) based protectors such as VMProtect 2.x/3.x, Themida, and custom malware VMs. The framework combines multiple analysis engines including Dynamic Taint Tracking (DTT), Symbolic Execution (SE), Pattern Classification, and Machine Learning to automate the reverse engineering process.
Goal: Transform complex protected binary analysis from weeks/months of manual work into structured, automated analysis with explainable results.
| Domain | Engine / Module | Highlights |
|---|---|---|
| VM Discovery | analysis.vm_discovery | Dispatcher & handler table identification, nested VM heuristics |
| Pattern Analysis | analysis.pattern_analysis | Rule-based + similarity + ML (hybrid auto-selection) |
| Taint Tracking | analysis.taint_tracking | Intel Pin–driven byte-level taint, handler discovery, flow confidence |
| Symbolic Execution | analysis.symbolic_execution.executor | PathPrioritizer ML-weighted exploration, constraint & state tracking |
| Hybrid Orchestration | (Python core) | Sequential / parallel / adaptive workflows (Ghidra report indicates implemented) |
| Synthetic Data | data/training/synthetic_sample_generator.py | Obfuscation mutation, multi-architecture sample generation |
| Pattern DB | data/patterns/ | JSON + enhanced DB + SQLite-backed runtime patterns |
| Ghidra Plugin | plugins/ghidra/ | In-progress UI integration (several templates missing) |
| Schemas / Validation | data/schemas/ | JSON schema–validated analysis output & pattern formats |
VMDragonSlayer uses a modular architecture where multiple analysis engines work together:
graph TD
A[VM Discovery Engine] --> B[Pattern/ML Classifier]
B --> C[Symbolic Execution Engine]
B --> D[Dynamic Taint Tracker]
D --> C
subgraph DataSources ["Data Sources"]
E[Pattern Database]
F[ML Models - PoC]
end
subgraph Coordination
G[Orchestrator - Workflow Management & Coordination]
end
E --> B
F --> B
A --> G
B --> G
C --> G
D --> G
E --> G
F --> G
G --> H[REST API Server]
G --> I[Plugins - RE Tools]
dragonslayer.analysis.vm_discovery)dragonslayer.analysis.taint_tracking)dragonslayer.analysis.pattern_analysis)dragonslayer.analysis.symbolic_execution)dragonslayer.ml)VMDragonSlayer/
├── dragonslayer/ # Main Python package
│ ├── analysis/ # Analysis engines
│ │ ├── vm_discovery/ # VM detection and classification
│ │ ├── pattern_analysis/ # Pattern matching and ML classification
│ │ ├── symbolic_execution/ # Symbolic execution engine
│ │ ├── taint_tracking/ # Dynamic taint analysis
│ │ └── anti_evasion/ # Anti-analysis countermeasures
│ ├── api/ # REST API server and client
│ ├── core/ # Core framework components
│ ├── ml/ # Machine learning pipeline
│ ├── analytics/ # Analysis reporting and metrics
│ ├── gpu/ # GPU acceleration support
│ ├── utils/ # Utility functions
├── data/ # Configuration and data files
│ ├── patterns/ # Pattern database
│ ├── models/ # ML models and metadata
│ │ ├── pretrained/ # Pre-trained models (PoC)
│ │ └── metadata/ # Model metadata and schemas
│ ├── samples/ # Sample files and registries
│ ├── schemas/ # JSON schemas for validation
│ └── training/ # Training configurations
├── plugins/ # Reverse engineering tool plugins
│ ├── ghidra/ # Ghidra plugin (Java/Gradle)
│ ├── idapro/ # IDA Pro plugin (Python)
│ └── binaryninja/ # Binary Ninja plugin (Python)
├── tests/ # Tests suite
├── documentation/ # Documentation
└── LICENSE # GPL v3 License
VMDragonSlayer integrates with major reverse engineering tools:
Note: The included ML models are basic proof-of-concept implementations designed for research and educational purposes.
# This now works perfectly:
from dragonslayer.core.orchestrator import Orchestrator, AnalysisType
orchestrator = Orchestrator()
result = orchestrator.analyze_binary("your_binary.exe", analysis_type=AnalysisType.VM_DISCOVERY)
# Results are properly structured:
vmd = result.get("vm_discovery", {})
print(f"VM detected: {vmd.get('vm_detected', False)}")
print(f"Handlers found: {len(vmd.get('handlers_found', []))}")
# 1. Install with all dependencies
pip install -r requirements.txt
pip install -e .
# Clone repository
git clone https://github.com/poppopjmp/VMDragonSlayer.git
cd VMDragonSlayer
# UPDATED INSTALLATION
# Install all required dependencies including z3-solver
pip install -r requirements.txt
# Install framework in development mode
pip install -e .
# CPU-only installation (basic functionality)
pip install -r requirements.txt
pip install -e .
# NVIDIA GPU with CUDA 12.x (RTX 30xx/40xx series)
pip install -r requirements.txt
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install -e .
# NVIDIA GPU with CUDA 11.8 (older GPUs)
pip install -r requirements.txt
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install -e .
python -m venv venv source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
pip install -r requirements.txt
cd dragonslayer pip install -e .
Choose your preferred disassembler:
cd plugins/ghidra
./build.bat # Windows
# or
./build.sh # Linux/macOS
# Install to Ghidra
cp dist/VMDragonSlayer.zip $GHIDRA_INSTALL_DIR/Extensions/
from dragonslayer.core.orchestrator import Orchestrator, AnalysisType
# Initialize orchestrator (loads default configuration automatically)
orchestrator = Orchestrator()
# Analyze a binary
result = orchestrator.analyze_binary("path/to/protected_binary.exe", analysis_type=AnalysisType.VM_DISCOVERY)
# Extract VM discovery results
vmd = result.get("vm_discovery", {})
print(f"VM Protection Detected: {vmd.get('vm_detected', False)}")
print(f"Handler Count: {len(vmd.get('handlers_found', []))}")
print(f"Analysis Success: {result.get('success', False)}")
VMDragonSlayer uses a modular architecture with multiple analysis engines:
The framework includes several proof-of-concept models:
# Core configuration
export VMDS_CONFIG_PATH="/path/to/config"
export VMDS_MODEL_PATH="/path/to/models"
export VMDS_LOG_LEVEL="INFO"
# Database configuration
export VMDS_DB_URL="sqlite:///vmds.db"
# API configuration
export VMDS_API_HOST="localhost"
export VMDS_API_PORT="8000"
data/database_config.json: Database settingsdata/taint_config.properties: Taint analysis parametersdata/models/model_registry_config.toml: ML model configurationfrom dragonslayer.core.config import Config
from dragonslayer.analysis.vm_discovery import VMDiscoveryEngine
from dragonslayer.analysis.taint_tracking import TaintTracker
# Custom configuration
config = Config({
'vm_discovery': {
'min_handler_count': 10,
'dispatcher_threshold': 0.8
},
'taint_tracking': {
'precision': 'byte_level',
'max_depth': 1000
}
})
# Initialize specific engines
vm_engine = VMDiscoveryEngine(config)
taint_tracker = TaintTracker(config)
# Run targeted analysis
vm_result = vm_engine.analyze("binary.exe")
if vm_result.vm_detected:
taint_result = taint_tracker.analyze(vm_result.handlers)
from dragonslayer.workflows.manager import WorkflowManager
# Process multiple binaries
manager = WorkflowManager()
results = manager.process_batch([
"sample1.exe",
"sample2.exe",
"sample3.exe"
])
# Generate summary report
manager.generate_report(results, "analysis_report.json")
We welcome contributions! Please see:
This project is licensed under the GNU General Public License v3.0. See LICENSE for details.
If you use VMDragonSlayer in your research, please cite:
@software{vmdragonslayer_2025,
title = {VMDragonSlayer: Automated VM-based Binary Protection Analysis},
author = {Panico, Agostino},
year = {2025},
url = {https://github.com/poppopjmp/VMDragonSlayer}
}
Special thanks to the reverse engineering community and the developers of the underlying analysis tools and libraries that make this framework possible.
| Tool | Status | ETA | Notes |
|---|
| Direct API | Stable | Available Now | Recommended approach |
| Ghidra Plugin | In Progress | October 2025 | Basic functionality available |
| IDA Pro Plugin | Under Development | November 2025 | Work in progress - not functional |
| Binary Ninja Plugin | Under Development | November 2025 | Work in progress - not functional |