It appears you have not yet registered with our community. To register please click here...

 
Go Back [M] > Madshrimps > WebNews
Customizing Xiaomi ARM Cortex-M Firmware Customizing Xiaomi ARM Cortex-M Firmware
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Customizing Xiaomi ARM Cortex-M Firmware
Reply
 
Thread Tools
Old 22nd October 2019, 08:13   #1
[M] Reviewer
 
Stefan Mileschin's Avatar
 
Join Date: May 2010
Location: Romania
Posts: 153,575
Stefan Mileschin Freshly Registered
Default Customizing Xiaomi ARM Cortex-M Firmware

This hack was revealed a while ago at DEFCON26, but it’s still a fascinating look into vulnerabilities that affect some of the most widely used IoT devices.

[Dennis Giese] figured out a way to modify ARM Cortex-M based firmware for use in customizing the functionality of devices or removing access to the vendor. Obviously, there are more malicious activities that can be done with this type of hack, as with any exploits of firmware, but they are (also) obviously not condoned.

The talk goes into the structure of Xiaomi ecosystem and products before going into a step-by-step approach to binary patching the firmware. The first step was to acquire the firmware, either by dumping SPI flash memory (using JTAG, SWD, or desoldered Flash pins) or intercepting traffic during a firmware update and downloading the firmware. There’s also a possibility of downloading the firmware using a URL, although this can be more difficult to find.

The firmware can then be parsed, which first requires the format to be converted from a proprietary format to and ELF file. This conversion makes it easier to load into IDA pro, and gives information on the segments of the firmware and its entry point. Python tools luckily exist for converting binary files to ELF, which simplifies the task.

After loading the ELF file into the disassembler, you’ll want to find the key memory area, denoted by “TAG_MAC”, “TAG_DID”, and “TAG_KEY” in the example firmware (for storing the MAC address, device ID, and key). In order to prepare the firmware for Nexmon – a software that supported C-based firmware binary patching for ARM Cortex-A and ARM Cortex-M binaries – you’ll need to partition some space in the memory for patches and know the function names and signatures for the firmware.

https://hackaday.com/2019/10/19/cust...ex-m-firmware/
Stefan Mileschin is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
ARM announces Cortex A76 for 7nm Stefan Mileschin WebNews 0 4th June 2018 06:21
Non 5G Kirin 980 is Cortex A75 in 7nm Stefan Mileschin WebNews 0 10th May 2018 20:24
Customizing Chrome's New Tab page Stefan Mileschin WebNews 0 21st March 2017 10:33
ARM Announces the Cortex-R52 CPU Stefan Mileschin WebNews 0 21st September 2016 07:16
ARM Cortex-R8 processor design is out Stefan Mileschin WebNews 0 19th February 2016 09:43
Republic Wireless adds Moto Maker for customizing your Moto X Stefan Mileschin WebNews 0 1st April 2014 09:59
ARM Cortex A12: Between Cortex A9 and A15 in Power & Perf Stefan Mileschin WebNews 0 3rd June 2013 12:18
Xiaomi Announces Their Flagship Phone Mi2S and Budget Variant Xiaomi Phone Mi2A Stefan Mileschin WebNews 0 11th April 2013 10:59
Samsung Announces Exynos 5 Octa SoC - 4 Cortex A7s, 4 Cortex A15s Stefan Mileschin WebNews 0 10th January 2013 10:24
AC Ryan launches Ryanpower2: Customizing your way with CableFREE jmke WebNews 0 21st September 2004 12:21

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +1. The time now is 09:07.


Powered by vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO