nmap, ffuf, sqlmap: a recon chain and the limit of automation
nmap, ffuf and sqlmap form a chain of tools, each answering its own question. The first finds open ports and services, the second finds paths and parameters of a web service, the third checks for SQL injection after a manual hypothesis. The output gives only hypotheses that a human verifies, and zero findings does not prove safety. Speed is limited because automation is noisy.
Pentest · Tools
The scanner reported "clean". Does that mean there is nothing to look for?
Two commands were typed in the console and there are no new findings. Another gives a list of 40 "Medium". Only a human decides what is real. This lesson shows how utilities form a chain and where automation ends. All examples are only on hosts you are authorized to test (in a lab that is your local address).
Mechanism: each utility answers its own question.
- nmap: "which ports and services are open?" — the entry to the chain;
- ffuf: "which paths and parameters exist on this web service?";
- sqlmap: "is this parameter really vulnerable to SQL injection?" — only after a manual hypothesis.
The result of the previous step narrows the next one: without a port list there is nowhere to aim ffuf, and sqlmap makes no sense without a parameter found.
nmap -sV -p 1-1000 staging.example.com
ffuf -u https://staging.example.com/FUZZ \
-w words.txt -mc 200,301 -rate 20
sqlmap -u "https://staging.example.com/search?q=a" \
--batch --level=1 --risk=1
How to read the output. Below is a shortened example: this is how the result looks on a test host.
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.9
80/tcp open http nginx 1.24
admin [Status: 301, Size: 169]
backup [Status: 200, Size: 5120]
A human sees three hypotheses here: an outdated service version (check it against CVEs), the /admin directory (does it need authentication?), a 5 KB file in /backup (does it expose configuration?). None is a finding yet.
What each approach finds
Known and template-like
Open ports, versions, known CVEs, missing headers, simple injections. Fast and repeatable, but with false positives.
Logic and chains
Another user's id in a request, skipping a step sequence, combining two small things. Needs product understanding and two accounts.
Real cases. Log4Shell (CVE-2021-44228) was checked out-of-band: the payload made the server contact a DNS name controlled by the checker, and the record of that contact was the proof. No visible response is needed. In May 2023 (per CISA) the CL0P group broke into MOVEit Transfer through a SQL injection zero-day. A scanner template finds only the known: a zero-day is first found by people.
Limits. An automatic tool is noisy: ffuf with a thousand requests per second can knock down a fragile staging, sqlmap with high --level and --risk sends dangerous requests and data may change. So the speed is limited (-rate, -t) and sqlmap is first run with minimal settings.
Common mistakes:
- taking a wordlist from the internet without looking at what is in it;
- treating "0 findings" as proof of security: the scanner may be unauthenticated or lack a template;
- putting a tool's output in the report without manual verification;
- running sqlmap straight to a data dump: the evidence is the fact of the vulnerability, not a table of customers.
Check yourself
ffuf shows many 200 responses of the same 4 KB size. What does it mean and what to do?
Answer
The server seems to return the same page for any path (a soft 404). A filter by code will not help: add a filter by size (-fs 4096 or similar) or by word count and look at the responses that differ.