☼
⌃
☰

Reconnaissance

Table of Contents

Reconnaissance

Overview

Reconnaissance is the initial phase of a cyber attack, where an adversary gathers information about a target system or organization.

The primary objective of this phase is to identify potential vulnerabilities, understand the target's infrastructure (such as IP Addresses, domain names, and employee information), and collect data that can be used to plan and execute subsequent stages of an attack.

A key technique used in reconnaissance is Open Source Intelligence (OSINT), which focuses on gathering information from publicly available sources.

Active Reconnaissance

Description

Active reconnaissance involves directly engaging with a target's systems to gather detailed information. Unlike Passive Reconnaissance, which relies on publicly available data, active reconnaissance involves sending probes, packets, and requests to the target and analyzing the responses. This direct interaction makes it a "noisier" process, increasing the risk of detection by security measures like firewalls or Intrusion Detection Systems (IDS). However, it often yields more accurate and in-depth information, such as open ports, running services, and potential vulnerabilities.

This technique is used by both malicious actors to plan attacks and by ethical hackers and penetration testers to identify and remediate security weaknesses as part of a defensive strategy.

Techniques & Tools

Common techniques involve actively scanning and probing the target's network and systems.

Key Techniques

  • Port Scanning: Identifying open, closed, or filtered ports on a target system to discover running services.
  • Ping Sweeps: Determining which IP addresses in a range belong to live hosts by sending ICMP echo requests.
  • Banner Grabbing: Connecting to an open port to read the welcome message (banner) from a service, which often reveals the software type and version.
  • Vulnerability Scanning: Using automated tools to scan a system for known security weaknesses and vulnerabilities.
  • OS Fingerprinting: Analyzing a system's responses to specific probes to determine its operating system.

Common Tools

  • Nmap: A powerful and widely used tool for network discovery, port scanning, service and version detection, and OS fingerprinting.
  • Metasploit Framework: While primarily an exploitation tool, it contains numerous modules for reconnaissance.
  • Netcat: A versatile networking utility used for port scanning and banner grabbing.
  • Ping / Traceroute: Basic network utilities for identifying live hosts and mapping network paths.

Defenses

Organizations can defend against malicious active reconnaissance by implementing:

  • Firewalls: To control which ports are exposed and restrict access.
  • Intrusion Detection/Prevention Systems (IDS/IPS): To detect and block traffic patterns associated with scanning and probing.

Passive Reconnaissance

Description

Passive reconnaissance is a method of collecting information that minimizes the risk of detection by the target's security systems, such as firewalls and intrusion detection systems. The goal is to build a comprehensive profile of the target's digital footprint, including its infrastructure, employees, and potential vulnerabilities, all from a distance.

Key Characteristics

  • No Direct Engagement: Information is gathered without sending any packets or probes to the target's systems.
  • Reliance on Public Data: It leverages open-source intelligence (OSINT) and other publicly accessible information.
  • Stealthy by Nature: The lack of direct interaction makes it difficult for the target to detect that they are being investigated.
  • Foundation for Further Action: The intelligence gathered informs the subsequent stages of a security assessment or attack.

Examples

Techniques

  • Open-Source Intelligence (OSINT): Scouring public resources like search engines (Google dorking), social media, and company websites.
  • WHOIS Lookups: Querying public databases to retrieve domain registration information.
  • Passive DNS Enumeration: Analyzing publicly available DNS records to find subdomains, mail servers, etc.
  • Email Harvesting: Collecting email addresses from public sources for potential phishing campaigns.
  • Packet Sniffing: Capturing and analyzing network traffic to understand protocols and services in use.
  • Analyzing Job Postings: Revealing information about technologies and software a company uses.

Tools

  • Maltego: A powerful data mining and visualization tool for mapping a target's digital ecosystem.
  • Recon-ng: A web reconnaissance framework to automate information gathering.
  • SpiderFoot: An OSINT automation tool that integrates with numerous data sources.
  • theHarvester: Gathers email addresses, subdomains, and hosts from public sources.
  • Shodan: A search engine for internet-connected devices, revealing software versions and potential vulnerabilities.
  • Censys: Similar to Shodan, scans the internet for devices and configuration information.
  • DNSDumpster: A free domain research tool to discover hosts related to a domain.
  • crt.sh: Searches certificate transparency logs to find SSL/TLS certificates and subdomains.
  • Wireshark: A network protocol analyzer that can be used to passively capture and analyze traffic.