玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

栏目: IT技术 · 发布时间: 5年前

内容简介:Vulnhub是一个提供各种漏洞环境的靶场,每个镜像会有破解的目标,挑战的目标是通过网络闯入系统获取root权限和查看flag。靶场下载链接:

前言

Vulnhub是一个提供各种漏洞环境的靶场,每个镜像会有破解的目标,挑战的目标是通过网络闯入系统获取root权限和查看flag。

说明

靶场下载链接: https://drive.google.com/file/d/15QiLTp5tsvwkjIMYjY4zJSyMVbulU8jc/view

个人建议在vmware运行靶场环境,再使用kali作为攻击主机,同时要注意在同一网卡下,否则是无法进行通信的

这次选择的靶场名字为: Me and My Girlfriend

题目的介绍为: 玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

为了让更多新手朋友少走弯路,我尽量写详细一点

开始

在这里我让kali和靶场都使用NAT模式

在编辑->虚拟网络编辑器处可以看到我们使用模式的配置。

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

Ip段为192.168.158.0

我们使用nmap进行扫描

Nmap -sS -Pn 192.168.158.0/24

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

可以发现192.168.158.134开放了 80端口

看来我们靶场的ip就是这个了

使用nmap -T4 -A -v -p 1-65535 192.168.158.134进行详细扫描

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

看来只开放了 80和22

首先对22端口进行爆破

我这里使用的是超级弱口令检测工具

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

没有爆破成功,没关系

我们去看看80端口

访问http:// 192.168.158.134/

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

打开是这样的

右击查看源代码

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

提示我们使用X-Forwarded-For

我们打开burp

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

添加X-Forwarded-For:localhost,点击发送

成功绕过

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

页面有点单调呀。

接下来我们可以对目录进行扫描,看看有没有一些敏感的目录

由于要添加x-forwarded-for

所以只能使用burp进行目录扫描

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

没啥东西呀

我们看看robots.txt的返回包

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

又出了一个新的txt文件。

我们继续访问一下

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

这个提示!!!!!让我们get the shell

我们回到登录的地方,查看一下登录口是否有注入或者弱口令

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

没有发现。

接着我们看到一个注册的地方

注册一个账号试试

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend 我们使用刚刚注册的账号登录

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

抓到一个有意思的包

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

User_ID=12

难道有越权

修改id为1

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

好像没事东西喔

点击查看资料看看

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

修改id

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

还真有越权

遍历id可以发现alice

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

为啥要找alice呢?我们回到题目的提示。

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

Id为5时是她的

我们查看一下返回包

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

拿到了爱丽丝的账号密码

alice/4lic3

这个web页面没有其他的东西了,所以可以大胆猜测这个就是ssh的密码了

尝试登录

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

Ssh连接成功

看到目录

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

My_secret?

我的秘密?不能让他们有秘密我们进去看看

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

看到了flag1.txt文件以交my_notes.txt

Cat一下

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

他要找比Bob更好的伙伴!他们不是情侣吗

0.0有问题!

我们cat一下flag文件

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

成功拿到flag1

题目提示还有一个flag

我们接着去看看其他目录

发现自己权限很低,很多文件访问不了。

我们使用命令id查看当前权限

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

看来要提权呀。。。。。。

使用uname -a查看内核信息

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

列举爱丽丝权限

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

看到(root)NOPASSWD:/usr/bin/php,看来我们离成功不远了

对于这个

我们可以使用 php 回调一个bash

再用sudo的方式运行得到管理员权限

于是输入命令

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

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend

成功拿到管理员权限。

最后我们在/root目录下发现另外一个flag文件

玩转Vulnhub靶场 ——第一期-Me and My Girlfriend


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Usability for the Web

Usability for the Web

Tom Brinck、Darren Gergle、Scott D. Wood / Morgan Kaufmann / 2001-10-15 / USD 65.95

Every stage in the design of a new web site is an opportunity to meet or miss deadlines and budgetary goals. Every stage is an opportunity to boost or undercut the site's usability. Thi......一起来看看 《Usability for the Web》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具