Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2021-27289 — CVE-2021-27289: 在Ksix Zigbee设备上的重放保护绕过 | Kitploit
工具/GitHubGitHub/themalwareguardian/cve-2021-27289
侦察物联网安全漏洞利用无线安全硬件与物联网安全学习与教育
GitHubthemalwareguardian/cve-2021-27289

CVE-2021-27289

CVE-2021-27289: 在Ksix Zigbee设备上的重放保护绕过

查看仓库
11281年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

🐝 CVE-2021-27289: Ksix Zigbee 设备回放保护绕过




📑 目录

  • 正式内容之前

  • 此 CVE 背后的故事

  • 漏洞

    • 受影响设备
    • 技术细节
    • 攻击场景
    • 影响
    • 概念验证
    • 演示视频
  • 原始博客文章

    • 研究人员
    • Zigbee 基础知识
    • 背景与动机
    • 早期实验
    • 发现
    • 利用
    • 实验环境搭建
    • 相关研究



🎭 正式内容之前

大家好,

我想专业人士的做法可能就是直接给这个仓库起一个清晰、描述性的名称,直截了当。但我在整理时,脑子里还闪过其他几个标题,比如:

  • "我作为学生报告了一个漏洞……结果三年后才被分配(而我两年后才注意到😅)"
  • "我在大学最后几个月提交的 CVE,原以为完全被忽视了"
  • "没有补丁,没有关注……但他们停止销售这些产品了"
  • "从毕业设计到 CVE,中间睡了个大觉"

总之,这就是故事。




📜 此 CVE 背后的故事

当我正准备公开一个新漏洞时,我记起了多年前做过的一件事——我在毕业设计期间研究 Thread 和 Zigbee 等 IoT 协议时发现的一个 bug。当时我给 MITRE 发了一份报告,但再也没有收到回复,所以以为它被忽略了。

出于好奇,我重新登录了我用来提交的那个旧 Gmail 账号……结果让我惊讶的是,在 2023 年——三年后——我看到实际上已经分配了一个 CVE。

CVE-2021-27289,与我作为学生报告的漏洞相关联。

为什么花了这么长时间?当我第一次联系供应商时,他们说他们没有足够的人员来修复,并不断重复这个借口。我告诉 MITRE 似乎没有人对此采取任何行动,所以我猜他们一直在等待——可能是因为这个问题本身就不会得到修补。

该漏洞影响了 Ksix 制造的几款基于 Zigbee 的 IoT 设备。核心问题是 Zigbee 规范中定义、并通过帧计数器实施的回放保护机制没有正确实现。

由于设备没有正确检查帧计数器,攻击者只需将序列号增加到比设备上次看到的序列号更高的值,就可以与网络通信并伪造数据包。这使得重放捕获的消息并使其被接受为有效成为可能——实际上导致了身份验证绕过。

这个仓库包含我毕业设计期间所做的所有工作:

  • 对重放攻击的清晰分解
  • 受影响设备及其影响
  • 我的原始文章和演示视频链接
  • 我创建的概念验证,后来于 2020 年被 OffSec 发布在 Exploit-DB 上



🛠️ 漏洞

Ksix Zigbee IoT 设备受重放攻击漏洞影响,该漏洞源于 Zigbee 回放保护机制实现不当。

  • CVE ID: CVE-2021-27289
  • CWE: CWE-294: 通过捕获-重放绕过身份验证
  • Exploit-DB: Ksix Zigbee 设备 - 回放保护绕过 (PoC)

📦 受影响设备

以下版本经测试存在漏洞。我没有测试更高版本,因此它们也可能受影响。

  • Ksix IoT Zigbee 网关 – v1.0.3
  • Ksix Zigbee 门磁传感器 – v1.0.7
  • Ksix Zigbee 运动传感器 – v1.0.12

这些产品在供应商网站或 Amazon 等平台均已停售,似乎已停产。

🧬 技术细节

受影响设备中的 Zigbee 协议栈未能正确实施依赖帧计数器(Zigbee 规范中定义)的回放保护机制。该字段本应确保收到的消息是新鲜的,未被重放。

然而,在此实现中,帧计数器被忽略或未被正确验证。因此,攻击者可以捕获一个合法的 Zigbee 数据包,将其序列号增加到一个更高的值(例如 250),然后重放给网络。

由于设备仅检查序列号,它们会接受该消息为新消息——从而允许伪造通信和未经授权的操作,而无需破解任何身份验证或加密。

