Attack surface inventory
Lessons on httpx, ffuf, Amass, and Gobuster: what a title, a status code, an ASN, or a size column does not prove.
- 27 lessons
- 5 h of reading
- 6 topics
Outsiders build a list of your hostnames, web services, and forgotten files from public data and a few hours of requests. These lessons build the same list first, compare it with what the organization thinks it owns, and turn every gap into a ticket with an owner.
Passive tools such as subfinder only read third-party datasets. Probes, template scans, and path discovery send traffic, so they run against your own staging hosts, or production with the owner’s written approval and an agreed request rate.
subfinder
5 lessons
- 01subfinder: build a subdomain inventory from passive sourcesUse subfinder to list the hostnames public sources already know for a domain you own, keep the source of each name, and diff the list against your DNS records.10 min
- 02subfinder: a hostname line is a source report, not a live hostA subfinder line means a passive source reported that hostname. Write the source, the name, and the time of the run. Do not treat the line as a service that is up.11 min
- 03subfinder: a host belongs to the input domain on that lineWhen a run asks about more than one domain, each hostname belongs to the input printed with it. Write that pair. Do not file a name under a different parent because the names look related.11 min
- 04subfinder: a source count is not a confidence scoreThe sources beside a hostname are a list of datasets that returned it. The length of that list is not a liveness score and not a severity. Write the names, not a rank you invented.11 min
- 05subfinder: a reported name is not a wildcardA hostname in the output is a name a source reported for the domain you asked about. Several names are several reports. They are not a wildcard record. Write the names, and write that a wildcard was not tested unless you made that check separately.11 min
Amass
3 lessons
- 01Amass: map owned domains, netblocks, and ASNs as one graphRun OWASP Amass in passive mode against your registered domains, then read its asset database to connect names, addresses, and netblocks for an exposure review.12 min
- 02Amass: an address in the graph is a resolution, not a contractAn address next to a name in the Amass database is where that name resolved when the data was stored. Write the name, the address, and when it was read. A registry string is not an owner and not an intruder.11 min
- 03Amass: an ASN is not an addressAn ASN in the graph is a network number a source stored. It is not an IP address, a hostname, or every address in that network.12 min
httpx
6 lessons
- 01httpx: find which inventoried hosts actually serve web pagesFeed a hostname list to ProjectDiscovery httpx at a polite rate and record status, title, server, and TLS details so the web inventory reflects what is really answering.10 min
- 02httpx: one response line is one momentAn httpx line is the status, title, headers, and address from one request at one time. Write those fields as observed. A title is not an owner, and a server header is not a confirmed product.11 min
- 03httpx: no line is not a status codehttpx prints a line for a host that answered. A name that was in the input and is missing from the output has no status code in this run. Write “no line,” not a code you did not receive.11 min
- 04httpx: the certificate date is not the probe timeA not-after value is when the certificate ends. The probe time is when you asked. Write both. Do not say the certificate expired at the moment of the probe unless the date is already past that time.11 min
- 05httpx: the length is this responseA length on an httpx line is the size recorded for that one response. It is not a count of pages, users, or files. Write it with the URL and the status, and do not turn the number into a population.11 min
- 06httpx: the title field is not the bodyThe title on an httpx line is the title text stored for that response. It is not the body, and it is not the status code.11 min
Nuclei
5 lessons
- 01Nuclei on staging: run curated templates and triage the resultsRun Nuclei against a staging host you own with severity and tag filters and a request rate limit, then sort its findings into real exposures, noise, and items to verify by hand.12 min
- 02Writing a Nuclei template that checks your own baselineTurn one internal security requirement, such as HSTS on the login page, into a small Nuclei template, validate it, and run it across every owned web host on a schedule.11 min
- 03Nuclei: a result line is a template matchA Nuclei result means that template’s matchers passed on that URL. Write the template id, the URL, and the severity label. Do not treat the label as a confirmed finding until the response is the page you meant.12 min
- 04Nuclei: extracted text is what the template capturedAn extractor pulls a string out of the response. Write the template id and that string as captured text. Do not turn the string into a confirmed vulnerable build unless the template result says that, and even then quote the template.12 min
- 05Nuclei: matched-at can be a path the template addedThe URL you passed is not always the URL that matched. matched-at is the request the template made, which may add a path. Write matched-at. Do not say the site root matched if the result names a longer URL.11 min
ffuf
4 lessons
- 01ffuf on your own staging site: find content the route list forgotUse ffuf with a common wordlist, auto-calibration, and a low request rate to find files and folders on a staging host that are missing from the application’s route inventory.11 min
- 02ffuf: a redirect line is not the page it points atA 301 or 302 line is the redirect response ffuf received. Write the status and the Location header if it was recorded. Do not describe the page at that Location unless a later request fetched it.11 min
- 03ffuf: a filtered word is not a statusA word that does not appear in the ffuf output was not given a status in that run. If a filter was on, the absence can be the filter. Write the filter and “no status printed,” and do not invent 404.12 min
- 04ffuf: the status code is not the lengthA status and a size on one ffuf line are different columns. Write both, and do not copy the status into the size.11 min
Gobuster
4 lessons
- 01Gobuster DNS and vhost modes: audit names after a decommissionUse gobuster dns and vhost modes against your own zone and load balancer to confirm that retired hostnames no longer resolve or route after a migration.10 min
- 02Gobuster: a DNS found-line is not an HTTP statusIn DNS mode, Found plus an address is a resolution. In vhost mode, a status code is an HTTP response. Write the mode. Do not read a bracketed address as status 200.12 min
- 03Gobuster: a resolved name is not the zone textIn a DNS run, a found name with an address is a resolution from that run. It is not a line copied from the zone file. Write the name and the address. Do not describe the zone’s record type unless you opened the zone.11 min
- 04Gobuster: the size column is not the statusOn a vhost line, status and size are different columns. Do not file the status number as the size.11 min