Identify Linux Server Version

Beginner

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.


Skills Graph

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.txt in the project directory.
  • Examine the scan results to determine the operating system of the local machine.

Requirements

  1. You must use the nmap command with the -O option to enable OS detection.
  2. The target to scan is localhost.
  3. The output of the Nmap scan must be redirected to a file named target_os.txt in the project directory.
  4. You must execute the nmap command from the ~/project directory.
  5. You must use sudo to run the nmap command.

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 sudo when 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.txt file using cat to 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.