Skip to content

Instantly share code, notes, and snippets.

@personnumber3377
Created April 13, 2023 03:27
Show Gist options
  • Save personnumber3377/937fadbc707e59f5f337acd59513b790 to your computer and use it in GitHub Desktop.
Save personnumber3377/937fadbc707e59f5f337acd59513b790 to your computer and use it in GitHub Desktop.
Another thing
#!/bin/bash
# Running a netcat listener on port tcp port 80 in the background
netcat -l 80 -k -w 0 &
# Prepare iptables entries
iptables-legacy -t nat -A OUTPUT -p tcp -j REDIRECT --to-port 80
iptables-legacy -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 127.0.0.1
# Prepare fuzzing directories
mkdir fuzz &&
cd fuzz &&
mkdir in out &&
echo -ne 'curl\x00http://127.0.0.1:80' > in/example_command.txt &&
# Run afl++ fuzzer
afl-fuzz -x /AFLplusplus/curl.dict -i in/ -o out/ -- curl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment