All Projects → chrivers → Samsung Firmware Magic

chrivers / Samsung Firmware Magic

Tool for decrypting the firmware files for Samsung SSDs

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Samsung Firmware Magic

adb-cheatsheet
Your journey to master Android™ Shell begins here
Stars: ✭ 44 (-68.12%)
Mutual labels:  firmware, samsung
samsung-bios-check
BIOS update checker for Samsung laptops running Linux
Stars: ✭ 25 (-81.88%)
Mutual labels:  firmware, samsung
Heimdall
Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy devices.
Stars: ✭ 1,829 (+1225.36%)
Mutual labels:  samsung, firmware
Samloader
Download Samsung firmware from official servers
Stars: ✭ 260 (+88.41%)
Mutual labels:  samsung, firmware
Firmware password manager
A Python script to help Macintosh administrators manage the firmware passwords of their computers.
Stars: ✭ 127 (-7.97%)
Mutual labels:  firmware
Epk2extract
Extraction tool for LG, Hisense, Sharp, Philips/TPV, Thompson and similar TVs/Embedded Devices
Stars: ✭ 115 (-16.67%)
Mutual labels:  firmware
Deoptfuscator
Deobfuscator for Android Application
Stars: ✭ 115 (-16.67%)
Mutual labels:  deobfuscation
Opentx
OpenTX custom firmware for Transmitters
Stars: ✭ 1,687 (+1122.46%)
Mutual labels:  firmware
Big Companies Interview Questions
A curated list of previous asked Interview Question at Big Companies and Startups 🤲 🏆
Stars: ✭ 135 (-2.17%)
Mutual labels:  samsung
Kmk firmware
Clackety Keyboards Powered by Python
Stars: ✭ 132 (-4.35%)
Mutual labels:  firmware
Nexmon
The C-based Firmware Patching Framework for Broadcom/Cypress WiFi Chips that enables Monitor Mode, Frame Injection and much more
Stars: ✭ 1,761 (+1176.09%)
Mutual labels:  firmware
Makelangelo Firmware
CNC firmware for many different control boards and kinematic systems. Originally the brain of the Makelangelo art robot.
Stars: ✭ 116 (-15.94%)
Mutual labels:  firmware
Esp32 Ota Https
Secure over-the-air updates for the ESP32 platform
Stars: ✭ 132 (-4.35%)
Mutual labels:  firmware
Dap42
CMSIS-DAP debugger firmware for STM32F042Fx and STM32F103xx
Stars: ✭ 115 (-16.67%)
Mutual labels:  firmware
Fingerprintidentify
👍 Android Fingerprint Verification SDK
Stars: ✭ 1,702 (+1133.33%)
Mutual labels:  samsung
Yourfritz
dynamic package management for AVM routers
Stars: ✭ 114 (-17.39%)
Mutual labels:  firmware
Marlin
Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
Stars: ✭ 12,217 (+8752.9%)
Mutual labels:  firmware
Iextractor
Automate extraction from iOS firmware files (.ipsw)
Stars: ✭ 124 (-10.14%)
Mutual labels:  firmware
Mgos To Tasmota
A minimal firmware for OTA (over the air) flashing Tasmota, HAA, or ESPurna from Mongoose OS or compatible firmware types.
Stars: ✭ 118 (-14.49%)
Mutual labels:  firmware
Scout
Scout - Instruction based research debugger (a poor man's debugger)
Stars: ✭ 127 (-7.97%)
Mutual labels:  firmware

Samsung Firmware Magic

Samsung distributes firmware updates for their SSDs for either "Windows" or "Mac". Ironically, both of these are bootable Linux .iso files, containing the actual firmware and update program.

The .iso files can be unpacked, but ultimately we end up with an obfuscated binary blob, even for the meta information.

For the upstream file downloads, see

https://www.samsung.com/semiconductor/minisite/ssd/download/tools/

Out of curiosity, I decided to create a decryption tool for this obfuscated format, which is found in this repository.

Unpacking iso image to firmware blob

First, we download a firmware iso:

`wget http://downloadcenter.samsung.com/content/FM/201711/20171102105105735/Samsung_SSD_850_PRO_EXM04B6Q_Win.iso`

Next, we unpack the relevant file from the iso, the initrd:

`7z x Samsung_SSD_850_PRO_EXM04B6Q_Win.iso initrd`

This file is a gzip-compressed cpio archive, so use 7z to strip gzip:

`7z x initrd`

This produces initrd~, containing the uncompressed contents. From here we extract the directory of interest, root/fumagician:

`7z -ofw x 'initrd~' root/fumagician`

This creates fw/root/fumagician in the current directory:

$ cd fw/root/fumagician
$ ls -l
total 5408
-rw-rw-r-- 1 user user    2124 1971-03-22 19:52 DSRD.enc
-rw-rw-r-- 1 user user 4752867 1971-03-22 19:52 EXM04B6Q.enc
-rw-rw-r-- 1 user user  772516 2016-10-14 10:42 fumagician
-rw-rw-r-- 1 user user     290 2016-10-14 10:42 fumagician.sh

The files DSRD.enc (xml list of firmwares) and EXM04B6Q.enc (firmwares) are the obfuscated files, that we can now decrypt.

Decrypting firmware blob

The included decode.py script will unpack these .enc files, like so:

## show xml on stdout:
$ ./samsung-magic.py < fw/root/fumagician/DSRD.enc

## decrypt firmware to file:
$ ./samsung-magic.py < fw/root/fumagician/EXM04B6Q.enc > EXM04B6Q.bin

Seemingly, the folks at Samsung are huge fans of nesting things, because the decrypted EXM04B6Q.bin file is actually a zip file, containing encrypted firmware files:

$ unzip -l EXM04B6Q.bin
Archive:  EXM04B6Q.bin
  Length      Date    Time    Name
---------  ---------- -----   ----
  1048576  2017-02-19 10:41   EXM04B6Q_10170217.enc
  1048576  2017-02-19 10:41   EXM04B6Q_20170203.enc
  1048576  2017-02-19 10:41   EXM04B6Q_30170203.enc
  1048576  2017-02-19 10:41   EXM04B6Q_40170902.enc
  1048576  2017-02-19 10:41   EXM04B6Q_50170208.enc
  1048576  2017-02-19 10:41   EXM04B6Q_60170208.enc
---------                     -------
  6291456                     6 files

Luckily, the encryption is exactly the same, so samsung-magic.py can decrypt these as well:

$ unzip EXM04B6Q.bin
$ ./samsung-magic.py < EXM04B6Q_10170217.enc > EXM04B6Q_10170217.bin

Now, at last, we have the raw firmware.

Enjoy!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].