sogen - उच्च-प्रदर्शन Windows & Linux userspace emulator
(github.com/momo5502)- system call (syscall) स्तर पर काम करने वाला उच्च-प्रदर्शन Windows/Linux userspace emulator, जो व्यापक hooking के ज़रिए process execution के पूरे प्रवाह को नियंत्रित करता है
- security research, malware analysis, DRM research जैसे उन कार्यों के लिए उपयुक्त, जहाँ process execution पर सूक्ष्म नियंत्रण की आवश्यकता होती है
- Windows API को फिर से implement किए बिना syscall स्तर पर काम करता है, इसलिए मौजूदा system DLLs का वैसे ही उपयोग संभव है
- C++ में लिखा गया है और इच्छित backend पर चलाया जा सकता है: Unicorn Engine, icicle-emu, Hyper-V(WHP)
- उन्नत memory management: Unicorn के memory management के ऊपर निर्मित, reserved·committed जैसे Windows-विशिष्ट memory types का समर्थन
- पूर्ण PE loading समर्थन: executable और DLL loading का प्रबंधन, उचित memory mapping, relocations, TLS समर्थन
- exception handling: Windows structured exception handling (SEH) का implementation, exception dispatcher और unwinding का समर्थन
- threading समर्थन: round-robin scheduling threading model प्रदान करता है
- state management: पूर्ण state serialization और तेज in-memory snapshots, दोनों का समर्थन
- debugging interface: GDB serial protocol implementation के कारण IDA Pro, GDB, LLDB, VS Code आदि के साथ integration संभव
- malware analysis के दौरान host isolation पूरी तरह सुनिश्चित न हो सके, इसलिए browser sandbox-आधारित web version का उपयोग करने की सिफारिश
- Python से automation संभव
pip install sogenसे install- emulator चलाना, callback register करना, WinAPI call intercept को Python के भीतर सीधे संभालना संभव
प्रस्तुति स्लाइड्स देखें: Fake It ‘til We Make It: The Art of Windows User Space Emulation
- Windows User Space Emulation क्या है?
- process को emulator के अंदर चलाना, और उसके नीचे के OS और kernel का simulation करना
- जहाँ सामान्य emulation में code को virtual CPU पर चलाया जाता है और hardware का simulation होता है, वहीं userspace emulation उसके ऊपर OS·kernel layer तक की नकल करता है
- इसका मुख्य मूल्य है चल रहे code पर पूर्ण नियंत्रण — emulator execution के हर चरण में हस्तक्षेप कर सकता है
- नियंत्रण hooking points के माध्यम से होता है
- memory access hooking — read, write, execute स्तर पर intercept
- instruction execution hooking — syscall, cpuid, rdtsc जैसे विशेष instructions के execution समय को पकड़ना
- new code path execution hooking — पहली बार चलने वाले code paths का पता लगाना
- इस hooking क्षमता की वजह से external communication intercept करना, execution flow trace करना, code coverage मापना आदि संभव होता है, जो DRM analysis, malware analysis, vulnerability analysis, security research की बुनियाद बनता है
- वक्ता एक DRM developer हैं, जिन्हें Steam CEG, Arxan, Denuvo आदि कई DRM को reverse engineer और bypass करने का अनुभव है
- Windows गेम्स में व्यापक रूप से उपयोग होने वाले Denuvo DRM के analysis में emulation एक प्रमुख साधन रहा है
- क्योंकि आधुनिक DRM में obfuscation, anti-tampering, anti-debugging होने से static और dynamic analysis अक्सर संभव नहीं होता
- emulator का vulnerability analysis (fuzzing) में उपयोग: emulator के भीतर input को randomize करना, hooking से code coverage feedback लेना, और execution को predictable तथा repeatable बनाना
- मौजूदा solutions की सीमाएँ ही विकास की प्रेरणा बनीं
- Qiling·Speakeasy·Dumpulator Python में होने के कारण, बहुत अधिक hooking वाले DRM analysis में बेहद धीमे हैं
- Binee·Unicorn PE API-स्तर reimplementation होने के कारण अपूर्ण हैं और bugs पैदा कर सकते हैं
- syscall का पैमाना: ntdll.dll के सामान्य syscall 409, win32u.dll के UI syscall 1474
- तेज emulation speed का कारण JIT है
अभी कोई टिप्पणी नहीं है.