← retour aux outils back to tools

# Dirb

Scanner de contenu web utilisant des attaques par dictionnaire pour trouver des répertoires et fichiers cachés sur les serveurs web. Web content scanner using dictionary-based attacks to find hidden directories and files on web servers.

↗ https://sourceforge.net/projects/dirb

## Overview

Dirb is a simple, reliable web content scanner that discovers hidden directories and files by brute-forcing against a wordlist. It’s slower than Feroxbuster/ffuf but reliable for basic content discovery.

## Common Usage

Basic scan (uses default wordlist)

    dirb https://target.com

Custom wordlist

    dirb https://target.com /usr/share/wordlists/dirb/big.txt

File extensions

    dirb https://target.com -X .php,.txt,.bak

Scan with authentication

    dirb https://target.com -u admin:password

Recursive (follow subdirectories)

    dirb https://target.com -r

Save output

    dirb https://target.com -o results.txt

Proxy through Burp

    dirb https://target.com -p http://127.0.0.1:8080

Custom user agent

    dirb https://target.com -a "Mozilla/5.0 ..."

## Built-in Wordlists (Kali)

    /usr/share/wordlists/dirb/common.txt      (4614 words)
    /usr/share/wordlists/dirb/big.txt         (20469 words)
    /usr/share/wordlists/dirb/small.txt       (959 words)
    /usr/share/wordlists/dirb/extensions_common.txt

Help / Man page

    dirb <url_base> [<wordlist_file(s)>] [options]

    REQUIRED:
      url_base          Base URL to scan
      wordlist_file     Wordlist (default: /usr/share/dirb/wordlists/common.txt)

    OPTIONS:
      -a USER_AGENT     Custom User-Agent
      -b                Don't squash sequences of /../ or /./
      -c COOKIE         Set a cookie
      -E CERTIFICATE    Client certificate file
      -f                Fine tunning of NOT_FOUND detection
      -H HEADER         Add custom header
      -i                Use case-insensitive search
      -l                Print "Location" header when found
      -N CODE           Ignore responses with this HTTP code
      -o FILE           Save output to file
      -p PROXY          Proxy (host:port or http://host:port)
      -P PROXY_USER:PASS  Proxy authentication
      -r                Don't search recursively
      -R                Interactive recursion (ask at each level)
      -S                Silent mode (no header or progress)
      -t                Don't force an ending slash on URLs
      -u USER:PASS      HTTP authentication
      -v                Show also NOT_FOUND pages
      -w                Don't stop on WARNING messages
      -X EXTENSIONS     Append extensions to each word (e.g. .php,.txt)
      -x EXTS_FILE      File with list of extensions
      -z MILLISECS      Add a delay between requests

## Vue d’ensemble

Dirb est un scanner de contenu web simple et fiable qui découvre les répertoires et fichiers cachés par brute-force contre une liste de mots. Il est plus lent que Feroxbuster/ffuf mais fiable pour la découverte de contenu de base.

## Utilisation courante

    # Scan de base (utilise la liste de mots par défaut)
    dirb https://target.com

    # Liste de mots personnalisée
    dirb https://target.com /usr/share/wordlists/dirb/big.txt

    # Extensions de fichiers
    dirb https://target.com -X .php,.txt,.bak

    # Scan avec authentification
    dirb https://target.com -u admin:password

    # Récursif (suivre les sous-répertoires)
    dirb https://target.com -r

    # Sauvegarder la sortie
    dirb https://target.com -o results.txt

    # Proxy via Burp
    dirb https://target.com -p http://127.0.0.1:8080

    # User agent personnalisé
    dirb https://target.com -a "Mozilla/5.0 ..."

## Listes de mots intégrées (Kali)

    /usr/share/wordlists/dirb/common.txt      (4614 mots)
    /usr/share/wordlists/dirb/big.txt         (20469 mots)
    /usr/share/wordlists/dirb/small.txt       (959 mots)
    /usr/share/wordlists/dirb/extensions_common.txt

Aide / Page de manuel

    dirb <url_base> [<wordlist_file(s)>] [options]

    REQUIRED:
      url_base          Base URL to scan
      wordlist_file     Wordlist (default: /usr/share/dirb/wordlists/common.txt)

    OPTIONS:
      -a USER_AGENT     Custom User-Agent
      -b                Don't squash sequences of /../ or /./
      -c COOKIE         Set a cookie
      -E CERTIFICATE    Client certificate file
      -f                Fine tunning of NOT_FOUND detection
      -H HEADER         Add custom header
      -i                Use case-insensitive search
      -l                Print "Location" header when found
      -N CODE           Ignore responses with this HTTP code
      -o FILE           Save output to file
      -p PROXY          Proxy (host:port or http://host:port)
      -P PROXY_USER:PASS  Proxy authentication
      -r                Don't search recursively
      -R                Interactive recursion (ask at each level)
      -S                Silent mode (no header or progress)
      -t                Don't force an ending slash on URLs
      -u USER:PASS      HTTP authentication
      -v                Show also NOT_FOUND pages
      -w                Don't stop on WARNING messages
      -X EXTENSIONS     Append extensions to each word (e.g. .php,.txt)
      -x EXTS_FILE      File with list of extensions
      -z MILLISECS      Add a delay between requests