ww9210 / roputils

A Return-oriented Programming toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

roputils

A Return-oriented Programming toolkit

Usage

examples/ropasaurusrex.py is a write up of ropasaurusrex in PlaidCTF 2013.

roputils.py is the single-file module, so your script can use it by creating a symlink named roputils.py in the same directory.

Overview

Currently roputils.py has the below classes:

  • ELF: ELF parser (by readelf)
  • ROP: ELF class with additional methods for creating ROP chains
  • Shellcode: i386/x86-64/arm shellcode builder
  • FormatStr: string builder for format string attack
  • Proc: non-blocking IO for local/remote process
  • Pattern: Metasploit pattern generator/calculator
  • Asm: implementation of asm subcommand

roputils.py also can be used as CLI tool, the subcommands are:

  • checksec: check security features (clone of checksec.sh)
  • pc: create Metasploit pattern
  • po: calculate offset in Metasploit pattern
  • gadget: check availability of tiny gadgets
  • scan: grep the binary and disassemble from each index
  • sc: output shellcode as hexstring
  • asm: assemble/disassemble input (i386/x86-64/arm/thumb2)
  • objdump: disassemble with IDA-like annotations

To list up the methods of each class, hit the below command in the same directory as roputils.py:

$ python -c 'import roputils as me; help(me)'

For more details, just read the code.

About

A Return-oriented Programming toolkit


Languages

Language:Python 83.2%Language:Assembly 16.8%