Vulnhub靶场之Me-and-My-Girlfriend – 作者:cloudcoll

一、环境搭建

靶场下载地址:https://download.vulnhub.com/meandmygirlfriend/Me-and-My-Girlfriend-1.ova

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

1605874981_5fb7b5251a07f2dc6b32f.png!small?1605874980906

二、信息收集

1、nmap扫描确定ip1605872824_5fb7acb863b05c201c9e5.png!small?1605872824361

使用namp进一步扫描,扫出更多的信息1605872989_5fb7ad5d7469ca2f29349.png!small?16058729893211605873003_5fb7ad6b77b1af207e5d6.png!small?1605873003667

2、Web扫描

1、web界面

1605873138_5fb7adf271cdedbef3182.png!small?1605873138415

查看源码

1605873181_5fb7ae1d289b9a8aee85e.png!small?1605873181076

提示需要用x-forwarded-for,使用google插件ModHeader,添加请求头X-Forwarded-For

用brup suite改返回失败,不知道为啥

1605874221_5fb7b22d33863c9999716.png!small?1605874222220

1605874108_5fb7b1bcebb66f01fddaf.png!small?1605874108962

成功访问1605874254_5fb7b24e6c6c81078c640.png!small?1605874254309

有登入功能,可以尝试爆破

1605874362_5fb7b2ba14ccd53ecf283.png!small?1605874361986

还有注册功能,随便注册一个账号登入进去康康

1605874461_5fb7b31dbd2c541e27b02.png!small?1605874461626

点击profile的时候,url栏里出现了一个id=12

1605874649_5fb7b3d9603b25d190ab8.png!small?1605874649171修改一下id,看到了其他用户的信息

1605875233_5fb7b62191a91871cc27a.png!small?1605875235658

三、漏洞利用

使用F12(鼠标右键检查),将密码的type修改为text看一下爱丽丝的密码

1605875065_5fb7b57964c1574d98ebf.png!small?1605875065266

1605875119_5fb7b5af49765b69a207b.png!small?1605875119164

1605875250_5fb7b6329ca83ae06fc92.png!small?1605875250506

登入进入看了看,没什么可用的信息

2、目录扫描

1605876230_5fb7ba066433fada1ff91.png!small?1605876230572

有个robots.txt,访问下看看1605876259_5fb7ba238dece60457aa2.png!small?1605876259331继续访问heyhoo.txt

1605876291_5fb7ba430caa026dbd7d8.png!small?1605876290855

reconn?重新连接?还能连接什么呢?当然是ssh啦,使用爱丽丝的账号密码登入ssh看看

1605876221_5fb7b9fd3f27777031752.png!small?1605876221171

看下目录

1605876687_5fb7bbcfc952958c96a8f.png!small?1605876687689

去看看她的小秘密

1605876721_5fb7bbf1bfd5d3da1fc57.png!small?1605876721625

得到一个flag1605876824_5fb7bc585703aa35f3f77.png!small?1605876824143再看看他的notes

1605876808_5fb7bc48404322a687e4c.png!small?16058768081051605876877_5fb7bc8d02031f3b6014f.png!small?1605876876783

???????????????????????????????????????????????

再看一下网站的配置文件

1605877100_5fb7bd6c4c12b1820c2ef.png!small?1605877100353

得到数据库账号密码,尝试提权

1605877322_5fb7be4a8974a925f7b6a.png!small?1605877322445

成功获得flag1605877378_5fb7be82294a707355add.png!small?16058773781551605877428_5fb7beb4d40977a56f47d.png!small?1605877428639这靶场的作者还是挺有意思的。

其他方法

ssh登入爱丽丝账号,使用 sudo -l 命令查看sudo权限1605877935_5fb7c0af425255f815e64.png!small?1605877935239有php的root权限,直接使用php执行bash1605878045_5fb7c11da4778605013be.png!small?1605878045809成功提权

来源:freebuf.com 2020-11-20 21:17:43 by: cloudcoll

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

请登录后发表评论