Gobuster Basics: Find Hidden Directories on Your Own Website (Legally)


Every website has pages you never see in the navigation menu: admin panels, backup files, test folders, old versions of pages. Attackers love finding these because developers often forget they exist — and forget to protect them. Gobuster is the free tool that finds them. Today you will learn to use it on your own website.

What Is Gobuster?

Gobuster is a directory and file brute-forcing tool written in Go. You give it a website URL and a wordlist — a big list of common directory and file names — and it tries each one, reporting which ones actually exist. It is fast, simple, and included in Kali Linux.

Step 1: Install It

sudo apt update && sudo apt install gobuster

On Kali it is usually preinstalled. Verify with:

gobuster --help

Step 2: Get a Wordlist

Gobuster needs a list of words to try. Kali ships with several in /usr/share/wordlists/. A good starter:

ls /usr/share/wordlists/dirb/

The file common.txt is a solid beginner choice. Bigger lists like directory-list-2.3-medium.txt find more but take longer.

Step 3: Run Your First Scan

Point Gobuster at a site you own — your own blog, a local test server, or a legal lab like OWASP Juice Shop:

gobuster dir -u http://your-own-site.com -w /usr/share/wordlists/dirb/common.txt

What the flags mean:

  • dir — directory brute-force mode
  • -u — the target URL
  • -w — the wordlist to use

Gobuster prints every path that returns an interesting status code. A 200 means the page exists. A 301 or 302 means a redirect — often worth a look too. A 403 means forbidden — the path exists but you cannot access it, which is itself useful information.

Step 4: Read the Results Like a Defender

A typical run on your own site might reveal:

  • /admin — is it protected by strong authentication?
  • /backup.zip — a full site backup, publicly downloadable? Remove it.
  • /test/ — a forgotten development folder? Delete it.
  • /.git/ — your source code history, exposed? Block it.

Every finding is a fix waiting to happen. That is the point: you are finding your own weaknesses before someone else does.

Useful Flags

gobuster dir -u http://your-own-site.com -w /usr/share/wordlists/dirb/common.txt -x php,html,txt -t 50 -o results.txt
  • -x php,html,txt — also try these file extensions
  • -t 50 — use 50 threads for speed
  • -o results.txt — save results to a file

The Rules (Non-Negotiable)

  • Only scan sites you own or have written permission to test. Scanning someone else’s website without permission is illegal in most countries, even if you “only” look for directories.
  • Be gentle. Aggressive scans with huge wordlists and high thread counts can hammer a small server. Keep thread counts modest on shared hosting.
  • Fix what you find. A scan you ignore is worse than no scan at all.

What to Learn Next

Once Gobuster feels easy, try ffuf for more flexible fuzzing, and learn how web servers decide what to reveal — that is where directory enumeration meets real web security.

Go scan your own site. You might be surprised what you forgot was there.

Comments

Popular Posts