Giter Club home page Giter Club logo

esp8285-bin2elf's Introduction

ESP8285 Bin2ELF

Reverse engineering ESP8285 firmware with pure python3.

Note

This works for ESP8285 (and possibly other ESP) firmware that was generated with elf2bin.py (for example via Arduino IDE). However, you may have to adjust some things in the bin2elf.py. The function parse_mem reverses the logic of elf2bin.py and since that slightly changed over time you may find different sections and/or different orders of sections. If you can guess the version the code was compiled with you can check the source code of the elf2bin.py in the Arduino repository and then adapt this tool to your needs.

Usage

python3 bin2elf.py -f /flashdump.bin
ELF Header (Bootloader):
	Magic: E9
	Segments: 2
	Flash Mode: dout
	Flash Frequency: 40
	Flash Size: 1M
	Entry Address: 0x4010f480
	Binary Checksum: 2B
ELF Segments:
	.text:
		Address: 0x4010f000
		Size: 0xd60
	.rodata:
		Address: 0x3fff20b8
		Size: 0x28

ELF Header (Application):
	Magic: E9
	Segments: 5
	Flash Mode: dout
	Flash Frequency: 40
	Flash Size: 1M
	Entry Address: 0x401000c0
	Binary Checksum: 58
ELF Segments:
	.irom0.text:
		Address: 0x40201010
		Size: 0x41be0
	.text:
		Address: 0x40100000
		Size: 0x102
	.text1:
		Address: 0x40100104
		Size: 0x68cd
	.data:
		Address: 0x3ffe8000
		Size: 0x5e0
	.rodata:
		Address: 0x3ffe8620
		Size: 0x42c

Converting app to ELF
Assemble program header table
Assemble section header table
Assemble sections
Assemble ELF structure
Writing ELF to: app.elf

Credits/Resources

Standing on the shoulders of giants. Some resources in no particular order:

esp8285-bin2elf's People

Contributors

cr4ckc4t avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.