GithubHelp home page GithubHelp logo

petite-mort's Introduction

Petite Mort

These are a set of ChipWhisperer scripts for glitching bootrom on Vita.

Usage

Copy the scripts to scripting-examples in your ChipWhisperer installation. Then open a shell in that directory and run the script manually.

Parameters

In each script, there are a number of constants you can change to tune the glitching. They are currently set to known working parameters.

Name Description
CW_SYSCLK_FREQ CW system clock frequency. You shouldn't change this unless you know what you're doing.
VITA_CLK_FREQ Vita clock input, CW extclkgen output frequency.
VITA_UART0_BAUD UART baud rate, this should change when VITA_CLK_FREQ changes.
MIN_OFFSET Starting offset from trigger in units of extclkgen cycles.
MAX_OFFSET Upper bound offset from trigger in units of extclkgen cycles.
OFFSET_STEP Offset stride in units of extclkgen cycles for search.
MIN_WIDTH Starting width of glitch in units of extclkgen cycles.
MAX_WIDTH Upper bound width of glitch in units of extclkgen cycles.
WIDTH_STEP Width stride in units of extclkgen cycles for search.
POWER_ON_HOLD Number of seconds to hold power button on reset in seconds. (N/A to all script)
GLITCH_FIND_TIMEOUT Timeout in 1/10 seconds of MMC traffic idle
PAYLOAD_TIMEOUT Timeout in 1/10 seconds of UART idle (after glitch successful)
VERBOSE Verbose logging

Scripts

Size Check Overflow

Usage: python2 vita-petite-mort.py [output.bin] where output.bin is an optional file to dump serial output to.

This script requires an MBR with offset 0x30 pointing to 0x8000 and offset 0x34 having a value > 0xE1. Your payload should have jmp instructions past offset 0x1c000 (in bytes) to your code and be flashed to block 0x8000 for 0x100 blocks.

Exception Handler

Usage: python2 vita-petite-mort-exception.py [output.bin] where output.bin is an optional file to dump serial output to.

This script requires an MBR with offset 0x30 pointing to your payload at block 0x8000 and offset 0x34 having a value <= 0xE1 (to pass size check). You should fill the first 0x20 bytes of the payload with jmp instructions to your code.

tzpwn

Usage: python2 vita-petite-mort-tzpwn.py [output.bin] where output.bin is an optional file to dump serial output to.

This script requires tzpwn installed and auto-booted into with ensō. tzpwn will call secure_kernel.enp loading which copies in 0x40 bytes and overwrite the exception vectors. This script will then try to cause an exception.

Deux

Usage: python2 vita-petite-mort-deux.py

This script performs a double-glitch. First on reset and then on the size check overflow (see above for requirements). P1_ and P2_ parameters determines the settings for each glitch.

Exception Deux

Usage: python2 vita-petite-mort-exception-deux.py

Same as Deux but using the exception handler method.

Manual

Usage: vita-petite-mort-manual.py [output.bin] where output.bin is an optional file to dump serial output to.

Not tested working. This script waits for second_loader to finish and then manually trigger a number of glitches. Do not use this, use the tzpwn version instead.

petite-mort's People

Watchers

 avatar

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.