Skip to the content.

Tutorial — dirbrute

dirbrute brute-forces directories and files on a webserver with a threaded Go scanner. It filters wildcard responses automatically: when the server answers every path with the same status/size (soft 404), that baseline is detected once and skipped for all other candidates, so the findings list stays clean.

Step 1 — get the binary

Download the platform binary from dirbrute-v1.1.1 (linux amd64/arm64, macOS amd64/arm64, windows amd64 — all with sha256 checksums), or build from source:

$ make build        # compiles dirbrute/dirbrute (Go 1.19+)

Step 2 — basic scan

$ ./dirbrute/dirbrute -u http://127.0.0.1:8080/ -t 10

Findings go to stdout, progress to stderr. From the captured run:

[!] wildcard response detected (status 404, size 335), identical responses are skipped
[*] 145 candidates queued with 10 workers
.env (Status: 200) [Size: 124]
backup.zip (Status: 200) [Size: 152]
admin (Status: 301) [Size: 0]

The [!] line is good news: it means the server was returning a body for any random path, and the scanner learned that baseline and will not report every candidate as a hit.

Step 3 — extensions and wordlists

$ ./dirbrute/dirbrute -u https://target/ -x php,html -w paths.txt -t 30

Step 4 — filtering noise

$ ./dirbrute/dirbrute -u https://target/ -b 404,403 -exclude-length 0,12

Step 5 — authenticated scans and TLS

$ ./dirbrute/dirbrute -u https://target/ -c 'session=abc123' \
    -H 'X-Forwarded-For: 10.0.0.1' -a 'MyScanner/1.0' -k -r

Step 6 — save results, stay quiet

$ ./dirbrute/dirbrute -u https://target/ -t 50 -o found.txt -q

-o mirrors the findings to a file while they still stream to stdout; -q silences the stderr progress lines.

Every flag

Flag Meaning
-u target base URL, required (http(s)://host[:port])
-w wordlist file (default: embedded list)
-t concurrent workers, 1–500 (default 20)
-x comma separated extensions to probe
-b status codes to ignore (default 404)
-exclude-length body sizes to ignore
-a user agent
-c raw Cookie header
-H extra header, repeatable
-r follow redirects
-k skip TLS verification
-q suppress progress output
-timeout per-request timeout, 1–600 s (default 10)
-o also write findings to this file

Gotchas

See also: README · examples · next tutorial: hashcrack