![]() |
|
|
|
#1
|
||||
|
||||
|
The Art of Unpacking
======================= by Mark Vincent Yason Abstract: Unpacking is an art—it is a mental challenge and is one of the most exciting mind games in the reverse engineering field. In some cases, the reverser needs to know the internals of the operating system in order to identify or solve very difficult anti-reversing tricks employed by packers/protectors, patience and cleverness are also major factors in a successful unpack. This challenge involves researchers creating the packers and on the other side, the researchers that are determined to bypass these protections. The main purpose of this paper is to present anti-reversing techniques employed by executable packers/protectors and also discusses techniques and publicly available tools that can be used to bypass or disable this protections. This information will allow researchers, especially, malcode analysts to identify these techniques when utilized by packed malicious code, and then be able decide the next move when these anti-reversing techniques impede successful analysis. As a secondary purpose, the information presented can also be used by researchers that are planning to add some level of protection in their software by slowing down reversers from analyzing their protected code, but of course, nothing will stop a skilled, informed, and determined reverser. Table of Contents........................................................................................................................... 2 1. INTRODUCTION..................................................................................................................... 3 2. TECHNIQUES: DEBUGGER DETECTION..................................................................................... 4 2.1. PEB.BeingDebugged Flag: IsDebuggerPresent() ................................................................ 4 2.2. PEB.NtGlobalFlag, Heap Flags ......................................................................................... 5 2.3. DebugPort: CheckRemoteDebuggerPresent() / NtQueryInformationProcess()........................ 6 2.4. Debugger Interrupts ...................................................................................................... 7 2.5. Timing Checks ..............................................................................................................8 2.6. SeDebugPrivilege .......................................................................................................... 9 2.7. Parent Process ............................................................................................................ 10 2.8. DebugObject: NtQueryObject() ..................................................................................... 11 2.9. Debugger Window ....................................................................................................... 12 2.10. Debugger Process ................................................................................................... 12 2.11. Device Drivers ........................................................................................................ 12 2.12. OllyDbg: Guard Pages.............................................................................................. 13 3. TECHNIQUES: BREAKPOINT AND PATCHING DETECTION.......................................................... 14 3.1. Software Breakpoint Detection...................................................................................... 14 3.2. Hardware Breakpoint Detection..................................................................................... 15 3.3. Patching Detection via Code Checksum Calculation.......................................................... 16 4. TECHNIQUES: ANTI-ANALYSIS.............................................................................................. 17 4.1. Encryption and Compression......................................................................................... 17 4.2. Garbage Code and Code Permutation............................................................................. 18 4.3. Anti-Disassembly ........................................................................................................ 20 5. TECHNIQUES : DEBUGGER ATTACKS ..................................................................................... 22 5.1. Misdirection and Stopping Execution via Exceptions ......................................................... 22 5.2. Blocking Input ............................................................................................................ 23 5.3. ThreadHideFromDebugger ............................................................................................ 24 5.4. Disabling Breakpoints .................................................................................................. 25 5.5. Unhandled Exception Filter ........................................................................................... 26 5.6. OllyDbg: OutputDebugString() Format String Bug ........................................................... 26 6. TECHNIQUES : ADVANCED AND OTHER TECHNIQUES .............................................................. 27 6.1. Process Injection......................................................................................................... 27 6.2. Debugger Blocker........................................................................................................ 28 6.3. TLS Callbacks ............................................................................................................. 29 6.4. Stolen Bytes ...............................................................................................................30 6.5. API Redirection ........................................................................................................... 31 6.6. Multi-Threaded Packers................................................................................................ 32 6.7. Virtual Machines.......................................................................................................... 32 7. TOOLS ............................................................................................................................... 34 7.1. OllyDbg...................................................................................................................... 34 7.2. Ollyscript.................................................................................................................... 34 7.3. Olly Advanced............................................................................................................. 34 7.4. OllyDump...................................................................................................................34 7.5. ImpRec ...................................................................................................................... 34 8. REFERENCES....................................................................................................................... 35 |
|
#2
|
|||
|
|||
|
Please reupload because "The file link that you requested is not valid."
|
|
#3
|
|||
|
|||
|
Quote:
PHP Code:
|
| The Following 3 Users Gave Reputation+1 to Gmax For This Useful Post: | ||
|
#4
|
|||
|
|||
|
Quote:
http://www.blackhat.com/presentations/bh-usa-07/Yason/Whitepaper/bh-usa-07-yason-WP.pdf |
| The Following User Gave Reputation+1 to bolzano_1989 For This Useful Post: | ||
chessgod101 (12-25-2012) | ||
|
#5
|
||||
|
||||
|
I found an interesting book called Algorithmic Cryptanalysis. I spent around 30 minutes trying to find a working download link for this. At first glance, this book seems to give a lot of insight to cryptography reversing.
Information: Hardcover: 519 pages Publisher: Chapman and Hall/CRC (June 15, 2009) Language: English ISBN-10: 1420070029 ISBN-13: 978-1420070026 Download: Code:
http://rghost.net/42373232 Code:
http://www.spaadyshare.net/71vg8xg8ai80/Joux,%20Algorithmic%20Cryptanalysis,%20CRC,%202009.pdf
__________________
"As the island of our knowledge grows, so does the shore of our ignorance." John Wheeler |
|
#6
|
|||
|
|||
|
Inside Windows Debugging: A Practical Guide to Debugging and Tracing Strategies in Windows
English | 2012 | 592 Pages | ISBN: 0735662789 | PDF | 38 MB Code:
http://extabit.com/file/28dc44vnkpssp or http://ryushare.com/6sdj5ue3m6qs/Microsoft.Press.Inside.Windows.Debugging.pdf |
| The Following 4 Users Gave Reputation+1 to nikkapedd For This Useful Post: | ||
|
#7
|
|||
|
|||
|
Professional C Plus Plus 2nd Edition 2011 Wrox pubblisher
| 86.03 MB Code:
http://www2.zippyshare.com/v/82942829/file.html pass: rl-team.net |
| The Following 4 Users Gave Reputation+1 to nikkapedd For This Useful Post: | ||
|
#8
|
|||
|
|||
|
For those interested in a comprehensive book IDA with some examples
Quote:
|
|
#9
|
|||
|
|||
|
Quote:
for it in EPUB/MOBI format look for the post bytypedef above; or, for it in PDF format, google for "theidaprobook" and take the first link! Best regards, bilbo |
| The Following User Gave Reputation+1 to bilbo For This Useful Post: | ||
chessgod101 (01-02-2013) | ||
|
#10
|
|||
|
|||
|
Quote:
PHP Code:
|
| The Following User Gave Reputation+1 to Gmax For This Useful Post: | ||
|
#11
|
||||
|
||||
|
The Art of Assembly Language
|
|
#12
|
|||
|
|||
|
Hackers: Heroes of the Computer Revolution (25th Anniversary Edition)
Publisher: O'Reilly Media 2010 | 528 Pages | ISBN: 1449388396 | PDF | 12 MB Code:
http://extabit.com/file/29g1vn63wy58e/ or http://ryushare.com/jm8b5mhg3lib/h4ck.univer.pdf |
| The Following 2 Users Gave Reputation+1 to nikkapedd For This Useful Post: | ||
alekine322 (01-07-2013), chessgod101 (01-07-2013) | ||
|
#13
|
||||
|
||||
|
Help:_http://rghost.net/
__________________
�����ԧ�ѧާާߧ�� ��ҧ֧��֧�֧ߧڧ� �ӧ�����ܧ� �� Windows Crack ���ҧ��֧ߧڧ� ���ѧ�-Dabei Guanyin ����է�ڧ�ѧ��ӧ� ���ѧ� �ҧ֧� �ާڧ�ѧҧ��
|
|
#14
|
|||
|
|||
|
xtiaoshi
here another link for the ebook Hackers: Heroes of the Computer Revolution (25th Anniversary Edition) Publisher: O'Reilly Media 2010 | 528 Pages | ISBN: 1449388396 | PDF | 12 MB Code:
http://rghost.net/42793834 |
| The Following 3 Users Gave Reputation+1 to nikkapedd For This Useful Post: | ||
|
#15
|
||||
|
||||
|
nikkapedd
Thanks you.
__________________
�����ԧ�ѧާާߧ�� ��ҧ֧��֧�֧ߧڧ� �ӧ�����ܧ� �� Windows Crack ���ҧ��֧ߧڧ� ���ѧ�-Dabei Guanyin ����է�ڧ�ѧ��ӧ� ���ѧ� �ҧ֧� �ާڧ�ѧҧ��
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ebooks | conan981 | General Discussion | 0 | 07-07-2006 22:36 |
| some ebooks | fulone | General Discussion | 1 | 05-20-2004 21:22 |