🎯 攻击场景

  1. 攻击者使用嗅探设备捕获一个 Zigbee 数据包——例如,运行 KillerBee 的 APImote,或刷入 Zigbee2MQTT 和 SmartRF Packet Sniffer 2 的 TI CC2531。
  • 攻击者编辑捕获数据包中的序列号,将其设置为比以前看到的更高的值(例如 250)。
  1. 修改后的数据包被重放到 Zigbee 网络中。
  2. 接收设备将其接受为有效的新消息。

根据设备类型以及其集成到环境中的方式,这可能会导致用户最初用于设置网络的应用程序中出现虚假警报或虚假传感器状态(例如,检测到运动、门打开)——尽管实际上什么也没发生。在更复杂的设置中,基于伪造数据,甚至可能破坏自动化工作流或触发意外操作。

💣 影响

这些设备通常使用 Tuya Smart 或类似平台进行配置,当传感器被触发时(例如门打开或检测到运动),会实时通知用户。这使得以下攻击即使物理事件从未发生也特别有效。

  • 虚假警报与传感器欺骗:范围内的攻击者可以重放捕获的数据包,使应用程序显示门或窗户已被打开,或房屋内检测到运动。这实际上并未发生,但很容易欺骗用户,因为应用程序会发送模拟其家中真实活动的推送通知。
  • 中断与拒绝服务:正如我的毕业设计所演示的,操纵 Zigbee 数据包可以破坏设备之间的通信,使它们在移动应用程序中显示为在线,但实际上已不再属于网络。这种静默拒绝服务可能会阻止警报到达用户——可能隐藏物理入侵或延迟其响应。

尽管这种特定重放漏洞的直接影响有限,但更深入地理解协议——就像我在毕业设计中所探索的那样——可以揭示出那些只需最少资源就能实施的更高级攻击场景。

💻 概念验证

  • Exploit-DB
  • Packet Storm```

Exploit Title: Ksix Zigbee Devices - Playback Protection Bypass (PoC)

Date: 2020-11-15

Exploit Author: Alejandro Vazquez Vazquez

Vendor Homepage: https://www.Ksix.com/

Firmware Version: (Gateway Zigbee Module - v1.0.3, Gateway Main Module - v1.1.2, Door Sensor - v1.0.7, PIR Motion Sensor - v1.0.12)

Tested on: Kali Linux 2020.3

The coordinator of the Zigbee network (Zigbee gateway) does not correctly check the sequence number of the packets that are sent to it, which allows forging messages from an end device to the coordinator (example: turn on a light bulb, open a door, ...) by injecting a very large value in the "sequence number" field.

To exploit this vulnerability

1. Capture Zigbee traffic with a sniffer (Api-Mote) and save it in .pcap format

2. Open the file with Wireshark and locate the packet you want to forward (turn on a light bulb, open a door, ...)

3. Copy that packet as "hex dump" and save it to a .txt file

4. Modify the "sequence number" field to a high value such as 250

5. Convert the txt file to .pcap again

6. Forward the packet to the network, using a tool such as Killerbee

#!/bin/bash

function usage(){ echo -e "\nUsage: $0 [ZigbeeChannel] [SecuenceNumber] [HexDumpFile] [ShortSource] [ExtendedSource] [ShortDestination] [ShortPanId] [FCS]" echo -e "Example: $0 11 250 Open_Door_Alert_Hex_Dump 0x0001 11:ff:11:ff:11:ff:11:ff 0x0000 0x3333 0x0000 \n" echo -e "IMPORTANT: This is a script that I developed to understand how an IEEE 802.15.4 / Zigbee packet is formed, modify some fields of the packet in a simple way and see the effect when forwarding it to the network. If you want to exploit the vulnerability, follow the steps that I specify in the comments I make in the script. I exploited the vulnerability by spoofing a packet (sequence number 250) that contained the message "Door open".\n" }

function message(){ echo -e "\nProof of Concept" echo -e "There is an incorrect check of the "sequence number" field on Ksix Zigbee devices\n" echo -e "IMPORTANT: This is a script that I developed to understand how an IEEE 802.15.4 / Zigbee packet is formed, modify some fields of the packet in a simple way and see the effect when forwarding it to the network. If you want to exploit the vulnerability, follow the steps that I specify in the comments I make in the script. I exploited the vulnerability by spoofing a packet (sequence number 250) that contained the message "Door open".\n" }

下载工具