COMP-221 · Lesson 1 of 12 · 23 min

Reconnaissance in an authorized test

▶ Video coming soon A video version of this lesson is on the way.

Tobias Rennick had been at Ironwhistle Security Partners for six weeks when Dario Feldspar handed him a binder and a laptop sticker that said, in block capitals, CHECK THE SCOPE. The binder held the signed authorization letter for the Prairiefold Credit Union engagement, the rules of engagement, the scope workbook and an empty reconnaissance log. Dario said the sticker was a joke, and also not a joke. Every hour Tobias spent on Prairiefold over the next two months would begin with one of the documents in that binder.

This course follows the reconnaissance and enumeration phase of that engagement, which maps to domain 2 of the CompTIA PenTest+ PT0-003 exam. Domain 2 carries 21 percent of the exam weight, second only to attacks and exploits. Its four objectives ask you to apply information gathering techniques (2.1), apply enumeration techniques (2.2), modify scripts for reconnaissance and enumeration (2.3) and use the appropriate tools (2.4). This first lesson sets the frame for all of them: what reconnaissance is for, how passive and active work differ, and the paperwork and habits that make reconnaissance lawful, safe and useful.

What reconnaissance is for

Reconnaissance is the work of learning about a target before and during a test. Information gathering builds a picture of the organization: its domains, address ranges, people, technology, suppliers and public footprint. Enumeration goes deeper on specific systems: which hosts are alive, which ports are open, what software answers, which users, groups and shares exist, and how they relate. The two blur together in practice, but the exam keeps them as separate objectives, and so do good testers, because enumeration usually means touching the target and information gathering often does not.

The point of all this work is not to collect as much data as possible. It is to produce a target profile: an accurate, evidenced picture of the attack surface that lets the team choose what to test, in what order, with the least risk. A good profile answers questions the client cares about. What can an outsider learn about us without breaking any rules? Which of our systems are exposed that should not be? Where would an attacker most likely start? Each of those answers can become a finding in its own right, even before a single vulnerability is confirmed.

Reconnaissance also protects the client. A team that understands the environment before it scans is far less likely to knock over a fragile system, wander into a third party's network or flood a help desk with alerts nobody expected. Dario put it plainly to Tobias: the cheapest outage is the one you avoid because you looked first.

Passive and active reconnaissance

The most important distinction in this domain is between passive and active reconnaissance.

Passive reconnaissance gathers information without sending traffic to the target's systems in a way the target could attribute to the test. Reading the client's public website as any visitor would, searching certificate transparency logs, querying a search engine, reviewing job postings, looking up registration records and reading data that third parties such as Shodan or Censys have already collected are all passive. The target either sees nothing at all or sees nothing different from ordinary internet traffic.

Active reconnaissance interacts directly with the target: sending probes to discover live hosts, scanning ports, grabbing service banners, querying the client's own DNS servers for zone transfers, crawling a web application, or logging in to a directory service to enumerate users. Active work produces packets and log entries that a well-monitored target can detect and attribute.

A horizontal arrow running from no packets to the target on the left to direct, logged interaction on the right. Five boxes sit along it: public records, search engines and certificate transparency logs; third-party data such as Shodan, Censys and passive DNS; DNS queries to public resolvers and web browsing; host discovery, port scans and banner grabs; and authenticated enumeration over LDAP and SMB. Below, a note says passive work was allowed from September 21 from Ironwhistle systems only, and active work only inside the October 5 to November 13 window against in-scope addresses from the declared source IP, with notice.
Reconnaissance is a spectrum. The further right, the more the target can see, and the tighter the rules.

In reality the line is a spectrum rather than a wall. Browsing the client's public website sends requests to the client's server, but in a way indistinguishable from any customer. Resolving a hostname through a public resolver might eventually reach the client's authoritative name server. The exam tends to treat activities that do not directly probe target systems as passive, and anything that sends crafted or unusual traffic to them as active. In an engagement, the rules of engagement decide which side of the line each activity falls on and when it is allowed.

