All Projects → oranav → I9300_emmc_toolbox

oranav / I9300_emmc_toolbox

Licence: gpl-3.0
Samsung Galaxy S3 GT-I9300 eMMC toolbox

Programming Languages

c
50402 projects - #5 most used programming language
shellcode
44 projects

Labels

Projects that are alternatives of or similar to I9300 emmc toolbox

Poc Bank
Focus on cybersecurity | collection of PoC and Exploits
Stars: ✭ 68 (-23.6%)
Mutual labels:  exploit
Unauthd
A local privilege escalation chain from user to kernel for MacOS < 10.15.5. CVE-2020–9854
Stars: ✭ 79 (-11.24%)
Mutual labels:  exploit
Imgbackdoor
Hide your payload into .jpg file
Stars: ✭ 87 (-2.25%)
Mutual labels:  exploit
Ctf
Some of my CTF solutions
Stars: ✭ 70 (-21.35%)
Mutual labels:  exploit
Cve 2017 0781
Blueborne CVE-2017-0781 Android heap overflow vulnerability
Stars: ✭ 74 (-16.85%)
Mutual labels:  exploit
Cryptolocker
CryptoLocker is open source files encrypt-er. Crypto is developed in Visual C++. It has features encrypt all file, lock down the system and send keys back to the server. Multi-threaded functionality helps to this tool make encryption faster.
Stars: ✭ 79 (-11.24%)
Mutual labels:  exploit
Slickermaster Rev4
NSA Hacking Tool Recreation UnitedRake
Stars: ✭ 62 (-30.34%)
Mutual labels:  exploit
Thoron
Thoron Framework is a Linux post-exploitation framework that exploits Linux TCP vulnerability to provide a shell-like connection. Thoron Framework has the ability to create simple payloads to provide Linux TCP attack.
Stars: ✭ 87 (-2.25%)
Mutual labels:  exploit
Yookiterm Slides
Exploitation and Mitigation Slides
Stars: ✭ 74 (-16.85%)
Mutual labels:  exploit
Windowsexploits
Windows exploits, mostly precompiled. Not being updated. Check https://github.com/SecWiki/windows-kernel-exploits instead.
Stars: ✭ 1,243 (+1296.63%)
Mutual labels:  exploit
Kernel Exploits
My proof-of-concept exploits for the Linux kernel
Stars: ✭ 1,173 (+1217.98%)
Mutual labels:  exploit
Ciscoexploit
Cisco Exploit (CVE-2019-1821 Cisco Prime Infrastructure Remote Code Execution/CVE-2019-1653/Cisco SNMP RCE/Dump Cisco RV320 Password)
Stars: ✭ 73 (-17.98%)
Mutual labels:  exploit
Sploitfun Linux X86 Exp Tut Zh
📖 [译] SploitFun Linux x86 Exploit 开发系列教程
Stars: ✭ 78 (-12.36%)
Mutual labels:  exploit
M0b Tool
exploit
Stars: ✭ 68 (-23.6%)
Mutual labels:  exploit
Csgo Crash Exploit
Allows you to crash any Windows user
Stars: ✭ 87 (-2.25%)
Mutual labels:  exploit
Chimay Red
Mikrotik RouterOS (6.x < 6.38.5) exploit kit. Reverse engineered from the "Vault 7" WikiLeaks publication.
Stars: ✭ 63 (-29.21%)
Mutual labels:  exploit
Mikrotikexploit
Scan and Export RouterOS Password
Stars: ✭ 79 (-11.24%)
Mutual labels:  exploit
Reverse Shell
Reverse Shell as a Service
Stars: ✭ 1,281 (+1339.33%)
Mutual labels:  exploit
Cve 2019 0708 Tool
A social experiment
Stars: ✭ 87 (-2.25%)
Mutual labels:  exploit
Beef Over Wan
Browser Exploitation Framework is a Open-source penetration testing tool that focuses on browser-based vulnerabilities .This Python Script does the changes Required to make hooked Linked Accessible Over WAN .So anyone can use this framework and Attack Over WAN without Port Forwarding [NGROK or any Localhost to Webhost Service Required ]
Stars: ✭ 82 (-7.87%)
Mutual labels:  exploit

Samsung GT-I9300 eMMC toolbox

A collection of tools used to revive and experiment with Samsung GT-I9300 eMMC chips (VTU00M).

This project is experimental in its nature and I take absolutely no responsiblity for anything that might happen to your device.

Caution: You will lose your EFS partition, but there's not much to do about it.

Instructions

Reviving a dead Samsung Galaxy S3 (GT-I9300)

Prerequesities (for Debian stretch, should work on other apt-based distributions as well):

