/ropstar

Automatic exploit generation for simple linux pwn challenges.

Primary LanguagePythonMIT LicenseMIT

Ropstar

Exploits simple linux bof challenges involving alsr, nx and to some extend format strings. You can let it get you a shell or specify a win function that is called.

asciicast

Install

  • The program expects a local installation of libcdatabase in /home/user/tools/libcdatabase. To run local exploits make sure you add your local libc to libcdatabase (32-bit & 64-bit versions). Also in ~/tools you need a clone of ROPgadget (used for static binary exploitation).

  • In order to run challenges from hackthebox directly you have to have a '.api_key' file in your home directory containing your api key.

Examples

The examples assume you create a 'work' subdirectory in the project folder where you copy the target binary into and run the program from.

Exploit local binary:

python ../ropstar.py ropme

Run hackthebox challenge (this required a '.api_key' file in your home directory containing the api key in order to submit the flag)

python ../ropstar.py ropme -rhost docker.hackthebox.eu -rport 47184 -cid 8

Limitations

  • A lot, this a just a PoC

Todo

  • canaries
  • pie
  • input from other sources than stdin (arg, file, network..)

Tested on