Skip to content

r888800009/OneGadgetTest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

OneGadgetTest

OneGadgetTest (ogt) is a gdb plugin to help pwner quickly check constraints of one gadget has been satisfied or not. This plugin is very simple and probably has some mistakes, feel free to correct it :)

Requirements

  • one_gadget
  • gdb

Installation

git clone https://github.com/0n3t04ll/OneGadgetTest.git
cd OneGadgetTest
echo "source `pwd`/ogt.py" >> ~/.gdbinit

Usage

$gdb ogt

ogt command will use one_gadget to collect constraints and check the constraints has been satisfied or not.

$gdb ogt <fix rsp>

After call instruction, rsp will minus 8 cause of push return address, ogt -8 will plus -8 first then check constraints.

ScreenShots

The program below is very simple, it just read the input and take it as a function address then execute it.

#include <unistd.h>
int main()
{
	void (*foo)();
	read(0, &foo, 8);
	foo();
}

Stop instruction at call rdx

use ogt -8 cause of call instruction

0x10a38c constraints has been satisfied

change the foo address and get shell

Reference

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%