Popular Searches

Extended Web Fuzzing (Parameters & Vhosts)

CybersecurityBeginner
Practice Now

Introduction

In this lab, you will expand your web enumeration skills by exploring advanced fuzzing techniques using ffuf (Fuzz Faster U Fool). While basic directory fuzzing is common, many web applications hide additional attack surfaces in the form of Virtual Hosts (Vhosts) and undocumented HTTP parameters.

Virtual Hosts allow a single web server (with one IP address) to host multiple different websites or subdomains. The server determines which site to display based on the Host header provided in the HTTP request. By fuzzing this header, you can discover hidden administrative or development portals.

This is an important lesson in web architecture: the same IP address does not necessarily mean the same application. Modern hosting often multiplexes many sites behind one address and distinguishes them at the HTTP layer.

Similarly, web endpoints often accept hidden GET or POST parameters (e.g., ?debug=true) that developers left behind. Discovering these parameters can lead to significant vulnerabilities, such as bypassing authentication or triggering injection flaws. You will learn how to systematically uncover these hidden elements.

Parameters are part of the application's input surface. If you do not know which parameters exist, you are only seeing part of how the endpoint behaves.

Configure Host Header Fuzzing

In this step, you will learn the concept of Virtual Hosts (Vhosts) and how to manually manipulate the HTTP Host header using curl.

A single web server can host multiple websites. When you send a request to a web server, your browser automatically includes a Host header containing the domain name you are trying to access. The web server reads this header and serves the corresponding website. If the header is missing or unrecognized, the server usually returns a default page.

First, let's make a standard request to our local target server without specifying a custom domain.

curl http://127.0.0.1:8080

You should see the default response:

Welcome to the main site. Try to find hidden vhosts or parameters!

Now, imagine we suspect that this server hosts a subdomain called admin.labex.io. Even if we don't have a DNS record for this subdomain, we can force the server to evaluate it by manually injecting the Host header using the -H flag in curl.

Execute the following command to send a custom Host header:

curl -H "Host: admin.labex.io" http://127.0.0.1:8080

You will notice that the response changes completely:

Welcome to the Admin Portal!

This confirms that the server is using name-based virtual hosting. By changing the Host header, we accessed a completely different part of the application. In the next step, we will automate this process to discover unknown subdomains.

Fuzz Virtual Hosts (Vhosts)

In this step, you will use ffuf to automate the discovery of Virtual Hosts. Instead of manually guessing subdomains with curl, we will use a wordlist to rapidly test multiple possibilities.

We have prepared a small wordlist for you at ~/project/wordlists/vhosts.txt. We will use ffuf to inject each word from this list into the Host header.

Run the following ffuf command. The -w flag specifies the wordlist, -u specifies the target URL, and -H specifies the custom header where the FUZZ keyword will be replaced by words from our list.

ffuf -w ~/project/wordlists/vhosts.txt -u http://127.0.0.1:8080 -H "Host: FUZZ.labex.io"

You will notice that ffuf reports every single word in the wordlist as a successful match (Status: 200). This happens because the server always returns a 200 OK status code, even for the default page.

To find the actual hidden vhosts, we need to filter out the default responses. Look at the Size column in your previous output. The default page has a size of 67 bytes. We can tell ffuf to ignore any response that is exactly 67 bytes long by using the -fs (filter size) flag.

Run the refined command with the size filter:

ffuf -w ~/project/wordlists/vhosts.txt -u http://127.0.0.1:8080 -H "Host: FUZZ.labex.io" -fs 67

Now, the output will be much cleaner, revealing only the subdomains that return a different response size:

dev                     [Status: 200, Size: 24, Words: 2, Lines: 2]
admin                   [Status: 200, Size: 29, Words: 5, Lines: 2]
:: Progress: [5/5] :: Job [1/1] :: 0 req/sec :: Duration: [0:00:00] :: Errors: 0 ::

You have successfully discovered two hidden virtual hosts: admin.labex.io and dev.labex.io.

Fuzz URL Parameters (GET/POST)

In this step, you will learn how to discover hidden HTTP parameters. Developers sometimes leave undocumented parameters in APIs or web pages, such as ?debug=1 or ?test=true, which can expose sensitive information or alter the application's behavior.

This is why parameter discovery matters. Two requests to the same path can behave very differently depending on which names and values the server recognizes.

Fuzzing GET Parameters

Let's target the /api endpoint. First, check its default response:

curl http://127.0.0.1:8080/api

The response is API Endpoint. Missing parameters. which is exactly 34 bytes long. We will use ffuf to fuzz the parameter name in the URL query string (?FUZZ=1). We will use the -fs 34 flag to filter out the default response.

Run the following command using the params.txt wordlist:

ffuf -w ~/project/wordlists/params.txt -u "http://127.0.0.1:8080/api?FUZZ=1" -fs 34

The output will reveal a hidden parameter:

debug                   [Status: 200, Size: 48, Words: 6, Lines: 2]

Fuzzing POST Parameters

Parameters can also be sent in the body of a POST request, commonly used in login forms or data submissions. Let's target the /login endpoint.

First, check the default POST response without any parameters:

curl -X POST http://127.0.0.1:8080/login

The response is Login page. Please submit credentials. which is 39 bytes long.

To fuzz POST data with ffuf, we need to specify the HTTP method using -X POST, provide the data payload using -d "FUZZ=admin", and set the correct content type header using -H "Content-Type: application/x-www-form-urlencoded".

Run the following command, filtering out the default 39-byte response:

ffuf -w ~/project/wordlists/params.txt -u http://127.0.0.1:8080/login -X POST -d "FUZZ=admin" -H "Content-Type: application/x-www-form-urlencoded" -fs 39

The output will reveal the accepted POST parameter:

user                    [Status: 200, Size: 27, Words: 4, Lines: 2]

You have successfully discovered a hidden GET parameter (debug) and a hidden POST parameter (user).

Analyze Fuzzing Results

In this final step, you will manually verify the results of your fuzzing activities and extract the sensitive information exposed by the hidden parameters.

During our fuzzing, we discovered that the /api endpoint accepts a debug parameter. Let's manually trigger this endpoint using curl to see what information it reveals.

Execute the following command to send a GET request with the debug parameter set to 1:

curl "http://127.0.0.1:8080/api?debug=1"

You should receive a response containing a secret key:

Debug mode enabled. Secret key: LABEX_SECRET_99

Next, let's verify the hidden POST parameter we found on the /login endpoint. We discovered that it accepts a user parameter.

Execute the following command to send a POST request with the user parameter:

curl -X POST -d "user=admin" http://127.0.0.1:8080/login

You should receive a successful login message:

Login successful for user.

To complete this lab, save the secret key you discovered from the debug endpoint into a file named secret.txt in your project directory.

echo "LABEX_SECRET_99" > ~/project/secret.txt

By combining Virtual Host discovery and parameter fuzzing, you can map out the hidden architecture of a web application and uncover endpoints that developers never intended for public access.

Summary

In this lab, you expanded your web enumeration capabilities by learning how to fuzz Virtual Hosts and HTTP parameters using ffuf. You started by understanding how the Host header routes traffic and automated the discovery of hidden subdomains. You then applied similar fuzzing techniques to uncover undocumented GET and POST parameters, successfully bypassing default application behaviors to extract sensitive information. These techniques are essential for comprehensive web application security assessments, allowing you to find attack surfaces that are invisible to standard web crawlers.