Git Product home page Git Product logo

nrf52-glitcher's Introduction

Glitcher

Voltage Fault Injectionを行うESP32のプログラムです。

※自分自身が所有する機器にのみ使用してください。

Usage

ソースコードをコンパイルし、ESP32に書き込みます。

paranoia_modeについて

グリッチ間隔の値は、通常は1us単位で行われます。paranoia_modeを利用すると、ディレイ間隔が1usからおよそ25nsに切り替わります。このディレイはビジーウェイトで作り出しているため精度に揺らぎがあるかもしれません。解像度が40倍になるため、ディレイに関する各パラメータを調整してください。delay_startの値を40倍にすれば、ノーマルモードのときと同じディレイを発生させられるはずです。

Example

  ____  _  _  _         _
 / ___|| |(_)| |_  ___ | |__    ___  _ __
| |  _ | || || __|/ __|| '_ \  / _ \| '__|
| |_| || || || |_| (__ | | | ||  __/| |
 \____||_||_| \__|\___||_| |_| \___||_|    by @shutingrz

Serial terminal usage:
  help               Print this usage
  nrf                Voltage glitch for nrf

> nrf
switch nrf mode.

Serial terminal usage:
  help               Print this usage
  set <item> <value> set param
  exit               exit nrf mode
  show               show glitch options
  power <on|off>     Power on or off nRF.
  swd                SWD IDCODE check

You can set glitch option value with "set" command.
 Params: delay_start, delay_end, width_start, width_end, paranoia_mode
and can get current value with "show" command.

nrf> swd
SWD IDCODE: 0x00000064
UICR device type(0x10000100): 0x00000000
APPROTECT enabled.
SWD port locked.
nrf>
(..snip..)
nrf> set delay_start 2360
set: delay_start=2360
nrf> run
----------------
Glitch options:
  delay_start   : 2360
  width_start   : 0
  delay_end     : 2500
  width_end     : 10
  paranoia_mode : 0
----------------
Start glitch! Press any key to stop.
...........2361...........2362...........2363...........2364...........2365...........2366...........2367...........2368...........2369...........2370...........2371...........2372...........2373...........2374...........2375...........2376...........2377...........2378...........2379...........2380.......glitch success!
SWD Id: 0x2ba01477
UICR_LOCK: 0xffffff00
Flash size: 1048576

Connect your debugger to the SWD port and attach it!
nrf> swd

SWD IDCODE: 0x2ba01477
UICR device type(0x10000100): 0x00052840
APPROTECT disabled.
SWD port unlocked!
nrf>

Reference

This tool was inspired by atc1441/ESP32_nRF52_SWD

nrf52-glitcher's People

Contributors

shutingrz avatar

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.