...
  1. Introduction to Scanning 
Ethical Hacking: 5 Phases, Techniques, and Tools | by Ajith Chandran |  Medium

Scanning is an important step in the ethical hacking approach, usually following the information collecting (or reconnaissance) stage. It entails actively engaging with the target system or network to identify active devices, open ports, services, and vulnerabilities. Ethical hackers employ scanning technologies to find vulnerabilities in infrastructure that attackers could exploit. By scanning a network or host, ethical hackers and penetration testers can construct a network map and detect potential entry points for unauthorized access.
Scanning is critical in developing a security profile of the target, allowing a hacker to know where and how to execute subsequent assaults. This action should always be done with consent and within a legal framework, adhering to ethical hacking norms. 

2. Objectives of Scanning

The primary objectives of scanning in ethical hacking include:

  • Identifying Live Hosts: Finding devices that are currently connected and active on a network.
  • Detecting Open Ports: Open ports serve as entry points into a system. Identifying them allows us to better comprehend the network’s offerings.
  • Mapping Network Topology: Understanding the network’s design and layout.
  • Identifying Services and Versions: Knowing which services are operating on each 

port, as well as their versions, aids in the identification of vulnerabilities.

  • Fingerprinting the Operating System: Identifying the target’s OS to determine whether exploits may be effective.
  • Vulnerability detection: is the process of identifying known vulnerabilities in networked services and software.

3. Types of Scanning

There are various sorts of scanning techniques used in ethical hacking. Each category serves a specific purpose and contributes to a more comprehensive understanding of the target network.

3.1. Network Scanning

Network scanning is the process of detecting and acquiring information on networked devices, such as IP addresses, MAC addresses, and device names. This type of scan assists in identifying all systems that could be prospective targets.
Tools used include Nmap, and Netcat.

3.2. Port Scanning

Port Scan in Ethical Hacking ...

Port scanning detects open or closed ports on a system, allowing an ethical hacker to determine which services are operating on the target. Each port can be connected with a certain service, such as HTTP (port 80), FTP (port 21), and so on.

Tools used: Nmap.

3.3. Vulnerability Scanning

Vulnerability scanning is used to find flaws in a system or network. It looks for known vulnerabilities using a database of exploits, misconfigurations, and outdated software.

Nessus and OpenVAS were the tools used.

4. Key Techniques in Scanning

Scanners use a variety of approaches to extract information about their targets. Understanding these strategies is critical for efficiently deploying scanning tools in penetration testing.

4.1. TCP/IP Scanning

This technique sends TCP or UDP packets to various ports on a target host to discover whether they are open, closed, or filtered. Depending on the response, the scanner can determine the port’s status.

Types of TCP Scans:

SYN Scan (Half-Open Scan) sends SYN packets and waits for responses without completing the handshake.

A screenshot of a computer

Description automatically generated

ACK Scan: Used to map out firewall rules.

A computer screen with white text

Description automatically generated

Xmas Scan: Sends packets with specific TCP flags to determine how the target replies.

A screenshot of a computer

Description automatically generated

4.2. Stealth Scanning

Stealth scanning aims to avoid detection by security systems such as firewalls and intrusion detection systems (IDS). To avoid detection, techniques such as transmitting fragmented packets, encrypting packets, and modifying packet headers are used.

4.3. Banner Grabbing

Banner grabbing is a technique for gathering information about a system or service by collecting the banner returned by the service after a connection is established. This can disclose information about the service version and operating system.

4.4. OS Fingerprinting

Operating system fingerprinting entails delivering certain packets to a target and evaluating the results to determine the operating system. Tools such as Nmap can determine the operating system based on the characteristics of packet responses.

A screenshot of a computer screen

Description automatically generated

5. Common Scanning Tools

Ethical hackers have access to several powerful scanning tools. Here are some of the most popular tools and their features.

5.1. Nmap (Network Mapper)

Nmap is one of the most widely used scanning tools in the cybersecurity industry. It is open-source and capable of performing network discovery, port scanning, service version detection, OS fingerprinting, and vulnerability scanning.

Key Features:

  • Host discovery
A screenshot of a computer

Description automatically generated
  • Port scanning
A screenshot of a computer

Description automatically generated
  • OS detection
  • Scriptable via Nmap Scripting Engine (NSE)
A screenshot of a computer

Description automatically generated

5.2. Nessus

Nessus is a comprehensive vulnerability scanner that detects flaws in systems and networks. It uses large security issue databases to help identify misconfigurations, outdated software, and known vulnerabilities.

5.3. OpenVAS.

OpenVAS (Open Vulnerability Assessment System) is an open-source vulnerability scanner capable of detecting system vulnerabilities, misconfigurations, and exploits.

5.5. Nikto

Nikto is a web server scanner that detects vulnerabilities in online applications such as out-of-date software versions, misconfigurations, and malicious files.

5.6. NetCat

Netcat, also known as the “Swiss Army knife of networking,” is a flexible tool used for port scanning, banner grabbing, and service enumeration. It can make TCP and UDP connections and listen for incoming data.

6. Understanding the Scanning Process

Before scanning, an ethical hacker will frequently use foot printing and enumeration to acquire preliminary information about the target. This includes identifying the domain, obtaining WHOIS information, and determining IP address ranges.

6.2. Active vs. Passive Scanning

Active Scanning: Interacts directly with the target system to obtain information. Active scans transmit packets to the target and evaluate the responses; nevertheless, security systems can detect them.

Passive Scanning: In contrast, passive scanning includes listening to network traffic in order to obtain information without directly interacting with the target. This makes it stealthier but less thorough.

Leave A Comment

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.