Skip to content
Home

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
FlagMeaning
-XOnly try these extensions
-rNon-recursive (root level only)
-cSend a cookie (authenticated scan)
-oWrite output to a file
-zDelay 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 dirbuster does the same job through a point-and-click interface if you’d rather pick a wordlist visually.