24 Jul 2024
I will be grading labs on a best-six-out-of-seven basis, so you can treat this lab as optional.
Preparation
None
Procedure
|
Note
|
Within the lab, you can view this procedure at http://10.0.0.1. You will also be using http://10.0.0.1 as a fuzz target. |
FFuF usage
FFuF (Fuzz Faster U Fool) is a fast web fuzzing tool created in Go.
It is mainly used for web enumeration, fuzzing, and directory brute-forcing.
Read its manual page or help (-h) output and answer the following questions:
-
How do you save FFuF’s output to a markdown file such as
ffuf.md? -
What option would you use to follow redirects?
-
How do you print complete URLs and redirect locations?
-
How do you enable colourized output?
-
How can you match only URLs with HTTP status 200 (OK)?
-
How can you filter out URLs with HTTP status code 403 (Forbidden)?
URL discovery
The FFuF tool always requires at least two option:
-u-
Target URL to fuzz. This should contain the literal value
FUZZ, which will be replaced with words in a wordlist. -w-
Wordlist file. We can use wordlists from
/usr/share/seclistsin our Kali installation, or we can supply custom wordlists at the command line by using-w -(stdin).
Using these arguments:
-
"Fuzz" the site http://10.0.0.1 with a single-word wordlist. What is the HTTP status code, file size and word count of the resulting file?
-
Use the
Discovery/Web-Content/common.txtwordlist to discover some files and directories that are present on http://10.0.0.1. -
Try again with the
Discovery/Web-Content/raft-large-files.txtwordlist. What difference do you see? -
Use the
-eoption in conjunction with theraft-medium-words-lowercase.txtwordlist to discover more files with common endings (e.g.,.txtand.php). -
Find as many files and directories as you can within the
/vulnerabilitiesdirectory (e.g.,/vulnerabilities/brute/index.php).
Parameter fuzzing
FFuF can fuzz things besides URLs!
-
Using a very short wordlist (e.g., one word), fuzz http://10.0.0.1/sqli-labs/Less-1/index.php?FUZZ=1. How many words are in the HTML you receive as a result?
-
Use
Discovery/Web-Content/burp-parameter-names.txtto fuzz the space of parameters to/sqli-labs/Less-1by filtering on the number of words in the HTTP response.
Password fuzzing
We can also use ffuf for wordlist-based brute-force attacks, for example, trying passwords on an authentication page.
-
Use the cURL command to inspect the login page at http://10.0.0.1/sqli-labs/Less-11/index.php. What do you observe about the HTML form?
-
Use the
-X POSTargument to cURL to make a POST request to/sqli-labs/Less-11/, using the-dargument to pass HTML form data attempting to log in with the usernamebatmanand the passworddark knight. For example, if you wanted to submit an HTML form with a fieldahaving the valuefooandbhaving the value42, you would passa=foo&b=42to-d. -
Use FFuF with the same
-Xand-darguments to fuzz the password of theDummyuser. Try using thePasswords/Leaked-Databases/phpbb.txtwordlist. You will also need to set the HTTP headerContent-Type: application/x-www-form-urlencoded, since FFuF doesn’t set it automatically like cURL. -
Confirm that you have successfully found the
Dummyuser’s password. -
Use
curlanddiffto compare the HTML of/sqli-labs/Less-11under the following conditions. What do you observe?-
no username or password supplied
-
incorrect username or password supplied
-
correct username and password supplied
-
username
Dummy, passwordphpbbin'(note: the URL encoding of the single quote'character is%27)
-