Basic Fuzzing
Directory Fuzzing
- Make it faster by adding
-t 200
(==not recommended because can cause a Denial of Service==)
Page Fuzzing
Extension Fuzzing
In the previous section, we found that we had access toย /blog
, but the directory returned an empty page, and we cannot manually locate any links or pages. So, we will once again utilize web fuzzing to see if the directory contains any hidden pages. However, before we start, we must find out what types of pages the website uses, likeย .html
,ย .aspx
,ย .php
, or something else.
One common way to identify that is by finding the server type through the HTTP response headers and guessing the extension. For example, if the server isย apache
, then it may beย .php
, or if it wasย IIS
, then it could beย .asp
ย orย .aspx
, and so on. This method is not very practical, though.
Before we start fuzzing, we must specify which file that extension would be at the end of! We can always 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.
- Once found the extension type, perform the following:
Recursive Fuzzing
When we scan recursively, it automatically starts another scan under any newly identified directories that may have on their pages until it has fuzzed the main website and all of its subdirectories.
Some websites may have a big tree of sub-directories, like /login/user/content/uploads/โฆetc, and this will expand the scanning tree and may take a very long time to scan them all. This is why it is always advised to specify a depth to our recursive scan, such that it will not scan directories that are deeper than that depth. Once we fuzz the first directories, we can then pick the most interesting directories and run another scan to direct our scan better.
Domain Fuzzing
Sub-domain Fuzzing
A sub-domain is any website underlying another domain. For example,ย https://photos.google.com
ย is theย photos
ย sub-domain ofย google.com
.
vHost Fuzzing
To scan for VHosts, without manually adding the entire wordlist to ourย /etc/hosts
, we will be fuzzing HTTP headers, specifically theย Host:
ย header. To do that, we can use theย -H
ย flag to specify a header and will use theย FUZZ
ย keyword within it, as follows:
Filtering results
- Filter by size:
Parameter Fuzzing - GET
Tip
Fuzzing parameters may expose unpublished parameters that are publicly accessible. Such parameters tend to be less tested and less secured, so it is important to test such parameters for the web vulnerabilities we discuss in other modules.
GET Request Fuzzing
Parameter Fuzzing - POST
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โโ.
Value Fuzzing
After fuzzing a working parameter, we now have to fuzz the correct value that would return theย flag
ย content we need.
Custom Wordlist
When it comes to fuzzing parameter values, we may not always find a pre-made wordlist that would work for us, as each parameter would expect a certain type of value.
There are many ways to create this wordlist, from manually typing the IDs in a file, or scripting it using Bash or Python. The simplest way is to use the following command in Bash that writes all numbers from 1-1000 to a file: