Hacker Kayra
  • 📍Introduction Page
  • ⭐Learning Process
    • 🧠Learning Mindset
    • 🖇️Learning Dependencies
    • 🧮Learning Process
  • 🔠Fundamentals
    • 🛜Networking Fundamentals
    • 🐧Linux Fundamentals
    • 🪟Windows Fundamentals
    • 🕵️Active Directory
    • 🕸️Introduction to Web Applications
    • 🗃️Other Useful Concepts
      • Regular Expressions (RegEx)
    • Cyber Security Products
      • Lab Setup
      • ✅Fortigate Firewall
      • MDM Lab
      • IAM Lab
      • PAM Lab
      • DLP Lab
  • 🧰Tools
    • Nmap
    • Nessus
    • Ffuf
    • Hydra
    • John The Ripper
  • ✍️Write Ups
    • 🗃️Hack The Box Machines
      • 🐧Linux
        • Code
    • 🗃️Proving Grounds Boxes
      • 🐧Linux
        • Stapler
        • eLection
        • Loly
        • Blogger
        • Potato
        • Amaterasu
        • Exfiltrated
        • Pelican
        • Astronaut
        • Cockpit
        • Levram
        • Extplorer
        • LaVita
        • pc
        • Scrutiny
        • Zipper
        • Flu
        • Twiggy
        • Codo
        • Crane
        • Hub
        • BlackGate
        • Boolean
        • ClamAV
        • PayDay
        • Snookums
        • Bratarina
        • Nibbles
      • 🪟Windows
        • Algernon
        • AuthBy
        • Craft
        • Kevin
        • Squid
        • Jacko
        • DVR4
        • Hepet
        • Shenzi
        • Nickel
        • Slort
        • MedJed
        • Active Directory
          • Access
          • Vault
    • 🪪Certificates
      • Certified Professional Penetration Tester (eCPPTv3)
      • Web Application Penetration Tester eXtreme (eWPTXv3)
    • 🚩CTF Events
      • Cyber Hub 2025 CTF
  • 📚Study Notes
    • Penetration Tester (HTB CPTS)
      • Penetration Testing Process
      • Reconnaissance, Enumeration & Attack Planning
        • Network Enumeration with Nmap (Continue Here)
        • Footprinting (Just Do Formatting)
        • Vulnerability Scanning (Check)
        • File Transfers
        • Using the Metasploit Framework
        • Web Information Gathering
        • Shells & Payloads
      • Exploitation & Lateral Movement
        • Attacking Common Services (Just Do Formatting)
        • Password Attacks
        • Active Directory Enumeration & Attacks (TBC)
        • Pivoting, Tunneling, and Port Forwarding
      • Web Exploitation
        • Using Web Proxies (Check)
        • Attacking Web Applications With Ffuf (Check)
        • Login Bruteforcing
        • Cross-Site Scripting (XSS)
        • Command Injection
        • SQL Injection
        • File Upload Attacks
        • File Inclusion
        • Web Attacks (Check)
        • Attacking Common Applications (Check)
      • Post-Exploitation
        • Linux Privilege Escalation
        • Windows Privilege Escalation (TBC)
      • Documentation & Reporting
  • 🧑‍💻Other
    • Leet Code
      • Quick Guide: Big-O Notation
      • Problem 01 - Two Sum
    • Data Structure & Algorithms (DSA)
  • 🗄️Archive/Backup/Bin
    • Sysmon Usecases (IBM)
    • 🐧Linux Fundamentals (TryHackMe)
      • Introduction
      • Basic Commands
      • Wildcards & Operators
      • Permissions
      • Common Directories
      • Terminal Text Editors
      • General/Useful Utilities
    • 🪟Windows Fundamentals (TryHackMe)
      • Introduction
      • The File System
      • User Accounts
      • Settings & Control Panel & Task Manager
      • System Configuration
    • Active Directory (TryHackMe)
      • Breaching Active Directory
    • FOR508: Advanced Incident Response, Threat Hunting, and Digital Forensics
      • Book 2 - Intrusion Analysis
        • Credential Theft
        • Event Log Analysis for Responders and Hunters
    • Certified Threat Hunting Professional (eCTHPv2)
      • Threat Hunting: Hunting the Endpoint & Endpoint Analysis
        • Event IDs, Logging, & SIEMs
    • OSCP
      • Report Writing
      • ✅Passive Information Gathering
      • ✅Active Information Gathering
      • ✅Vulnerability Scanning
      • Introduction to Web Application Attacks
      • Common Web Application Attacks
        • ✅Cross-Site Scripting (XSS)
        • ✅Directory Traversal
        • ✅File Inclusion
        • ✅File Upload Vulnerabilities
        • Command Injection
        • SQL Injection Attacks
        • Client Side Attacks
      • ✅Locating Public Exploits
      • ✅Exploiting Walkthrough
      • Fixing Exploits
      • ✅Antivirus Evasion
      • Password Attacks
      • Windows Privilege Escalation
      • Linux Privilege Escalation
      • Port Redirection and SSH Tunneling
      • Tunneling Through Deep Packet Inspection
      • The Metasploit Framework
      • Active Directory Introduction & Enumeration
      • Attacking Active Directory Authentication
      • Lateral Movement in Active Directory
      • Assembling the Pieces
      • Other General Information
    • ⚡Port Swigger (Web Penetration Testing)
      • ✅Information Disclosure
      • ✅Path Traversal (Directory Traversal)
      • ✅OS Command Injection
      • Business Logic Vulnerabilities
      • ✅Authentication
      • ✅Access Control
    • Certified Bug Bounty Hunter (CBBH)
      • Web Requests
        • HTTP Fundamentals
    • Getting Started
      • Introduction
      • Pentesting Basics
    • Certified Penetration Testing Specialist (CPTS)
      • Introduction
        • ✅Penetration Testing Process
          • Penetration Testing Overview
          • Laws & Regulations
          • Penetration Testing Process
          • Pre-Engagement
          • Information Gathering
          • Vulnerability Assessment
          • Exploitation
          • Post-Exploitation
          • Lateral Movement
          • Proof-of-Concept
          • Post-Engagement
          • Practice
          • Academy Module Layout
        • Getting Started with Hack The Box (HTB)
      • Reconnaissance, Enumeration & Attack Planning
        • ✅Network Enumeration with Nmap
          • Enumeration & Introduction to Nmap
          • Host Discovery
          • Host and Port Scanning
          • Saving The Results
          • Service Enumeration
          • Nmap Scripting Engine
          • Scanning Performance
          • Firewall and IDS/IPS Evasion
        • Footprinting
        • ✅Information Gathering - Web Edition
          • Introduction
          • Passive Information Gathering
          • Active Information Gathering
        • Vulnerability Assessment
        • File Transfers
        • Shells & Payloads
        • Using the Metasploit Framework
      • Exploitation & Lateral Movement
        • Password Attacks
        • Attacking Common Services
        • Pivoting, Tunneling, and Port Forwarding
        • Active Directory Enumeration & Attacks
      • Web Exploitation
        • Using Web Proxies
        • ✅Attacking Web Applications with Ffuf
        • ✅Login Brute Forcing
        • SQL Injection Fundamentals
        • SQLMap Essentials
        • Cross-Site Scripting (XSS)
        • File Inclusion
        • File Upload Attacks
        • Command Injections
        • Web Attacks
        • Attacking Common Applications
      • Post-Exploitation
        • Linux Privilege Escalation
        • Windows Privilege Escalation
      • Reporting & Capstone
        • Documentation & Reporting
        • Attacking Enterprise Networks
    • Old Active Directory
    • Tib3rius Privilege Escalation
      • Linux Privilege Escalation
    • HTB Archived Write-Ups (Check)
      • Irked
      • Nibbles
      • Brainfuck
      • Lame (Check)
    • 📋Cheat Sheets
      • Penetration Testing Cheat Sheet (In Progress)
