Undetectable Debugger
Undetectable Debugger
diploma thesis (DEFENDED)

View/ Open
Permanent link
http://hdl.handle.net/20.500.11956/40862Identifiers
Study Information System: 94737
Collections
- Kvalifikační práce [11325]
Author
Advisor
Referee
Marek, Lukáš
Faculty / Institute
Faculty of Mathematics and Physics
Discipline
Software Systems
Department
Department of Distributed and Dependable Systems
Date of defense
3. 9. 2012
Publisher
Univerzita Karlova, Matematicko-fyzikální fakultaLanguage
English
Grade
Good
Keywords (Czech)
virtualization, debugging, malwareKeywords (English)
virtualization, debugging, malwarePoužívanie debuggeru je bežný prostriedok na identifikáciu a analýzu malwaru (ako sú vírusy, červy, spyware, rootkity, apod). Keďže, debugger môže byť detekovaný malwarom prostredníctvom pozorovania správania operačného systému, zmien v kóde (napr. breakpoint inštrukcií) a neštandardného správania procesora, urobiť analýzu malwaru môže byť tažké a pomalé. V tejto práci implementujeme základný debugger založený na QEMU emulátore, ktorý dokáže ukryť svoju prítomnosť pred ladenou aplikáciou. Dosahujeme to pomocou QEMU ako virtuálneho stroja a pridaním rozlišovania kontextov do už existujúceho primitívneho debuggeru. Rozlišovanie kontextov je realizované pomocou vstavaného skriptovacieho jazyka Python. Takýto systém nám umožňuje flexibilne implementovať podporu pre rôzne operačné systémy. V tejto práci sme vyvinuli dva príklady. Prvý príklad je pre operačný systém RTEMS, ktorý slúži ako ľahko pochopiteľná referenčná implementácia. Druhý príklad je vyvinutý pre operačný systém Linux, na ukázanie schopností nášho nedetekovateľného debuggeru v reálnejšom príklade.
Using debuggers is a common mean for identifying and analyzing malware (such as viruses, worms, spyware, rootkits, etc.). However, debuggers can be detected by malware via observing of the behavior of operating system, changes in code (such as breakpoint instructions) and non-standard behavior of the CPU, making the analysis of the malware can be hard and tedious. In this thesis we are implementing a basic debugger based on the QEMU emulator that hides its presence from the debugged application. This is accomplished by using the QEMU as virtual machine and adding context awareness to the already existing primitive debugger. The context awareness is implemented using an embedded Python scripting engine. Such setup gives us a flexible way of implementing support for various operating systems. In this thesis, we have developed two examples. One example is for the RTEMS operating system, which serves as easy to understand reference implementation. Second example is for the Linux operating system, to show the abilities of the undetectable debugger in a more real scenario.