Next Generation Z-Wave Security Testing Framework
Professional Z-Wave packet interception, analysis, and injection tool with full S2 security support
Features β’ Installation β’ Quick Start β’ Documentation β’ Credits
Z-Attack-NG is an interactive security research framework for Z-Wave protocol analysis and testing. Born from the original Z-Attack by Advens (2015), this next-generation version has been completely rewritten with modern Python 3, featuring a professional ImGui interface, modular architecture, and Z-Wave S2 security support in beta for the moment.
- π¨ Modern ImGui Interface - Responsive GUI with real-time visualization replacing the old Tk one
- ποΈ Modular Architecture - "Clean" separation of concerns (GUI, Core, Hardware, S2)
- π S2 Support - ECDH key exchange capture and AES-CCM decryption
- β‘ Z-Wave Plus - Enhanced command class support (more classes to come)
- π Advanced Analytics - Session management, nonce tracking, and export capabilities
- π οΈ New CLI - argparse-based command-line interface
- π§© Plugin-Ready - Extensible architecture for custom modules
- Real-time Interception - Live capture of Z-Wave traffic
- Protocol Decoding - Automatic parsing of implemented command classes
- Smart Filtering - Focus on specific networks, nodes, or command classes
- Hex Dump Viewer - Raw packet inspection with detailed breakdowns
- β Complete encryption/decryption
- β Nonce capture and management
- β AES-128 OFB mode
- β Frame injection with encryption
- β Network key management
- β ECDH Curve25519 key exchange capture
- β AES-CCM authenticated encryption/decryption
- β All security classes (Unauthenticated, Authenticated, Access Control)
- β DSK-based device pairing
- β Perfect Forward Secrecy support
- β SPAN replay protection
- β Session management with export capabilities
- Interactive Topology Map - Real-time network visualization
- Node Discovery - Automatic device identification
- Relationship Mapping - Controller-to-device connections
- Export Options - Generate static graphs (PNG/SVG)
- Advanced Mode - Full control over frame construction
- Easy Mode - Pre-configured common commands
- Secure Injection - Support for S0-encrypted frames
- Template Library - Reusable command templates
- Timestamped Logs - Detailed packet history
- CSV Export - Analysis-ready data format
- Nonce Database - S0 nonce tracking and export
- S2 Session Export - Save key material and session data
- Copy-Paste - Right-click context menus
Hardware Requirements:
- RfCat compatible device (recommended), OR
- Texas Instruments CC1110/CC1111 development kit
- TODO: Evil Crow RF V2, and maybe others? (soon)
- TODO: Software-Defined Radio to implement (soon)
Software Requirements:
- Python 3.8 or higher
- Git
# Install Poetry
curl -sSL https://install.python-poetry.org | python3 -
# Clone repository
git clone https://github.com/penthertz/Z-Attack-ng.git
cd Z-Attack-ng
# Install dependencies
poetry install
# Run Z-Attack-NG
poetry run python ZAttackNG# Clone the repository
git clone https://github.com/penthertz/Z-Attack-ng.git
cd Z-Attack-ng
# Install Python dependencies
pip install -r requirements.txt [--break-install]
# (Optional) Install Graphviz for network graph export
# Ubuntu/Debian:
sudo apt-get install graphviz
# macOS:
brew install graphviz
# Windows: Download from https://graphviz.org/download/# Using RfCat (default)
python ZAttackNG
# With debug mode
python ZAttackNG -d
# Using TI RF Kit
python ZAttackNG --serial -lcom /dev/ttyUSB0 -scom /dev/ttyUSB1
# Show all options
python ZAttackNG --helpWant to decrypt Z-Wave S2 traffic? Follow these simple steps:
The Device Specific Key (DSK) is printed on your device label or QR code.
Format: 12345-67890-12345-67890-12345-67890-12345-67890
python ZAttackNG- Click Menu β Add S2 DSK
- Enter Node ID (e.g.,
02) - Enter DSK from device label
- Click Add DSK
Initiate device pairing. Z-Attack-NG will automatically:
- Capture the ECDH public keys
- Compute the shared secret
- Derive all encryption keys
All subsequent S2 messages from this device will be automatically decrypted! π
Monitor progress: Check the console output for [S2] βββ DECRYPTED βββ messages.
usage: ZAttackNG [-h] [-1 | -2] [-lcom PORT] [-scom PORT] [-d] [-csv] [--no-csv]
[-k KEY] [-v]
Z-Attack-NG 1.0 - Z-Wave Security Testing Tool
Options:
-h, --help Show this help message and exit
-1, --rfcat Use RfCat device (default)
-2, --serial Use TI RF KIT (serial device)
-lcom PORT, --listen-port PORT
Listening COM port for TI RF KIT
-scom PORT, --send-port PORT
Sending COM port for TI RF KIT
-d, --debug Enable debug mode (verbose output)
-csv, --csv-output Enable CSV output to file (default: enabled)
--no-csv Disable CSV output
-k KEY, --key KEY Network key for S0 decryption (hex string)
-v, --version Show program version and exit
Z-Attack-NG supports:
Click to expand full list
Security:
- Security S0 (0x98) - Legacy encryption
- Security S2 (0x9F) - Modern encryption with ECDH
Control:
- Basic (0x20)
- Switch Binary (0x25)
- Switch Multilevel (0x26)
- Switch All (0x27)
- Scene Activation (0x2B)
- Central Scene (0x5B)
Sensors:
- Sensor Binary (0x30)
- Sensor Multilevel (0x31)
- Meter (0x32)
- Alarm/Notification (0x71)
Configuration:
- Configuration (0x70)
- Association (0x85)
- Multi Channel Association (0x8E)
- Wake Up (0x84)
- Battery (0x80)
Advanced:
- Multi Channel (0x60)
- Color Control (0x33)
- Door Lock (0x62)
- User Code (0x63)
- Barrier Operator (0x66)
- Thermostat Mode (0x40)
- Thermostat Setpoint (0x43)
Device Info:
- Version (0x86)
- Manufacturer Specific (0x72)
- Z-Wave Plus Info (0x5E)
- Device Reset Locally (0x5A)
...and many more!
Z-Attack-ng/
βββ main.py # Entry point with modern argument parsing
βββ config.py # Global configuration and settings
βββ requirements.txt # Python dependencies
β
βββ core/ # Core Z-Wave protocol handling
β βββ __init__.py
β βββ protocol.py # Frame parsing and construction
β βββ crypto.py # S0 encryption/decryption
β βββ network.py # Network topology management
β
βββ s2/ # S2 Security module
β βββ __init__.py
β βββ s2_crypto.py # ECDH, AES-CCM, key derivation
β βββ s2_manager.py # Session management, KEX handling
β
βββ hardware/ # Hardware abstraction layer
β βββ __init__.py
β βββ rfcat_device.py # RfCat interface
β βββ serial_device.py # TI RF Kit interface
β
βββ gui/ # ImGui-based interface
β βββ __init__.py
β βββ main_window.py # Main application window
β βββ windows.py # Popup windows (send, nonce, etc.)
β βββ s2_window.py # S2 management windows
β βββ utils.py # GUI utilities (logging, textures)
β
βββ data/ # Data files and parsers
β βββ zwClasses.py # Command class definitions
β βββ sendData.py # Pre-configured commands
β βββ manufacturer_specific.xml
β
βββ images/ # GUI assets
βββ zattack.png
βββ penthertz.png
- Compatibility: YardStick One, RfCat dongle
- Frequency: 868.4 MHz (EU) / 908.4 MHz (US)
- Setup: Automatic configuration
- Status: β Fully supported
- Compatibility: CC1110, CC1111 development boards
- Interface: Dual UART (listen + send)
- Setup: Manual port configuration
- Status: β Fully supported
- Analyze Z-Wave network security posture
- Test device encryption implementations
- Discover protocol vulnerabilities
- Validate security configurations
- Map home automation networks
- Identify unsecured devices
- Test access control policies
- Verify encryption standards
- Reverse engineer device behavior
- Document command implementations
- Create device fingerprints
- Study protocol compliance
- Include in IoT security assessments
- Demonstrate Z-Wave vulnerabilities
- Test network segmentation
- Validate incident response
Real-time packet interception with dual-log display:
- Reception log (top) - Intercepted traffic
- Send/Response log (bottom) - Your injections and ACKs
Interactive topology map with:
- Visual node relationships
- Live connection status
- Controller identification
- Export to static images
Comprehensive session management:
- Active session monitoring
- DSK configuration
- Public key capture
- Nonce tracking
(Screenshots coming soon)
This tool has been used in various security research projects:
- Z-Wave Security Analysis - Penthertz Research (2025)
- Smart Home Security Testing - Advens (2015)
We welcome contributions! Here's how you can help:
- π Report bugs - Open an issue with detailed reproduction steps
- π‘ Suggest features - Share your ideas for improvements
- π Improve docs - Help us make the documentation better
- π§ Submit PRs - Fix bugs or add features
# Fork and clone
git clone https://github.com/PentHertz/Z-Attack-ng.git
cd Z-Attack-ng
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes and test
python ZAttackNG -d
# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature
# Open Pull RequestThis project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Z-Attack-NG - Next Generation Z-Wave Security Testing Framework
Copyright (C) 2025 Penthertz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Advens Security Research Team (2015)
Website: advens.fr
Original project: github.com/Advens/Z-Attack
Penthertz (2025)
Website: penthertz.com
Twitter: @penthertz
- The RfCat project for excellent RF tools
- Z-Wave Alliance for protocol documentation
- The open-source security community
- Complete Python 3 rewrite with modern architecture
- ImGui-based professional interface
- Full S2 (Security 2) decryption support
- ECDH Curve25519 key exchange
- AES-CCM authenticated encryption
- DSK-based device pairing
- Session management
- Modular architecture (core, gui, s2, hardware)
- Modern argparse CLI
- 60+ command class parsers
- Interactive network topology visualization
- Enhanced logging and export capabilities
- Migrated from Python 2 to Python 3.8+
- Replaced Tkinter with ImGui for better UX
- Restructured codebase for maintainability
- Updated all dependencies to modern versions
- Initial release by Advens
- Basic Z-Wave packet interception
- Injection capabilities
- RfCat and TI Kit support
- S0 decryption


