基本的操作系统和版本检测
在这一步中,我们将使用 Nmap 对目标服务器执行操作系统和版本检测。这将帮助你理解识别目标系统上运行的操作系统和软件版本的重要性。
现在,服务器正在运行,我们准备使用 Nmap 执行第一次扫描。打开一个新的终端窗口并导航到你的项目目录:
cd /home/labex/project
以下命令将尝试确定运行在本地主机端口 4444
上的主机的操作系统:
sudo nmap -O localhost -p 4444 > /home/labex/project/nmap_os_detection.txt
-O
选项告诉 Nmap 尝试识别目标的操作系统。
检查 nmap_os_detection.txt
文件以查看扫描结果。
cat /home/labex/project/nmap_os_detection.txt
该文件将包含 Nmap 检测到的操作系统和版本信息。
Starting Nmap 7.80 ( https://nmap.org ) at 2024-07-02 15:08 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000024s latency).
Other addresses for localhost (not scanned): ::1
PORT STATE SERVICE
4444/tcp open krb524
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running: Linux 2.6.X
OS CPE: cpe:/o:linux:linux_kernel:2.6.32
OS details: Linux 2.6.32
Network Distance: 0 hops
OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 1.57 seconds