Beginner · Methodology and reconnaissance · topic 11 of 35 · 18 min
Active reconnaissance
Explanation
Active vs passive
Active recon sends traffic to the target and watches the replies. Unlike passive recon, the target can see and log your activity. That is why active recon only happens on systems you are authorised to test and that are in scope. In your lab, everything is authorised, so it is a safe place to practise.
Simple active techniques
A ping checks whether a host is up by sending a small packet and waiting for a reply. Looking at a site's pages, headers and robots.txt tells you what technology it runs. Checking which services answer on which ports is the first step of scanning, covered fully in the next module.
ping -c 4 192.168.56.102 # is the lab target up? (4 packets)
curl -I http://192.168.56.102/ # show the HTTP response headers
curl http://192.168.56.102/robots.txt # a file that lists pathsReading what a server tells you
Servers often reveal useful details in their responses: the web server name and version in a header, the technology in a cookie name, or error pages that mention a framework. This is called banner grabbing or fingerprinting. It tells a tester what to focus on — and tells a defender what to hide.
Detection and defence
Detection: active recon shows up in logs — many requests from one address, hits to odd paths, repeated pings. Defenders spot it with their web server logs, an intrusion detection system, or a SIEM (all covered in security courses). Defence: remove version banners, return plain error pages, and rate-limit or block noisy sources. None of this stops an authorised tester, but it slows a real attacker and makes their recon noisy and visible.
Need help?
Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.
Try:
Watch the lesson
Active reconnaissance · 1/7
Active recon touches the target directly and watches the replies.
Prefer a video by a teacher? Find free videos on “active reconnaissance ping curl banner grabbing ethical hacking” on YouTube ↗
In real life: Fingerprinting a lab web server
In her lab, a learner runs curl -I against the DVWA VM and sees a Server header naming the web server and a cookie that reveals it is a PHP app. In two seconds she has learned the technology without any heavy tool. She notes it, and also writes the defence: configure the server to hide its version banner, so a real attacker learns less. Attack insight and defensive fix, recorded together.
Practice (0/3 done)
The key difference between passive and active recon is…
curl -I is used to…
Servers often leak their version in a header like "Server: Apache/2.4.41". Write server_version(header) that returns just the version string after the first "/". server_version("Server: Apache/2.4.41") returns "2.4.41".
Quick quiz
Read more (free)
Related help
Before this, learn
This topic builds on these. If something here feels new, open them first.
Related topics
- A repeatable method: PTES and OWASP WSTGMethodology and reconnaissance · same module
- Enumeration: digging into servicesEnumeration and vulnerability assessment
- Ports, services and what scanning doesScanning with nmap
- Passive voice: it was made, it is doneSpoken English: Zero to Fluent · Grammar for real talk
- nmap scan typesScanning with nmap
- Service, version and OS detection, and NSEScanning with nmap
Questions people ask about this
Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.
Active recon is only done on systems that are…
Answer: Authorised and in scope
Because it touches the target, it must be authorised and in scope.
Reading a server's version from its headers is called…
Answer: Banner grabbing / fingerprinting
Fingerprinting (banner grabbing) learns the technology from responses.
A good defence against recon fingerprinting is to…
Answer: Hide version banners and return plain error pages
Revealing less gives attackers less to work with.
Active recon is detectable because…
Answer: It generates traffic that appears in logs, IDS and SIEM
Contacting the target leaves log entries defenders can see.
Which of these is still off-limits during passive recon?Related
Answer: Using leaked passwords to log in
Using leaked credentials to access accounts is account access, not passive recon, and is illegal.
Enumeration is noisier than scanning because it…Related
Answer: Sends many requests and produces many 404s
The volume of requests and error responses stands out in logs.
A defender can reduce scan exposure by…Related
Answer: Closing unused ports and using a firewall
Fewer open ports and a firewall shrink the attack surface.
Make it passive: "Someone cleans the office every morning."Related
Answer: The office is cleaned every morning.
Present passive: is + past participle (cleaned). "By someone" is not needed.
Pass the quiz (60% or more) or mark this topic as done when you are ready.
Your progress is saved on this device only.
Next steps
- This is the last topic of “Methodology and reconnaissance”. The module exam comes next.
- Module 3 exam: methodology and recon · 12 questions · 18 min, without help. 3 topics of this module still to finish first.
- Then the next module, Scanning with nmap. 35 topics left in the course before the final exam.