Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

bof-helper

Python Helper Utilities for SEH Overwrite Based Exploits

Usage

from helper import *

Examples

  1. pattern
payload = pattern_create(3000)
  1. offset
nSEH_offset = pattern_offset('0x39644338')
egghunter_offset = pattern_offset('3Av4')
  1. padding
payload = pattern_create(egghunter_offset)
payload += egghunter
payload += fill(payload, farjmp_offset)
payload += farjmp
payload += fill(payload, nSEH_offset)
  1. save_file
save_file("payload.txt", payload)
  1. packing
def u8(x):
    return struct.unpack("<B", x)[0]

def u16(x):
    return struct.unpack("<H", x)[0]

def u32(x):
    return struct.unpack("<I", x)[0]

def u64(x):
    return struct.unpack("<Q", x)[0]

def p8(x):
    return struct.pack("<B", x)

def p16(x):
    return struct.pack("<H", x)

def p32(x):
    return struct.pack("<I", x)

def p64(x):
    return struct.pack("<Q", x)
  1. logging
def log(x):
    print(x)

def debug(x):
    log("[*] {:s}".format(x)) if DEBUG else None

def ok(x):
    log("[+] {:s}".format(x))

def err(x):
    log("[-] {:s}".format(x))

def warn(x):
    log("[!] {:s}".format(x))

About

Python Helper Utilities for SEH Overwrite Based Exploits

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages