McAfee Confidential—Internal Use Only
Untangling the code
An overview of techniques to reverse engineer malicious software
June 3, 2013
Untangling the code An overview of techniques to reverse engineer - - PowerPoint PPT Presentation
Untangling the code An overview of techniques to reverse engineer malicious software Prashant Gupta Security Architect, McAfee Inc. June 3, 2013 McAfee Confidential Internal Use Only Abstract Reverse engineering and analysis of binary code
McAfee Confidential—Internal Use Only
June 3, 2013
June 3, 2013 2
June 3, 2013 3
Interactions Environment Code
June 3, 2013 4
June 3, 2013 5
357 8,069 56,342 164,000 54M+ 1 10 100 1000 10000 100000 1000000 10000000 100000000 1990 1995 2000 2005 2010
Historically….
June 3, 2013 6
Virtualization Encryption Compression Anti- Emulation Junk-Code Packer Chaining Dynamic Functionality Extension Destroy structures Anti- Disassembly New attack vectors
June 3, 2013 7
June 3, 2013 8
June 3, 2013 9
June 3, 2013 10
June 3, 2013 11
June 3, 2013 12
Binary Code Binary Documents Analysis Not human readable Yes Yes RE tools and environment Multitude of environments Many execution environments including VMs Documents are generally platform agnostic. Heuristic analysis systems can be shared when analysing artefact correlation. Can exploit vulnerabilities Yes, but not always needed. Yes, generally in document editor/reader but sometimes in OS Dynamic analysis techniques can be used Internal formats can be
Yes Yes Detecting encoded payloads. Identifying presence of
Executable Code Yes No Signature searches and payload analysis techniques.
June 3, 2013 13
10 20 30 40 50 60 70 80 90 100 100 38400 76700 115000 153300 191600 229900 268200 306500 344800 383100 421400 459700 498000 536300 574600 612900 651200 689500 727800 766100 804400 842700 881000 919300 957600 995900
explorer.exe
10 20 30 40 50 60 70 80 90 100 100 14500 28900 43300 57700 72100 86500 100900 115300 129700 144100 158500 172900 187300 201700 216100 230500 244900 259300 273700 288100 302500 316900 331300 345700 360100 374500
upx compressed explorer.exe
June 3, 2013 14
10 20 30 40 50 60 70 80 90 100 100 157900 315700 473500 631300 789100 946900 1104700 1262500 1420300 1578100 1735900 1893700 2051500 2209300 2367100 2524900 2682700 2840500 2998300 3156100 3313900 3471700 3629500 3787300 3945100 4102900 4260700 4418500 4576300 4734100
document
10 20 30 40 50 60 70 80 90 100 100 157900 315700 473500 631300 789100 946900 1104700 1262500 1420300 1578100 1735900 1893700 2051500 2209300 2367100 2524900 2682700 2840500 2998300 3156100 3313900 3471700 3629500 3787300 3945100 4102900 4260700 4418500 4576300 4734100
document with hidden executable
June 3, 2013 15
June 3, 2013 16
June 3, 2013 17
June 3, 2013 19
June 3, 2013 20