dirb: dictionary-based web content scanner
Brute-force hidden directories and files on a web server with wordlists.
bash·1 min read··INE Certification
dirb is the older, simpler cousin of gobuster and ffuf. It’s slower, but it ships everywhere and its recursive-by-default behavior means it’ll dig into subdirectories it finds without being told to.
Usage
dirb http://example.com # default wordlist
dirb http://example.com /path/to/wordlist.txt # custom wordlist
dirb http://example.com -X .php,.html,.bak # only these extensions
dirb http://example.com -r # non-recursive (root level only)
dirb http://example.com -c "session=12345" # authenticated scan via cookie
dirb http://example.com -o output.txt
dirb http://example.com -z 100 # add delay (ms) between requests
| Flag | Meaning |
|---|---|
-X | Only try these extensions |
-r | Non-recursive (root level only) |
-c | Send a cookie (authenticated scan) |
-o | Write output to a file |
-z | Delay in ms between requests |
A solid default wordlist: /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt.
Gotchas
- For anything time-sensitive, gobuster or ffuf get through the same wordlist faster.
- dirb’s main advantage is that it’s dependable and preinstalled, which matters on a minimal toolset.
- Its GUI sibling
dirbusterdoes the same job through a point-and-click interface if you’d rather pick a wordlist visually.
Related
- Web server & HTTP enumeration: the workflow this tool plugs into
- Gobuster: faster alternative with dns/vhost modes
- FFuF: fuzz anywhere in the request, not just paths