• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    Python
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hodor! Fuzzer..

Hodor Fuzzer :

We want to design a general-use fuzzer that can be configured to use known-good input and delimiters in order to fuzz specific locations. Somewhere between a totally dumb fuzzer and something a little smarter, with significantly less effort than with implementation of a proper smart fuzzer. Hodor.

We've had a few projects where a tool like this would have been useful. It's not uncommon to have some sort of case where we have known good input and want to modify it. If we know a bit about the file/protocol/etc spec, this could be used to easily do slightly smarter fuzzing.

The design is intended to be portable so that one can just drop the files onto any box with python 2.7 and get cracking.

Joel St. John, Braden Hollembaek, and Frank Arana

NOTE: POKE AROUND THE CONFIG FILE BEFORE RUNNING

Examples of usage:

python hodor.py -t testfiles/test.txt Mutate delimited text from test.txt
python hodor.py -t testfiles/test.txt -f Mutate all text from test.txt
python -c "print 'A' * 50" | python hodor.py -t -f Pipe in input from another program, mutate all input
python hodor.py -b testfiles/bintest.png > diff.png Mutate binary file at ranges specified in config_hodor.bin_fields (not compatible with qpq mode)
Show where the files differ [address] [file1 hex] [file2 hex]:
cmp -l bintest.png diff.png | gawk '{printf "%08X %02X %02X\n", $1, strtonum(0$2), strtonum(0$3)}'

WISH LIST:

  • Make bflipper better
  • Add more mutators and ability to use multiple types simultaneously
  • Add features to qpq mode
    • Binary mode
    • Named-delimiters that allow for swap of same thing in all tokens of same name
    • Swap multiple tokens at once
  • Add more token handling features

Hodor Manual

A general-use fuzzer that can be configured to use known-good input and delimiters in order to fuzz specific locations.

Somewhere in between a dumb fuzzer and a proper smart fuzzer. Hodor.

Table of Contents

Filetypes

The first question is what kind of file are you mutating? Choosing a filetype is done at the command line. (i.e. python hodor.py -b binfile or python hodor.py -t file.txt)

Full mutation:

If you want to mutate the entire file sparing nothing, use the -f option. (i.e. python hodor.py -t file.txt -f)

Mutating file segments:

Binary Files

Use bin_fields to choose which bytes to mutate in the binary.

Example:
If bin_fields = [(0x3,0x7)]
First 16 bytes of the original file:
0000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR
A few mutations:
0000000: 8950 4e55 0d0a 1a0a 0000 000d 4948 4452 .PNU........IHDR
0000000: 8950 4e46 0d0a 1a0a 0000 000d 4948 4452 .PNF........IHDR
0000000: 8950 4e47 0d0a 330a 0000 000d 4948 4452 .PNG..3.....IHDR
0000000: 8950 4e47 0dd9 1a0a 0000 000d 4948 4452 .PNG........IHDR

Note: In Python's slicing, 0x3 does not get modified and is the byte before selection while 0x7 is the last byte to be mutated. A mathematical representation of this interval is (0x3, 0x7]

For text files

Use text_delimiter to decide which parts of your text will be mutated.

Example:
If text_delimiter = "@@"
Original file: In @@West Philadelphia@@ born and raised
Mutated output: In We_t Ih��a]Ih��al hi| born and raised

Mutation Methods

Hodor has several mutation methods implemented for use.

Millerfuzz

The classic dumb fuzz algorithm by Charlie Miller. Millerfuzz mutation uses FuzzFactor to determine how minute the fuzzing will be. The higher the value in FuzzFactor, the more minute the mutation.

Quid Pro Quo (QPQ)

Quid Pro Quo is currently only partially implemented.

Swap out tokens from the seed file with specific tokens of your choosing. If you specify more than one file, they will be aligned with each token from input in same order. If more than one file, you need to have same number of files as tokens for it to function correctly.

For example, if you specify two files and have two tokens, the first token will be iteratively replaced by things from the first file, and the second token will be iteratively replaced with items from the second file. Only one change is made per output.

Example:
qpq = {"file" : ["qpqfiles/qpqtest.txt", "qpqfiles/qpqtest2.txt"], "swapmode" : "oneatatime"}

TotesRand

Replace the token with totally randomly output generated from Python's random.randrange()

BFlipper

Flip a determined amount of bits. Set flipmode to the number of bits to flip at once. If there are more iterations than bits, flipmode will increase automatically. BFlipper is deterministic.

Post Mutation Handler

CRC32 Fixup

Hodor can compute and add a CRC32 checksum to the newly-mutated token. The CRC32 module has a few fields to configure:

Type

