Discovery
Useful Browser Extension
| Extension | Use |
|---|---|
| FoxyProxy | proxy switching |
| Wappalyzer | stack fingerprint |
| DotGit | .git detection |
| Cookie-Editor | cookie editing |
| HackBar | manual requests |
| JSONVue | JSON formatting |
| XFF Header | IP spoofing |
| BuiltWith | tech profiling |
| UA Switcher | user-agent spoofing |
| JWT Inspector | token inspection |
A. Recon & Fingerprinting
Finding the domain name
🌟 First check Nmap and website correctly
Reverse DNS:
SMB banner — returns domain and hostname:
TLS certificate — CN and SANs:
openssl s_client -connect $IP:443 </dev/null 2>/dev/null | openssl x509 -noout -text | grep -E 'CN|DNS'
LDAP rootDSE:
Redirects and absolute URLs:
Confirmed name into hosts:
Initial recon
for p in robots.txt sitemap.xml .git/HEAD .env web.config; do printf "%s %s\n" "$(curl -s -o /dev/null -w '%{http_code}' http://$IP/$p)" "$p"; done
curl -s http://$IP | grep -oP 'src="[^"]+\.js"' | cut -d'"' -f2 | while read -r j; do echo "== $j"; curl -s "http://$IP/$j" | grep -oP '["'"'"']/[a-zA-Z0-9_/.-]+'; done
Tech & CMS fingerprinting
B. Known Paths & Exposure
Known paths & backup files
1. Manual checks
curl -s $URL/robots.txt
curl -s $URL/sitemap.xml
curl -s $URL/phpinfo.php
curl -s $URL/server-status
2. Common sensitive files
for f in .env .htaccess .htpasswd config.php wp-config.php web.config \
.DS_Store id_rsa .bash_history database.sql dump.sql; do
echo -n "$f -> "; curl -s -o /dev/null -w "%{http_code}\n" $URL/$f
done
3. Dir brute force
gobuster dir -u $URL -w /usr/share/seclists/Discovery/Web-Content/common.txt -t 40
feroxbuster -u $URL -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -x php,txt,html
4. Backup extensions
gobuster dir -u $URL -w /usr/share/seclists/Discovery/Web-Content/common.txt \
-x bak,old,orig,save,zip,tar,tar.gz,sql,swp,txt,~
5. Backups of a known file (e.g. config.php)
for e in .bak .old .orig .save ~ .swp .txt .zip .tar.gz _bak .copy; do
curl -s -o /dev/null -w "config.php$e %{http_code}\n" $URL/config.php$e
done
6. Download and grep for creds
wget -r -np -nH $URL/backup/
grep -rniE "password|passwd|secret|api_key|token|DB_" .
unzip backup.zip -d out
Source & .git exposure
curl -s $URL/.git/HEAD
git-dumper $URL/.git ./dump
cd dump && git log --oneline && git show <commit>
curl -s $URL/.svn/entries
C. Fuzzing
Wordlists
Quick triage:
/usr/share/seclists/Discovery/Web-Content/common.txt
/usr/share/seclists/Discovery/Web-Content/raft-small-directories.txt
Default:
/usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt
/usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt
Deep, only on a stubborn box:
/usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt
/usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt
Situational:
/usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt
/usr/share/seclists/Discovery/Web-Content/web-extensions.txt
/usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt
/usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt
Directory brute
gobuster dir -u $URL -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -t 40 -o dirs.txt
feroxbuster -u $URL -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -t 40 -o ferox.txt
ffuf -u $URL/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -mc 200,204,301,302,307,401,403 -t 40
Filter noise (wildcard / same-size responses):
ffuf -u $URL/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -fs 1234
ffuf -u $URL/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -fc 404 -fw 20
With cookie or auth header:
gobuster dir -u $URL -w /usr/share/seclists/Discovery/Web-Content/common.txt -c "PHPSESSID=abc123"
ffuf -u $URL/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -H "Authorization: Bearer TOKEN"
Recursion
gobuster has no recursion, so use feroxbuster or ffuf.
ffuf -u $URL/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-small-directories.txt -recursion -recursion-depth 2 -e .php
Brute inside one interesting directory only:
Extensions
Pick the extension from the tech you fingerprinted:
| Stack | Extensions |
|---|---|
| PHP | php,phtml,php5,inc,txt,bak |
| IIS / .NET | asp,aspx,config,txt,bak |
| Java / Tomcat | jsp,jspx,do,action,xml |
| Generic | html,js,json,txt,xml,zip,bak |
gobuster dir -u $URL -w /usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt -x php,txt,bak
ffuf -u $URL/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt -e .php,.txt,.bak
feroxbuster -u $URL -x php,aspx,jsp,txt,bak
Vhosts
Get the baseline response size first, then filter it out:
ffuf -u http://$IP -H "Host: FUZZ.domain.htb" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt -fs <size>
gobuster vhost -u http://$IP --domain domain.htb --append-domain -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt
Add every hit to hosts, then rerun dir brute on it:
D. API & Wrap-up
API & HTTP methods
Allowed methods:
Try each method on an endpoint:
for m in GET POST PUT DELETE PATCH HEAD; do echo -n "$m -> "; curl -s -o /dev/null -w "%{http_code}\n" -X $m $URL/api/users; done
API endpoint discovery:
ffuf -u $URL/FUZZ -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt -mc all -fc 404
Common docs and spec paths:
for p in swagger.json openapi.json api-docs swagger-ui.html api/v1 api/v2 graphql; do printf "%s %s\n" "$(curl -s -o /dev/null -w '%{http_code}' $URL/$p)" "$p"; done
JSON request and version bump:
curl -s -X POST $URL/api/login -H "Content-Type: application/json" -d '{"username":"admin","password":"admin"}'
curl -s $URL/api/v1/users ; curl -s $URL/api/v2/users
Triggers
| You see | Do next |
|---|---|
robots.txt Disallow entries |
Visit each path, brute inside it |
.git/HEAD returns 200 |
git-dumper, then check the log for creds |
403 on /admin |
Brute /admin/FUZZ, try /admin/ and /admin/. |
| 301 on a directory | Add trailing / and brute inside |
| Host header changes response size | Vhost fuzzing |
.zip, .bak, .sql found |
Download, then grep for creds |
/api, /swagger.json, /graphql |
API section, test methods and versions |
?page=, ?file=, ?path= |
LFI / path traversal |
| Upload form | File upload attacks |
| Login page | Default creds, then SQLi |
| 405 Method Not Allowed | Test other methods with OPTIONS |
| Version in banner or footer | searchsploit <name> <version> |
Notes
- Save every scan with
-oso you don't rerun it. - Brute both directories and files (
raft-*-directoriesandraft-*-files). - Always set the extension from the detected stack, not a blind list.
- Lower
-tif the box is slow or starts dropping requests. - After adding a vhost to
/etc/hosts, repeat recon and brute on it. - Check the page source, JS files and comments before heavy fuzzing.
- A custom 404 that returns 200 means you must filter by size (
-fs) or words (-fw).