<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Performing IoT Vulnerability Assessment

## Nmap IoT Scripts

| Script | Description |
|---|---|
| `modbus-discover` | Enumerate Modbus device IDs |
| `bacnet-info` | BACnet device information |
| `mqtt-subscribe` | MQTT broker topic enumeration |
| `s7-info` | Siemens S7 PLC identification |
| `dnp3-info` | DNP3 protocol device info |
| `upnp-info` | UPnP device discovery |
| `http-default-accounts` | Default credential testing |

## MQTT Testing

| Command | Description |
|---|---|
| `mosquitto_sub -h <broker> -t '#'` | Subscribe to all topics |
| `mosquitto_pub -h <broker> -t <topic> -m <msg>` | Publish test message |
| `-u <user> -P <pass>` | Authenticated connection |
| `--retained-only` | Show only retained messages |

## Firmware Analysis

| Tool | Description |
|---|---|
| `binwalk -e <firmware>` | Extract embedded filesystem |
| `firmwalker <dir> <report>` | Automated firmware audit |
| `strings <binary>` | Extract readable strings |

## Agent Script

```bash
# Discover IoT devices
node agent.js discover 192.168.1.0/24

# Test MQTT broker
node agent.js mqtt 192.168.1.50 --port 1883

# Analyze firmware
node agent.js firmware device_firmware.bin

# Test default credentials
node agent.js default-creds 192.168.1.100 --port 80

# nuclei IoT scan
node agent.js nuclei http://192.168.1.100
```
