Ethical HAcking SPPU Unit 2
Ethical HAcking SPPU Unit 2
gathering information about a target in order to find the best way to compromise it. This stage is
crucial because it lays the groundwork for the rest of the attack. Here's a detailed breakdown
suitable for a cyber student:
Types of Reconnaissance
1. Passive Reconnaissance:
o Description: This involves collecting information about a target without directly
interacting with it. The goal is to avoid detection by the target.
o Methods:
Open Source Intelligence (OSINT): Gathering data from publicly
available sources like websites, social media, news articles, and public
records.
Whois Lookup: Retrieving information about domain names, such as the
owner's details, registration dates, and expiration dates.
DNS Enumeration: Exploring the Domain Name System (DNS) to find
information about a target’s domain and its subdomains.
Search Engines: Using search engines to find information about the target
organization, its employees, and its infrastructure.
2. Active Reconnaissance:
o Description: This involves directly interacting with the target to gather
information, which carries a higher risk of detection.
o Methods:
Ping Sweeps: Sending ICMP echo requests to multiple hosts to determine
which ones are up and running.
Port Scanning: Checking the target's open ports to find active services
and potential vulnerabilities. Tools like Nmap are commonly used for this
purpose.
Banner Grabbing: Capturing the banners sent by applications and
services running on open ports to identify software versions and other
details.
Network Tracing: Mapping the network path from the attacker to the
target, typically using tools like Traceroute.
Objectives of Reconnaissance
Shodan: A search engine for internet-connected devices that can reveal information
about the devices connected to the internet.
TheHarvester: A tool for gathering email accounts, subdomains, hosts, employee names,
open ports, and banners from different public sources.
Maltego: A data mining tool that offers graphical analysis of relationships and
connections between various pieces of information.
Practical Example
1. Use Google to find information about the company's employees and their roles.
2. Perform a Whois lookup to get details about the company's domain registration.
3. Use Shodan to see if any of the company's devices are exposed to the internet.
4. Scan the company's IP range with Nmap to identify open ports and running
services.
5. Capture banners from these services to determine if any are running vulnerable
versions.
By the end of the reconnaissance phase, the attacker will have a detailed map of the target’s
environment, potential entry points, and strategies for exploiting vulnerabilities.
Open Source Intelligence (OSINT) refers to the practice of collecting and analyzing information
from publicly available sources to support decision-making in cybersecurity and other fields. In
the context of cybersecurity, OSINT is used to gather data about potential threats, vulnerabilities,
and other relevant aspects of a target without resorting to intrusive methods. Here's a breakdown
of what OSINT entails:
What is OSINT?
OSINT involves gathering data from open, publicly accessible sources, such as:
Internet Websites: Company websites, personal blogs, forums, and social media
platforms.
Public Records: Government databases, court records, and legal documents.
Media: News articles, press releases, and video content.
Technical Resources: Whitepapers, academic papers, patents, and conference
presentations.
1. Non-Intrusive: It allows information gathering without direct interaction with the target,
reducing the risk of detection.
2. Cost-Effective: Most OSINT resources are freely available, making it a cost-effective
way to collect valuable data.
3. Comprehensive: It provides a broad view of the target's digital footprint and potential
vulnerabilities.
1. Threat Intelligence: Identifying potential threats by monitoring hacker forums, dark web
marketplaces, and other sources where threat actors communicate.
2. Vulnerability Assessment: Finding information about known vulnerabilities that might
affect the target’s systems.
3. Reconnaissance: Gathering information about a target organization or individual to plan
further actions in penetration testing or cyberattacks.
4. Incident Response: Supporting investigations by providing context and additional details
about an incident or attack.
Passive Open Source Intelligence (OSINT) refers to the collection of information from publicly
available sources without directly interacting with the target. This approach minimizes the risk of
detection and avoids triggering security defenses that might alert the target to the information-
gathering activities. Here’s a detailed explanation to help you understand Passive OSINT in a
cybersecurity context:
Passive OSINT involves observing and gathering data from existing sources without any active
engagement with the target. Unlike active OSINT, which might involve sending requests to a
web server or engaging with online communities, passive OSINT strictly relies on information
that is already available and can be accessed anonymously.
1. Stealth: Because it doesn’t interact directly with the target, passive OSINT is less likely
to be detected.
2. Safety: It avoids legal and ethical issues that might arise from direct interaction or
probing.
3. Broad Scope: It allows researchers to gather a wide range of information from various
sources.
In cybersecurity, scanning and enumeration are critical steps in the reconnaissance phase of a
cyber attack or penetration test. These processes involve actively probing a target network to
gather detailed information about its structure, devices, and services. Here’s an in-depth
explanation of each:
1. Scanning
What is Scanning?
Scanning is the process of examining a network to identify live hosts, open ports, and the
services running on those ports. It helps attackers and security professionals understand the
attack surface of the network.
Types of Scanning
1. Network Scanning:
o Ping Sweep: Determines which IP addresses in a range are active.
o Traceroute: Identifies the path packets take to reach a destination, helping map the
network.
2. Port Scanning:
o TCP Scanning: Checks for open TCP ports using various methods (e.g., SYN scan, ACK
scan).
o UDP Scanning: Identifies open UDP ports, though it is less reliable and slower due to the
connectionless nature of UDP.
3. Vulnerability Scanning:
o Automated Tools: Uses tools like Nessus or OpenVAS to identify known vulnerabilities in
the target systems.
Nmap: One of the most popular tools for network discovery and security auditing.
Angry IP Scanner: A fast and user-friendly network scanning tool.
Advanced IP Scanner: Free and easy-to-use tool for scanning and analyzing local networks.
Zenmap: The graphical user interface for Nmap, making it easier to visualize scan results.
Scanning Techniques
1. SYN Scan: Also known as half-open scanning, it sends SYN packets and waits for SYN-ACK
responses.
2. ACK Scan: Used to map out firewall rules and determine if ports are filtered.
3. FIN Scan: Sends a FIN packet to bypass some firewalls and packet filters.
4. UDP Scan: Sends empty UDP packets and waits for ICMP "Port Unreachable" messages to
determine closed ports.
2. Enumeration
What is Enumeration?
Enumeration is the process of extracting more detailed information from the discovered live
hosts. This step involves querying services to gain information about user accounts, shares, and
services running on the network. Enumeration is more intrusive than scanning and can often be
detected.
Types of Enumeration
1. NetBIOS Enumeration:
o Gathers information about Windows devices and shared resources.
o Tools: nbtscan, NetBIOS Auditing Tool (NAT).
2. SNMP Enumeration:
o Uses the Simple Network Management Protocol to extract information about network
devices.
o Tools: snmpwalk, SolarWinds IP Network Browser.
3. LDAP Enumeration:
o Queries Lightweight Directory Access Protocol directories to gather information about
directory services.
o Tools: LDAP Admin, Softerra LDAP Browser.
4. SMTP Enumeration:
o Interacts with mail servers to enumerate valid email addresses.
o Tools: smtp-user-enum, Metasploit’s auxiliary modules.
5. DNS Enumeration:
o Discovers DNS records and domain information.
o Tools: dig, dnsenum, Fierce.
Techniques in Enumeration
1. Banner Grabbing: Collecting banner information from services to identify software versions and
potentially vulnerable applications.
2. SNMP Walk: Retrieving a subtree of management values from a network device supporting
SNMP.
3. Null Sessions: Exploiting Windows services to establish an unauthenticated connection and
gather information.
4. Zone Transfers: Requesting a DNS zone transfer to gather a list of DNS records from a server.
Ethical Considerations
Obtain Proper Authorization: Always have explicit permission before probing a network.
Comply with Legal Standards: Adhere to laws and regulations governing network scanning and
penetration testing.
Minimize Disruption: Avoid actions that could disrupt services or affect network performance.
Finding vulnerabilities in a network is a crucial task in cybersecurity to ensure the integrity,
confidentiality, and availability of information systems. This process involves several steps and
the use of various tools and techniques to identify weaknesses that could be exploited by
attackers. Here’s a comprehensive guide on how to find vulnerabilities in a network:
Scope: Determine the boundaries of the network to be assessed, including all devices, services,
and systems.
Objectives: Clearly outline what you aim to achieve with the vulnerability assessment, such as
identifying potential entry points for attackers or evaluating the effectiveness of security
controls.
b. Obtain Authorization
Permission: Ensure you have explicit permission from the network owner to conduct the
assessment to avoid legal and ethical issues.
a. Passive Reconnaissance
b. Active Reconnaissance
Network Scanning: Identify live hosts and open ports using tools like Nmap.
Banner Grabbing: Collect information from service banners to identify software versions and
potential vulnerabilities.
3. Network Scanning
a. Host Discovery
Ping Sweep: Use tools like Nmap to discover active IP addresses in the network range.
Traceroute: Map the path packets take to reach the target to understand the network topology.
b. Port Scanning
c. Service Enumeration
Service Version Detection: Use Nmap’s version detection feature to identify the versions of the
services running on open ports.
o Example Command: nmap -sV target-ip
4. Vulnerability Scanning
o Automated Scanners: Use tools like Nessus, OpenVAS, and QualysGuard to identify
known vulnerabilities.
o Web Application Scanners: Use tools like OWASP ZAP or Burp Suite to identify web
application vulnerabilities.
5. Manual Testing
o Exploitation Frameworks: Use tools like Metasploit to manually test for vulnerabilities.
o Specific Tests: Conduct specific tests for common vulnerabilities like SQL injection, XSS,
buffer overflows, etc.
2. Proof-of-Concept (POC)
Example of a POC
1. Authorization: Always obtain explicit permission from the target’s owner before conducting
vulnerability assessments or POC development.
2. Confidentiality: Handle all findings with confidentiality and ensure they are only shared with
authorized personnel.
3. Non-Destructive Testing: Ensure that testing methods do not cause harm or disruption to the
target system.
4. Responsible Disclosure: Follow responsible disclosure practices by notifying the vendor or
owner of the vulnerabilities and providing sufficient time for them to be patched before public
disclosure.