Common reconnaissance activities and how they are normally classed.
ActivityUsually classed asWhat the target might see
Searching certificate transparency logs for the client's domainsPassiveNothing; the logs are public and hosted by third parties
Reviewing Shodan or Censys results for the client's address rangePassiveNothing; the data was collected earlier by the service
Reading job postings and staff profilesPassiveNothing
Browsing the public website as a visitorPassive in most rules of engagementOrdinary web requests
Attempting a DNS zone transfer from the client's name serverActiveA logged transfer request, often alerted on
Ping sweep or TCP discovery scanActiveProbes from one source to many addresses
Port and version scanningActiveConnection attempts across many ports, IDS alerts
Enumerating users over LDAP with test credentialsActive (authenticated)Directory queries logged against the test account

The documents that make reconnaissance lawful

Engagement management is the subject of COMP-220, PenTest+: Engagement Management, but reconnaissance is where its documents are tested hardest, because so much reconnaissance happens early and quickly. Four documents governed what Tobias could do.

The authorization letter, signed for Prairiefold on September 14, 2026 by Gwendolyn Tran as engagement sponsor and Marguerite Okonkwo-Lind for Ironwhistle, states that the client permits the named testers to test the named systems during the named period. It is the document a tester would show if a police officer, a data centre manager or a suspicious branch employee asked what they were doing. Its signatory must have the authority to grant access to the systems in scope; a manager cannot authorize testing of systems their organization does not own.

The scope lists exactly what may be tested: domains, address ranges, applications, physical locations and any exclusions. For Prairiefold, the scope workbook listed the credit union's public address block, its head office and branch internal networks, the staging environment of the member portal, one branch and head office for physical testing, and a limited phishing simulation agreed with human resources. It also listed, in bold, the main exclusion: the online banking platform hosted by a third-party processor, which was out of scope unless the processor gave written permission. It had not.

The rules of engagement describe how testing happens: testing windows, the source addresses Ironwhistle would scan from, notification steps, rate limits, prohibited techniques, data handling, stop conditions and emergency contacts. Prairiefold's rules allowed passive open-source research from September 21, two weeks before active testing began on October 5, so the team could plan. They required that active scans come only from Ironwhistle's declared source address, that Felix Aberdeen, the IT operations manager, be told before each block of active scanning, and that any sign of a real compromise, any instability in a production system, or any discovery of member financial data stop testing immediately.

The statement of work and contract cover the commercial terms, liability and deliverables. They matter to reconnaissance mainly because they define what the final report must contain, which shapes what evidence the team must collect.

The engagement documents and how each constrains reconnaissance.
DocumentQuestion it answersReconnaissance example
Authorization letterAre we allowed to test at all, and who said so?Shown to building security during a physical walk-through
ScopeWhat exactly may we touch?An address in the processor's range is recorded but not scanned
Rules of engagementHow, when and from where?Active scans only from the declared source IP inside the window
Statement of workWhat must we deliver?The report requires an external attack surface summary

The law behind the documents

Authorization matters because, without it, much of what a tester does is a crime. The legal frame differs between countries, and testers should know the main provisions where they work.

In Canada, section 342.1 of the Criminal Code makes it an offence to obtain a computer service, intercept a function of a computer system, or use a computer system with intent to commit certain offences, when done fraudulently and without colour of right. The maximum penalty on indictment is ten years. Subsection 430(1.1) separately covers mischief in relation to computer data, such as altering or obstructing the lawful use of data. A signed authorization from someone entitled to give it is what gives a tester colour of right. Testing beyond the scope, or against systems the signatory could not authorize, removes that protection.

Privacy law also shapes reconnaissance. Gathering information about staff, such as names, roles and email addresses, involves personal information. For a private-sector organization in Saskatchewan, the Personal Information Protection and Electronic Documents Act (PIPEDA) governs how that information is handled. Parliament has been working on replacement legislation, most recently Bill C-36, tabled in June 2026, but PIPEDA continues to apply until any replacement takes effect. In practice this means collecting only what the test needs, storing it securely and destroying it when the engagement ends, which Prairiefold's rules of engagement required.

Testers also respect third parties' terms. Scraping a social network in violation of its terms of service, or querying a commercial data service beyond its licence, can create legal exposure for the tester and the client even when the client has authorized the test. Ironwhistle used only services it held proper accounts for and kept to their published terms.

Gates before any action

Dario gave Tobias a habit that he expected to see every time: before any reconnaissance action, pass through the gates.

