02.IDENTIFYING MAIN() IN STRIPPED BINARIES
This method is used on programs that doesn't have DEBUG SYMBOLS. When analyzing stripped binaries, it is crucial to identify main() as that's where the program's logic typically starts. Finding main() improves decompiler readability, aids control flow analysis, and helps trace program behavior. It also aligns static analysis with runtime activity.
01.REBASE: IDENTIFY BASE ADDRESS
STEP 1: WINDBG
PS C:\sre> WinDBG
...
WinDBG > File > Open Executable > anti-debug.exe
//step 1: list the modules and identify the "base address" of the anti-debug program
WinDBG > Command
0:000> lm
Start End module_name
00c00000 00c6b000 anti_debug (deferred)
76a70000 76b60000 KERNEL32 (deferred)
770f0000 7730c000 KERNELBASE (deferred)
77320000 774c4000 ntdll (pdb symbols) c:\ProgramData\dbg\sym\wntdll.
* ghidra will be set to the same "base address" found by WinDBG
- Base Address: 00c00000STEP 2: GHIDRA
Ghidra must be set to the same "base address" found by WinDBG. When the interesting code parts are found and identified, no address translation will be required, as the addresses in WinDBG and Ghidra will match.
02.RUN THE PROGRAM AND IDENTIFY PATTERNS
this may not always be accurate
03.HUNT MAIN
when you find the function that has similar patterns when the program is run, this could be your clue
Last updated