Find Hidden Directories with Gobuster

Find Hidden Directories with Gobuster — Web Recon on Kali Linux

This post walks the workflow end to end — the basic scan, hunting files by extension, and how `ffuf` does the same job a little faster — with real output.


> Prefer video? I walk through the whole thing on [my YouTube channel](https://www.youtube.com/@guskhawaja) — same commands, ~3 minutes.



> ⚠️ Run this on a lab box, not a live domain. Directory busting fires thousands of requests per minute. That's noisy *active* scanning, not passive recon. Everything below runs against a local [DVWA](https://github.com/digininja/DVWA) container I own. Most bug bounty programs authorize passive recon but draw the line at high-volume brute force — only ever point these tools at a target you own or have explicit written permission to test.


How Directory Busting Works

A directory buster takes a wordlist — a big list of common folder and file names — and asks the web server about every single one. You're not guessing blindly; you're checking a curated list of names that show up on real sites (`admin`, `config`, `backup`, `login`, `uploads`, `.git`, and thousands more). The server's HTTP **status code** for each request tells you whether the path is real.


That's the whole trick. Reading the status codes is the skill:

| `200` | OK | The page exists and loaded. Go look at it. |

| `301` / `302` | Redirect | Almost always a real directory (the server redirects `/config` → `/config/`). |

| `403` | Forbidden | The path **exists**, you're just not allowed in. Ironically, a confirmation. |

| `404` | Not Found | Nothing there. gobuster hides these by default so you only see hits. |


What You'll Need

A Kali Linux box (or any Debian/Ubuntu derivative). `gobuster`, `ffuf`, and `dirb` are all in the repos:

sudo apt install gobuster ffuf dirb


For a safe practice target, spin up DVWA in Docker:

sudo docker run -d -p 8080:80 vulnerables/web-dvwa


That gives you a deliberately vulnerable web app on `http://127.0.0.1:8080` to point everything at.


Step 1 — The Basic Gobuster Scan

`gobuster` runs in modes; for content discovery you want `dir` mode. A tip that keeps your commands short: stash the wordlist path in a variable so you're not retyping it.


export WL=/usr/share/wordlists/dirb/common.txt

gobuster dir -u http://127.0.0.1:8080 -w $WL -t 30


- `dir` — directory/file enumeration mode.

- `-u` — the target URL (include the scheme, `http://` or `https://`).

- `-w` — the wordlist. `dirb/common.txt` (~4,600 entries) is the classic starting point.

- `-t 30` — run 30 requests concurrently so it finishes quickly.


Step 2 — Hunt Files by Extension with `-x`

Folders are only half the story. The real loot is usually in files — `.php` scripts, `.txt` notes, `.bak` backups. By default gobuster only tries the bare words in the list. Tell it which extensions to append with `-x`:

gobuster dir -u http://127.0.0.1:8080 -w $WL -x php,txt -t 30


Step 3 — Meet the Family: `ffuf`

`gobuster` isn't the only tool that does this. `ffuf` ("Fuzz Faster U Fool") does the same job and is a touch faster. The difference is the syntax: instead of a `-u`/`dir` mode, you put the literal word `FUZZ` in the URL wherever the guess should go.

ffuf -u http://127.0.0.1:8080/FUZZ -w $WL -mc 200,301,302,403


- `FUZZ` — the placeholder; ffuf swaps in each wordlist entry here.

- `-w` — the same wordlist.

- `-mc` — "match codes," filter the output to the status codes you care about.


Summary

| `gobuster` | Simple, fast, great default. The one most tutorials use. |

| `ffuf` | Fastest, and `FUZZ` can go *anywhere* — paths, parameters, headers, vhosts. |

| `feroxbuster` | Recursive by default — automatically digs into directories it finds. |

| `dirb` | The old reliable. Slower, but it's everywhere and needs zero flags. |


Comments

Popular posts from this blog

How to Install a Printer on Kali Linux

Sharing a Folder on Kali Linux

Listing Files and Folders in Kali Linux