Last active
October 15, 2020 09:43
-
-
Save CallMarl/b77ac9c2b070451343566aedec54bd64 to your computer and use it in GitHub Desktop.
GDB usual command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set assembleur display as intel norme | |
set disassembly-flavor intel | |
# Enable step mode | |
set step-mode on | |
# Follow child | |
set follow-fork-mode child |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run gdb | |
gdb | |
# Run gdb debugging programe | |
gdb ./programe_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get program function list | |
info function | |
i fu | |
# Get program function list maching regex | |
i func funcname | |
# Disassemble function | |
dissemble function_name | |
disass function_name | |
d function_name | |
# Get register detail | |
info register | |
info register $eax | |
i r | |
i r $eax | |
# Display memory in hexa | |
x/x *0x00000000 | |
x/x $ebp | |
# Display memory in string | |
x/s *0x00000000 | |
x/s $esp + 0x5 | |
# Display memory in decimal | |
x/d *0x00000000 | |
x/d $edi + 0x5 | |
# Display memory int decimal | |
x/16b *0x00000000 | |
# move step by step | |
step | |
step 10 | |
s | |
s 10 | |
# setup breakpoint | |
breakpoint *0x00000000 | |
breakpoint function_name | |
b *0x00000000 | |
breakpoint *function_name | |
# continue to next breakpoink | |
continue | |
c | |
# get the process memory info | |
info proc map | |
# find string in address range | |
find 0x00000000, 0x00000000, "/bin/sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment