Gobuster Cheat Sheet

Sharing is caring

Views: 55

Common Gobuster Commands

dir Mode

gobuster dir -u https://nlabs.local -w ~/wordlists/shortlist.txt

With content length

gobuster dir -u https://nlabs.local  -w ~/wordlists/shortlist.txt -l

dns Mode

gobuster dns -d nlabs.local -t 50 -w common-names.txt
gobuster dns -d nlabs.local -w ~/wordlists/subdomains.txt

With Show IP

gobuster dns -d nlabs.local -w ~/wordlists/subdomains.txt -i

Base domain validation warning when the base domain fails to resolve

gobuster dns -d nlabs.local -w ~/wordlists/subdomains.txt -i

Wildcard DNS is also detected properly:

gobuster dns -d 0.0.1.xip.io -w ~/wordlists/subdomains.txt

vhost Mode

gobuster vhost -u https://nlabs.local -w common-vhosts.txt

s3 Mode

gobuster s3 -w bucket-names.txt

Available Modes

SwitchDescription
dirDirectory brute-forcing mode
dnsDNS subdomain brute-forcing mode
vhostVirtual host brute-forcing mode (not the same as DNS). NOTE: VHosts may or may not have public DNS records.
s3Enumerate open S3 buckets and look for existence and bucket listings

Global Flags

Short SwitchLong SwitchDescription
-z–no-progressDon’t display progress
-o–output stringOutput file to write results to (defaults to stdout)
-q–quietDon’t print the banner and other noise
-t–threads intNumber of concurrent threads (default 10)
-i–show-ipsShow IP addresses
–delay durationDNS resolver timeout (default 1s)
-v,–verboseVerbose output (errors)
-w–wordlist stringPath to the wordlist

DNS Mode Options

Short SwitchLong SwitchDescription
-h,–helphelp for dns
-d,–domain stringThe target domain
-r,–resolver stringUse custom DNS server (format server.com or server.com:port)
-c,–show-cnameShow CNAME records (cannot be used with ‘-i’ option)
-i,–show-ipsShow IP addresses
–timeout durationDNS resolver timeout (default 1s)

vhost Mode Options

Short SwitchLong SwitchDescription
-h–helphelp for vhost
-c–cookies stringCookies to use for the requests
-r–follow-redirectFollow redirects
-H–headers stringArraySpecify HTTP headers, -H ‘Header1: val1’ -H ‘Header2: val2’
-k–no-tls-validationSkip TLS certificate verification
-P–password stringPassword for Basic Auth
-p–proxy stringProxy to use for requests [http(s)://host:port]
–timeout durationHTTP Timeout (default 10s)
-u–url stringThe target URL
-a–useragent stringSet the User-Agent string (default “gobuster/3.1.0”)
-U–username stringUsername for Basic Auth

DIR Mode Options

Short SwitchLong SwitchDescription
-h,–helphelp for dir
-f,–add-slashAppend / to each request
-c,–cookies stringCookies to use for the requests
-e,–expandedExpanded mode, print full URLs
-x,–extensions stringFile extension(s) to search for
-r,–follow-redirectFollow redirects
-H,–headers stringArraySpecify HTTP headers, -H ‘Header1: val1’ -H ‘Header2: val2’
-l,–include-lengthInclude the length of the body in the output
-k,–no-tls-validationSkip TLS certificate verification
-n,–no-statusDon’t print status codes
-P,–password stringPassword for Basic Auth
-p,–proxy stringProxy to use for requests [http(s)://host:port]
-s,–status-codes stringPositive status codes (will be overwritten with status-codes-blacklist if set) (default “200,204,301,302,307,401,403”)
-b,–status-codes-blackliststring Negative status codes (will override status-codes if set)
–timeout durationHTTP Timeout (default 10s)
-u,–url stringThe target URL
-a,–useragent stringSet the User-Agent string (default “gobuster/3.1.0”)
-U,–username stringUsername for Basic Auth
-d,–discover-backupUpon finding a file search for backup files
–wildcardForce continued operation when wildcard found