Powered by GitBook
On this page
  • Introduction
  • Wordlists
  • DNS Records
  • How to Install
  • Basic Fuzzing
  • Directory Fuzzing
  • Extension Fuzzing
  • Recursive Fuzzing
  • Domain Fuzzing
  • Subdomains Fuzzing
  • Vhost Fuzzing
  • Filtering Results
  • Parameter Fuzzing
  • GET Request Fuzzing
  • POST Request Fuzzing
  • Value Fuzzing
  1. Tools

Ffuf

Introduction

  • Fuzzing is a testing technique that sends various types of user input to an interface to study how it reacts. For web fuzzing, we usually use predefined wordlists of commonly used terms to see if a web server accepts them. This is because web servers do not typically provide a directory of all available links and domains (unless very poorly configured), so we must try various links to see which ones return pages.

Wordlists

  • To determine which pages exist, you should have a wordlist containing commonly used words for web directories and pages. Although this method will not reveal all pages on a website (since some pages may be randomly or uniquely named), it generally returns the majority of pages.

  • Fortunately, you don't have to create these wordlists manually. Many efforts have already been made to search the web and compile the most commonly used words for each type of fuzzing. Some of the most popular wordlists can be found in the GitHub SecLists repository, which categorizes wordlists by fuzzing type.

  • In Kali Linux, the SecLists can be found in /usr/share/seclists/

    • Directory/Page: SecLists/Discovery/Web-Content/directory-list-2.3-small.txt

    • Extensions Wordlist: SecLists/Discovery/Web-Content/web-extensions.txt

    • Domain Wordlist: SecLists/Discovery/DNS/subdomains-top1million-5000.txt

    • Parameters Wordlist: SecLists/Discovery/Web-Content/burp-parameter-names.txt

