All Projects → ucsb-seclab → Bootstomp

ucsb-seclab / Bootstomp

Licence: bsd-2-clause
BootStomp: a bootloader vulnerability finder

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bootstomp

Patrowlhears
PatrowlHears - Vulnerability Intelligence Center / Exploits
Stars: ✭ 89 (-70.63%)
Mutual labels:  cve, vulnerability-detection
Hellraiser
Vulnerability scanner using Nmap for scanning and correlating found CPEs with CVEs.
Stars: ✭ 413 (+36.3%)
Mutual labels:  cve, vulnerability-detection
vulnerability-db
Vulnerability database and package search for sources such as OSV, NVD, GitHub and npm.
Stars: ✭ 36 (-88.12%)
Mutual labels:  cve, vulnerability-detection
Vfeed
The Correlated CVE Vulnerability And Threat Intelligence Database API
Stars: ✭ 826 (+172.61%)
Mutual labels:  cve, vulnerability-detection
Cve Search
cve-search - a tool to perform local searches for known vulnerabilities
Stars: ✭ 1,765 (+482.51%)
Mutual labels:  cve, vulnerability-detection
patton-cli
The knife of the Admin & Security auditor
Stars: ✭ 42 (-86.14%)
Mutual labels:  cve, vulnerability-detection
vulnerablecode
A free and open vulnerabilities database and the packages they impact. And the tools to aggregate and correlate these vulnerabilities. Sponsored by NLnet https://nlnet.nl/project/vulnerabilitydatabase/ for https://www.aboutcode.org/ Chat at https://gitter.im/aboutcode-org/vulnerablecode Docs at https://vulnerablecode.readthedocs.org/
Stars: ✭ 269 (-11.22%)
Mutual labels:  cve, vulnerability-detection
Threatpinchlookup
Documentation and Sharing Repository for ThreatPinch Lookup Chrome & Firefox Extension
Stars: ✭ 257 (-15.18%)
Mutual labels:  cve
Cloudfrunt
A tool for identifying misconfigured CloudFront domains
Stars: ✭ 281 (-7.26%)
Mutual labels:  vulnerability-detection
Docker To Linux
Make bootable Linux disk image abusing Docker
Stars: ✭ 257 (-15.18%)
Mutual labels:  bootloader
Versionscan
A PHP version scanner for reporting possible vulnerabilities
Stars: ✭ 254 (-16.17%)
Mutual labels:  cve
B2r2
B2R2 is a collection of useful algorithms, functions, and tools for binary analysis.
Stars: ✭ 262 (-13.53%)
Mutual labels:  binary-analysis
Xunfeng
巡风是一款适用于企业内网的漏洞快速应急,巡航扫描系统。
Stars: ✭ 3,131 (+933.33%)
Mutual labels:  vulnerability-detection
Fastboot3ds
A homebrew bootloader for the Nintendo 3DS that is similar to android's fastboot.
Stars: ✭ 258 (-14.85%)
Mutual labels:  bootloader
Zelos
A comprehensive binary emulation and instrumentation platform.
Stars: ✭ 298 (-1.65%)
Mutual labels:  binary-analysis
Openblt
Official read-only mirror of the SVN OpenBLT bootloader repository. Updated daily.
Stars: ✭ 256 (-15.51%)
Mutual labels:  bootloader
Aio Boot
AIO Boot is an All-in-One bootable software for USB and HDD. Is one of the best Multiboot USB Creator for Windows.
Stars: ✭ 300 (-0.99%)
Mutual labels:  bootloader
Limine
x86/x86_64 BIOS Bootloader
Stars: ✭ 288 (-4.95%)
Mutual labels:  bootloader
Penetration testing poc
渗透测试有关的POC、EXP、脚本、提权、小工具等---About penetration-testing python-script poc getshell csrf xss cms php-getshell domainmod-xss penetration-testing-poc csrf-webshell cobub-razor cve rce sql sql-poc poc-exp bypass oa-getshell cve-cms
Stars: ✭ 3,858 (+1173.27%)
Mutual labels:  cve
Dependencycheck
OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.
Stars: ✭ 3,571 (+1078.55%)
Mutual labels:  vulnerability-detection

