cd /home/ubuntu/Desktop/vulhub/tomcat/CVE-2017-12615
sudo docker-compose up -d
cd /home/ubuntu/Desktop/vulhub/phpmyadmin/CVE-2018-12613
sudo docker-compose up -d
二、渗透测试
0x01 信息收集
仅得到一个IP地址,查看开放哪些端口:
1 2 3 4 5 6 7 8 9 10 11 12
udo nmap -sS -sV -Pn -T 4192.168.40.128
Nmap scan report for192.168.40.128 Host is up (0.000047s latency). Not shown: 996 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.13 (Ubuntu Linux; protocol 2.0) 2001/tcp open http Jetty 9.2.11.v20150529 2002/tcp open http Apache Tomcat 8.5.19 2003/tcp open http Apache httpd 2.4.25 ((Debian)) MAC Address: 00:0C:29:32:AB:01 (VMware) Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
[Information Gathering - System Info] 2022/04/1711:14:03 current dir: / 2022/04/1711:14:03 current user: root uid: 0 gid: 0 home: /root 2022/04/1711:14:03 hostname: 174745108fcb 2022/04/1711:14:03 debian debian 9.11 kernel: 4.4.0-142-generic
[Information Gathering - Services] 2022/04/1711:14:03 service found in process: 10 java 2022/04/1711:14:03 service found in process: 1641 python 2022/04/1711:14:03 service found in process: 256254 python
[Information Gathering - Commands and Capabilities] 2022/04/1711:14:03 available commands: curl,wget,find,ps,java,python,apt,dpkg,ssh,git,svn,mount,fdisk,base64,python2,python2.7,perl 2022/04/1711:14:03 Capabilities hex of Caps(CapInh|CapPrm|CapEff|CapBnd|CapAmb): CapInh: 00000000a80425fb CapPrm: 00000000a80425fb CapEff: 00000000a80425fb CapBnd: 00000000a80425fb CapAmb: 0000000000000000 Cap decode: 0x00000000a80425fb = CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_SETGID,CAP_SETUID,CAP_SETPCAP,CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_SYS_CHROOT,CAP_MKNOD,CAP_AUDIT_WRITE,CAP_SETFCAP Add capability list: [*] Maybe you can exploit the Capabilities below:
[Information Gathering - Mounts]
[Information Gathering - Net Namespace] container net namespace isolated.
[Discovery - K8s API Server] 2022/04/1711:14:03 checking if api-server allows system:anonymous request. err found while searching local K8s apiserver addr.: err: cannot find kubernetes api host in ENV api-server forbids anonymous request. response:
[Discovery - K8s Service Account] load K8s service account token error.: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
[Discovery - Cloud Provider Metadata API] 2022/04/1711:14:04 failed to dial Alibaba Cloud API. 2022/04/1711:14:04 failed to dial Azure API. 2022/04/1711:14:04 failed to dial Google Cloud API. 2022/04/1711:14:05 failed to dial Tencent Cloud API. 2022/04/1711:14:05 failed to dial OpenStack API. 2022/04/1711:14:05 failed to dial Amazon Web Services (AWS) API. 2022/04/1711:14:06 failed to dial ucloud API.
Nmap scan report for192.168.183.130 Host is up (0.00059s latency).
PORT STATE SERVICE VERSION 445/tcp open microsoft-ds Microsoft Windows Server 2008 R2 - 2012 microsoft-ds (workgroup: DEMO) Service Info: Host: WIN-ENS2VR5TR3N; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results: |_smb-vuln-ms10-054: false |_smb-vuln-ms10-061: NT_STATUS_ACCESS_DENIED | smb-vuln-ms17-010: | VULNERABLE: | Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010) | State: VULNERABLE | IDs: CVE:CVE-2017-0143 | Risk factor: HIGH | A critical remote code execution vulnerability exists in Microsoft SMBv1 | servers (ms17-010). | | Disclosure date: 2017-03-14 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143 | https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/ |_ https://technet.microsoft.com/en-us/library/security/ms17-010.aspx
Nmap scan report for192.168.183.131 Host is up (0.00053s latency).
PORT STATE SERVICE VERSION 445/tcp open microsoft-ds Microsoft Windows 7 - 10 microsoft-ds (workgroup: DEMO) Service Info: Host: TESTWIN7-PC; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results: |_samba-vuln-cve-2012-1182: NT_STATUS_ACCESS_DENIED |_smb-vuln-ms10-054: false |_smb-vuln-ms10-061: NT_STATUS_ACCESS_DENIED | smb-vuln-ms17-010: | VULNERABLE: | Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010) | State: VULNERABLE | IDs: CVE:CVE-2017-0143 | Risk factor: HIGH | A critical remote code execution vulnerability exists in Microsoft SMBv1 | servers (ms17-010). | | Disclosure date: 2017-03-14 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143 | https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/ |_ https://technet.microsoft.com/en-us/library/security/ms17-010.aspx
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 2 IP addresses (2 hosts up) scanned in45.49 seconds