Vulnhub: DriftingBlues: 6靶机

发布时间 2023-08-05 16:39:40作者: ctostm

kali:192.168.111.111

靶机:192.168.111.180

信息收集

端口扫描

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

image

查看robots.txt发现存在目录:/textpattern/textpattern

image

访问后发现是textpattern cms

image

目录爆破发现文件spammer,访问后发现是个压缩包,解压需要密码,用john爆破

gobuster dir -u http://192.168.111.180 -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt

image

zip2john spammer.zip > hash
john hash --wordlist=/usr/share/wordlists/rockyou.txt

image

解压后查看文件creds.txt,得到账号密码:mayer:lionheart

image

登录textpattern cms后台,直接上传php反弹shell

image

image

文件被上传到http://192.168.111.180/textpattern/files/

image

访问后获得反弹shell

image

提权

目标内核版本

uname -a

image

dirtycow提权

gcc 40616.c -o exp -pthread
./exp

image

flag

image