Can either be set for binary or text files.
Options: "type" : "bin" or "type" : "text"

Input_fields

Works very similarly to bin_fields from the binary mutation section. All of the segments listed will be used to calculate the checksum. If input_fields : None, then the entire mutation will be used for computation and automatically append the sum to the end of the file.

Example:
input_fields : [(0x12, 0x15), (0x4f, 0x5a)] will compute the checksum for all segments in the order listed.

Note: Remember, Python slices use the interval (x,y]

Sum_location

This designates where where to begin overwriting the location specified to insert the checksum. If set to None the sum will be appended to the end of the mutation.

Note: sum_location cannot be a value that intercepts with any interval from input_fields, and sum_location will go unchecked if input_fields is set to None

Example:
sum_location : [(0x0)] will start overwriting the at the beginning of the file.

Outputting Mutations

What to do with the mutations. Logging is done differently per module.

Stdout

Print mutations directly to stdout. No other logging is done.

Network

Send mutation to network, indicate target and where to log results, 'file' will write unique files to specified directory.

Connection

The target host and port are set in network.

Example:
network = {"remotehostport" : ("localhost", 1234)

Specify connection type by setting ssl to True or False.

Logging

Two options are available for logging. Using file allows to set a directory to write output to, and stdout will print to standard out.

Example:

"log" : {"file" : "results/" }

Disk

Write mutations as separate files into directory specified in disk

Example: disk = results/ will create the directory results in the current working directory, and store mutations within.

Process

Automatically send mutation to specified process. Hodor will log if the program crashes, or if the maximum wait time is reached. Either way the process is terminated and then the next iteration will begin.

Name

The name of the executable to run.

Example: "name" : "readelf"

Arguments

Use arguments to add any arguments needed to run the executable listed in name.

Example: "arguments" : "-h" will run readelf -h.

If the mutation needs to be a command-line argument, set "file_arg" : True. If set to False the mutation will be send to the process as stdin.

If the mutation needs a particular file extension use extension to designate it.

Example: "extension" : ".mp3"

Combining all the examples listed in this section, Hodor will execute readelf -h mutation.mp3

Wait Time

How long to wait before terminating an iteration of process if it does not crash.

Example:
Setting "timeout" : 5 "steps" : .3 Will check every .3 seconds to see if the process has crashed, and terminate at the final wait time of five seconds.

Logging in process

Handles how and what is stored through every iteration. These are located within the log portion of the process configuration.

What is always stored

Some logs are automatically generated without configuration. A file crashlog.txt will be created containing every crash that occurs in the path directory specified.

How crashes are logged

All files generated by logging will be located in path.
Example:
"path" : "results/" will create the directory results in the current working directory, and store log files within.

Logging Options

Aside from crashlog.txt, setting "mutations" : True means every crash will have the offending mutation saved to a directory named after the terminating signal.

Similarly, "proc_out" : True will record the stdout and stderr of every process to a text file. Including processes that do not crash.

Performance

Execution Delays

Delays each mutation iteration. Useful for not flooding a network target. Values are measured in seconds.

Example:
execdelay = .1 will delay every iteration by one-tenth of a second.

Processes

The amount of parallel iterations running at one time. It is recommended to only have one process per CPU core. Defined as proc.

Threads

Number of threads per-process to be used to handle the iterations. Useful for optimizing against I/O bound fuzzing.

Iterations

This is number of total iterations, and will be divided among procs and threads. Any number not divisible by procs*threads will just get the remainder dumped onto the last thread.


That's it. Go find bugs!

More Repositories

1

ScoutSuite

Multi-Cloud Security Auditing Tool
Python
6,664
star
2

Scout2

Security auditing tool for AWS environments
Python
1,728
star
3

sobelow

Security-focused static analysis for the Phoenix Framework
Elixir
1,671
star
4

Winpayloads

Undetectable Windows Payload Generation
Python
1,519
star
5

demiguise

HTA encryption tool for RedTeams
Python
1,326
star
6

house

A runtime mobile application analysis toolkit with a Web GUI, powered by Frida, written in Python.
JavaScript
1,321
star
7

PMapper

A tool for quickly evaluating IAM permissions in AWS.
Python
1,279
star
8

redsnarf

RedSnarf is a pen-testing / red-teaming tool for Windows environments
PowerShell
1,182
star
9

featherduster

An automated, modular cryptanalysis tool; i.e., a Weapon of Math Destruction
Python
1,087
star
10

SocksOverRDP

Socks5/4/4a Proxy support for Remote Desktop Protocol / Terminal Services / Citrix / XenApp / XenDesktop
C++
1,067
star
11

singularity

A DNS rebinding attack framework.
JavaScript
1,018
star
12

exploit_mitigations

Knowledge base of exploit mitigations available across numerous operating systems, architectures and applications and versions.
865
star
13

AutoRepeater

Automated HTTP Request Repeating With Burp Suite
Java
742
star
14

fuzzowski

the Network Protocol Fuzzer that we will want to use.
Python
719
star
15

aws-inventory

Discover resources created in an AWS account.
Python
703
star
16

BurpSuiteHTTPSmuggler

A Burp Suite extension to help pentesters to bypass WAFs or test their effectiveness using a number of techniques
Java
654
star
17

Sniffle

A sniffer for Bluetooth 5 and 4.x LE
C
648
star
18

sadcloud

A tool for standing up (and tearing down!) purposefully insecure cloud infrastructure
HCL
636
star
19

TriforceAFL

AFL/QEMU fuzzing with full-system emulation.
C
624
star
20

nmap-nse-vulnerability-scripts

NMAP Vulnerability Scanning Scripts
Lua
618
star
21

LoggerPlusPlus

Advanced Burp Suite Logging Extension
Java
608
star
22

nccfsas

Information released publicly by NCC Group's Full Spectrum Attack Simulation (FSAS) team.
C
598
star
23

freddy

Automatically identify deserialisation issues in Java and .NET applications by using active and passive scans
Java
572
star
24

phantap

Phantom Tap (PhanTap) - an ‘invisible’ network tap aimed at red teams
C
560
star
25

azucar

Security auditing tool for Azure environments
PowerShell
559
star
26

tracy

A tool designed to assist with finding all sinks and sources of a web application and display these results in a digestible manner.
JavaScript
553
star
27

VCG

VisualCodeGrepper - Code security scanning tool.
Visual Basic .NET
523
star
28

Cyber-Defence

Information released publicly by NCC Group's Cyber Incident Response Team
Python
474
star
29

scrying

A tool for collecting RDP, web and VNC screenshots all in one place
Rust
450
star
30

autochrome

This tool downloads, installs, and configures a shiny new copy of Chromium.
HTML
431
star
31

wssip

Application for capturing, modifying and sending custom WebSocket data from client to server and vice versa.
JavaScript
425
star
32

blackboxprotobuf

Blackbox protobuf is a Burp Suite extension for decoding and modifying arbitrary protobuf messages without the protobuf type definition.
Python
380
star
33

idahunt

idahunt is a framework to analyze binaries with IDA Pro and hunt for things in IDA Pro
Python
376
star
34

autopwn

Specify targets and run sets of tools against them
Python
376
star
35

CrossSiteContentHijacking

Content hijacking proof-of-concept using Flash, PDF and Silverlight
HTML
372
star
36

Solitude

Solitude is a privacy analysis tool that enables anyone to conduct their own privacy investigations. Whether a curious novice or a more advanced researcher, Solitude makes the process of evaluating user privacy within an app accessible for everyone.
CSS
370
star
37

vlan-hopping---frogger

Easy 802.1Q VLAN Hopping
Shell
346
star
38

shocker

A tool to find and exploit servers vulnerable to Shellshock
Python
333
star
39

DriverBuddy

DriverBuddy is an IDA Python script to assist with the reverse engineering of Windows kernel drivers.
Python
331
star
40

WMIcmd

A command shell wrapper using only WMI for Microsoft Windows
C#
319
star
41

acCOMplice

Tools for discovery and abuse of COM hijacks
PowerShell
272
star
42

SusanRTTI

Another RTTI Parsing IDA plugin
Python
269
star
43

umap

The USB host security assessment tool
Python
265
star
44

metasploitavevasion

Metasploit AV Evasion Tool
Shell
257
star
45

keimpx

Check for valid credentials across a network over SMB
Python
256
star
46

umap2

Umap2 is the second revision of NCC Group's python based USB host security assessment tool.
Python
250
star
47

depthcharge

A U-Boot hacking toolkit for security researchers and tinkerers
Python
245
star
48

UPnP-Pentest-Toolkit

UPnP Pentest Toolkit for Windows
C#
244
star
49

GTFOBLookup

Offline command line lookup utility for GTFOBins (https://github.com/GTFOBins/GTFOBins.github.io), LOLBAS (https://github.com/LOLBAS-Project/LOLBAS), WADComs (https://wadcoms.github.io), and HijackLibs (https://hijacklibs.net/).
Python
238
star
50

G-Scout

Google Cloud Platform Security Tool
Python
232
star
51

asatools

Main repository to pull all NCC Group Cisco ASA-related tool projects.
Shell
224
star
52

cisco-SNMP-enumeration

Automated Cisco SNMP Enumeration, Brute Force, Configuration Download and Password Cracking
Shell
216
star
53

thetick

A simple embedded Linux backdoor.
Python
195
star
54

AWS-recipes

A number of Recipes for AWS
Python
195
star
55

kube-auto-analyzer

Kubernetes Auto Analyzer
HTML
192
star
56

TPMGenie

TPM Genie is an I2C bus interposer for discrete Trusted Platform Modules
C++
189
star
57

BinProxy

BinProxy is a proxy for arbitrary TCP connections. You can define custom message formats using the BinData gem.
Ruby
172
star
58

TriforceLinuxSyscallFuzzer

A linux system call fuzzer using TriforceAFL
C
170
star
59

DetectWindowsCopyOnWriteForAPI

Enumerate various traits from Windows processes as an aid to threat hunting
C++
168
star
60

pybeacon

A collection of scripts for dealing with Cobalt Strike beacons in Python
Python
167
star
61

BKScan

BlueKeep scanner supporting NLA
Shell
167
star
62

typofinder

A finder of domain typos showing country of IP address
Python
166
star
63

BLESuite

BLESuite is a Python package that provides an easier way to test Bluetooth Low Energy (BLE) device
Python
165
star
64

SteppingStones

A Red Team Activity Hub
Python
162
star
65

libslub

Python
161
star
66

tcpprox

A small command-line TCP proxy utility written in Python
Python
156
star
67

requests-racer

Small Python library that makes it easy to exploit race conditions in web apps with Requests.
Python
152
star
68

LazyDroid

bash script to facilitate some aspects of an Android application assessment
Shell
151
star
69

chuckle

An automated SMB relay exploitation script.
Shell
151
star
70

whalescan

Whalescan is a vulnerability scanner for Windows containers, which performs several benchmark checks, as well as checking for CVEs/vulnerable packages on the container
Python
143
star
71

gitpwnd

GitPwnd is a network penetration tool that lets you use a git repo for command and control of compromised machines
Python
139
star
72

Carnivore

Tool for assessing on-premises Microsoft servers authentication such as ADFS, Skype, Exchange, and RDWeb
C#
139
star
73

CollaboratorPlusPlus

Java
139
star
74

Change-Lockscreen

Offensive tool to trigger network authentications as SYSTEM
C#
138
star
75

Decoder-Improved

Improved decoder for Burp Suite
Java
134
star
76

OutlookLeakTest

The Outlook HTML Leak Test Project
C#
131
star
77

Wubes

Qubes containerization on Windows
Python
130
star
78

port-scan-automation

Automate NMAP Scans and Generate Custom Nessus Policies Automatically
Shell
128
star
79

Zulu

The Zulu fuzzer
Python
125
star
80

WinShareEnum

Windows Share Enumerator
C#
121
star
81

memscan

Searches for strings, regex, credit card numbers of magnetic stripe card tracks in a Windows process's memory space
C#
120
star
82

ebpf

eBPF - extended Berkeley Packet Filter tooling
Python
120
star
83

argumentinjectionhammer

A Burp Extension designed to identify argument injection vulnerabilities.
Python
118
star
84

cq

Python
115
star
85

DroppedConnection

Python
113
star
86

SCOMDecrypt

SCOMDecrypt is a tool to decrypt stored RunAs credentials from SCOM servers
C#
112
star
87

GOATCasino

This is an intentionally vulnerable smart contract truffle deployment aimed at allowing those interested in smart contract security to exploit a wide variety of issues in a safe environment.
JavaScript
112
star
88

OneLogicalMyth_Shell

A HTA shell to assist with breakout assessments.
HTML
112
star
89

BLE-Replay

BLE-Replay is a Bluetooth Low Energy (BLE) peripheral assessment tool
Python
110
star
90

cloud_ip_ranges

Identify IP addresses owned by public cloud providers
Python
109
star
91

web3-decoder

Python
108
star
92

ccs

Python
107
star
93

WindowsDACLEnumProject

A collection of tools to enumerate and analyse Windows DACLs
C++
105
star
94

raccoon

Salesforce object access auditor
Python
104
star
95

DIBF

Windows NT ioctl bruteforcer and modular fuzzer
C++
103
star
96

go-pillage-registries

Pentester-focused Docker registry tool to enumerate and pull images
Go
103
star
97

DatajackProxy

Datajack Proxy allows you to intercept TLS traffic in native x86 applications across platforms
JavaScript
100
star
98

pcap-burp

Pcap importer for Burp
Java
100
star
99

jwt-reauth

Java
100
star
100

Berserko

Burp Suite extension to perform Kerberos authentication
Java
99
star