https://github.com/cydave/gdb-main
Locate main
https://github.com/cydave/gdb-main
Last synced: 12 months ago
JSON representation
Locate main
- Host: GitHub
- URL: https://github.com/cydave/gdb-main
- Owner: cydave
- Created: 2019-12-21T14:46:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-21T14:47:51.000Z (over 6 years ago)
- Last Synced: 2025-01-13T07:27:53.628Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gdb-main
A utility script which should, in theory, locate the main function of a
stripped x86 32-bit or 64-bit elf binary.
```
(gdb) source ./entry.py
Program stopped.
0x00007ffff7fd4100 in _start () from /lib64/ld-linux-x86-64.so.2
Breakpoint 1 at 0x555555555050
Breakpoint 1, 0x0000555555555050 in _start ()
0x0000555555555054 in _start ()
0x0000555555555056 in _start ()
0x0000555555555059 in _start ()
0x000055555555505a in _start ()
0x000055555555505d in _start ()
0x0000555555555061 in _start ()
0x0000555555555062 in _start ()
0x0000555555555063 in _start ()
0x000055555555506a in _start ()
0x0000555555555071 in _start ()
0x0000555555555078 in _start ()
Breakpoint 2 at 0x555555555149
Breakpoint 2, 0x0000555555555149 in main ()
main @ 0x555555555149
(gdb) x/20i $rip
=> 0x555555555149 : push rbp
0x55555555514a : mov rbp,rsp
0x55555555514d : sub rsp,0x20
```