| Author | seifer666 |
| Target | Ultimate Packer eXecutable 1.01 |
| Public Release | 15/08/2000 |
| Author Contact | seifer666@caramail.com |
| Dedication | N/A |
| Difficulty Level (1..7) | 3 (INTERMEDIATE) |
| Tools Required | Soft Ice 3x, ProcDump32, exe to pack, upx 1.01 |
Disclaimer:
Please note, the information herein is copyright to Hellforge. No portion of
this text may be duplicated. Furthermore, damage or problems arising after
reading this text is left to the users disposal. Neither Hellforge, nor its
members can be held responsible for any direct or indirect result of following
this text. The full liability of following this text is on the reader (YOU). The
information is provided for educational purposes, misuse of this information is
strictly prohibited. If you do not agree with this agreement, then please hit
the "back" button on your browser, and go to hell. - Mercution.
I just remembered that i downloaded this version of UPX some times ago, i dunno if a new
one has been released yet. I'm not very experienced in unpacking, but i tried to remove this piece
of crap by myself, without asking anybody. I don't regret my choice... This tut will show you how
to retrieve the String Data Refs and the Exported Functions of a packed file (no import table
here).
I made a copy of a little executable in the UPX directory (the program is Lazarus' String
to Ascii Converter) and packed it. Do the same with the exe you want, it isn't very important.
Then, edit the PE of the two files (the clean and the packed one) with ProcDump. My results are :
######################### Clean exe : Header Infos# ######################### Entry Point : 1000 Size of Image : 4A000 Image Base : 400000 ########################### Clean exe : Sections Infos# ########################### ======================================================================================= Name Virt Size Virt Offset Raw Size Raw Offset Characteristics ======================================================================================= .text 00033000 00001000 00032200 00000600 60000020 ======================================================================================= .data 00009000 00034000 00004200 00032800 C0000040 ======================================================================================= .tls 00001000 0003D000 00000200 00036A00 C0000040 ======================================================================================= .rdata 00001000 0003E000 00000200 00036C00 50000040 ======================================================================================= .idata 00002000 0003F000 00001C00 00036E00 40000040 ======================================================================================= .edata 00001000 00041000 00000200 00038A00 40000040 ======================================================================================= .rsrc 00003000 00042000 00002C00 00038C00 40000040 ======================================================================================= .reloc 0000416C 00043000 00003C00 0003B800 C0000040 ======================================================================================= ########################## Packed exe : Header Infos# ########################## Entry Point : 4C400 Size of Image : 4E000 Image Base : 400000 ############################ Packed exe : Sections Infos# ############################ ======================================================================================= Name Virt Size Virt Offset Raw Size Raw Offset Characteristics ======================================================================================= UPX0 0002E000 00001000 00000000 00000400 E0000080 ======================================================================================= UPX1 0001E000 0002F000 0001D800 00000400 E0000040 ======================================================================================= .rsrc 00001000 0004D000 00000C00 0001DC00 C0000040 =======================================================================================
XXX:XXXXXXXX 60 PUSHAD ;pushes all registers on the stack XXX:XXXXXXXX BE2EFD4200 MOV ESI, XXXXXXXX ;the next instructions are for the file unpacking XXX:XXXXXXXX 8DBED21FFDFF LEA EDI, [ESI+XXXXXXXX] ....... ....... <---- trace with F10 ;-P XXX:XXXXXXXX FF96A8C90400 CALL [ESI+XXXXXXXX] XXX:XXXXXXXX 61 POPAD ;restores all the pushed registers values XXX:XXXXXXXX E9A44AFBFF JMP 00401000 ;jumps to real prog OEP, file is unpacked
a < press enter > jmp eip < press enter > < press escape >
This was my first tutorial on manual unpacking,
I hope you could understand it, and it was useful for you. If you have any problem with the method i showed you, just contact me !