-
Notifications
You must be signed in to change notification settings - Fork 762
Changelog and Migration
Comprehensive changelog and migration instructions for Qiling Framework versions.
Release Date: 2024-03-15 Status: Current Stable Release
🚀 New Features:
- Enhanced Windows 11 support with updated API implementations
- New RISC-V 64-bit architecture support for firmware analysis
- Advanced memory forensics toolkit with heap analysis
- Improved IoT firmware emulation for ARM Cortex-M series
- Enterprise logging system with structured output formats
🔧 Improvements:
- Performance optimization: 40% faster emulation on x86_64
- Reduced memory footprint by 25% for large binaries
- Enhanced debugger integration with GDB protocol support
- Improved cross-platform compatibility (Windows/Linux/macOS)
- Better error messages with context and suggestions
🐛 Bug Fixes:
- Fixed memory corruption in multi-threaded Windows emulation
- Resolved ARM thumb mode instruction handling edge cases
- Fixed Unicode handling in Windows API implementations
- Corrected MIPS syscall table inconsistencies
- Fixed memory leaks in long-running analysis sessions
🔒 Security:
- Hardened rootfs isolation mechanisms
- Fixed potential information disclosure in error messages
- Enhanced sandboxing for untrusted binary analysis
- Improved input validation for API parameters
⚡ Performance:
- Optimized instruction cache for frequently executed code
- Improved memory mapping efficiency for large address spaces
- Enhanced hook mechanism with lower overhead
- Better thread synchronization for parallel analysis
Release Date: 2024-01-20
🚀 New Features:
- QNX Neutrino OS support for automotive firmware analysis
- Enhanced macOS Monterey and Ventura compatibility
- New fuzzing integration with AFL++ and Honggfuzz
- Advanced anti-analysis detection and bypass techniques
🔧 Improvements:
- Restructured project architecture for better modularity
- Enhanced documentation with interactive examples
- Improved CLI tools with better user experience
- Better integration with popular reverse engineering tools
🐛 Bug Fixes:
- Fixed UEFI emulation compatibility issues
- Resolved Python 3.11 compatibility problems
- Fixed shellcode analysis edge cases
- Corrected ARM64 exception handling
Release Date: 2023-11-10
🚀 New Features:
- Enhanced Android emulation with API level 33 support
- New snapshot and restore functionality for complex analysis
- Advanced code coverage tracking with HTML reports
- Improved Windows driver emulation capabilities
🔧 Improvements:
- Better integration with Ghidra and IDA Pro
- Enhanced logging system with configurable verbosity
- Improved memory management for large-scale analysis
- Better error recovery mechanisms
Release Date: 2023-08-15 Status: Legacy Support (Security fixes only)
🔧 Final Improvements:
- Last major update to Windows 10 API implementations
- Final ARM Cortex-A series optimizations
- Legacy MIPS architecture final compatibility updates
🔒 Security:
- Final security patches for 1.3.x series
- Hardened legacy API implementations
This is a major version migration with significant architectural improvements and some breaking changes.
1. API Restructuring:
# 1.3.x (Old)
from qiling.os.windows.api import *
from qiling.os.linux.syscall import *
# 1.4.x (New)
from qiling.os.windows import api
from qiling.os.linux import syscall2. Hook System Changes:
# 1.3.x (Old)
def my_hook(ql, address, size):
pass
ql.hook_code(my_hook, begin=0x1000, end=0x2000)
# 1.4.x (New)
def my_hook(ql):
pass
# Use new address-specific hooks
ql.hook_address(my_hook, 0x1000)
# Or use range hooks with new syntax
ql.hook_code(my_hook, address_range=(0x1000, 0x2000))3. Memory Management Updates:
# 1.3.x (Old)
ql.mem.map(0x1000, 0x1000, info="custom")
# 1.4.x (New)
ql.mem.map(0x1000, 0x1000, perms=UC_PROT_READ | UC_PROT_WRITE, info="custom")4. Logging System Changes:
# 1.3.x (Old)
from qiling.const import QL_VERBOSE
ql = Qiling([binary], rootfs, verbose=QL_VERBOSE.DEBUG)
# 1.4.x (New)
import logging
logging.basicConfig(level=logging.DEBUG)
ql = Qiling([binary], rootfs, verbose=True)Step 1: Update Installation
# Uninstall old version
pip uninstall qiling
# Install new version
pip install qiling>=1.4.0
# Verify installation
python -c "import qiling; print(qiling.__version__)"Step 2: Update Import Statements
# Update all import statements to new structure
# Use automated migration script if available
python migrate_imports.py your_script.pyStep 3: Update Hook Functions
# Old hook signatures
def old_hook(ql, address, size):
print(f"Hook at 0x{address:x}")
# New hook signatures
def new_hook(ql):
print(f"Hook at 0x{ql.arch.regs.rip:x}") # Use register accessStep 4: Update Memory Operations
# Review all memory mapping operations
# Add explicit permission flags where needed
ql.mem.map(address, size, perms=UC_PROT_READ | UC_PROT_WRITE)Step 5: Update Configuration
# 1.3.x Configuration
config = {
'verbose': True,
'debug': True,
'timeout': 1000
}
# 1.4.x Configuration
config = QilingConfig(
verbose=True,
enable_debugger=True,
timeout=1000,
log_level=logging.DEBUG
)For gradual migration, 1.4.x includes a compatibility layer:
# Enable compatibility mode for 1.3.x code
from qiling.compat import enable_v13_compatibility
enable_v13_compatibility()
# Your 1.3.x code will work with warnings
# Migrate gradually to new APIsAutomated Testing:
# Run migration validation script
python tools/validate_migration.py your_project/
# Run comprehensive tests
pytest tests/ --migration-testManual Verification:
# Test basic functionality
def test_migration():
ql = Qiling(['tests/samples/hello'], 'tests/rootfs/')
# Test hook system
def test_hook(ql):
print("Hook working")
ql.hook_address(test_hook, 0x1000)
ql.run()
print("Migration successful!")
test_migration()Key Changes:
- Introduction of unified architecture handling
- Improved Windows API emulation
- Enhanced cross-platform support
Migration Steps:
- Update Python version requirement (3.7+ → 3.8+)
- Update hook callback signatures
- Migrate custom OS implementations
- Update test suites
Memory Usage Optimization:
# 1.4.x introduces memory-efficient modes
ql = Qiling([binary], rootfs,
memory_mode=QL_MEMORY_MODE.EFFICIENT,
cache_instructions=True)Hook Performance:
# Use targeted hooks instead of global hooks
# Old: Global code hook
ql.hook_code(global_hook)
# New: Specific address hooks
ql.hook_address(specific_hook, target_address)Analysis Performance:
# Use streaming analysis for large binaries
from qiling.analysis import StreamingAnalyzer
analyzer = StreamingAnalyzer(ql)
for chunk in analyzer.analyze_stream():
process_chunk(chunk)| Qiling Version | Python Version | Unicorn Version | Capstone Version | Keystone Version |
|---|---|---|---|---|
| 1.4.6 | 3.8-3.12 | 2.0.1+ | 5.0.1+ | 0.9.2+ |
| 1.4.5 | 3.8-3.11 | 2.0.0+ | 5.0.0+ | 0.9.2+ |
| 1.4.4 | 3.8-3.11 | 2.0.0+ | 4.0.2+ | 0.9.2+ |
| 1.3.7 | 3.7-3.10 | 1.0.3+ | 4.0.2+ | 0.9.1+ |
| 1.3.6 | 3.7-3.10 | 1.0.3+ | 4.0.2+ | 0.9.1+ |
APIs Scheduled for Removal in 1.5.x:
# Deprecated: Legacy hook system
ql.hook_code_callback() # Use ql.hook_code() instead
# Deprecated: Old memory API
ql.mem.map_region() # Use ql.mem.map() instead
# Deprecated: Legacy constants
QL_VERBOSE # Use logging module insteadMigration Timeline:
- 1.4.6: Deprecation warnings introduced
- 1.5.0: Legacy APIs removed
- 1.5.2: Full backward compatibility removed
Removed APIs:
# These APIs were removed in 1.4.x
ql.patch() # Use ql.mem.write() instead
ql.set_timeout() # Use timeout parameter in run() instead
ql.enable_lib_patch() # Automatic library patching enabled by defaultWindows API Changes:
# 1.3.x
from qiling.os.windows.dlls import *
# 1.4.x
from qiling.os.windows.dlls.kernel32 import kernel32_api
from qiling.os.windows.dlls.ntdll import ntdll_apiRegistry Emulation:
# Enhanced registry emulation in 1.4.x
ql.os.registry.create_key("HKLM\\Software\\MyApp")
ql.os.registry.set_value("HKLM\\Software\\MyApp", "Version", "1.0")Syscall Handling:
# Improved syscall table in 1.4.x
ql.os.set_syscall("read", custom_read_handler)
ql.os.set_syscall("write", custom_write_handler)New macOS Support:
# Enhanced macOS emulation in 1.4.x
ql = Qiling([binary], "rootfs/macos_x8664/")
ql.os.macho.load_dylib("Foundation.framework")Issue 1: Import Errors
# Error: ImportError: cannot import name 'QL_VERBOSE'
# Solution: Update to new logging system
import logging
logging.basicConfig(level=logging.DEBUG)Issue 2: Hook Callback Errors
# Error: TypeError: hook() takes 2 positional arguments but 3 were given
# Solution: Update hook signature
def old_hook(ql, address, size): # Old signature
pass
def new_hook(ql): # New signature
address = ql.arch.regs.rip # Get address from registersIssue 3: Memory Mapping Errors
# Error: QilingMemoryError: Invalid memory mapping
# Solution: Add explicit permissions
from unicorn import UC_PROT_READ, UC_PROT_WRITE
ql.mem.map(address, size, perms=UC_PROT_READ | UC_PROT_WRITE)Issue 4: Performance Degradation
# Solution: Enable performance optimizations
ql = Qiling([binary], rootfs,
optimize=True,
cache_instructions=True)Automated Migration Script:
# Download migration tool
wget https://github.com/qilingframework/qiling/tools/migrate.py
# Run migration on your codebase
python migrate.py --from=1.3 --to=1.4 your_project/Compatibility Checker:
# Check compatibility before migration
python tools/check_compatibility.py your_script.pyPlanned Features:
- Native Apple Silicon (M1/M2) optimization
- Enhanced WebAssembly (WASM) emulation support
- Cloud-native analysis platform integration
- Advanced machine learning-based analysis
- Real-time collaborative analysis features
Breaking Changes Planned:
- Complete removal of deprecated 1.3.x APIs
- New unified configuration system
- Restructured plugin architecture
Major Architectural Changes:
- Microservice-based architecture
- Native distributed analysis support
- Enhanced security sandbox
- Next-generation hook system
- Advanced visualization platform
- GitHub Discussions: Migration questions and community help
- Telegram Chat: Real-time migration assistance
- Migration Guide: Detailed step-by-step instructions
- Professional Support: Enterprise migration assistance available
Pre-Migration:
- Backup existing codebase
- Review compatibility matrix
- Test in development environment
- Read deprecation notices
During Migration:
- Update dependencies
- Migrate import statements
- Update hook functions
- Test core functionality
- Update configuration
Post-Migration:
- Run comprehensive tests
- Verify performance metrics
- Update documentation
- Train team on new features
Need Help? Join our community channels or contact the development team for personalized migration assistance. We're committed to making your migration as smooth as possible!
- Home
- Getting Started
- Core Concepts
- Usage
- Features
- Tutorials
- Development
- Resources