Professional Documents
Culture Documents
Assignment #2
Penetration Testing
Submitted by:
M.Shakeeb-Khalid
Bse-193082
Submitted to:
Mr. Mehran Yousaf
Submission Date:
April 03, 2023
Page|2
a) SYN Scan:
SYN scan is a TCP-based scanning technique used to identify open ports on a target system.
This scan sends a SYN packet to the target system's ports, and if the port is open, the target will
respond with a SYN-ACK packet. Hping command for SYN scan is:
b) UDP Scan:
UDP scan is a scanning technique used to identify open UDP ports on a target system. Unlike
TCP, UDP does not establish a connection before transmitting data. Therefore, UDP scan sends
a UDP packet to the target system's ports and waits for a response. Hping command for UDP
scan is:
c) FIN Scan:
FIN scan is a TCP-based scanning technique used to identify open ports on a target system. In
this scan, the FIN flag is sent to the target system's ports, and if the port is open, there will be no
response. Hping command for FIN scan is:
Conduct a SYN scan on the target network, and explain the command
used.
To conduct a SYN scan on the target network using Hping tool, we will use the following
command:
For example, if we want to conduct a SYN scan on the target system with IP 192.168.0.1 and
port 80, the command will be:
hping3 -S 192.168.0.1 -p 80
In this command, -S flag indicates that we want to perform a SYN scan, and -p flag indicates
the port number we want to scan. This command will send a SYN packet to port 80 of the target
system and wait for a response. If the port is open, the target system will respond with a SYN-
ACK packet.
Conduct a UDP scan on the target network, and explain the command
used.
To conduct a UDP scan on the target network using Hping tool, we will use the following
command:
For example, if we want to conduct a UDP scan on the target system with IP 192.168.0.1 and
port 53, the command will be:
hping3 -2 192.168.0.1 -p 53
In this command, -2 flag indicates that we want to perform a UDP scan, and -p flag indicates
the port number we want to scan. This command will send a UDP packet to port 53 of the target
system and wait for a response. If the port is open, the target system will respond with a UDP
To conduct a FIN scan using Hping tool, and explain the command
used:
For example, if we want to conduct a FIN scan on the target system with IP 192.168.0.1 and
port 22, the command will be:
In this command, --fin flag indicates that we want to perform a FIN scan, and -p flag indicates
the port number we want to scan. This command will send a FIN packet to port 22 of the target
system and wait for a response. If the port is open, the target system will not respond with any
packet. However, if the port is closed, the target system will respond with a RST packet.
Page|4
References:
Cybersecurity and Infrastructure Security Agency (CISA) - TCP/IP Ports and Protocols:
https://us-cert.cisa.gov/ncas/alerts/TA14-017A