21BCE3437 Nmap
21BCE3437 Nmap
Cyber Security
Assignment
Description: This command performs a TCP connect scan using nmap, which tries to establish
a full TCP connection with each open port of the target host. It's a reliable method to check if
ports are open but can be easily logged by modern firewalls and intrusion detection systems.
Screenshot
Description: Known as a SYN scan, this scan sends a SYN packet (as if it's initiating a
connection) and waits for a response. If it receives a SYN-ACK, it indicates the port is open.
Instead of completing the three-way handshake, it sends an RST to close the connection. This
type of scan is stealthier than a full connect scan.
Screenshot
2.3. Xmas Scan
Command
nmap -sX 74.125.193.94
Description: An Xmas scan sends packets with the FIN, PSH, and URG flags set. This scan
type is called "Xmas" because of the set flags lighting up the packet header like a Christmas
tree. It's used to probe for listening ports on the target system in a stealthy manner, though
not all systems respond predictably.
Screenshot
Description: A FIN scan sends TCP segments with just the FIN flag set to the target. Closed
ports are expected to reply with RST packets, while open or filtered ports ignore the FIN
segment. This type of scan can help bypass some firewalls.
Screenshot
2.5. Banner Grabbing
Command
nmap -sV 74.125.193.94
Description: This command performs service detection or banner grabbing, which identifies
the service running on an open port along with its version information. This is useful for
identifying potential vulnerabilities of the services running on the host.
Screenshot
Description: This conducts a ping sweep, where nmap sends ICMP echo requests (or other
methods if ICMP is blocked) to multiple hosts to check if they are alive. It helps in mapping
out live hosts in a network.
Screenshot
2.7. OS scan
Command
nmap -O 87.121.150.33
Description: This OS detection command uses TCP/IP stack fingerprinting to identify the
operating system of the target host. It sends a series of TCP and UDP packets to the host and
examines the responses.
Screenshot
Description: This uses a custom Nmap Scripting Engine (NSE) script to check for cross-site
scripting vulnerabilities in web applications hosted on the target server by testing known
URLs and parameters.
Screenshot
2.9. CSRF scan
Command
nmap -sV --script http-csrf 87.121.150.33
Description: This command scans for Cross-Site Request Forgery vulnerabilities using
another NSE script. It attempts to find forms and URLs in the web application that might be
vulnerable to CSRF attacks.
Screenshot
Description: Utilizes the http-sql-injection script to scan for SQL injection vulnerabilities in
the web services running on specified ports. It tests various injection techniques to identify
potential SQL injection flaws in the web application.
Screenshot
3. Draw the attack tree for the question given in the class.
3.1. Copy of a file
3.2. Web Application attack
4. Use Wireshark and perform the capture of username and password from the following website
http://testphp.vulnweb.com/