CtrlK

Pentest Notes / Enumeration / Tools

Gobuster

Some options:

-t [no.of threads]
-o [output_file]
-w [wordlist]

Directory and File Enumeration

dir mode
gobuster dir -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php, txt, html, js -u http://[MACHINE_IP]

FlagDescriptionExample
-cSet cookie, such as a session ID.
-xfile extensions to scan for.-x .php, .js, .txt, .html
-HSet header to pass along.
-kSkips checking of certificate when https is used. Use case: self-signed certificates-
-ndon’t want to see status codes of each response received.
-PSet password to execute authenticated requests.
-USet username to execute authenticated requests.
-sStatus code you want to display eg: 200 or a range 300-400
-bStatus codes you don’t want to display. Overrides the -s flag.
--xlExcludes specific length of the response body.
-rto follow the redirect that it received as a response to the sent request.-

Subdomain Enumeration

dns mode
gobuster dns -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt --domain [example.thm]

FlagDescriptionExample
--domainDomain you want to enumerate.--domain example.thm
-iṢhows IP addresses that the domain and subdomains resolve to.-
-rCustom DNS server to use for resolving.
-cShow CNAME Records (cannot be used with the -i flag).-

Vhost Enumeration

Virtual hosts are different websites on the same machine. They look like subdomains but virtual hosts are IP-based and are running on the same server.
vhost mode
gobuster vhost -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt --append-domain -u http://[MACHINE_IP] --domain example.thm

FlagDescriptionExample
-uBase URL (target domain).-u 10.10.10.10
--append-domainAppends the base domain to each word in the wordlist (e.g., word.example.com).-
-mSpecifies the HTTP method (e.g., GET, POST).
--domainAppends a domain to each wordlist entry to form a valid hostname.--domain example.thm
--xlExcludes specific length of the response body.
--xsExclude specific status codes
-rFollows HTTP redirects.

if dns architecture is not configured properly then -u must have IP and --domain and --append-domain flags must be used
else: -u can have the domain name directly, rather than the IP