The SECoT CLI Tool is a command-line interface designed to interact with the SECoT ESP32 card. It allows users to connect to the SECoT device via serial port or MQTT, control the SECoT card, retrieve data, and perform various security-related operations such as network scanning, port scanning, and launching attacks supported by the SECoT card.
- Interactive Mode: Provides a REPL (Read-Eval-Print Loop) for user-friendly interaction.
- Serial Port Communication: Connect directly to the SECoT device via serial port.
- Auto-Detection: Automatically detect and connect to SECoT devices connected via USB.
- MQTT Integration: Connect to an MQTT broker or launch a local broker for communication.
- Network Scanning: Discover Wi-Fi networks in the vicinity.
- Port Scanning: Scan open ports on a target IP address.
- Attack Execution: Trigger attacks supported by the SECoT card (e.g., ARP spoofing, deauthentication).
- Output Formatting: Display results in table or JSON format.
SECoT_CLI_Tool/
├── src/
│ ├── main.rs # Entry point for the CLI tool
│ ├── command/ # Command implementations
│ │ ├── mod.rs # Command module
│ │ ├── scan.rs,... # Implementation of scanNetworks
│ ├── models/ # Data models
│ │ ├── mod.rs # Models module
│ │ ├── device.rs # Device-related logic
│ │ ├── network.rs # Network scanning logic
│ │ ├── port.rs,... # Port scanning logic
│ ├── mqtt/ # MQTT communication logic
│ ├── output/ # Output formatting
│ ├── config/ # Configuration management
│ ├── tests/ # Unit tests
├── Cargo.toml # Rust project configuration
├── README.md # Project documentation
IoT Security Audit Tool - Interactive Mode
Type 'help' for available commands, 'exit' to quit
iot> scanNetworks --band 2.4
Scanning networks...
=== Command Result ===
+-------------+-------------------+---------+----------+
| SSID | BSSID | Signal | Security |
+-------------+-------------------+---------+----------+
| HomeWiFi | 00:11:22:33:44:55 | -65 | WPA2 |
| GuestAccess | AA:BB:CC:DD:EE:FF | -72 | OPEN |
+-------------+-------------------+---------+----------+
=====================
iot> portScan 192.168.1.1 --ports 1-100
Scanning ports...
=== Command Result ===
+-----------+------------+---------------------+
| Port | Status | Service |
+-----------+------------+---------------------+
| 22 | open | ssh |
| 80 | open | http |
| 443 | open | https |
+-----------+------------+---------------------+
=====================
iot> exit
Disconnected from MQTT broker.
- Description: Scan for Wi-Fi networks.
- Usage:
scanNetworks --band <2.4|5>
- Description: Scan open ports on a target IP.
- Usage:
portScan <IP> --ports <range>
- Description: Set the output format (e.g., table, JSON).
- Usage:
set output <format>
- Description: Exit the interactive mode.
- Purpose: Handles network scanning logic.
- Key Functions:
scan_networks(band: &str) -> Vec<Network>: Scans for Wi-Fi networks.
- Purpose: Handles port scanning logic.
- Key Functions:
scan_ports(ip: &str, range: &str) -> Vec<Port>: Scans open ports on a target IP.
- Purpose: Manages device-related logic.
- Key Functions:
connect_to_device(): Connects to the SECoT card.
The SECoT CLI Tool aims to provide a comprehensive set of features for interacting with the SECoT ESP32 card. Below is the complete list of commands and their purposes:
scanNetworks: Scan for Wi-Fi networks in the vicinity.scan_ports: Scan open ports on a target IP address.
mqttPublish: Publish messages to an MQTT topic.mqttSubscribe: Subscribe to an MQTT topic and handle incoming messages.mqttScan: Scan for active MQTT brokers on the network.
deauth: Perform a deauthentication attack.beaconFlood: Execute a beacon flood attack.probeSpam: Send probe request spam.arpSpoof: Perform an ARP spoofing attack.mqttSpoof: Spoof MQTT messages.evilTwin: Set up an evil twin access point.passiveSniff: Passively sniff network traffic.bluetoothScan: Scan for Bluetooth devices.jamming: Perform signal jamming attacks.
set output: Set the output format (e.g., table, JSON).exit: Exit the interactive mode.
broker_test: Test the MQTT broker connection.
The SECoT CLI Tool is designed to be extensible. Future updates may include:
- Enhanced attack configurations.
- Real-time monitoring dashboards.
- Integration with external APIs for threat intelligence.
- Support for additional IoT protocols (e.g., CoAP, Zigbee).
For development notes and tasks, refer to DEVELOPMENT_NOTES.md.