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

# API Reference — Implementing Honeypot Deployment

## OpenCanary

| Command | Description |
|---|---|
| `opencanaryd --start` | Start OpenCanary daemon |
| `opencanaryd --stop` | Stop OpenCanary daemon |
| `opencanaryd --dev` | Run in foreground with debug output |
| `opencanaryd --copyconfig` | Create default configuration file |

### Supported Services

| Service | Default Port | Config Key |
|---|---|---|
| SSH | 22 | `ssh.enabled` |
| FTP | 21 | `ftp.enabled` |
| HTTP | 80 | `http.enabled` |
| SMB | 445 | `smb.enabled` |
| RDP | 3389 | `rdp.enabled` |
| MySQL | 3306 | `mysql.enabled` |
| Telnet | 23 | `telnet.enabled` |
| SNMP | 161 | `snmp.enabled` |

## Cowrie SSH Honeypot

| Command | Description |
|---|---|
| `bin/cowrie start` | Start Cowrie in background |
| `bin/cowrie stop` | Stop Cowrie |
| `bin/cowrie status` | Check running status |

## Agent Script

```bash
# Validate OpenCanary config
node agent.js validate /etc/opencanary/config.json

# Check honeypot services
node agent.js check-services 10.99.0.10

# Generate config for SSH + HTTP + SMB
node agent.js generate --services ssh http smb --node-id dc-honeypot-01

# Generate breadcrumb artifacts
node agent.js breadcrumbs --honeypot-ip 10.99.0.10 --domain corp.local
```
