Sickos1.1
下载地址:https://download.vulnhub.com/sickos/sick0s1.1.7z
一、主机发现
- ┌──(de1te㉿de1te)-[~]
- └─$ sudo nmap -sn 192.168.239.0/24
- [sudo] de1te 的密码:
- Starting Nmap 7.93 ( https://nmap.org ) at 2023-03-29 09:47 CST
- Nmap scan report for 192.168.239.1
- Host is up (0.0014s latency).
- MAC Address: 00:50:56:C0:00:03 (VMware)
- Nmap scan report for 192.168.239.133
- Host is up (0.00016s latency).
- MAC Address: 00:0C:29:D9:46:32 (VMware)
- Nmap scan report for 192.168.239.254
- Host is up (0.00011s latency).
- MAC Address: 00:50:56:F4:69:7B (VMware)
- Nmap scan report for 192.168.239.129
- Host is up.
- Nmap done: 256 IP addresses (4 hosts up) scanned in 19.04 seconds
复制代码 192.168.239.133 是靶机ip
二、nmap扫描及思路分析
- 查看开放端口
- ┌──(de1te㉿de1te)-[~]
- └─$ sudo nmap --min-rate 10000 -p- 192.168.239.133
- Starting Nmap 7.93 ( https://nmap.org ) at 2023-03-29 09:49 CST
- Nmap scan report for 192.168.239.133
- Host is up (0.00037s latency).
- Not shown: 65532 filtered tcp ports (no-response)
- PORT STATE SERVICE
- 22/tcp open ssh
- 3128/tcp open squid-http
- 8080/tcp closed http-proxy
- MAC Address: 00:0C:29:D9:46:32 (VMware)
- Nmap done: 1 IP address (1 host up) scanned in 21.99 seconds
复制代码 开放了22、3128端口,8080能被扫出来但是被关了
- 查看开放端口的服务及版本号
- ┌──(de1te㉿de1te)-[~]
- └─$ sudo nmap -sT -sV -O -p 22,3128,8080 192.168.239.133
- Starting Nmap 7.93 ( https://nmap.org ) at 2023-03-29 09:51 CST
- Nmap scan report for 192.168.239.133
- Host is up (0.00043s latency).
- PORT STATE SERVICE VERSION
- 22/tcp open ssh OpenSSH 5.9p1 Debian 5ubuntu1.1 (Ubuntu Linux; protocol 2.0)
- 3128/tcp open http-proxy Squid http proxy 3.1.19
- 8080/tcp closed http-proxy
- MAC Address: 00:0C:29:D9:46:32 (VMware)
- 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 22.07 seconds
复制代码 尝试用UDP进行扫描- ┌──(de1te㉿de1te)-[~]
- └─$ sudo nmap -sU -p 22,3128,8080 192.168.239.133
- Starting Nmap 7.93 ( https://nmap.org ) at 2023-03-29 09:55 CST
- Nmap scan report for 192.168.239.133
- Host is up (0.00040s latency).
- PORT STATE SERVICE
- 22/udp open|filtered ssh
- 3128/udp open|filtered ndl-aas
- 8080/udp open|filtered http-alt
- MAC Address: 00:0C:29:D9:46:32 (VMware)
- Nmap done: 1 IP address (1 host up) scanned in 9.90 seconds
复制代码 没有获取到有价值的信息
- 用nmap简单扫描一下漏洞
- ┌──(de1te㉿de1te)-[~]
- └─$ sudo nmap --script=vuln -p22,3128,8080 192.168.239.133
- Starting Nmap 7.93 ( https://nmap.org ) at 2023-03-29 10:00 CST
- Nmap scan report for 192.168.239.133
- Host is up (0.00056s latency).
- PORT STATE SERVICE
- 22/tcp open ssh
- 3128/tcp open squid-http
- 8080/tcp closed http-proxy
- MAC Address: 00:0C:29:D9:46:32 (VMware)
- Nmap done: 1 IP address (1 host up) scanned in 19.93 seconds
复制代码 没有啥简单的漏洞
- 总结:
- 22端口是ssh服务。
- 3128是http代理服务,用的是Squid http proxy版本
- 8080端口也是http代理,但是是关闭的
- 系统版本是liunx3.2-4.9 之间
一般来说,22端口不可能会直接被攻击。所以我们可以尝试一下3128端口。
3128和8080端口都显示http服务,所以我们尝试用浏览器看一下。
3128端口显示如下- ERROR
- The requested URL could not be retrieved
- The following error was encountered while trying to retrieve the URL: /
- Invalid URL
- Some aspect of the requested URL is incorrect.
- Some possible problems are:
- Missing or incorrect access protocol (should be "http://" or similar)
- Missing hostname
- Illegal double-escape in the URL-Path
- Illegal character in hostname; underscores are not allowed.
- Your cache administrator is webmaster.
- Generated Wed, 29 Mar 2023 10:09:00 GMT by localhost (squid/3.1.19)
复制代码 百度搜索了一下,发现squid 是代理服务器
三、Squid代理分析与设置
- 目录爆破
对端口3128进行爆破- ┌──(de1te㉿de1te)-[~]
- └─$ sudo dirb http://192.168.239.133
- -----------------
- DIRB v2.22
- By The Dark Raver
- -----------------
- START_TIME: Wed Mar 29 13:01:54 2023
- URL_BASE: http://192.168.239.133/
- WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt
- -----------------
- GENERATED WORDS: 4612
- ---- Scanning URL: http://192.168.239.133/ ----
- *** Calculating NOT_FOUND code...
-
- (!) FATAL: Too many errors connecting to host
- (Possible cause: OPERATION TIMEOUT)
-
- -----------------
- END_TIME: Wed Mar 29 13:04:24 2023
- DOWNLOADED: 0 - FOUND: 0
复制代码 gobuster:- ┌──(de1te㉿de1te)-[~]
- └─$ sudo gobuster dir -u 192.168.239.133 -w /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt
- ===============================================================
- Gobuster v3.5
- by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
- ===============================================================
- [+] Url: http://192.168.239.133
- [+] Method: GET
- [+] Threads: 10
- [+] Wordlist: /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt
- [+] Negative Status codes: 404
- [+] User Agent: gobuster/3.5
- [+] Timeout: 10s
- ===============================================================
- 2023/03/29 12:56:48 Starting gobuster in directory enumeration mode
- ===============================================================
- Error: error on running gobuster: unable to connect to http://192.168.239.133/: Get "http://192.168.239.133/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
复制代码 报错了,emm尝试用代理端口3128进行目录爆破- ┌──(de1te㉿de1te)-[~]
- └─$ sudo dirb http://192.168.239.133 -p http://192.168.239.133:3128
- -----------------
- DIRB v2.22
- By The Dark Raver
- -----------------
- START_TIME: Wed Mar 29 13:05:28 2023
- URL_BASE: http://192.168.239.133/
- WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt
- PROXY: http://192.168.239.133:3128
- -----------------
- GENERATED WORDS: 4612
- ---- Scanning URL: http://192.168.239.133/ ----
- + http://192.168.239.133/cgi-bin/ (CODE:403|SIZE:291)
- + http://192.168.239.133/connect (CODE:200|SIZE:109)
- + http://192.168.239.133/index (CODE:200|SIZE:21)
- + http://192.168.239.133/index.php (CODE:200|SIZE:21)
- + http://192.168.239.133/robots (CODE:200|SIZE:45)
- + http://192.168.239.133/robots.txt (CODE:200|SIZE:45)
- + http://192.168.239.133/server-status (CODE:403|SIZE:296)
- -----------------
- END_TIME: Wed Mar 29 13:05:33 2023
- DOWNLOADED: 4612 - FOUND: 7
复制代码 四、web爆破
扫描出了几个目录。将192.168.239.133:3128端口设置为代理服务器再进行访问
查看8080端口查看roboots.txt- roboots.txt
- User-agent: *
- Disallow: /
- Dissalow: /wolfcms
复制代码 出现wolfcms,再查看一下

- 看到cms,就要想能不能找到管理目录,google浏览网页,发现管理目录一般为?加admin
查看网页发现也有?,尝试一下

如何登录?
通过google搜索,发现用户名多为admin。所以以admin为用户名进行弱密码尝试。
通过多次尝试,最终
发现好多php代码,可以尝试使用一句话木马进行反弹shell进行操作
[code] |