Coder Social home page Coder Social logo

bkerler / firehorse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alephsecurity/firehorse

11.0 3.0 1.0 23.14 MB

Research & Exploitation framework for Qualcomm EDL Firehorse programmers

License: Apache License 2.0

Makefile 4.50% Assembly 7.18% C 35.69% C++ 2.84% Python 49.78%

firehorse's Introduction

firehorse

By Roee Hay (@roeehay) & Noam Hadad, Aleph Reseserch, HCL Technologies

Research & Exploitation framework for Qualcomm EDL Firehose programmers.

Blog posts:

  1. Exploiting Qualcomm EDL Programmers (1): Gaining Access & PBL Internals
  2. Exploiting Qualcomm EDL Programmers (2): Storage-based Attacks & Rooting
  3. Exploiting Qualcomm EDL Programmers (3): Memory-based Attacks & PBL Extraction
  4. Exploiting Qualcomm EDL Programmers (4): Runtime Debugger
  5. Exploiting Qualcomm EDL Programmers (5): Breaking Nokia 6's Secure Boot

Usage

Prerequisites

To use this tool you'll need:

  1. Qualcomm Product Support Tools (QPST - we used version 2.7.437 running on a windows 10 machine)
  2. A Cross compiler to build the payload for the devices (we used arm-eabi-4.6 toolchain for aarch32 and aarch64-linux-android-4.8 toolchain for aarch64, both running on ubuntu 16.04 machine)
  3. Aquire the relevant programmers and copy them to the host/target/device directory

Building the payloads

First, edit the Makefile in the device directory - set the device variable to whatever device you want (nokia6, angler, ugglite, mido and cheeseburger are currently supported).

Next, set the CROSS_COMPILE_32 and CROSS_COMPILE_64 enviroment vars as follows:

export CROSS_COMPILE_32=<path-to-arm-eabi-4.6-toolchain>/bin/arm-eabi-
export CROSS_COMPILE_64=<path-to-aarch64-linux-android-4.8-toolchain>/bin/aarch64-linux-android-

Then call make and the payload for your specific device will be built

Configure the tool

Before we start, we need to configure some stuff, edit the constants.py file in the host directory:

  1. set COM to whatever com port the device is connnected to
  2. set FH_LOADER with a path to the fh_loader.exe in the QPST\bin directory
  3. set SAHARA_SERVER with a path to the QSaharaServer.exe in the QPST\bin directory
COM = "COM17"
FH_LOADER = r"C:\Program Files (x86)\Qualcomm\QPST437\bin\fh_loader.exe"
SAHARA_SERVER = r"C:\Program Files (x86)\Qualcomm\QPST437\bin\QSaharaServer.exe" 

Usage examples

c:\firehorse\host>python firehorse.py -s -c COM17 -t nokia6 target magic
INFO: sending programmer...
INFO: Overwriting partition logdump with ../tmp\nokia6-ramdisk-modified.cpio.gz...
INFO: applying patches and breakpoints...
INFO: installing bp for 0010527c
INFO: installing bp for 00104130
[...]
INFO: creating pagecopy...
INFO: pages: set([272, 256, 259, 260, 261])
INFO: uploading firehorse data...
INFO: uploading egghunter to 080af000
INFO: 080af000
INFO: i = 0, dst = 080d0000, cksum = d1fe325f
INFO: i = 1, dst = 080d0320, cksum = 3c092224
INFO: got all parts in 1 tries
INFO: uploading firehorse...
INFO: i = 0, dst = 080b0000, cksum = f5234b61
INFO: i = 1, dst = 080b0320, cksum = 641cb436
[...]
INFO: got all parts in 2 tries
INFO: initializing firehorse...
INFO: calling pbl patcher...
c:\firehorse\host>python firehorse.py -c COM17 -t nokia6 fw hello

c:\firehorse\host>python firehorse.py -c COM17 -t nokia6 fw peek 0x100000 0x10
INFO: 00100000  22 00 00 ea 70 00 00 ea 74 00 00 ea 78 00 00 ea   "...p...t...x...

firehorse's People

Contributors

noam-hadad avatar roeeh avatar alephsecurity avatar

Stargazers

 avatar Huski avatar  avatar ZNZ930 avatar  avatar Mr. Ken  avatar Rob avatar  avatar  avatar  avatar  avatar

Watchers

James Cloos avatar Bjoern Kerler avatar  avatar

Forkers

lusoe302

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.