利用AI Agent逆向分析外设固件:麦克风与摄像头实战复盘
Hacker News Best: Everything I own
提供了一套完整的AI驱动硬件逆向工作流,包含具体Prompt模板与工具链细节,极具实操参考价值。
Everything I own, owned
我拥有的一切,皆被掌控
August 23, 2026
2026年8月23日
Over the past couple weeks I’ve been doing agent-driven reverse engineering of peripherals that happen to be within arm’s reach. From those devices, I’ve come away with a full plaintext command shell inside my microphone, a webcam whose activity LED I can switch off while it records, and a key light that hands out memory writes to anyone on the WiFi. Peripherals have proven to be an ideal target for agentic RE - they’re tiny computers attached to my computer, with a data connection to the host and usually a firmware update mechanism, so an agent has something to iterate against. The net outcome is better control and understanding of my machine.
在过去几周里,我一直在对触手可及的外设进行由智能体驱动的逆向工程。从这些设备中,我获得了麦克风内的完整明文命令 shell、一个可以在录制时关闭活动指示灯的网络摄像头,以及一个向 WiFi 上任何人提供内存写入权限的补光灯。外设已被证明是智能体逆向工程的理想目标——它们是连接在我电脑上的微型计算机,与主机有数据连接,并且通常具备固件更新机制,因此智能体有了可以迭代操作的对象。最终结果是更好地控制和理解我的机器。
My process was pretty much the same for each of these devices: grab a copy of the device’s firmware and associated update tool from the manufacturer, throw it into my reverse engineering environment, tell Claude Opus 5 what my goals are, and let it churn. Depending on the device, the goals were somewhat different, but they usually looked something like:
我对每个设备的处理过程基本相同:从制造商处获取设备固件及其关联的更新工具,将其放入我的逆向工程环境,告诉 Claude Opus 5 我的目标是什么,然后让它自行运转。根据设备不同,目标略有差异,但通常类似于:
In this directory is the firmware and update utility for ___. The device is also attached to this computer, and you may interact with it in non-mutating ways. Exhaustively document and cross-validate the entire firmware, including the following goals:
* reverse engineer the firmware update format and update protocol
* implement our own update utility
* determine the security properties of the update protocol, including checksums, signature validation, secure boot
* use static and dynamic analysis to determine all protocol surfaces and completely enumerate functionality
* find any hidden or debug functionality in the product and how to access itIn this directory is the firmware and update utility for ___. The device is also attached to this computer, and you may interact with it in non-mutating ways. Exhaustively document and cross-validate the entire firmware, including the following goals:
* reverse engineer the firmware update format and update protocol
* implement our own update utility
* determine the security properties of the update protocol, including checksums, signature validation, secure boot
* use static and dynamic analysis to determine all protocol surfaces and completely enumerate functionality
* find any hidden or debug functionality in the product and how to access itDepending on the results, there were different directions of follow-up, but you should get the general idea. Let’s run through the list - each device links to a GitHub repo full of generated-slop docs and scripts, most of which have been validated live against real hardware. I’ve also included the effort each device took, pulled out of the Claude Code session transcripts. “Churn” is the time Claude was actually working, with the long idle gaps removed. “Prompts from me” is every message I typed, including the one-word ones telling it to keep going. All five devices together came out to about 13 hours of churn and 98 prompts, spread across two weeks of evenings.
根据结果的不同,后续方向也有所不同,但你应该能领会大致思路。让我们逐一过一遍列表——每个设备都链接到一个 GitHub 仓库,里面充满了生成的文档和脚本,其中大部分已在真实硬件上经过验证。我还列出了处理每个设备所花费的精力,这些数据来自 Claude Code 会话记录。“Churn”是指 Claude 实际工作的时间,已去除长时间的空闲间隔。“Prompts from me”是我输入的所有消息,包括那些只有一个单词、指示它继续执行的消息。这五台设备总共产生了约 13 小时的 churn 和 98 条提示,分布在两周的晚间时间里。
Everything I own
我拥有的一切
Insta360 Link webcam
Insta360 Link 网络摄像头
GitHub repo - 3.7 hours of Claude churn, 33 prompts from me
GitHub 仓库 - 3.7 小时 Claude churn,33 条来自我的提示
I use an Insta360 Link webcam, which is a nice gimbaled pan-tilt-zoom camera that does face tracking for automatically framing the shot. I wanted to know if it was possible to subvert the activity LED, like in the classic iSeeYou exploit.
我使用 Insta360 Link 网络摄像头,这是一款带有云台控制的平移-倾斜-变焦相机,能够自动跟踪面部以构图。我想了解是否有可能像经典的 iSeeYou 漏洞那样,颠覆其活动指示灯的功能。
Interestingly, it was immediately obvious that this camera has a lot going on inside it. It turns out that it runs a whole RTOS (ThreadX) sourced from the upstream SoC vendor, Ambarella. The RTOS hosts several small vision models that provide things like the aforementioned face tracking, as well as gesture detection for controlling settings. Pretty amazing complexity inside a tiny webcam, but it also means there’s some exciting attack surface here.
有趣的是,很明显这台相机内部有很多复杂的东西。事实证明,它运行着一个源自上游 SoC 供应商 Ambarella 的完整 RTOS(ThreadX)。该 RTOS 托管着几个小型视觉模型,提供上述的面部跟踪功能,以及用于控制设置的姿态检测。在一个微小的网络摄像头内部拥有如此惊人的复杂性,但也意味着这里存在一些令人兴奋的攻击面。
Over the USB Video Class interface, there’s an XU (Extension Unit) command that kicks the device into “mass storage” mode. This then lets us transfer a staged firmware update to the device’s internal FAT filesystem, which the device then applies to itself on reboot. This route does require user intervention to reboot with a replug, but there’s actually another command channel that exposes arbitrary read/write of files and a reboot command over the USB vendor class. With this, we can fully flash the device without any user interaction. Once the firmware is in the right place, there’s effectively no anti-tamper, just an appended MD5 hash to ensure integrity.
通过 USB Video Class 接口,存在一个 XU(扩展单元)命令可将设备切换至“大容量存储”模式。随后,我们可以将预置的固件更新传输到设备的内部 FAT 文件系统中,设备在重启时会自动应用该更新。此方法确实需要用户干预,通过重新插拔来重启设备;但实际上还有另一个命令通道,可通过 USB 厂商类协议暴露对文件的任意读写及重启命令。借助此通道,我们可以在无需任何用户交互的情况下完全刷写设备固件。一旦固件就位,实际上不存在防篡改机制,仅附加了一个 MD5 哈希值以确保完整性。
The indicator LED turns out to have a well-structured set of “patterns” in the firmware that dictate color, blink pattern, etc. that are indexed into for various device states. I had Claude write a tool to patch out the table entry for camera activity, fix up the integrity hash, and flash it to the camera. A quick test showed that the green LED that normally illuminates while recording no longer turned on. Horrifying! On this device, the gimbal itself also deflects down when not recording, so it’s not completely stealth, but it still doesn’t feel great.
指示灯 LED 在固件中具有结构良好的“模式”集,用于规定颜色、闪烁模式等,并针对各种设备状态进行索引调用。我让 Claude 编写了一个工具,用于修补相机活动对应的表项、修复完整性哈希,并将其刷写到相机中。快速测试显示,录制时通常亮起的绿色 LED 不再点亮。令人毛骨悚然!在该设备上,云台本身在不录制时也会向下偏转,因此并非完全隐蔽,但观感依然不佳。
The LED behavior before and after patching.
修补前后的 LED 行为。
ASUS ROG Swift PG42UQ monitor
华硕 ROG Swift PG42UQ 显示器
GitHub repo - 1.2 hours of Claude churn, 13 prompts from me
GitHub 仓库 - 1.2 小时的 Claude 迭代,我发出了 13 条提示词
My ASUS ROG Swift PG42UQ monitor was actually where I started, because I got annoyed at the pop-up overlay that comes up every once in a while that tells me to run “pixel cleaning”. I have never intentionally run pixel cleaning on this monitor and I never will, I don’t care, and I would like for that overlay to go away forever. Maybe there’s a debug menu or something that can turn it off, or worst case we patch a branch in the firmware?
我的华硕 ROG Swift PG42UQ 显示器实际上是起点,因为我对其偶尔弹出的提示运行“像素清洁”的覆盖层感到厌烦。我从未有意在显示器上运行过像素清洁,将来也不会,我不在乎,我希望这个覆盖层永远消失。也许有调试菜单之类的东西可以关闭它,或者最坏的情况是我们修补固件中的某个分支?
Claude found that the firmware has effectively no protection whatsoever - there’s a two-slot A/B scheme and a simple checksum, but ultimately we can write whatever we want to the thing. Firmware updates run over an I2C bus bridged over USB.
Claude 发现固件几乎没有任何保护——采用双槽 A/B 方案和简单的校验和,但最终我们可以向其中写入任意内容。固件更新通过桥接在 USB 上的 I2C 总线运行。
The pixel cleaning warning turns out to have no native way to disable it, and it’ll always show up after 8 hours of runtime. Oh well. Claude did find the appropriate area to patch to kill the functionality though. I haven’t actually been brave enough to write a modified firmware to the thing yet - it’s a pretty expensive monitor - but I’ll get there at some point.
像素清洁警告实际上没有原生禁用方式,且每次运行 8 小时后必定出现。唉。不过 Claude 确实找到了可修补以消除该功能的区域。我还没有勇气真的将修改后的固件刷入设备——毕竟这是一台相当昂贵的显示器——但我迟早会动手。
Another neat thing was exploring the DDC/CI interface. This is the control channel available over the display cable itself, allowing the host to change inputs and other settings. I believe ASUS offers this through their Windows utility, DisplayWidget, but that does little for me on Linux. So, now I have a shell script that can flip through some of the DDC/CI features like the hardware crosshair or zoom overlays, FPS counter, and countdown timer. I might set up some of these on hotkeys in the future for easy access.
另一个有趣的地方是探索 DDC/CI 接口。这是通过显示器线缆本身提供的控制通道,允许主机更改输入和其他设置。我相信华硕通过他们的 Windows 实用程序 DisplayWidget 提供此功能,但这在 Linux 上对我帮助不大。因此,现在我有一个 shell 脚本,可以切换一些 DDC/CI 功能,如硬件准星或缩放叠加层、FPS 计数器和倒计时计时器。我将来可能会将其中一些设置在热键上以便轻松访问。
Shure MV7 microphone
舒尔 MV7 麦克风
GitHub repo - 4.2 hours of Claude churn, 32 prompts from me
GitHub 仓库 - 4.2 小时的 Claude 代码生成,32 个来自我的提示词
At this point, there’s less actual incentive to keep popping these devices and more just morbid curiosity. My microphone, the Shure MV7, connects over USB and obviously has some amount of smarts to it, with on-device digital volume controls and such.
到目前为止,继续折腾这些设备的实际动力已经不多,更多的是出于一种病态的好奇心。我的麦克风 Shure MV7 通过 USB 连接,显然具有一定的智能功能,包括设备上的数字音量控制等。
The firmware for this one turned out to be hidden inside the Windows software, MOTIV Mix, so Claude installed that in Wine, found the update server, and pulled it down. I wasn’t on the latest, so there was actually a reasonable incentive here to get this working just to update my microphone from Linux. The firmware turned out to contain both DSP and MCU firmware, and was honestly pretty boring as you might expect. Again, no real security on the firmware flash itself.
这款设备的固件隐藏在 Windows 软件 MOTIV Mix 中,所以 Claude 在 Wine 中安装了它,找到了更新服务器并下载了固件。我当时没有最新版本,所以确实有合理的动力来让它工作,以便从 Linux 更新我的麦克风。结果发现固件包含 DSP 和 MCU 固件,说实话相当无聊,正如你所料。同样,固件刷写本身没有任何真正的安全措施。
However, the update protocol revealed that the entire thing actually runs over a USB HID vendor class protocol that implements a full plaintext command shell, with 48 different commands. Since it’s HID, we can actually hit this over WebHID from a webpage in Chrome, so I had Claude build a web interface for using the shell. There’s all sorts of interesting settings in here including a dozen DSP knobs, arbitrary memory read/write, LED control, and a 4-tier user privilege system whose entire authentication is a string comparison against the name of the tier you asked for. su sup just works, and the top tier can disable the touch panel so you can’t mute at the device, and drive the mute LED independently of whether the microphone is actually muted. It’s the webcam LED trick again, on a microphone. Obviously, be aware that you could probably break your device if you use that UI and do something stupid with it.
然而,更新协议揭示整个系统实际上运行在一个实现完整明文命令 shell 的 USB HID 厂商类协议之上,共有 48 种不同的命令。由于它是 HID,我们实际上可以通过 Chrome 网页中的 WebHID 访问它,所以我让 Claude 构建了一个用于使用该 shell 的 Web 界面。这里有很多有趣的设置,包括十几个 DSP 旋钮、任意内存读写、LED 控制以及一个四级用户权限系统,其整个认证过程只是将你请求的层级名称进行字符串比较。su sup 直接就能用,最高层级可以禁用触摸面板,这样你就无法在设备上静音,并且可以独立于麦克风是否真正静音来控制静音 LED。这又是网络摄像头 LED 把戏,只不过这次是在麦克风上。显然,请注意,如果你使用那个 UI 并做一些愚蠢的操作,可能会损坏你的设备。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力