Six boxes in a row joined by arrows: signed authorization, scope list checked, window and source IP, notify contacts, act and log, and stop condition. Under the last box, a note reads yes: pause, call emergency contact. A line underneath says any no stops the action until it is resolved in writing.
The checks Ironwhistle ran before every active reconnaissance step.

The gates are simple. Is there a signed authorization covering this activity? Is every target address or name on the scope list, checked against the workbook rather than memory? Is this inside the testing window and coming from the declared source address? Have the right people been told? Then act, and log what was done. Finally, watch for stop conditions. Any no means stop and get the answer in writing, not on the phone.

The scope check catches real mistakes. On his second day of passive research Tobias found a hostname, banking.prairiefold.example, that resolved into the processor's address range, 198.51.100.0/25. It looked like a Prairiefold system and carried the credit union's name, but the address belonged to the processor. It went into the log as observed and out of scope, and Dario mentioned it to Gwendolyn as something the processor might want to know about. Nobody scanned it.

Operational security for testers

Reconnaissance creates sensitive material. A target profile is, in effect, a guide to attacking the client. Ironwhistle treated every reconnaissance artifact as confidential from the moment it was created. Ana Sokolova-Reyes, the reporting and quality lead, set the rules: evidence stored only on Ironwhistle's encrypted engagement share, never on personal devices or public cloud notes; screenshots and tool output named with the date, time, tester and target; and personal data about staff kept to the minimum needed to show a finding.

Operational security also means not tipping off the target unnecessarily during a test designed to measure detection, and not exposing the client by leaving traces on public services. Searching for the client's name in a third-party service is generally fine; uploading the client's internal documents to an online analysis tool to see what it finds is not.

One line of the reconnaissance log Tobias kept. Saskatchewan does not observe daylight saving time, so Ironwhistle's Regina office recorded CST all year.
FieldExample entry
Date and time (with time zone)2026-10-06 09:42 CST
TesterT. Rennick
SourceDeclared scanning address 198.51.100.200
Target203.0.113.0/26 (scope item E-1)
Activity and toolTCP discovery scan, Nmap, top 100 ports
NotificationF. Aberdeen emailed 09:15, acknowledged 09:31
Output fileE1-discovery-20261006-0942 (XML and normal formats)
Observations14 hosts responded; no instability reported

Planning the reconnaissance phase

Good reconnaissance is planned around questions rather than tools. Before the passive window opened, Dario, Priyanka Haldane and Tobias wrote down what they needed to know and where they would look. The plan kept the work focused and made it easy to see when something was finished.

The reconnaissance plan, organized by question.
QuestionPassive sourcesActive confirmation (in window)
What domains and hostnames belong to Prairiefold?WHOIS and RDAP, CT logs, DNS records, search enginesResolve names and check against scope
Which public addresses are live and what do they run?Shodan, Censys, historical scan dataHost discovery, port and version scans
Who works there and how are accounts named?Website, social media, professional sites, Hunter.ioNot tested until the phishing simulation design
What technology is in use?Job postings, vendor case studies, page sourceFingerprinting, web technology detection
What is in the cloud?DNS records, public identity endpoints, code repositoriesChecks of storage and tenant settings within scope
What does the internal network look like?Very little from outsideDiscovery and enumeration from the internal test point

Each row has an owner and an exit condition. For example, the domain inventory was done when every candidate name had been resolved, deduplicated and marked in scope, out of scope or unresolved. This mattered because reconnaissance can go on forever. A plan with clear exits lets the team move to vulnerability discovery, covered in COMP-222, PenTest+: Vulnerability Discovery and Analysis, with confidence that the map is good enough.

What the client gets from reconnaissance

Reconnaissance results are not just inputs to later testing. Several kinds of finding come straight out of this phase, and the PenTest+ objectives expect you to recognize them.

  • Information disclosure: internal hostnames in public DNS, software versions in banners, staff directories, or configuration files in public code repositories.
  • Unknown or forgotten assets: a test server still answering on the internet, an old VPN portal, a cloud storage container nobody remembers creating.
  • Exposure of credentials and secrets: keys or passwords in code, or staff accounts appearing in public breach data.
  • Weak external hygiene: missing email authentication records, expired certificates, or services exposed that should sit behind a VPN.
  • Detection gaps: if active scanning ran for days without the security team noticing, that is worth reporting too.