BootStomp

License

BootStomp is a boot-loader bug finder. It looks for two different class of bugs: memory corruption and state storage vulnerabilities. For more info please refer to the BootStomp paper at https://seclab.cs.ucsb.edu/academic/publishing/#bootstomp-security-bootloaders-mobile-devices-2017

To run BootStomp's analyses, please read the following instructions. Note that BootStomp works with boot-loaders compiled for ARM architectures (32 and 64 bits both) and that results might slightly vary depending on angr and Z3's versions. This is because of the time angr takes to analyze basic blocks and to Z3's expression concretization results.


Directory structure

  • analysis: Contains analysis results (Ex: IDA idbs etc) of boot images of different devices.
  • tools: Contains tools that can be used to work with various images.

Pre-requisites

$ pip install angr

How to run it

Run BootStomp using docker

The easiest way to use BootStomp is to run it in a docker container. The folder docker contains an appropriate Dockerfile. These are the commands to use it.

cd docker
# build the docker image
docker build -t bootstomp .
# run the docker image (if you need, use proper options to have persistent changes or shared files)
docker run -it bootstomp

# now you are inside a docker container
cd BootStomp
# run BootStomp's taint analysis on one of the examples
# this will take about 30 minutes
python taint_analysis/bootloadertaint.py config/config.huawei
# the last line of the output will be something like:
# INFO    | 2017-10-14 01:54:10,617 | _CoreTaint | Results in /tmp/BootloaderTaint_fastboot.img_.out

# you can then "pretty print" the results using:
python taint_analysis/result_pretty_print.py /tmp/BootloaderTaint_fastboot.img_.out

The output should be something like this:

...
17)
===================== Start Info path =====================
Dereference address at: 0x5319cL
Reason: at location 0x5319cL a tainted variable is dereferenced and used as address.
...
Tainted Path 
----------------
0x52f3cL -> 0x52f78L -> 0x52f8cL -> 0x52fb8L -> 0x52fc8L -> 0x52fecL -> 0x53000L -> 0x53014L -> 0x5301cL -> 0x53030L -> 0x53044L -> 0x53050L -> 0x5305cL -> 0x53068L
===================== End Info path =====================
# Total sinks related alerts: 5
# Total loop related alerts: 8
# Total dereference related alerts: 4

Run BootStomp manually

Automatic detection of taint sources and sinks

  1. Load the boot-loader binary in IDA (we used v6.95). Depending on the CPU architecture of the phone it has been extracted from, 32 bit or 64 bit IDA is needed.
  2. From the menu-bar, run File => Script file => find_taint.py
  3. Output will appear in the file taint_source_sink.txt under the same directory as the boot-loader itself.

Configuration file

Create a JSON configuration file for the boot-loader binary (see examples in config/), where:

  • bootloader: boot-loader file path
  • info_path: boot-loader source/sink info file path (i.e., taint_source_sink.txt )
  • arch: architecture's number of bits (available options are 32 and 64)
  • enable_thumb: consider thumb mode (when needed) during the analysis
  • start_with_thumb: starts the analysis with thumb mode enabled
  • exit_on_dec_error: stop the analysis if some instructions cannot be decoded
  • unlock_addr: unlocking function address. This field is necessary only for finding insecure state storage vulnerabilities.

Finding memory corruption vulnerabilities

Run

python bootloadertaint.py config-file-path

Results will be stored in /tmp/BootloaderTaint_[boot-loader].out, where [boot-loader] is the name of the analyzed boot-loader. Note that paths involving loops might appear more than once.

Finding insecure state storage vulnerability

Run

python unlock_checker.py config-file-path

Results will be stored in /tmp/UnlockChecker_[boot-loader].out, where [boot-loader] is the name of the analyzed boot-loader. Note that paths involving loops might appear more than once.

Checking results

To check BootStomp results, use the script result_pretty_print.py, as follows:

python result_pretty_print.py results_file

Exploit for CVE-2017-2729

Other references

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].