┌──(root㉿kali)-[~] └─# nmap -sn 192.168.2.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-08-19 16:45 CST Nmap scan report for 192.168.2.1 Host is up (0.00045s latency). MAC Address: 0A:00:27:00:00:0A (Unknown) Nmap scan report for 192.168.2.2 Host is up (0.00034s latency). MAC Address: 08:00:27:70:FA:0F (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.66 Host is up (0.00078s latency). MAC Address: 08:00:27:CB:D0:41 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.4 Host is up. Nmap done: 256 IP addresses (4 hosts up) scanned in 2.09 seconds
靶机IP:192.168.2.66
2、端口扫描
1.全端口扫描
1 2 3 4 5 6 7 8 9 10 11 12 13
┌──(root㉿kali)-[~] └─# nmap --min-rate 10000 -p- 192.168.2.66 Starting Nmap 7.94SVN ( https://nmap.org ) at2025-08-1916:45 CST Nmap scan report for192.168.2.66 Host is up (0.0013s latency). Not shown: 65532 closed tcp ports (reset) PORT STATE SERVICE 21/tcp openftp 22/tcp open ssh 80/tcp openhttp MAC Address: 08:00:27:CB:D0:41 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in31.24seconds
PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 3.0.5 | ftp-syst: | STAT: | FTP server status: | Connected to ::ffff:192.168.2.4 | Loggedinas ftp | TYPE: ASCII | No session bandwidth limit | Sessiontimeoutin seconds is 300 | Control connection is plain text | Data connections will be plain text | At session startup, client count was 4 | vsFTPd3.0.5 - secure, fast, stable |_End of status | ftp-anon: Anonymous FTP login allowed (FTP code 230) |_drwxr-xr-x 21141194096 Jul 1612:35 pub 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.13 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 307246:82:43:4b:ef:e0:b0:50:04:c0:d5:2c:3c:5c:7d:4a (RSA) | 25652:79:ea:92:35:b4:f2:5d:b9:14:f0:21:1c:eb:2f:66 (ECDSA) |_25698:fa:95:86:04:75:31:39:c6:60:26:9e:26:86:82:88 (ED25519) 80/tcp open http Apache httpd 2.4.41 ((Ubuntu)) |_http-title: LazyCorp | Empowering Devs | http-robots.txt: 2 disallowed entries |_/cms-admin.php /auth-LazyCorp-dev/ |_http-server-header: Apache/2.4.41 (Ubuntu) MAC Address: 08:00:27:CB:D0:41 (Oracle VirtualBox virtual NIC) 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 4.X|5.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 OS details: Linux 4.15 - 5.8 Network Distance: 1 hop Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in9.24 seconds
┌──(root㉿kali)-[~] └─# nmap -sU --top-ports 100 192.168.2.66 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-08-19 23:38 CST Nmap scan report for 192.168.2.66 Host is up (0.0014s latency). Not shown: 99 closed udp ports (port-unreach) PORT STATE SERVICE 68/udp open|filtered dhcpc MAC Address: 08:00:27:63:D7:A1 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 106.07 seconds
没有开放的端口
4.漏洞脚本扫描
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
┌──(root㉿kali)-[~] └─# nmap --script=vuln -p21,22,80 192.168.2.66 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-08-19 23:40 CST Nmap scan report for 192.168.2.66 Host is up (0.0011s latency).
PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 80/tcp open http |_http-dombased-xss: Couldn't find any DOM based XSS. |_http-stored-xss: Couldn't find any stored XSS vulnerabilities. |_http-csrf: Couldn't find any CSRF vulnerabilities. | http-enum: |_ /robots.txt: Robots file MAC Address: 08:00:27:63:D7:A1 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 31.70 seconds
┌──(root㉿kali)-[~] └─# ftp 192.168.2.66 Connected to 192.168.2.66. 220 (vsFTPd 3.0.5) Name (192.168.2.66:root): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 229 Entering Extended Passive Mode (|||9335|) 150 Here comes the directory listing. drwxr-xr-x 2 114 119 4096 Jul 16 12:35 pub 226 Directory send OK. ftp> cd pub 250 Directory successfully changed. ftp> ls 229 Entering Extended Passive Mode (|||9201|) 150 Here comes the directory listing. -rw-r--r-- 1 0 0 1366786 Jul 16 12:35 note.jpg 226 Directory send OK.
成功登录并发现/pub目录下面有一个名为note.jpg的文件,将其下载至本地
1 2 3 4 5 6 7 8 9
ftp> get note.jpg local: note.jpg remote: note.jpg 229 Entering Extended Passive Mode (|||10901|) 150 Opening BINARY mode data connection for note.jpg (1366786 bytes). 100% |**************************************************************************************************| 1334 KiB 79.73 MiB/s 00:00 ETA 226 Transfer complete. 1366786 bytes received in 00:00 (76.77 MiB/s) ftp> exit 221 Goodbye.
图片隐写获取凭证
直接使用steghide工具提取note.jpg文件
1 2 3 4
┌──(root㉿kali)-[/tmp] └─# steghide extract -sf note.jpg Enter passphrase: wrote extracted data to "creds.txt".
成功从图片中提取出隐藏的凭证,尝试ssh登录,发现登录失败,说明该凭证不是用于ssh登录
1 2 3 4
┌──(root㉿kali)-[/tmp] └─# cat creds.txt Username: dev Password: d3v3l0pm3nt!nt3rn