# IDAPython Embedded Toolkit

> Maddie Stone's IDAPython scripts for triaging and annotating embedded-device firmware images in IDA Pro, presented at RECON Montreal and DerbyCon in 2017. Triage scripts define code and functions from per-architecture prologue and epilogue patterns, mark address ranges as bytes, words or double words and turn unexplored bytes into strings; analysis scripts resolve memory accesses made at offsets from a known base value and add cross-references and value comments, and annotation scripts list CPU port (GPIO) use, tag functions without cross-references as possible dead code and trace where an operand is used. An Android folder adds a script that comments JNIEnv function calls in native libraries and one that decrypts the strings of ARM32 libraries packed with the WeddingCake anti-analysis wrapper.

- Type: Tool
- Targets: App · Firmware
- Category: Firmware tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-20
- Added to the catalog: 2026-11-02
- Original resource: <https://github.com/maddiestone/IDAPythonEmbeddedToolkit>
- Primary source: <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/README.md>
- Catalog page: <https://awesomerea.org/resources/idapython-embedded-toolkit/>
- Record JSON: <https://awesomerea.org/resources/idapython-embedded-toolkit/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/idapython-embedded-toolkit/index.md)

## Requirements & limits

- Ten Python scripts and the slides of the two 2017 talks as PDFs, with no releases or tags; the reviewed master commit, from 2019-08-14, is the latest. The README says the scripts have only been tested on IDA Pro 6.95, with IDA 7.0 testing in progress, and runs each one separately through File > Script file in an open IDA database with IDAPython. Most use Python 2 print statements and pre-7.0 IDC calls such as MakeCode, MakeComm, MakeStr and AskAddr; jni_translate.py, added in 2019, uses Python 3-compatible print calls but still calls idc.MakeComm.
- The user supplies the firmware image or Android native library and its IDA database, and enters address ranges, regular expressions or base values at prompts or in each script's user-defined section. Processor-specific syntax is chosen from IDA's processor name: define_code_functions.py covers 8051, PIC18, Mitsubishi M32R, TI TMS320C28x and AVR, and find_mem_accesses.py only 8051, while identify_port_use_locations.py ships one active PIC18 pattern with commented 8051 alternatives. Unsupported processors stop with an error until the analyst adds patterns, and find_mem_accesses.py cannot create references into segments that do not yet exist.
- Several scripts rewrite the database: define_data_as_types.py first undefines the range, overwriting code or strings there, and WeddingCake_decrypt.py overwrites encrypted strings with their decrypted contents and needs JNI_OnLoad defined and exported. The WeddingCake files accompany Maddie Stone's Black Hat USA 2018 talk on that packer.
- MIT, copyright 2017 Maddie Stone, in LICENSE; the README's copyright notice instead names The Johns Hopkins University Applied Physics Laboratory, and the Android README and WeddingCake script carry a Google LLC 2018 copyright line without separate license terms.

## Primary sources

1. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/README.md>
2. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/Android/README.md>
3. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/define_code_functions.py>
4. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/find_mem_accesses.py>
5. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/identify_port_use_locations.py>
6. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/define_data_as_types.py>
7. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/Android/jni_translate.py>
8. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/Android/WeddingCake_decrypt.py>
9. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/tree/3cf0346f93eb3c009f4bf274c91bd00398a56d77/presentations>
10. <https://github.com/maddiestone/IDAPythonEmbeddedToolkit/blob/3cf0346f93eb3c009f4bf274c91bd00398a56d77/LICENSE>

## More in Firmware and hardware

- [fiano](https://awesomerea.org/resources/fiano/index.md) · Tool
- [Pyrrha](https://awesomerea.org/resources/pyrrha/index.md) · Tool
- [RETracker](https://awesomerea.org/resources/retracker/index.md) · Tool
- [Titan M tools (Quarkslab)](https://awesomerea.org/resources/quarkslab-titanm-tools/index.md) · Tool
- [uefi_retool](https://awesomerea.org/resources/uefi-retool/index.md) · Tool
- [Shannon Modem Loader for IDA Pro](https://awesomerea.org/resources/shannon-modem-loader/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
