靶机下载地址:https://www.vulnhub.com/entry/vulncms-1,710/
Description
This box is all about CMS as its name suggests. You need to enumerate the box, find the CMS, and exploit in order to gain access to other and finally get the user and root flag.
Hint: Proceed in the given order
信息搜集
nmap -sV -sC -A 192.168.169.143 发现开放了22 80 5000 8081 9001端口
其中80是w3.css 5000端口是WordPress 8081端口是Joomla 9001端口是drupal,经过测试,9001端口的下的drupal可以利用
漏洞利用
这里drupal有个RCE,我直接丢上Exp了
1 |
import requests |
这里可以直接使用msf,可以成功获取到一个meterpreter
1 |
use exploit/multi/handler |
python3 -c ‘import pty; pty.spawn(“/bin/bash”);’ 切换成交互式shell
查看/etc/passwd文件 cat /etc/passwd,发现有两个用户,elliot,tyrell,应该是要获取到这两个用户,我们去翻翻三个cms的数据库吧
drupal:/sites/default/settings.php
1 |
$databases = array ( |
joomla:configuration.php
1 |
public $host = 'localhost'; |
worepress:
1 |
/** The name of the database for WordPress */ |
额,我这里数据库连接不上,这第一个flag暂时找不出来,因为爆破账号密码的话,正确密码在数据库里
后渗透提权
虽然第一个flag做不出来,第二个还是可以的,我们可以发现在/drupal/misc有个tyrell.pass,里面有tyrell的账号密码
使用ssh登陆 ssh [email protected]
登录成功之后使用sudo -l命令发现/bin/journalctl可以进行利用;
附上漏洞查询连接https://gtfobins.github.io/
输入完命令即可获取root权限
1 |
sudo journalctl |
相关推荐: 【技术原创】ProxyShell利用分析3——添加用户和文件写入
0x00 前言 本文将要介绍ProxyShell中添加用户和文件写入的细节,分析利用思路。 0x01 简介 本文将要介绍以下内容: ◼添加用户的方法 ◼文件写入的方法 ◼利用分析 0x02 添加用户的方法 使用PyPSRP执行Powershell命令时,无法执…
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论