Install
$ agentstack add skill-brownfinesecurity-iothackbot-picocom ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
IoT UART Console (picocom)
This skill enables interaction with IoT device UART consoles using picocom for security testing and penetration testing operations. It supports bootloader interaction, shell access (with or without authentication), device enumeration, and vulnerability discovery.
Prerequisites
- picocom must be installed on the system
- Python 3 with pyserial library (
sudo pacman -S python-pyserialon Arch, orpip install pyserial) - UART connection to the target device (USB-to-serial adapter, FTDI cable, etc.)
- Appropriate permissions to access serial devices (typically /dev/ttyUSB or /dev/ttyACM)
Recommended Approach: Serial Helper Script
IMPORTANT: This skill includes a Python helper script (serial_helper.py) that provides a clean, reliable interface for serial communication. This is the RECOMMENDED method for interacting with IoT devices.
Default Session Logging
ALL commands run by Claude will be logged to /tmp/serial_session.log by default.
To observe what Claude is doing in real-time:
# In a separate terminal, run:
tail -f /tmp/serial_session.log
This allows you to watch all serial I/O as it happens without interfering with the connection.
Why Use the Serial Helper?
The helper script solves many problems with direct picocom usage:
- Clean output: Automatically removes command echoes, prompts, and ANSI codes
- Prompt detection: Automatically detects and waits for device prompts
- Timeout handling: Proper timeout management with no arbitrary sleeps
- Easy scripting: Simple command-line interface for single commands or batch operations
- Session logging: All I/O logged to
/tmp/serial_session.logfor observation - Reliable: No issues with TTY requirements or background processes
Quick Start with Serial Helper
Single Command:
python3 .claude/skills/picocom/serial_helper.py --device /dev/ttyUSB0 --command "help"
With Custom Prompt (recommended for known devices):
python3 .claude/skills/picocom/serial_helper.py --device /dev/ttyUSB0 --prompt "User@[^>]+>" --command "ifconfig"
Interactive Mode:
python3 .claude/skills/picocom/serial_helper.py --device /dev/ttyUSB0 --interactive
Batch Commands from File:
# Create a file with commands (one per line)
echo -e "help\ndate\nifconfig\nps" > commands.txt
python3 .claude/skills/picocom/serial_helper.py --device /dev/ttyUSB0 --script commands.txt
JSON Output (for parsing):
python3 .claude/skills/picocom/serial_helper.py --device /dev/ttyUSB0 --command "help" --json
Debug Mode:
python3 .claude/skills/picocom/serial_helper.py --device /dev/ttyUSB0 --command "help" --debug
Session Logging (for observation):
# Terminal 1 - Run with logging
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--prompt "User@[^>]+>" \
--logfile /tmp/session.log \
--interactive
# Terminal 2 - Watch the session in real-time
tail -f /tmp/session.log
Note: See OBSERVING_SESSIONS.md for comprehensive guide on monitoring serial sessions.
See [examples.md](examples.md) for full worked attack walkthroughs: basic connection/enumeration, U-Boot bootloader exploitation, login-auth bypass, privilege escalation from a limited user, and firmware extraction.
Monitor Mode (Passive Listening)
NEW FEATURE: Monitor mode is designed for passive UART monitoring where the device outputs logs without prompts or interaction.
Use cases:
- Monitoring boot logs from devices without interactive consoles
- Capturing triggered output when external actions are performed
- Testing if network requests or hardware events generate UART logs
- Baseline vs triggered output comparison
Basic passive monitoring:
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--monitor \
--duration 30 \
--logfile /tmp/uart.log
Monitor with external trigger script:
# Run external script after 5 seconds and capture triggered UART output
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--monitor \
--duration 60 \
--trigger-script "python3 /path/to/test_script.py" \
--trigger-delay 5 \
--logfile /tmp/triggered_uart.log
Monitor with baseline capture:
# Capture 10s baseline, run trigger at 15s, continue for total 60s
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--monitor \
--duration 60 \
--trigger-script "curl http://192.168.1.100/api/reboot" \
--trigger-delay 15 \
--baseline-duration 10 \
--logfile /tmp/reboot_monitor.log
Monitor mode options:
--duration SECONDS- Total monitoring time (default: 30)--trigger-script CMD- External command/script to run during monitoring--trigger-delay SECONDS- When to run trigger (default: 5)--baseline-duration SECONDS- Capture baseline before trigger (default: 0)--logfile FILE- Log all I/O to file--json- Output results in JSON format
Output includes:
- Real-time timestamped console output
- Baseline vs trigger vs post-trigger categorization
- Trigger script exit code and output
- Summary statistics (bytes captured in each phase)
- Timeline with all captured data
Serial Helper Options
Required (one of):
--command, -c CMD Execute single command
--interactive, -i Enter interactive mode
--script, -s FILE Execute commands from file
--monitor, -m Passive monitoring mode (just listen, no commands)
Connection Options:
--device, -d DEV Serial device (default: /dev/ttyUSB0)
--baud, -b RATE Baud rate (default: 115200)
--timeout, -t SECONDS Command timeout (default: 3.0)
--prompt, -p PATTERN Custom prompt regex pattern
--at-mode, -a AT command mode for cellular/satellite modems
Monitor Mode Options:
--duration SECONDS Monitoring duration (default: 30.0)
--trigger-script CMD External script/command to run during monitoring
--trigger-delay SECONDS Seconds before running trigger (default: 5.0)
--baseline-duration SEC Baseline capture duration (default: 0.0)
Output Options:
--raw, -r Don't clean output (show echoes, prompts)
--json, -j Output in JSON format
--logfile, -l FILE Log all I/O to file (can tail -f in another terminal)
--debug Show debug information
Common Prompt Patterns
The helper script includes common prompt patterns, but you can specify custom ones:
# Uniview camera
--prompt "User@[^>]+>"
# Standard root/user prompts
--prompt "[#\$]\s*$"
# U-Boot bootloader
--prompt "=>\s*$"
# Custom device
--prompt "MyDevice>"
AT Command Mode (Cellular/Satellite Modems)
IMPORTANT: When interacting with AT command interfaces (cellular modems, satellite modems, GPS modules), use the --at-mode flag. AT interfaces do NOT use shell prompts - they respond with OK, ERROR, or specific result codes.
When to use AT mode:
- Cellular modems (Quectel, Sierra Wireless, u-blox, SIMCom, Telit)
- Satellite modems (Iridium, Globalstar)
- GPS modules with AT interface
- Any device that responds to AT commands with OK/ERROR
Basic AT command usage:
# Single AT command
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--at-mode \
--command "AT" \
--logfile /tmp/serial_session.log
# Get modem info
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--at-mode \
--command "ATI" \
--logfile /tmp/serial_session.log
# Get IMEI
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--at-mode \
--command "AT+CGSN" \
--logfile /tmp/serial_session.log
AT mode enumeration example:
HELPER="python3 .claude/skills/picocom/serial_helper.py"
DEVICE="/dev/ttyUSB0"
LOGFILE="/tmp/serial_session.log"
# Basic connectivity test
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT"
# Device identification
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "ATI"
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+CGMI"
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+CGMM"
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+CGMR"
# SIM and network info
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+CGSN"
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+CIMI"
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+CCID"
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+CSQ"
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+CREG?"
$HELPER --device $DEVICE --at-mode --logfile "$LOGFILE" --command "AT+COPS?"
Batch AT commands from file:
# Create AT command script
cat > at_enum.txt ` - Mobile equipment error with code
- `+CMS ERROR: ` - SMS-related error with code
- `NO CARRIER` - Connection lost/failed
- `CONNECT` - Data connection established
**Common AT command categories for pentesting:**
```bash
# Network and connectivity
AT+CGDCONT? # PDP context (APN settings)
AT+QIOPEN # Open socket (Quectel)
AT+QISTATE? # Socket state (Quectel)
# Device management
AT+CFUN? # Phone functionality
AT+CPIN? # SIM PIN status
AT+CLCK # Facility lock (SIM lock status)
# Firmware and updates
AT+CGMR # Firmware version
AT+QGMR # Extended firmware info (Quectel)
# Debug/engineering modes (may expose sensitive info)
AT+QENG # Engineering mode (Quectel)
AT$QCPWD # Password commands (Qualcomm)
Device Enumeration Example with Serial Helper
Here's a complete example of safely enumerating a device:
# Set variables for convenience
HELPER="python3 .claude/skills/picocom/serial_helper.py"
DEVICE="/dev/ttyUSB0"
PROMPT="User@[^>]+>" # Adjust for your device
LOGFILE="/tmp/serial_session.log"
# Get available commands
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "help"
# System information
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "date"
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "runtime"
# Network configuration
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "ifconfig"
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "route"
# Process listing (may need longer timeout)
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --timeout 5 --command "ps"
# File system exploration
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "ls"
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "ls /etc"
# Device identifiers
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "getudid"
$HELPER --device $DEVICE --prompt "$PROMPT" --logfile "$LOGFILE" --command "catmwarestate"
IMPORTANT FOR CLAUDE CODE: When using this skill, ALWAYS include --logfile /tmp/serial_session.log in every command so the user can monitor activity with tail -f /tmp/serial_session.log.
Pentesting Use Case: Trigger-Based UART Analysis
A common IoT pentesting scenario: testing if network requests, API calls, or hardware events trigger debug output on UART.
Example: Testing if API requests generate UART logs
# Monitor UART while sending network request
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--monitor \
--duration 30 \
--trigger-script "curl -X POST http://192.168.1.100/api/update" \
--trigger-delay 5 \
--logfile /tmp/api_test.log
# Review what the device logged when API was called
cat /tmp/api_test.log
Example: Testing authentication attempts
# Monitor UART during login attempts
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--monitor \
--duration 45 \
--trigger-script "python3 brute_force_login.py" \
--trigger-delay 10 \
--baseline-duration 5 \
--logfile /tmp/auth_test.log \
--json > /tmp/auth_results.json
Example: Boot sequence analysis
# Capture device boot logs (reboot via network API)
python3 .claude/skills/picocom/serial_helper.py \
--device /dev/ttyUSB0 \
--monitor \
--duration 120 \
--trigger-script "curl http://192.168.1.100/api/reboot" \
--trigger-delay 5 \
--logfile /tmp/boot_sequence.log
Why this is useful for pentesting:
- Devices often leak sensitive info (passwords, keys, paths) in UART logs
- Debug output may reveal internal API endpoints or protocols
- Error messages can expose vulnerabilities
- Boot logs show secure boot status, loaded modules, and filesystem paths
- Authentication attempts may log usernames/tokens in cleartext
IMPORTANT FOR CLAUDE CODE: When using this skill, ALWAYS include --logfile /tmp/serial_session.log in every command so the user can monitor activity with tail -f /tmp/serial_session.log.
Alternative: Direct picocom Usage (Advanced)
If you need direct picocom access (e.g., for bootloader interaction during boot), you can use picocom directly. However, this is more complex and error-prone.
Instructions
1. Connection Setup
CRITICAL: picocom runs interactively and CANNOT be controlled via standard stdin/stdout pipes. Use the following approach:
- Always run picocom in a background shell using
run_in_background: true - Monitor output using the BashOutput tool to read responses
- Send commands by using
Ctrl-A Ctrl-Sto enter send mode, or by writing to the device file directly
Default connection command:
picocom -b 115200 --nolock --omap crlf --echo /dev/ttyUSB0
Defaults (unless specified otherwise):
- Baud rate: 115200 (most common for IoT devices)
- Device: /dev/ttyUSB0 (most common USB-to-serial adapter)
- Always use
--nolock: Prevents file locking issues unless user specifically requests otherwise
Alternative baud rates (if 115200 doesn't work):
- 57600
- 38400
- 19200
- 9600
- 230400 (less common, high-speed)
Alternative device paths:
- /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2, ... (USB-to-serial adapters)
- /dev/ttyACM0, /dev/ttyACM1, ... (USB CDC devices)
- /dev/ttyS0, /dev/ttyS1, ... (built-in serial ports)
Essential picocom options:
-bor--baud: Set baud rate (use 115200 by default)--nolock: Disable file locking (ALWAYS use unless user asks not to)--omap crlf: Map output CR to CRLF (helps with formatting)--echo: Enable local echo (see what you type)--logfile: Log all session output to a file (recommended)-qor--quiet: Suppress picocom status messages--imap lfcrlf: Map LF to CRLF on input (sometimes needed)
2. Detecting Console State
After connecting, you need to identify what state the device is in:
a) Blank/Silent Console:
- Press Enter several times to check for a prompt
- Try Ctrl-C to interrupt any running processes
- If still nothing, the device may be in bootloader waiting state - try space bar or other bootloader interrupt keys
b) Bootloader (U-Boot, etc.):
- Look for prompts like
U-Boot>,=>,uboot>,Boot> - Bootloaders often have a countdown that can be interrupted
- Common interrupt keys: Space, Enter, specific keys mentioned in boot messages
c) Login Prompt:
- Look for
login:orusername:prompts - Common default credentials for IoT devices:
- root / root
- admin / admin
- root / (no password)
- admin / password
- Check manufacturer documentation or online databases
d) Shell Access:
- You may drop directly into a root shell
- Look for prompts like
#,$,>, or custom prompts
2.1. BusyBox Shells (Most IoT Devices)
IMPORTANT: The vast majority of IoT devices use Busy
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: BrownFineSecurity
- Source: BrownFineSecurity/iothackbot
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.