Note: Some wordlists include copyright comments at the beginning. These comments can be considered part of the wordlist and may clutter the results.

DNS Records

  • Some websites are not public and can only be accessed within a local network. Browsers understand how to connect to IP addresses; when you provide a URL, the browser tries to map it to an IP by looking into the local /etc/hosts file and then the public DNS Domain Name System. If the URL is not found in either, the browser will not know how to connect.

  • To connect to an internal website (e.g., internal.academy.htb), you need to add it to your /etc/hosts file. (sudo sh -c 'echo "Server IP Address> <Domain Name>" >> /etc/hosts')

How to Install

  • To install Ffuf, you can either use "apt install ffuf -y" or download it from its GitHub Repo.

Basic Fuzzing

  • The main two options are, -w for wordlists and -u for the URL.

  • You can assign a wordlist to a keyword in your URL by appending :FUZZ to the wordlist path. This is useful if you want to use two wordlists and assign a unique keyword for each (by default, the keyword is FUZZ).

    • Example: ffuf -w /opt/useful/SecLists/Discovery/Web-Content/directory-list-2.3-small.txt:FUZZ -u http://<Server-IP-Address>:<Port-Number>:/FUZZ

  • Fuzzing speed may vary based on your internet speed and ping. You can increase the number of threads (e.g., with -t 200) to make it faster, but this is not recommended on remote sites as it may disrupt service or even cause a denial of service.

Directory Fuzzing

  • For directory fuzzing, place the FUZZ keyword where the directory appears in your URL. Example: ffuf -w /opt/useful/SecLists/Discovery/Web-Content/directory-list-2.3-small.txt:FUZZ -u http://<Server-IP-Address>:<Port-Number>/FUZZ

Extension Fuzzing

  • Before fuzzing pages for extensions, you need to determine what type of pages the website uses (e.g., .html, .aspx, .php, etc.). One common method is to examine the HTTP response headers to guess the server type and its common file extensions.

  • Once you know the likely extension, specify it at the end of your file. You can use two wordlists with unique keywords if needed. A common approach is to fuzz the file index.* to see which extensions are accepted.

  • Example 1 (Fuzzing for extension on a file): ffuf -w /opt/useful/SecLists/Discovery/Web-Content/web-extensions.txt:FUZZ -u http://<Server-IP-Address>:<Port Number>/blog/indexFUZZ

  • Example 2 (Fuzzing a directory with a known extension): ffuf -w /opt/useful/SecLists/Discovery/Web-Content/directory-list-2.3-small.txt:FUZZ -u http://<Server-IP-Address>:<Port Number>/blog/FUZZ.php

The wordlist might or might not contain a dot (.), It's important to know before fuzzing to determine if we need to add the dot (.) ourselves or not.

Recursive Fuzzing

  • Recursive fuzzing automatically starts a new scan within any newly discovered directories until the entire site and its subdirectories have been fuzzed. Note that some websites have deep directory trees (e.g., /login/user/content/uploads/...), which may result in very long scans. It is advised to set a maximum recursion depth.

  • In ffuf, enable recursive scanning with the -recursion flag and set the depth with the -recursion-depth flag. You can also specify the file extension with -e and use -v to output full URLs for clarity.

  • Example: ffuf -w /opt/useful/SecLists/Discovery/Web-Content/directory-list-2.3-small.txt:FUZZ -u http://Server-IP-Address>:<Port-Number>/FUZZ -recursion -recursion-depth 1 -e .php -v

