๐Ÿ”ŽFFUF

Installation

  • apt install ffuf -y

Sed: Removing Comments

  • sudo sed -i 's/^#.*$//g' <filename> && sudo sed -i '/^$/d' <filename>

  • -ic: Ignore wordlist comments (default: false)

Fuzzing

Directory Fuzzing

  • directory-list-2.3-small.txt

  • ffuf -w <wordlist>:FUZZ -u http://SERVER_IP:PORT/FUZZ

code

ffuf -w /opt/useful/SecLists/Discovery/Web-Content/directory-list-2.3-small.txt:FUZZ -u http://SERVER_IP:PORT/FUZZ

example

elijahoh@htb[/htb]$ ffuf -w /opt/useful/SecLists/Discovery/Web-Content/directory-list-2.3-small.txt:FUZZ -u http://SERVER_IP:PORT/FUZZ


        /'___\  /'___\           /'___\       
       /\ \__/ /\ \__/  __  __  /\ \__/       
       \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\      
        \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/      
         \ \_\   \ \_\  \ \____/  \ \_\       
          \/_/    \/_/   \/___/    \/_/       

       v1.1.0-git
________________________________________________

 :: Method           : GET
 :: URL              : http://SERVER_IP:PORT/FUZZ
 :: Wordlist         : FUZZ: /opt/useful/SecLists/Discovery/Web-Content/directory-list-2.3-small.txt
 :: Follow redirects : false
 :: Calibration      : false
 :: Timeout          : 10
 :: Threads          : 40
 :: Matcher          : Response status: 200,204,301,302,307,401,403
________________________________________________

<SNIP>
blog                    [Status: 301, Size: 326, Words: 20, Lines: 10]
:: Progress: [87651/87651] :: Job [1/1] :: 9739 req/sec :: Duration: [0:00:09] :: Errors: 0 ::

Extension Fuzzing

  • web-extensions.txt

  • ffuf -w <wordlist>:FUZZ -u http://SERVER_IP:PORT/indexFUZZ

code

example

Page Fuzzing

  • directory-list-2.3-small.txt

  • ffuf -w <wordlist>:FUZZ -u http://SERVER_IP:PORT/FUZZ.php

code

example

FUZZ_1.FUZZ_2

Note: It is possible use two wordlists and have a unique keyword for each, and then do FUZZ_1.FUZZ_2 to fuzz for both. However, there is one file we can always find in most websites, which is index.*, so we will use it as our file and fuzz extensions on it.

Recursive Fuzzing

  • ffuf -w <wordlist>:FUZZ -u http://SERVER_IP:PORT/FUZZ -recursion -recursion-depth 1 -e .php -v -fs <size>

Flags:

  • -e: Comma separated list of extensions. Extends FUZZ keyword

  • -fs: Filter HTTP response size. Comma separated list of sizes and ranges

code

example

DNS Record

  • sudo sh -c 'echo "SERVER_IP <domain.TLD>" >> /etc/hosts'

Sub Domains Fuzzing

  • subdomains-top1million-5000.txt

  • ffuf -w <wordlist>:FUZZ -u https://FUZZ.<domain.TLD>/

code

example

--mc all

Vhost Fuzzing

  • subdomains-top1million-5000.txt

  • ffuf -w <wordlist>:FUZZ -u http://<domain.TLD>:<port>/ -H 'Host: FUZZ.<domain.TLD>' -fs <size>

code

example

Parameter Fuzzing

IppSec's Demostrationg

reference

code

example

code

example

Get Request Fuzzing

  • burp-parameter-names.txt

  • ffuf -w <wordlist>:FUZZ -u http://<subdomain>.<domain.TLD>:<port>/<page>.php?FUZZ=key -fs <size>

code

example

Post Request Fuzzing

  • ffuf -w <wordlist>:FUZZ -u http://<subdomain>.<domain.TLD>:<port>/<page>.php -X POST -d 'FUZZ=key' -H 'Content-Type: application/x-www-form-urlencoded' -fs <size>

code

example

Tip: In PHP, "POST" data "content-type" can only accept "application/x-www-form-urlencoded". So, we can set that in "ffuf" with "-H 'Content-Type: application/x-www-form-urlencoded'".

CURL POST REQUEST

reference

  • curl http://<subdomain>.<domain.TLD>:<port>/<page>.php -X POST -d 'id=key' -H 'Content-Type: application/x-www-form-urlencoded'

code

example

example

It requires a Content Length, which we can specify with the following;

Success! We get a list back of the running processes. The most interesting to us is an entry with what appears to be hard-coded credentials using the SSH protocol. SSH was on our NMAP so we are likely getting close.

CURL URL ENCODE

code

example

Value Fuzzing

Custom wordlist

  • for i in $(seq 1 1000); do echo $i >> ids.txt; done

  • ffuf -w <wordlist>:FUZZ -u http://<subdomain>.<domain.TLD>:<port>/<page>.php -X POST -d 'id=FUZZ' -H 'Content-Type: application/x-www-form-urlencoded' -fs <size>

code

example

File Path Traversal

Reference

Code:

Example:

Fuzzing Search Field with Special Characters for Odd Behaviors

reference

Interception with Burp

parameter
post request content type

code

code

filter Lines:34

example

  • FFUF will not URL encode the characters

Browser URL Encoded Character

search using '&'
the browser will URL encode '&'
probably this is the mssql syntax
auto-scroll to match

Last updated