(CN) Vulnhub target "Me and My Girlfriend" Practice

Me and My Girlfriend 靶场

1. 启动环境

导入vmware运行虚拟机

2. 攻击思路

使用fscan直接扫描整个网段,进行排除法发现靶机IP地址为192.168.182.138,开放了80和22端口

image-20230612143116556

登上网站F12发现

image-20230612143240660

提示x-forwarded-for

根据“local”提示,将x-for-forward设置为127.0.0.1,发现返回了主页

image-20230612144811143

admin爆破?试了一会感觉没啥用

注册了一个新用户进去看了看也没啥有用的信息

dirsearch扫一下目录,发现有三个目录可以访问,一个个试一下

image-20230612150420522

进入其他两个目录发现都是空白,进入robots.txt发现提示/heyhoo.txt,拿到提示

image-20230612150905018

image-20230612150557094

后来发现user_id值是可以自定义设置的

image-20230612151705341

找到如下用户:

id=1 Eweuh Tandingan eweuhtandingan skuyatuh

id=2 Aing Maung aingmaung qwerty!!!

id=3 Sunda Tea sundatea indONEsia

id=4 Sedih Aing Mah sedihaingmah cedihhihihi

id=5 Alice Geulis alice 4lic3

一个个尝试ssh,发现只有alice这个用户可以上去

image-20230612152230714

发现.my_secret文件,进入,发现flag1.txt

image-20230612152349803

拿到flag1

gfriEND{2f5f21b2af1b8c3e227bcf35544f8f09}

提示说需要拿到root权限才能获取flag

查看用户alice有哪些可以执行的命令和哪些不能执行的命令,发现可以执行php

sudo -l -U alice

image-20230612160655357

直接进行php提权

sudo php -r "system('/bin/bash');"

得到root权限,到/root目录下发现flag2.txt

image-20230612161207940

Outis Yang
Outis Yang
2024 Undergraduate in Cyberspace Security

My research interests include Internet of Vehicles(IoV), Penetration Testing and Security research.