Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Scanner class that finds ROP Gadgets #8

Open
postmodern opened this issue Feb 22, 2025 · 0 comments
Open

Add a Scanner class that finds ROP Gadgets #8

postmodern opened this issue Feb 22, 2025 · 0 comments
Labels
feature New Feature
Milestone

Comments

@postmodern
Copy link
Member

Add a Scanner class which takes a .text section object or IO stream and uses ronin-asm's disassembler(s) to disassemble each instruction, then looks for instructions prior to each ret instruction (or equivalent instruction for the architecture of the .text section/executable file). It should yield each discovered Gadget object (see #7).

executable_file = ExecutableFile.new('/bin/ls')
scanner = Scanner.new(executable_file, ...) # additional configuration options may be given

scanner.each do |gadget|
  puts "Found gadget at offset #{gadget.offset}"
  puts
  puts gadget.instructions
end
@postmodern postmodern added the feature New Feature label Feb 22, 2025
@postmodern postmodern added this to the 0.1.0 milestone Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New Feature
Projects
None yet
Development

No branches or pull requests

1 participant