Introduction
In this challenge, you'll step into the role of a junior security analyst tasked with identifying the operating system of your local machine. This involves using Nmap with OS detection enabled to scan localhost.
The challenge includes utilizing the nmap command with the -O option to perform OS detection. The scan results must be outputted to a file named target_os.txt within the project directory, allowing you to examine the output and determine the operating system of the local machine.
Identify Linux Server Version
You're a junior security analyst tasked with identifying the operating system of your local machine to assess potential vulnerabilities.
Tasks
- Use Nmap with OS detection enabled to scan localhost and output the results to a file named
target_os.txtin the project directory. - Examine the scan results to determine the operating system of the local machine.
Requirements
- You must use the
nmapcommand with the-Ooption to enable OS detection. - The target to scan is
localhost. - The output of the Nmap scan must be redirected to a file named
target_os.txtin the project directory. - You must execute the
nmapcommand from the~/projectdirectory. - You must use
sudoto run thenmapcommand.
Examples
After running the Nmap scan, the target_os.txt file in the project directory might contain output similar to this:
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000024s latency).
OS details: Linux 5.4.0-42-generic
Hints
- Remember to use
sudowhen running Nmap for OS detection. - Use redirection (
>) to save the output to a file. - The target is
localhost. - Check the contents of the
target_os.txtfile usingcatto view the scan results.
Summary
In this challenge, a junior security analyst uses Nmap with OS detection enabled (-O option) to identify the operating system of the local machine. The Nmap scan results are saved to a file named target_os.txt within the project directory.
The challenge involves setting up a simulated Linux server environment using a bash script and ensuring Nmap is installed. The analyst then executes the Nmap scan with sudo from the ~/project directory and examines the target_os.txt file to determine the machine's operating system, specifically looking for details like the Linux kernel version.



