Compare Xmas scan with FIN scan in Xfce terminal
In this step, we will compare the results of an Xmas scan with a FIN scan. Both Xmas and FIN scans are types of stealth scans that can be used to identify open ports on a target system. They work by sending specially crafted TCP packets to the target and analyzing the responses.
First, let's run a FIN scan on the localhost (127.0.0.1):
sudo nmap -sF 127.0.0.1
This command tells Nmap to perform a FIN scan (-sF) on the target IP address 127.0.0.1. You will need sudo privileges to run this command.
Example output (the actual output may vary):
Starting Nmap 7.80 ( https://nmap.org ) at 2023-10-27 10:00 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000029s latency).
All 1000 scanned ports on localhost (127.0.0.1) are filtered
Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds
Now, let's compare this output with the output from the Xmas scan we performed earlier. You can either scroll back in your terminal history to find the previous Xmas scan output, or you can re-run the Xmas scan:
sudo nmap -sX 127.0.0.1
Example output (the actual output may vary):
Starting Nmap 7.80 ( https://nmap.org ) at 2023-10-27 10:01 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000029s latency).
All 1000 scanned ports on localhost (127.0.0.1) are filtered
Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds
Observe the similarities and differences between the two scan results. In many cases, the results will be identical, showing all ports as filtered. This is because many modern firewalls and operating systems are configured to drop or ignore these types of packets.
To further compare, you can save the FIN scan results to a file, similar to what we did with the Xmas scan:
sudo nmap -sF -oN fin.txt 127.0.0.1
Then, you can use the diff command to compare the two files:
diff xmas.txt fin.txt
This command will show you any differences between the xmas.txt and fin.txt files. If the scans produced identical results, the diff command will not output anything.