0% found this document useful (0 votes)
20 views2 pages

Network Scanning Techniques Overview

The document provides an overview of various network scanning techniques and tools, including HPING3, Nmap, and MegaPing. It details specific commands for packet crafting, scanning methods, and troubleshooting, as well as techniques to avoid detection. Additionally, it covers identifying operating systems using TTL and TCP window sizes with Wireshark.

Uploaded by

Aamir Khan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Network Scanning Techniques Overview

The document provides an overview of various network scanning techniques and tools, including HPING3, Nmap, and MegaPing. It details specific commands for packet crafting, scanning methods, and troubleshooting, as well as techniques to avoid detection. Additionally, it covers identifying operating systems using TTL and TCP window sizes with Wireshark.

Uploaded by

Aamir Khan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Module 03: Scanning Networks

UDP and TCP Packet Crafting Techniques using HPING3


hping3 -1 No ICMP
hping3 -s SYN
hping3 -c count
hping3 --scan 1-1024
hping3 [Link] --udp --rand-source --data 500
hping3 -S [Link] -p 80 -c 5
hping3 [Link] --flood

e.g.
hping3 --scan 1-3000 -S [Link]
hping3 [Link] --udp --rand-source --data 500
hping3 -S [Link] -p 80 -c 5

Scanning The Network Using The Colasoft Packet Builder


ARP Packet template, set Delta Time as 0.1
Send All Packets window, check the Burst Mode

Basic Network Troubleshooting Using MegaPing


Host scanner
Port scanner

Understanding Network Scanning Using Nmap


nmap -O
nmap --packet-trace
Slow comprehensive scan
Null scan
Enable all advanced/aggressive options (-A)
nmap -sN -T4 -A [Link]

Exploring Various Network Scanning Techniques

TCP connect() scan uses a normal TCP connection to determine if a port is


available. Xmas Scan
involves sending TCP segments with the all flags sent in the packet header,
generating packets
that are illegal according to RFC 793. ACK Flag Scan involves sending ACK
probe packet with
random sequence number. UDP Scan involves sending a generic UDP packet to the
target. IDLE
Scan involves sending spoofed packets to a target.

TCP Connect Scan


nmap -sT -T3 -A [Link]

Xmas scan
nmap -sX -T4 [Link]

ACK Scan
nmap -sA -v -T4 [Link]

IDLE scan
nmap -Pn -p 80 -sI [Link] [Link]

Ping sweep
nmap -sP 10.10.10.*
• TCP Connect Scan
• Xmas Scan
• ACK Flag Scan
• UDP Scan
• IDLE Scan

Inverse TCP Flag Scan and Stealth Scan

Scanning a Network Using NetScan Tools Pro

Avoiding Scanning Detection using Multiple Decoy IP Addresses


nmap -f [Link]

Scan with smaller mtu


nmap -mtu 8 [Link]

Decoy method
nmap -D RND:10 [Link]

Drawing Network Diagrams Using Network Topology Mapper


Solarwinds network topology mapper

Checking for Live Systems Using Angry IP Scanner


Scanning hosts/ports (Windows tool)

Scanning for Network Traffic Going Through a Computer’s Adapter Using IP-Tools

Identify Target System OS with TTL and TCP Window Sizes using Wireshark

Operating System (OS) IP


Initial TTL TCP
window size
Linux (kernel 2.4 and 2.6) 64 5840
Google's customized Linux 64 5720
FreeBSD 64 65535
Windows XP 128 65535
Windows 7, Vista and Server 2008 128 8192
Cisco Router (IOS 12.4) 255 4128

Common questions

Powered by AI

The 'Colasoft Packet Builder' facilitates network scanning by allowing users to create customized packets to carry out specific scanning tasks. Unique features include its ARP packet template, setting Delta Time for inter-packet transmissions to control the pace of sending packets, and the ability to review packets before transmission through a Send All Packets window. These functionalities make it a versatile tool for network administrators to script and automate complex scanning sessions .

Using 'hping3' for TCP/UDP packet crafting provides flexibility for creating custom packets, allowing detailed control over packet parameters such as size, source, destination, and flags. This helps in performing tailored network diagnostics and penetration tests. However, challenges include the complexity and technical expertise required to craft meaningful packets, the risk of misconfiguring packet options leading to ineffective scans or detection, and the potential legal implications due to unauthorized scanning that may violate network policies or laws .

The 'IDLE scan' operates by sending spoofed packets to a target in a way that makes the behavior seem as though it's coming from a different host, known as the 'zombie.' This utilizes the predictability of IPID (IP Identification) sequences to infer if a port is open or closed based on increment patterns. The advantage of this method is its stealthiness; since it doesn't transmit packets from the attacker's real IP address, it is difficult to trace back to the true source, thus providing anonymity .

Using 'decoys' in network scanning involves launching a scan from multiple fictitious IP addresses alongside the real source IP. This method, specifically using Nmap's -D option, causes the target's logging and defensive mechanisms to register the scan as coming from multiple sources, obscuring the attacker's actual IP among the decoys. This technique effectively reduces the risk of scan detection and tracing the origin of the scan to the attacker .

The purpose of the 'Xmas Scan' in network scanning is to identify open ports on a target machine without establishing a full TCP connection, making it less detectable than other scan types. It functions by sending TCP segments with all flags (FIN, URG, PSH) set in the packet header, which generates packets that are illegal according to RFC 793. If a port is closed, it will respond with an RST packet. However, if a port is open, it will typically drop the packet due to no acknowledgment, allowing the scanner to infer the state of the port .

The role of 'TTL and TCP window sizes' in identifying a target system's operating system lies in the fact that different OSs have characteristic default values for these parameters. By analyzing the Time-To-Live (TTL) value and TCP window size of a packet, one can infer the operating system: for instance, Linux systems often have a TTL of 64 and a TCP window size of 5840, while Windows systems may have a TTL of 128 and a TCP window size of 65535. These identifiers help in profiling and identifying systems accurately without direct access .

'Ping sweeps' are used in network reconnaissance to determine which IP addresses are currently active and reachable within a given IP range. By sending ICMP echo request packets to numerous addresses and listening for replies, a scan can map out which live hosts exist on a network. This technique typically reveals the IP addresses of devices that are up and responding, thus indicating potential targets for further investigation or connectivity verification .

The use of a 'burst mode' in network packet transmission, where packets are sent in quick succession without delays, accelerates the scanning process by increasing the transmission speed of probing data. This can effectively reduce the overall time taken for a scan to complete. However, it can also lead to higher chances of detection due to quicker, more noticeable influxes of traffic. Additionally, it might cause network congestion or packet loss if network bandwidth is limited .

The 'TCP Connect Scan' initiates a full TCP handshake by establishing a normal TCP connection to determine if a port is available. This makes it straightforward to detect because it follows the standard connection procedures that can be logged by target systems. In contrast, the 'Stealth Scan' (or SYN scan) only sends a SYN packet and analyzes the SYN-ACK response instead of completing the TCP handshake. This results in lower detectability, as the connection is never fully established, making it less likely to be logged or flagged by intrusion detection systems .

'UDP scans' differ from 'TCP scans' in that they do not establish a connection through a handshake. Instead, they send a UDP packet to each target port, and if a response is not received, the port is presumed open. A closed port typically sends an ICMP destination unreachable message. The limitations of UDP scans include their slowness and the need to handle rate limits on ICMP responses, which can be selectively dropped to limit false positives. Additionally, various network security appliances might also block or drop these packets, making open ports harder to detect compared to TCP scans .

You might also like