$ sudo apt install python3 python3-libusb1 libusb-1.0-0 gcc-arm-none-eabi binutils-arm-none-eabi
$ make -C shellcode
  1. Obtain a VTU00M firmware dump (either 0xF1 or 0xF7) preferably from a donor 0xF7 device, or just dump your own 0xF1 device. Reference SHA256 sums are given below. This step is explained in detail here.
  2. Boot to download mode (sboot) on your device.
  3. Run the following command in order to low-level format the eMMC and install the new firmware: exploit/sboot_exploit.py --shellcode shellcode/write_fw.bin -e FWDUMP, where FWDUMP is the firmware dump obtained in step #1.
  4. Your device no longer has sboot installed in its boot partition, so you must prepare a recovery SD card with sboot XXELLA if not already done before. Insert it into your device and boot into download mode as usual (you'll see nothing on screen, but device will show under lsusb).
  5. Resize the boot partition: exploit/sboot_exploit.py --shellcode shellcode/change_boot_partition_size.bin
  6. eMMC should be working right now. You can use a normal recovery SD card as described here. This will install sboot on your eMMC, using SDCARD mode.
  7. eMMC is functional! You can use Odin or Heimdall to flash a new ROM to your device (you also need to repartition, i.e. flash a new PIT). Flashing a new PIT may not work with Heimdall, so use Odin if this is the case. Afterwards, flash some recovery (e.g. TWRP) and format all the user partitions to ext4 (/cache, /data, /preload, /sdcard). Then flash some firmware and your phone is good to go (except for EFS which is missing now).

Obtaining a firmware dump

Obtaining the firmware from a donor device (0xF7)

This is the preferred method, as your device will no longer suffer from the eMMC bug.

  • First option: use a patched kernel as described here. Once you obtained mmcram.bin, strip it to contain only the firmware: dd if=mmcram.bin of=0xf7.bin bs=4K skip=64 count=32.
  • Second option: dump using download mode. You're adviced to use sboot XXELLA since the shellcode is only guaranteed to work against it, but your mileage may vary. Enter download mode on your device, then run exploit/sboot_exploit.py --shellcode shellcode/dump_fw.bin -o 0xf7.bin.

Obtaining the firmware from your bricked device (0xF1)

This will unbrick your device, but your device will still suffer from the eMMC bug; the brick might happen again in the future. It's much better to obtain firmware 0xF7.

Boot into download mode, and run exploit/sboot_exploit.py --shellcode shellcode/dump_fw_bootrom.bin -o 0xf1.bin.

Booting into download mode

If your device can boot into download mode normally, you have some version of sboot installed on your device. The shellcode should theoretically work on any sboot version, but it is only guaranteed to work on sboot XXELLA. If it doesn't work, it might need some adaptations for your sboot version; be advised that some reverse engineering skill is required. If you don't know which sboot version you have, dump sboot from your eMMC.

If your device cannot boot into download mode (i.e. it's entirely dead - you see nothing), you first need a charged battery. Then, proceed to prepare a recovery SD card with sboot XXELLA. Once it's ready, just insert the SD card to your device, insert the battery, press power+volume down+home buttons for approx. 2-3 seconds, release all of them and press the volume up button once. Plug in the device over USB to your computer and it should be visible under lsusb. You might see some funky stuff on the phone's screen -- just ignore it.

Preparing a recovery SD card with sboot XXELLA

Prerequisites: obtain the firmware I9300XXELLA_I9300OXAELLA_BTU.zip. Extract the zip file, then extract the tar.md5 file inside (which is just a tar), and grab sboot.bin. This is the relevant sboot version. Copy it inside the sdcard folder.

Then run the following commands (replace DEV with the sdcard device on your computer, e.g. /dev/sdc. Be careful!):

$ cd sdcard
$ ./create_recovery_sdcard.py -o recovery_sdcard.bin -s sboot.bin
$ dd if=recovery_sdcard.bin of=DEV
$ sync

Dumping sboot

In case you ever need to obtain sboot from your device (in case eMMC's boot partition is still intact), you can use exploit/sboot_exploit.py --dump -o SBOOT, and the exploit will dump sboot to a file named SBOOT. It actually dumps a 1MB chunk starting at address 0x43e00000, so the binary's loading address is 0x43e00000.

Reference VTU00M firmware SHA256 sums

  • 0xF1 firmware (buggy): 4cd6e829fa9370c8bc74523e181467382444892770370daa9163ecda6499d228
  • 0xF7 firmware (bug fixed): 1c3ce3148704e21749c6b59ff88c7a133d385024f70038615806ae9e95798dbf

Files

Exploit

The exploit/ folder contains the sboot exploit in order to run code in the sboot environment.

  • sboot_exploit.py: sboot exploit using PIT file packets vulnerabilities; should work on all GT-I9300 sboot versions
  • odin.py: Quick and dirty approach for implementing Odin's protocol in Python

Shellcodes

The shellcode/ folder contains a collection of sboot shellcodes for interaction with the eMMC.

  • shellcode.h: Addresses for linking against sboot.
  • common.c, common.h: Common functions for shellcode operation.
  • write_fw.c: Writes a new firmware to the eMMC.
  • dump_fw.c Dumps the firmware from a working (non-brick) eMMC.
  • dump_fw_bootrom.c: Dumps the firmware from any eMMC (even bricked ones).
  • change_boot_partition_size.c: Resizes the eMMC boot partition using its own mechanism (only for working eMMC devices).
  • demo.c: Shellcode for eMMC talk demo purposes (please, don't use it!).
  • helloworld.c: Prints a "Hello, world!" message on sboot's screen.
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].