Domain Fuzzing

Subdomains Fuzzing

  • A subdomain is a domain that is part of a larger domain. For example, https://photos.google.com is the photos subdomain of google.com.

  • If a domain isn’t identifiable by public DNS, you need to add its subdomains to your /etc/hosts file. In these cases, use the virtual host (-vhost) scanning option.

  • In the SecLists repository, there is a specific section for subdomain wordlists, usually located in: /opt/useful/SecLists/Discovery/DNS/

    • Example: ffuf -w /opt/useful/SecLists/Discovery/DNS/subdomains-top1million-5000.txt:FUZZ -u https://FUZZ.<Domain-Name>/

    • Example: ffuf -w /opt/useful/SecLists/Discovery/DNS/subdomains-top1million-5000.txt:FUZZ -u http://FUZZ.<Domain-Name>/

Vhost Fuzzing

  • When fuzzing subdomains that do not have a public DNS record or websites that are not public, use Vhost fuzzing. A VHost (virtual host) is essentially a subdomain served on the same server with the same IP address. A single IP can host multiple websites (VHosts), which may or may not have public DNS records.

  • To scan for VHosts without manually adding entries to your /etc/hosts file, you can fuzz HTTP headers—specifically the Host: header—using the -H flag with the FUZZ keyword.

In Vhost fuzzing, many entries may return a 200 OK status because you are merely changing the header on the same IP. However, if a VHost exists, the response size may differ. You may need to filter your results accordingly.

Filtering Results

  • By default, ffuf filters results based on HTTP status codes, typically removing 404 NOT FOUND responses. You can also filter or match based on response size, line count, word count, or using regular expressions.

  • Filtering Options:

    • -fc: Filter out specific HTTP status codes (comma-separated list of codes and ranges)

    • -fl: Filter by the number of lines in the response (comma-separated list of counts and ranges)

    • -fr: Filter by a regular expression

    • -fs: Filter by HTTP response size (comma-separated list of sizes and ranges)

    • -fw: Filter by the number of words in the response (comma-separated list of counts and ranges)

  • For example, to filter out responses with a size of 900 bytes: ffuf -w /opt/useful/SecLists/Discovery/DNS/subdomains-top1million-5000.txt:FUZZ -u http://<Domain-Name>:<Port-Number>/ -H 'Host: FUZZ.<Domain-Name>' -fs 900

Parameter Fuzzing

  • Fuzzing parameters may reveal unpublished parameters that are publicly accessible. Such parameters are often less tested and less secure.

GET Request Fuzzing

  • In GET requests, parameters are usually appended to the URL. For example: http://admin.academy.htb:PORT/admin/admin.php?param1=key

  • So, all we have to do is replace param1 in the example above with FUZZ and rerun our scan.

  • Example: ffuf -w /opt/useful/SecLists/Discovery/Web-Content/burp-parameter-names.txt:FUZZ -u http://<Domain-Name>:<Port-Number>/admin/admin.php?FUZZ=key

POST Request Fuzzing

  • Unlike GET requests, POST request parameters are sent in the data field of the HTTP request. To fuzz POST data with ffuf, use the -d flag and add -X POST to specify the request method. Also, set the appropriate Content-Type header (commonly application/x-www-form-urlencoded for PHP).

  • Example: ffuf -w /opt/useful/SecLists/Discovery/Web-Content/burp-parameter-names.txt:FUZZ -u http://admin.academy.htb:PORT/admin/admin.php -X POST -d 'FUZZ=key' -H 'Content-Type: application/x-www-form-urlencoded'

Value Fuzzing

  • After identifying a working parameter, you may need to fuzz its value to determine acceptable inputs. Often, a pre-made wordlist may not exist for specific parameters. For common parameters like usernames, you might find a suitable wordlist or create one based on expected values. The command will differ depending on whether the parameter is sent via GET or POST.

  • Example: ffuf -w ids.txt:FUZZ -u http://admin.academy.htb:PORT/admin/admin.php -X POST -d 'id=FUZZ' -H 'Content-Type: application/x-www-form-urlencoded'

PreviousNessusNextHydra

Last updated 3 months ago

🧰