Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

uart - shell-detect

Detect an interactive shell or login prompt on a UART interface.

Usage

iottack uart shell-detect --port <PATH> [OPTIONS]

Description

Connects at the configured baud rate, sends newlines to wake the device, and inspects the response for shell and login prompt patterns. Makes multiple attempts to handle devices that need time to produce output.

Findings are classified as follows:

FindingSeverityCondition
Unauthenticated root shellCritical# or root@ present in output
Login prompt exposedHighlogin:, Password:, etc. present
Interactive promptMediumOther shell patterns matched
Boot messagesInfoBoot-time keywords detected
No response-No output after all attempts

Options

FlagShortDefaultDescription
--port <PATH>-p(required)Serial port device, e.g. /dev/ttyUSB0
--baud-rate <BAUD>-b115200Baud rate to connect at
--attempts <N>-3Number of stimulus attempts
--timeout-ms <MS>-500Read timeout per attempt in milliseconds
--output <FILE>-o-Save result to a file
--format <FORMAT>-ftexttext or json
--verbose-v-Increase log verbosity

Example

$ iottack uart shell-detect --port /dev/ttyUSB0 --baud-rate 115200

Plugin name:    uart/shell-detect
Execution time: 1.52 s
Status:         pass

Login prompt exposed on UART
  A login prompt is accessible on /dev/ttyUSB0 at 115200 baud.
  Default or weak credentials should be tested.
  Evidence: "OpenWrt login: "