Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 630 Bytes

buffer_overflow_bof.md

File metadata and controls

43 lines (31 loc) · 630 Bytes

Buffer overflow (BOF)

##Methodology

  1. Investigate the file
file
strings
  1. Test it out - what does the program do?

  2. Look at its functions in GDB

info functions
  1. Look at the assembly of a function
disass main
disass otherfunction
  1. Look for the flow of the program. Look for cmp

  2. Set up breakpoints with hooks

define hook-stop
info registers  ;show the registers
x/24xw $esp  ;show the stack
x/2i $eip  ;show the new two instructions
end
  1. Step through the whole program. Or at the breakpoints
si ;steps one forward, but follows functions
ni ;does not follow functions