White paper: Reverse Engineering and Exploiting the BT HomeHub 3.0b (pdf)
Slides: BT Wireless Routers: Adventures in Reversing and Exploiting
BT HomeHub 3.0b specifications
- http://forum.kitz.co.uk/index.php/topic,10161.msg213299.html#msg213299
- http://www.neufbox4.org/wiki/index.php?title=Neufbox_6#SoC_BCM6361
- http://www.hynix.com/inc/pdfDownload.jsp?path=/datasheet/pdf/graphics/H5PS5162FFR(Rev.1.4).pdf
- http://pdf1.alldatasheet.com/datasheetI pdf/view/94408/STMICROELECTRONICS/NAND256W3A2BN6/+7_4Q9UORlHDyRHOIpa/1XXyxeocP+uKxP6OXPaoV+ /datasheet.pdf
QEMU/Debian MIPS Linux walkthrough
Often binaries found in firmware won't play nicely in emulation because they make a lot of assumptions about the underlying hardware which QEMU can't satisfy. The most common case of this is an application querying NVRAM for configuration parameters. Here's a library I wrote to intercept those queries and provide answers from an INI-style configuration file.
NVRAM "faker" library for use in emulation
Bowcaster is an exploit development API that I wrote to ease development of buffer overflow exploits. It grew out of all the tools and techniques Craig Heffner and I developed for exploiting embedded devices. It primarily targets MIPS Linux, since there support for that architecture was almost non-existent. I plan to add support for other architectures as I have time.
Bowcaster
Here's my Github repository for proof-of-concept exploit code. In it, you'll find the exploit code for the BT HomeHub 3.0b that I demoed at BayThreat, among a few others.
Proof-of-Concept exploit code
In the presentation I mentioned how exploiting buffer overflows on MIPS Linux is a bit different that other, more familiar architectures. I wasn't able to go into details; that could make an entire presentation in itself. However, I mentioned my Black Hat USA 2012 presentation, where I did describe some of the mechanics of exploiting MIPS Linux buffer overflows. Here's the video of that presentation, entitled "From SQL Injection to MIPS Overflows: Rooting SOHO Routers".
SQL Injection to MIPS Overflows - Zachary Cutlip - Black Hat USA 2012 from Zach on Vimeo.
I hope these resources are useful. If you came to this article because you saw my BayThreat talk and demo, I hope you enjoyed it! Be sure to get in touch and share your thoughts! Twitter or my email are best.
Twitter: @zcutlip
Email: uid000 at gmail
Cheers!
Zach