· 7 min read
Most IoT devices fail security review for boring reasons: a password baked into the filesystem, a forgotten debug service, a web page that shells out to the OS. The hard part was never the vulnerability, it was the labour — unpacking the firmware, grepping a thousand files, cross-referencing versions against CVEs, then repeating it on the running device. That is exactly the kind of methodical, repetitive work an autonomous agent is good at.
Two ways to test a device, one agent
Effective IoT firmware security testing happens on two fronts, and a good agent handles both. The first is the image: the raw .img or SquashFS blob you pull from a release page or a chip. The second is the live device: the router, camera or appliance actually running on the network. Findings from one feed the other — a hash cracked from the image becomes an SSH login on the device; a backdoor spotted in an init script becomes a root shell over the wire.
What the image tells you
- Extraction. Carve the filesystem with binwalk and unpack the SquashFS. Everything below lives in that tree.
- Credentials.
/etc/shadowand/etc/configalmost always give something up. IoT ships manufacturer and malware-botnet defaults, so a targeted wordlist cracks them in seconds — no brute force required. - Backdoors. A non-standard init script plus a binary that binds a high port and spawns a shell is a backdoor, full stop. You find it by reading, not by scanning.
- Embedded web. The admin UI often shells out with user input. That is command injection running as root.
- Old parts. BusyBox, Dropbear, dnsmasq — version them, map them to known CVEs, and you have half the report before you touch the device.
Then you prove it live
Static findings are hypotheses until the running device confirms them. The agent connects to that suspicious high port and gets uid=0. It logs into SSH with the default it just cracked. It sends the injection payload to the web endpoint and reads the command output back. No speculation in the final report — every claim carries the exact command and its raw response.
A concrete walk-through: OWASP IoTGoat
We validated this against OWASP IoTGoat, a deliberately vulnerable OpenWrt firmware, run under emulation. From the image alone the agent recovered the shadow hashes, cracked the contractor account, flagged the shellbackbackdoor on its listening port, found the LuCI command-injection page in the Lua source, and mapped the outdated components to their CVEs. Against the live device it went further: an unauthenticated root shell through the backdoor, an SSH login with the recovered default, and the injection endpoint returning root command output.
The methodology and the full evidence tables are in our research repository.
Why an agent, not a script
Firmware scanners exist and they are useful, but they stop at the image and they do not reason. An agent decides what to extract, which hash is worth cracking, whether a service is a real backdoor, and how a static finding becomes a live proof — then pivots between filesystem and network on its own. That judgement, applied consistently and fast, is where AI in pentesting earns its place.
Full disclosure: Darkmoon is our open-source project (GPL-3.0). The firmware agent ships with the platform — github.com/ASCIT31/Dark-Moon.