General Questions
What is Dr.Semu?
What is Dr.Semu?
- Virtual filesystem using Windows Projected File System (ProjFS)
- Virtual registry through registry redirection
- Dynamic instrumentation via DynamoRIO
- Behavior-based detection using Python or Lua rules
Is Dr.Semu production-ready?
Is Dr.Semu production-ready?
- Research and learning
- Experimentation
- Academic projects
- Production malware analysis
- Critical security infrastructure
- Enterprise deployments
What makes Dr.Semu different from other sandboxes?
What makes Dr.Semu different from other sandboxes?
- User-mode isolation: Everything happens from user-mode without kernel drivers
- ProjFS virtualization: Uses Windows Projected File System for filesystem isolation
- DynamoRIO instrumentation: Intercepts system calls without hooking
- Community rules: Detection rules written in Python or Lua
- Open source: Full source code available for customization
What Windows versions does Dr.Semu support?
What Windows versions does Dr.Semu support?
- Minimum: Version 1809 introduced ProjFS support
- Maximum: DynamoRIO supports Windows 10 up to version 1809
Installation and Setup
How do I install Dr.Semu?
How do I install Dr.Semu?
-
Enable ProjFS (run as administrator):
- Download Dr.Semu from the releases page
-
Download DynamoRIO:
- Get it from DynamoRIO releases
- Extract into the DrSemu folder
- Rename to
dynamorio
- Install Python 3 x64 from python.org
- Download detection rules from DrSemu-Detections
- Restart your system to complete ProjFS setup
Do I need administrator privileges?
Do I need administrator privileges?
- Enabling ProjFS
- Creating virtual registry hives
- Starting virtualization instances
- Registry save/load operations
- Process monitoring and instrumentation
Can I build Dr.Semu from source?
Can I build Dr.Semu from source?
- Enable ProjFS (as above)
- Install Python 3 x64
- Download and extract DynamoRIO into the
binfolder, rename todynamorio - Build the pe-parser-library:
- Generate VS project from
DrSemu\shared_libs\pe_parseusing cmake-gui - Build 32-bit under
buildand 64-bit underbuild64 - Change runtime library to Multi-threaded (
/MT)
- Generate VS project from
- Set
LauncherCLIas StartUp Project in Visual Studio - Build the solution
What dependencies does Dr.Semu have?
What dependencies does Dr.Semu have?
- Windows 10 version 1809
- Windows Projected File System (ProjFS)
- DynamoRIO (runtime)
- Python 3 x64 (for detection rules)
- Lua runtime (for Lua-based detection rules)
- Visual Studio (for building from source)
- CMake (for building dependencies)
- pe-parse library
Usage
How do I analyze a file?
How do I analyze a file?
What file types can Dr.Semu analyze?
What file types can Dr.Semu analyze?
.exefiles (both 32-bit and 64-bit)
- DLL files (cannot be executed directly)
- Scripts (PowerShell, VBScript, etc.)
- Documents with macros
- Non-PE formats
- ARM executables
How long does analysis take?
How long does analysis take?
- Time limit setting (
--time_limitparameter) - Sample behavior (may exit earlier)
- System performance
- Instrumentation overhead (2-10x slower than native)
--time_limit:0 to disable timeout (not recommended).Where are the analysis results?
Where are the analysis results?
starter.json- Initial process information (PID, hash, etc.)<pid>.json- Behavior report for each process
Can I analyze multiple files at once?
Can I analyze multiple files at once?
- Find all
.exefiles in the directory - Create a separate VM instance for each file
- Analyze them concurrently in parallel threads
- Display results for each sample
- Virtual filesystem
- Virtual registry
- Isolated environment
- VM index (dr_semu_1, dr_semu_2, etc.)
Detection Rules
How do detection rules work?
How do detection rules work?
- Dr.Semu monitors the sample and generates JSON reports
run_detections.exeloads rules from thedr_rulesdirectory- Each rule receives:
- Dynamic behavior data (from JSON reports)
- Static information (PE headers, hash, etc.)
- Rules return detection results (malicious/benign)
- Dr.Semu displays the final verdict
- Python - Full access to Python libraries
- Lua - Lightweight scripting
Where do I get detection rules?
Where do I get detection rules?
- Python example: Python rule gist
- Lua example: Lua rule gist
dr_rules directory.How do I write a custom detection rule?
How do I write a custom detection rule?
Can I disable detection rules?
Can I disable detection rules?
- Remove rules from the
dr_rulesdirectory to disable them - Keep the directory empty to skip detection
- Dr.Semu will still generate behavior reports
Troubleshooting
Why does Dr.Semu fail to start?
Why does Dr.Semu fail to start?
-
ProjFS not enabled:
-
Not running as administrator:
- Right-click command prompt
- Select “Run as administrator”
-
Missing DynamoRIO:
- Download from DynamoRIO releases
- Extract to
dynamoriofolder
-
Wrong Windows version:
- Check:
winver - Must be Windows 10 version 1809
- Check:
What does 'Failed to start virtualization instance' mean?
What does 'Failed to start virtualization instance' mean?
-
Verify ProjFS is enabled:
Should show
State: Enabled - Restart after enabling ProjFS
- Run as administrator
- Check temp directory permissions
- Ensure no other ProjFS instances are using the same path
virtual_FS_REG.cpp:168Why are processes terminating immediately?
Why are processes terminating immediately?
-
Sample is crashing:
- Check if the sample runs normally without Dr.Semu
- Sample may detect the analysis environment
-
Missing dependencies:
- The executable may require DLLs not present in the virtual environment
- Try placing dependencies in the same directory
-
Anti-analysis techniques:
- Sample may detect DynamoRIO
- Sample may check for timing anomalies
- Sample may detect virtual environment
-
Architecture mismatch:
- Verify both 32-bit and 64-bit DynamoRIO are present
Can I analyze samples on Windows 11?
Can I analyze samples on Windows 11?
- DynamoRIO may not support Windows 11 system calls
- Instrumentation may fail or produce incorrect results
- Behavior monitoring may be incomplete
- System instability is possible
How do I view detailed logs?
How do I view detailed logs?
- Console output (if Dr.Semu is run from command line)
- Process tracking information
- Virtualization status
- Errors and warnings
- DynamoRIO debug output
- Detailed system call tracing
- Virtual filesystem operations
Advanced Topics
How does the isolation mechanism work?
How does the isolation mechanism work?
- Creates a virtual filesystem layer
- Redirects file operations to virtual paths
- Provides on-demand file population from the real filesystem
- All changes stay in the virtual environment
- Saves registry hives to files
- Loads them under virtual keys (HKLM\dr_semu_*)
- Redirects registry operations to virtual hives
- Unloads and deletes after analysis
- Tracks all spawned processes
- Instruments child processes with DynamoRIO
- Monitors process creation/termination
- Uses fake explorer.exe as parent
README.md:13-17What system calls does Dr.Semu monitor?
What system calls does Dr.Semu monitor?
DrSemu.cpp:414-741 for complete listCan malware detect Dr.Semu?
Can malware detect Dr.Semu?
- drrun.exe process
- Injected DLLs
- Memory patterns
- Execution timing
- Registry keys with dr_semu_ prefix
- Virtual filesystem paths
- Fake explorer.exe process
- Slow execution (2-10x overhead)
- Timing inconsistencies
- Missing hardware features
How can I extend Dr.Semu?
How can I extend Dr.Semu?
- Add syscall name to the appropriate handler file
- Implement pre/post handler functions
- Register in the event_pre_syscall function
- Use drwrap to hook functions
- Add pre/post callbacks
- Register in module_load_event
- Write Python or Lua scripts
- Place in dr_rules directory
- Access JSON behavior data
- Modify run_detections.cpp
- Add interpreter initialization
- Implement rule loading
- Enhance filesystem provider
- Add registry redirection rules
- Implement object namespace isolation
What are the performance characteristics?
What are the performance characteristics?
- Depends on instrumentation density
- I/O heavy operations are slower
- CPU-intensive operations have less overhead
- DynamoRIO overhead: ~10-50 MB per process
- Virtual filesystem: depends on accessed files
- Virtual registry: ~100-500 MB (full registry clone)
- Temporary virtual filesystem: varies by sample behavior
- Registry hives: ~100-500 MB per VM instance
- JSON reports: ~1-10 MB per process
- Multiple samples analyzed in parallel threads
- Each gets separate VM instance
- Limited by system resources
Contributing
Can I contribute to Dr.Semu?
Can I contribute to Dr.Semu?
- Bug fixes
- Feature enhancements
- Detection rules
- Documentation improvements
- Testing and issue reports
How do I report bugs?
How do I report bugs?
- Windows version (should be 1809)
- Dr.Semu version
- Steps to reproduce
- Error messages
- Sample hash (if applicable)
- Log output
Where can I get help?
Where can I get help?
- README.md in the repository
- Source code comments
- Example detection rules
- This documentation