Each of these is reported with its evidence and with a remediation, because every finding in a penetration test report pairs what the tester found with what the client should do about it. For reconnaissance findings, remediation often means reducing the footprint: removing stale records, restricting services, rotating exposed secrets and training staff about what they share publicly.

Worked problem

Is it in scope?

During passive research, Tobias finds three items: a hostname mail.prairiefold.example resolving to 203.0.113.10; a hostname statements.prairiefold.example with a CNAME to a host at 198.51.100.40; and a public code repository belonging to a former contractor that mentions an internal server name. The scope covers 203.0.113.0/26 and Prairiefold-owned internal networks; the processor's range 198.51.100.0/25 is excluded. Which can he actively test when the window opens?

Show solution
  1. mail.prairiefold.example resolves to 203.0.113.10, inside 203.0.113.0/26, so it is in scope for active testing in the window.
  2. statements.prairiefold.example points to 198.51.100.40, inside the processor's excluded range. Record it and do not test it.
  3. The code repository is owned by a third party. Reading it as a public visitor is passive research, but the repository itself is not a target. Record the finding and the internal name it reveals, and tell the client.

Answer: Only mail.prairiefold.example. The processor-hosted name is out of scope, and the repository is a source of information to report, not a system to test.

Tobias asked whether anyone ever pushed back on all this care. Marguerite, who had joined the morning stand-up, said yes, sometimes clients asked testers to just scan everything. Her answer was always the same: Ironwhistle tested exactly what the client owned and authorized, and told the client clearly about everything else it saw. That was what made a report something a credit union board could rely on.

Common mistakes

  • MistakeTreating a hostname with the client's name in it as automatically in scope.

    InsteadResolve it and check the address and owner against the scope workbook.

  • MistakeStarting active scans as soon as the authorization letter is signed.

    InsteadWait for the testing window, use the declared source address and notify the contacts.

  • MistakeCollecting every piece of personal data that can be found about staff.

    InsteadCollect only what the test needs, store it securely and destroy it at the end.

  • MistakeAccepting a verbal extension of scope from a client contact.

    InsteadGet any scope change in writing from someone with authority to approve it.

  • MistakeKeeping no record of passive research because it touched no systems.

    InsteadLog passive work too, so every finding traces to a source and a time.

Summary and key terms

  • Domain 2 of PT0-003 is reconnaissance and enumeration, 21 percent of the exam, with objectives 2.1 to 2.4.
  • Information gathering builds an organizational picture; enumeration goes deep on specific systems.
  • Passive reconnaissance avoids attributable contact with target systems; active reconnaissance probes them directly.
  • The authorization letter, scope, rules of engagement and statement of work govern every reconnaissance step.
  • Computer crime and privacy law make written authorization and careful data handling essential.
  • Gates before action: authorization, scope, window and source, notification, logging and stop conditions.
  • Reconnaissance produces findings of its own, each reported with evidence and remediation.
Reconnaissance
Gathering information about a target before and during a test to understand its attack surface.
Passive reconnaissance
Information gathering that does not send attributable traffic to the target's systems.
Active reconnaissance
Information gathering that interacts directly with target systems, such as scanning or crawling.
Enumeration
Detailed discovery of the hosts, services, users, shares and other objects on specific systems.
Authorization letter
The signed document in which the client permits named testers to test named systems for a stated period.
Rules of engagement
The agreed conditions for testing, including windows, sources, notifications, limits and stop conditions.
Stop condition
An event that requires testers to halt and contact the client, such as instability or signs of a real compromise.
Target profile
The evidenced picture of a client's attack surface produced by reconnaissance.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Classify each as passive or active: reading CT logs, attempting a zone transfer, reviewing Shodan data, running a ping sweep.

    Show answer

    Passive, active, passive, active.

  2. A branch manager emails to say Ironwhistle may also scan the branch's ATM network. What should the team do?

    Show answer

    Not act on it. Ask the engagement sponsor to approve any scope change in writing, confirming that the branch manager's organization owns and can authorize testing of those systems.

  3. Name three kinds of finding that can come straight out of reconnaissance.

    Show answer

    Any three of: information disclosure, forgotten assets, exposed secrets, weak external hygiene, and detection gaps.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz