Threats & Attacks

Reconnaissance and Scanning

how attackers and testers learn what is out there before touching anything

2 min readupdated by Syed Khaleel Ahmed

Before attacking anything, an attacker (or an ethical tester) learns about the target. This stage is reconnaissance, and good defenders learn to see their own organization through it.

Passive reconnaissance

Gathering information without touching the target's systems, so it leaves no trace there:

  • Company websites, job posts (they reveal the tech stack), press releases and conference talks.
  • Public records of domains and certificates, and search engine results.
  • Social media for names, roles and email formats.
  • Public code repositories where someone may have committed secrets by mistake.

This is part of OSINT, open-source intelligence.

Active reconnaissance

Directly interacting with the target to map it, which can be seen and logged:

  • DNS enumeration: finding subdomains and records.
  • Host discovery: which addresses are alive.
  • Port scanning: which ports and services answer.
  • Service and version detection: what software and version is behind each port, which hints at known vulnerabilities.
  • Web content discovery: hidden pages, admin panels and API endpoints.

The classic tool: Nmap

Nmap is a widely used open-source scanner. In simple terms it can find hosts, report open ports, and try to identify services and operating systems.[1] Scans can be noisy, and aggressive settings can disrupt fragile systems, which matters a lot in industrial environments.

Authorization comes first

Scanning systems you do not own or have written permission to test can be illegal and can cause harm. Professional tests have a signed scope and rules of engagement that say what may be scanned, when and by whom. Practice on your own lab or on sites that explicitly allow it.

What defenders learn from this

  • Know your own attack surface: every domain, subdomain, port and cloud resource visible from outside. Forgotten test servers are common entry points.
  • Remove what does not need to be exposed and patch what does.
  • Expect scanning. The internet is scanned constantly, so a single scan is background noise, but a targeted scan followed by exploitation attempts deserves attention.
  • Keep job posts and public documents free of sensitive internal detail.

Sources

  1. Nmap Reference Guide
  2. OWASP Web Security Testing Guide: Information Gathering

Test yourself

My notes

Private — saved only on this device, never sent anywhere.