View UDP results in Xfce terminal
In this step, we will focus on viewing and analyzing the UDP scan results directly within the Xfce terminal. While Nmap provides output directly to the terminal, sometimes it's helpful to save the output to a file for easier review and analysis. We'll use terminal commands to filter and view the UDP-specific parts of the scan.
First, let's run a UDP scan and save the output to a file. This will allow us to work with the results more easily. We'll use the -oN option to save the output in a "normal" format.
sudo nmap -sUV 192.168.1.1 -oN udp_scan_results.txt
This command performs a UDP scan with version detection on 192.168.1.1 and saves the output to a file named udp_scan_results.txt in your current directory (~/project).
Now that we have the results saved in a file, we can use terminal commands to view and filter the UDP-specific information.
To view the entire contents of the file, you can use the cat command:
cat udp_scan_results.txt
This will display the entire Nmap scan report in the terminal. However, we're primarily interested in the UDP results. We can use the grep command to filter the output and show only the lines that contain "udp".
grep "udp" udp_scan_results.txt
This command will search the udp_scan_results.txt file for lines containing the string "udp" and display those lines in the terminal. The output will show you the open or filtered UDP ports, along with any version information that Nmap was able to detect.
Example output:
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm
5353/udp open|filtered zeroconf Apple Bonjour
You can also use less command to view the file page by page:
less udp_scan_results.txt
Inside less, you can search for "udp" by typing /udp and pressing Enter. Press n to go to the next match. Press q to quit less.
By using these simple terminal commands, you can effectively view and analyze the UDP scan results generated by Nmap. This allows you to quickly identify open UDP ports and any associated service information.