Skip to content


DIRB is a Web Content Scanner. It looks for existing (and/or hidden) Web Objects. It basically works by launching a dictionary based attack against a web server and analyzing the response.

DIRB comes with a set of preconfigured attack wordlists for easy usage but you can use your custom wordlists. Also DIRB sometimes can be used as a classic CGI scanner, but remember is a content scanner not a vulnerability scanner.

DIRB main purpose is to help in professional web application auditing. Specially in security related testing. It covers some holes not covered by classic web vulnerability scanners. DIRB looks for specific web objects that other generic CGI scanners can’t look for. It doesn’t search vulnerabilities nor does it look for web contents that can be vulnerables.

How to use:

root@kali:~# dirb


DIRB v2.21

By The Dark Raver


./dirb [<wordlist_file(s)>] [options]

====== NOTES =======

  : Base URL to scan. (Use -resume for session resuming)

 <wordlist_file(s)> : List of wordfiles. (wordfile1,wordfile2,wordfile3…)

====== HOTKEYS ======

 ‘n’ -> Go to next directory.

 ‘q’ -> Stop scan. (Saving state for resume)

 ‘r’ -> Remaining scan stats.

======= OPTIONS =======

 -a : Specify your custom USER_AGENT.

 -c : Set a cookie for the HTTP request.

 -f : Fine tunning of NOT_FOUND (404) detection.

 -H : Add a custom header to the HTTP request.

 -i : Use case-insensitive search.

 -l : Print “Location” header when found.

 -N : Ignore responses with this HTTP code.

 -o : Save output to disk.

 -p <proxy[:port]> : Use this proxy. (Default port is 1080)

 -P : Proxy Authentication.

 -r : Don’t search recursively.

 -R : Interactive recursion. (Asks for each directory)

 -S : Silent Mode. Don’t show tested words. (For dumb terminals)

 -t : Don’t force an ending ‘/’ on URLs.

 -u : HTTP Authentication.

 -v : Show also NOT_FOUND pages.

 -w : Don’t stop on WARNING messages.

 -X / -x : Append each word with this extensions.

 -z : Add a miliseconds delay to not cause excessive Flood.

======== EXAMPLES ======

 ./dirb http://url/directory/ (Simple Test)

 ./dirb http://url/ -X .html (Test files with ‘.html’ extension)

 ./dirb http://url/ /usr/share/dirb/wordlists/vulns/apache.txt (Test with apache.txt wordlist)

 ./dirb https://secure_url/ (Simple Test with SSL)

How it works:

It internally has a wordlist file which has by default around 4000 words for brute force attack. There are a lot of updated wordlists available over the internet which can also be used. Dirb searches for the words in its wordlist in every directory or object of a website or a server. It might be an admin panel or a subdirectory that is vulnerable to attack. The key is to find the objects as they are generally hidden.

dirb Usage Example:

Scan the web server ( for directories using a dictionary file (/usr/share/wordlists/dirb/common.txt):

root@kali:~# dirb /usr/share/wordlists/dirb/common.txt


DIRB v2.21   

By The Dark Raver


START_TIME: Fri May 16 13:41:45 2014


WORDLIST_FILES: /usr/share/wordlists/dirb/common.txt


GENERATED WORDS: 4592                                                         

—- Scanning URL: —-

==> DIRECTORY:                                                                                                                            &nbsp;

+ (CODE:200|SIZE:2726)                                                                                                                

+ (CODE:403|SIZE:1122)                                                                                                                   

==> DIRECTORY:                                                                                                                          &nbsp;

==> DIRECTORY:                                                   &nbsp;