Skip to content
Tutorials Center
My learning

Topics

Lesson 10 of 38 ยท Reconnaissance

Reconnaissance: Passive and Active

Learn what reconnaissance is in penetration testing, the difference between passive and active information gathering, and how to plan and organize a recon phase.

Reconnaissance, or recon, is the phase where you learn about the target before testing anything. The better the picture of the organization's domains, address ranges, technologies and people-facing services, the more efficient (and the less noisy) the rest of the test will be. Experienced testers often spend a large share of an engagement here, because a forgotten test server found in recon is worth more than a week of clever exploitation on the main site.

Passive versus active

The line between the two kinds is whether you touch the target's systems.

Passive recon Active recon
Contact with target None: you use third-party data Direct: you send packets or requests
Detectable by target No Yes, in their logs
Examples Search engines, public records, certificate logs, archived pages Port scans, DNS queries to their servers, browsing their site, banner grabbing
Authorization needed Public data, but follow the rules and the law Yes, scope and rules of engagement apply

A middle ground exists: some actions look passive but still generate traffic to the target. Opening a company website in a browser is active in a technical sense, but ordinary browsing is expected and harmless. Many testers call this semi-passive. The RoE should say what counts.

Two kinds of recon

Passive Third-party sources. No contact.
Active Direct probes. Leaves traces.

Start passive, go active only inside scope.

1 / 2

What you want to learn

Recon answers concrete questions. Keep a running list as you go.

  1. Names and domains: primary domain, subdomains, related brands, acquisitions.
  2. Address space: IP ranges owned by the organization, hosting providers, CDN use.
  3. Technology: web servers, frameworks, content management systems, mail and VPN products, cloud providers.
  4. People and roles: naming patterns for email addresses, key roles, public social profiles (for authorized social engineering tests only).
  5. Leaked information: documents with metadata, code repositories, credentials exposed in public breaches.
  6. Third parties: suppliers and cloud services that are connected but may be out of scope.

The recon loop

Recon is iterative. A domain gives you subdomains; a subdomain gives you an address; an address gives you a hosting company and neighbors; a document gives you usernames; usernames give you an email format. Each result feeds the next question.

flowchart LR
    Seed["Seed: company name and domain"] --> D["Domains and subdomains"]
    D --> I["IP addresses and ranges"]
    I --> T["Technologies and services"]
    T --> P["People and email patterns"]
    P --> Seed2["New names, partners, leaks"]
    Seed2 --> D

Every finding is a new seed. Stop when new results stop appearing or time runs out.

Staying inside scope while recon grows

Recon tends to wander. A name found in a certificate may belong to a vendor. An address in a range may be a neighbor in shared hosting. Before you probe anything actively, confirm the owner. The simplest habit is to keep two lists: confirmed in scope and found but unconfirmed. Only the first list is eligible for active steps. See Rules of Engagement.

Read-only: tools you will meet

Passive and light active recon commonly use these tools. The block is read-only, with example output that follows the real format.

Terminal
whois example.test
dig +short example.test A
curl -sI https://www.example.test
TEXT
Domain Name: EXAMPLE.TEST
Registrar: Example Registrar, Inc.
192.0.2.10
HTTP/2 200
server: nginx
content-type: text/html; charset=utf-8

The next lessons cover each source in depth: OSINT, DNS and subdomain recon and web fingerprinting.

Stand-in: a recon tracker

The first example models the two-list habit. Recon items carry a source, a type and a status, and the tracker reports what is safe to probe actively.

Python Separate confirmed from unconfirmed assets

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The second example counts how recon results grow over iterations, which is a useful way to decide when to stop. The data is invented.

Python When does recon stop paying off?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Good recon habits

  • Record the source of every fact, so the report can say how it was found.
  • Prefer passive first; every active probe should have a reason.
  • Do not collect more personal data than needed for the goal.
  • Verify before trusting: old data lies. A name from a three-year-old archive may no longer exist.
  • Time-box it. Set a budget and stop when returns shrink.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the main characteristic of passive reconnaissance?

    Passive recon uses third-party data such as public records and search engines, so the target sees nothing.
  2. 2. Which of these is active reconnaissance?

    A port scan sends packets to the target and appears in its logs.
  3. 3. A subdomain from a certificate log is not on the confirmed scope list. What should you do?

    It may belong to a third party. Confirm ownership before any active step.
  4. 4. Why record the source of each fact?

    Knowing where a fact came from lets you verify it and explain it later.

Summary

  • Recon builds a picture of domains, address space, technologies, people-facing services and leaks before testing.
  • Passive recon does not contact the target; active recon does and needs authorization.
  • Recon is a loop: each finding seeds new questions. Stop when returns diminish.
  • Keep confirmed-in-scope assets separate from unconfirmed ones, and record sources.

Next: OSINT Techniques