niklasb / libc-database

Build a database of libc offsets to simplify exploitation
https://libc.rip/
MIT License
1.68k stars 193 forks source link

Fix __libc_start_main_ret lookup with smarter compilers #58

Closed peace-maker closed 2 years ago

peace-maker commented 2 years ago

We want to look for instructions at the start of the function, but some chunks might appear before the start of the function or objdump outputs the wrong symbol for unrelated addresses.

Match the __libc_start_main.* label by looking for the colon : behind it.