Crawling
FFUF
Discover files and folders that we cannot spot by simply browsing the website. Launch ffuf
with a list of folders names and instruct it to look recursively through them.
neutron@kali[/kali]$ ffuf -recursion -recursion-depth 1 -u http://192.168.10.10/FUZZ -w /opt/useful/SecLists/Discovery/Web-Content/raft-small-directories-lowercase.txt
/'___\ /'___\ /'___\
/\ \__/ /\ \__/ __ __ /\ \__/
\ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\
\ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/
\ \_\ \ \_\ \ \____/ \ \_\
\/_/ \/_/ \/___/ \/_/
v1.1.0-git
________________________________________________
:: Method : GET
:: URL : http://192.168.10.10/FUZZ
:: Wordlist : FUZZ: /opt/useful/SecLists/Discovery/Web-Content/raft-small-directories-lowercase.txt
:: Follow redirects : false
:: Calibration : false
:: Timeout : 10
:: Threads : 40
:: Matcher : Response status: 200,204,301,302,307,401,403,405
________________________________________________
wp-admin [Status: 301, Size: 317, Words: 20, Lines: 10]
[INFO] Adding a new job to the queue: http://192.168.10.10/wp-admin/FUZZ
wp-includes [Status: 301, Size: 320, Words: 20, Lines: 10]
[INFO] Adding a new job to the queue: http://192.168.10.10/wp-includes/FUZZ
wp-content [Status: 301, Size: 319, Words: 20, Lines: 10]
[INFO] Adding a new job to the queue: http://192.168.10.10/wp-content/FUZZ
admin [Status: 302, Size: 0, Words: 1, Lines: 1]
login [Status: 302, Size: 0, Words: 1, Lines: 1]
feed [Status: 301, Size: 0, Words: 1, Lines: 1]
[INFO] Adding a new job to the queue: http://192.168.10.10/feed/FUZZ
...
-
-recursion
: Activates the recursive scan. -
-recursion-depth
: Specifies the maximum depth to scan. -
-u
: Our target URL, andFUZZ
will be the injection point. -
-w
: Path to our wordlist.
Sensitive Information Disclosure
It is common to find backup or unreferenced files that can have important information or credentials. There are some lists of common extensions we can find in the raft-[ small | medium | large ]-extensions.txt
files from SecLists.
We will combine some of the folders we have found before, a list of common extensions, and some words extracted from the website to see if we can find something that should not be there. The first step will be to create a file with the following folder names and save it as folders.txt
.
wp-admin
wp-content
wp-includes
Next, we will extract some keywords from the website using CeWL. We will instruct the tool to extract words with a minimum length of 5 characters -m5
, convert them to lowercase --lowercase
and save them into a file called wordlist.txt -w <FILE>
:
neutron@kali[/kali]$ cewl -m5 --lowercase -w wordlist.txt http://192.168.10.10
The next step will be to combine everything in ffuf to see if we can find some information. Use the following parameters in ffuf
:
-
-w
: We separate the wordlists by coma and add an alias to them to inject them as fuzzing points later -
-u
: Our target URL with the fuzzing points.
neutron@kali[/kali]$ ffuf -w ./folders.txt:FOLDERS,./wordlist.txt:WORDLIST,./extensions.txt:EXTENSIONS -u http://192.168.10.10/FOLDERS/WORDLISTEXTENSIONS
/'___\ /'___\ /'___\
/\ \__/ /\ \__/ __ __ /\ \__/
\ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\
\ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/
\ \_\ \ \_\ \ \____/ \ \_\
\/_/ \/_/ \/___/ \/_/
v1.1.0-git
________________________________________________
:: Method : GET
:: URL : http://192.168.10.10/FOLDERS/WORDLISTEXTENSIONS
:: Wordlist : FOLDERS: ./folders.txt
:: Wordlist : WORDLIST: ./wordlist.txt
:: Wordlist : EXTENSIONS: ./extensions.txt
:: Follow redirects : false
:: Calibration : false
:: Timeout : 10
:: Threads : 40
:: Matcher : Response status: 200,204,301,302,307,401,403,405
________________________________________________
[Status: 200, Size: 8, Words: 1, Lines: 2]
* EXTENSIONS: ~
* FOLDERS: wp-content
* WORDLIST: secret
[Status: 200, Size: 0, Words: 1, Lines: 1]
* FOLDERS: wp-includes
* WORDLIST: comment
* EXTENSIONS: .php
[Status: 302, Size: 0, Words: 1, Lines: 1]
* FOLDERS: wp-admin
* WORDLIST: comment
* EXTENSIONS: .php
...
neutron@kali[/kali]$ curl http://192.168.10.10/wp-content/secret~
Following this approach, we have successfully found a secret file.