记一次vulnhub|渗透测试Five86-2

Five86-2


  • 0X01 Main Point
    1.wpscan的使用
    2.tcpdump的抓包以及流量分析
    3.wordpress插件提权

  • 0X02 前期嗅探和端口探测
    arp-scan -l得到靶机IP:
    在这里插入图片描述
    nmap -sS -A -p- 172.20.10.3扫描靶机IP的端口开放情况:
    在这里插入图片描述
    ftp无法匿名登录,只能从80端口入手: wordpress框架;显示不清楚;
    /etc/hosts下进行DNS解析即可:
    在这里插入图片描述
    发现wordpress是5.1.4版本(可以通过Wappalyzer得到)

searchsploit搜索发现没有5.1.4版本的漏洞可以利用

wpscan --url "http://172.20.10.3" -e u先来爆破用户名:
在这里插入图片描述
得到以上用户,因为没有给出其他信息,并且wordpress版本较高,没有可以利用的漏洞,可能就是需要枚举用户名及密码,因此根据用户名爆破密码:

wpscan --url "http://172.20.10.3" -U user.txt -P rockyou.txt

这里使用kali自带的rockyou.txt,这是一个密码字典:
在这里插入图片描述
得到两个用户barney、stephen,可以考虑使用metasploit来直接自动化进行攻击,只需配置攻击负载即可。
在这里插入图片描述
两个用户都以失败告终,那就先登录后台http://five86-2/wp-login.php?看看,后台是wordpress默认的后台,也可扫描目录得到:
在这里插入图片描述
只有barney用户可以加载插件,而利用wordpress插件提权是比较常规的姿势,我们依次搜索这三个插件的版本有无可用漏洞,发现第三个插件有对应版本的漏洞:Insert or Embed Articulate Content into WordPress Trial 漏洞

这里不再赘述,大致就是构造一个压缩包,包含html文件和php一句话的php文件,然后上传再在相应目录打开即可得到shell,我们使用蚁剑进行连接:

在这里插入图片描述
构造一个PHP一句话反弹shell,在虚拟终端打开这个PHP,kali监听相应端口即可连接:
在这里插入图片描述
利用python得到交互式shell:
在这里插入图片描述
逛了一圈没有发现任何www-data用户可以用来提权的东西,内核版本很高,同样无法通过内核提权,但是发现之前的ftp端口没有派上用场,我们ps -auxwww查看一下进程:
在这里插入图片描述
发现之前的FTP原来是paul用户创建的,我们知道一般的FTP是明文,而且FTP基于TCP,并且可以进行FTP协议抓包分析
在这里插入图片描述

  • tcpdump的使用方法和参数:
-c:指定要抓取的包数量。

-i interface:指定tcpdump需要监听的接口。默认会抓取第一个网络接口

-n:对地址以数字方式显式,否则显式为主机名,也就是说-n选项不做主机名解析。

-nn:除了-n的作用外,还把端口显示为数值,否则显示端口服务名。

-P:指定要抓取的包是流入还是流出的包。可以给定的值为"in""out""inout",默认
为"inout"。

-D:列出可用于抓包的接口。将会列出接口的数值编号和接口名,它们都可以用
于"-i"后。

-F:从文件中读取抓包的表达式。若使用该选项,则命令行中给定的其他表达式都将失效。

-w:将抓包数据输出到文件中而不是标准输出。可以同时配合"-G"

"time" 选项使得输出文件每time秒就自动切换到另一个文件。可通过"-r"选项载入这些
文件以进行分析和打印。

-r:从给定的数据包文件中读取数据。使用"-"表示从标准输入中读取。

分别进行抓包,并且读包。(注意:www-data用户权限不足,根据wordpress的用户和密码可以切换到stephen用户,barney用户密码和wordpress不同)
在这里插入图片描述
在这里插入图片描述
得到用户paul的密码,su paul ls -la隐藏文件都没有任何内容,sudo -l发现可以以彼得身份运行/ usr / sbin / service程序。
在这里插入图片描述
那么直接service ../../bin/bash即可提权,因此 sudo -u peter service ../../bin/bash
在这里插入图片描述
我们发现peter用户的权限很大:
在这里插入图片描述
直接可以执行/usr/bin/passwdsudo passwd root修改root密码即可得到root权限,最终得到flag!
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
Write a Model class with the following UML specification: +----------------------------------------------+ | Model | +----------------------------------------------+ | - score: int | | - bubbles: ArrayList<IShape> | +----------------------------------------------+ | + Model() | | + getScore(): int | | + addBubble(int w, int h): void | | + moveAll(int dx, int dy): void | | + clearInvisibles(int w, int h): void | | + deleteBubblesAtPoint(int x, int y): void | | + drawAll(Graphics g): void | | + testModel(): void | +----------------------------------------------+ When a new model object is created, the score must be zero and the arraylist must be empty. The getScore method returns as result the current score for the game. The addBubble method adds a new bubble to the arraylist of bubbles. The position of the center of the new bubble is random but must be inside a window of width w and height h (the arguments of the addBubble method), like this: new Bubble((int)(w * Math.random()), (int)(h * Math.random())) The moveAll method moves the positions of all the bubbles in the arraylist of bubbles by the amount dx in the x direction and by the amount dy in the y direction. The clearInvisibles method takes as argument the width w and the height h of the window, and deletes from the arraylist of bubbles any bubble which is not visible in the window anymore. For each bubble which is deleted, the score decreases by 1.The deleteBubblesAtPoint method takes as argument the coordinates (x, y) of a point, and deletes from the arraylist of bubbles any bubble which contains this point (multiple bubbles might contain the point, because bubbles can overlap in the window). For each bubble which is deleted, the score increases by 1. The drawAll method draws all the bubbles in the arraylist of bub
05-11

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值