Me-and-My-Girlfriend-1

本文描述了一次网络安全演练,通过主机发现、端口扫描、服务识别、目录挖掘,发现并利用URL参数漏洞获取Alice的密码,然后使用SSH以Alice身份登录,进一步发现可提升至root权限的PHP进程,最终实现权限升级并找到隐藏的flag。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

目录

Me-and-My-Girlfriend-1

主机发现

扫描端口

扫描服务

目录发现

注册登录

发现可疑url参数 

找到Alice密码+得到明文 

以Alice用户连接ssh

发现可疑目录,获取第一flag

发现root权限进程php

权限提升

获得最终flag


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

robots.txt

访问heyhoo.txt,发现让使用getshell,暂时与ssh没有关联,对此保持怀疑

访问 index.php 

        发现此处只能从本地访问,查看源码

         需要使用x-forwarded-for插件进行配置

添加并使用火狐浏览器插件

  •  此时访问成功

注册登录

注册并登入系统

发现可疑url参数 

         点击Profile后发现可疑url参数 user_id,尝试修改其值,发现当参数值为5时,对应Alice的信息

找到Alice密码+得到明文 

         修改Password输入值类型之后得到Alice的密码明文

以Alice用户连接ssh

  •  登入成功

发现可疑目录,获取第一flag

查看该目录下另一个文件

Heartbreaking...

发现root权限进程php

sudo -l

        发现具有root权限的php进程可用 

权限提升

sudo /usr/bin/php -r 'system("/bin/bash");'
为了配合system函数,关键词sudo一定要带上
  • 提权成功 

获得最终flag

每一个不曾起舞的日子,都是对生命的辜负。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

_廿_尘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值