Breaking Down Active and Passive Reconnaissance | Black Hat Ethical Hacking



What is Reconnaissance in Cyber Security?

Reconnaissance, sometimes referred to as “recon”, is generally known as the information-gathering phase, and is considered the initial step in both cyberattacks and ethical hacking. The activity involves the structured collection of data about a target to comprehend its structure, weaknesses, and defenses. This stage is carried out by attackers, ethical hackers, and security professionals, who collect information publicly and privately, analyze the target’s digital footprint, and determine how to proceed with the attack or test.

Reconnaissance is similar to scouting in warfare: one wouldn’t launch an offensive without understanding the lay of the land, the enemy’s defenses, and the routes to penetrate them. Similarly, in cybersecurity, success depends on knowing where the potential access points are and how to exploit them. Whether in penetration testing or bug bounty hunting, reconnaissance always starts the process.

Keep in mind that Reconnaissance makes up about 90% of the hacking process, with only 10% dedicated to execution.

 

Goals of Reconnaissance:

 

Finding Weaknesses: Reconnaissance identifies weaknesses in the target’s security posture, such as exposed services, unpatched software, or misconfigurations that can be exploited.

Finding the Entry Point: Attackers or ethical hackers seek entry points, such as open ports, exposed applications, or misconfigured devices, to gain unauthorized access to a system or network. These vectors are crucial for infiltrating and escalating privileges within the system.

Acquiring Intelligence: Reconnaissance aggressively gathers intelligence on the security measures implemented by the target, such as firewalls, intrusion detection systems (IDS), or encryption mechanisms. Understanding these defenses allows attackers or testers to strategize methods to bypass or disable them.

Mapping Network Architecture: Another key objective is mapping the target’s network architecture by identifying hosts, devices, services, and network segmentation. This gives a clear view of the target’s digital layout, helping identify vulnerable or less protected areas.

Retrieving a Target’s Historical State: Conducting recon allows you to trace the origins of a target, even if a website or system has undergone significant updates over the years. By going deeper into historical data, such as archived versions of a website, you can uncover the state of the system when it first went online. This historical context often reveals forgotten details—small traces or “breadcrumbs” left by developers during the initial phases of development. These traces can lead to sensitive information, such as early configuration files, internal paths, or hints about the technologies and methodologies initially used. Tools like the Wayback Machine are invaluable for this type of web history analysis, but the principle applies beyond websites. Historical snapshots of hosts, IP addresses, and other assets, like CRMs, can also provide valuable insights into the evolution of a target and potential overlooked security gaps.

Public Information Enumeration: Often, a wealth of information about a target is already in the public domain. From DNS records, social media profiles, and employee email addresses to press releases, valuable data can be gathered without direct contact with the target. This is especially useful for passive reconnaissance.

 

Passive Reconnaissance Techniques

 

Definition and Main Features

Passive reconnaissance is information gathering where an individual or entity collects data about a target system, network, or organization without directly engaging with the target. Unlike active reconnaissance, which involves probing a system (e.g., port scanning), passive reconnaissance relies on indirect means to gather publicly available information. This reduces the chance of detection, making it a suitable technique for cybercriminals and ethical hackers who want to learn without alerting the target, however, it may come with inaccuracies, such as outdated information or dead links.

The main characteristic of passive reconnaissance is that it remains undisclosed. The target is unaware that data is being gathered because there is no direct engagement or change in normal operations. Passive recon doesn’t trigger security defenses, like intrusion detection systems (IDS) or firewalls, making it extremely stealthy.

 

Common Passive Reconnaissance Methods

Passive reconnaissance can be performed through several methods, usually involving publicly available data or information retrieved indirectly.

Common methods include:

  • Open-Source Intelligence (OSINT): OSINT collects and analyzes publicly available sources like websites, blogs, social media, and online databases. Attackers and ethical hackers use it to gather information on a target’s employees, operations, technologies, and assets.
    • Example: Email Harvesting – An attacker might use tools or search engines to scrape email addresses from a company’s website, LinkedIn profiles, or other platforms to use in a targeted phishing campaign.
  • DNS Queries: DNS queries allow attackers or ethical hackers to map out a target’s online infrastructure by resolving domain names to IP addresses, and identifying servers, services, and locations without direct interaction.
    • Example: A tester querying DNS records might identify mail, web, and DNS servers, revealing misconfigurations or unpatched software.
  • WHOIS Lookups: WHOIS lookups retrieve a domain’s registration details, including owner contacts, registrar, registration date, and expiration, helping attackers or security professionals find weaknesses.
    • Example: WHOIS records might reveal that a company’s domain is about to expire, making it vulnerable to domain hijacking or social engineering.
  • Website Footprinting: Studying a website’s structure and metadata, such as robots.txt or sitemap.xml files, provides information about backend technologies and potential vulnerabilities.
    • Example: A penetration tester could find sensitive directories by reviewing a target’s robots.txt file, which may contain critical files.
  • Search Engine Dorking: This technique uses advanced search operators to locate sensitive data unintentionally exposed online, such as admin panels, passwords, and configuration files.
    • Example: A hacker might use a query like “site:example.com intext:confidential” to find confidential documents exposed to the public using Google’s search engine.
  • Job Listings Analysis: Job listings analysis involves examining job postings from a company to learn about the technologies and software used in their environment. Job ads often disclose the technical skills required, giving insights into the company’s infrastructure.
    • Example: A penetration tester finds a job listing from the target company on a job site, which mentions that the company is looking for an “experienced AWS administrator,” suggesting that the company uses Amazon Web Services as part of its cloud infrastructure.


Source link


Leave a Reply

Your email address will not be published. Required fields are marked *