目录
Me-and-My-Girlfriend-1
靶场介绍:
Description: This VM tells us that there are a couple of lovers namely Alice and Bob, where the couple was originally very romantic, but since Alice worked at a private company, "Ceban Corp", something has changed from Alice's attitude towards Bob like something is "hidden", And Bob asks for your help to get what Alice is hiding and get full access to the company!
Difficulty Level: Beginner
Notes: there are 2 flag files
Learning: Web Application | Simple Privilege Escalation
主机发现
arp-scan -l -I eth1 # 指定网卡
扫描端口
nmap -p- [your IP]
扫描服务
nmap -p[port1,port2,...] [your IP]
目录发现
- 此处本次所使用的字典为 directory-list-2.3-small.txt
dirsearch -u "[your IP]" /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-small.txt
其中发现两个值得深究的路径:
- /index.php —— 首页PHP页面
- /robots.txt —— 缓存文件
访问 robots.txt


访问 index.php
发现此处只能从本地访问,查看源码
需要使用x-forwarded-for插件进行配置
添加并使用火狐浏览器插件
- 此时访问成功
注册登录
注册并登入系统
发现可疑url参数
点击Profile后发现可疑url参数 user_id,尝试修改其值,发现当参数值为5时,对应Alice的信息
找到Alice密码+得到明文
修改Password输入值类型之后得到Alice的密码明文
以Alice用户连接ssh
- 登入成功
发现可疑目录,获取第一flag
查看该目录下另一个文件

发现root权限进程php
sudo -l
发现具有root权限的php进程可用
权限提升
sudo /usr/bin/php -r 'system("/bin/bash");'

- 提权成功
获得最终flag
每一个不曾起舞的日子,都是对生命的辜负。