GithubHelp home page GithubHelp logo

isabella232 / periscope-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from securesystemslab/periscope

0.0 0.0 0.0 139 KB

Shell 0.20% C++ 5.23% Python 22.39% C 70.05% Go 1.13% Makefile 1.00%

periscope-1's Introduction

PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS Boundary

Setup

Prerequisites

  • An AArch64 toolchain
  • Android platform tools: adb and fastboot
  • Python and dependent packages: invoke and prettytable
  • Go and Syzkaller packages

Building and flashing boot image

  • Get kernel source code and apply our patches

  • Make sure to have the following config options set

    CONFIG_KCOV=y
    CONFIG_HWIOTRACE=y
    CONFIG_HWIOFUZZ=y
    CONFIG_KHWIO_MMIO=y
    CONFIG_KHWIO_STREAMING_DMA=y
    CONFIG_KHWIO_CONSISTENT_DMA=y
    
  • Build the kernel and create a boot image, and flash it

Building executor and fuzzer (AFL)

make executor fuzzer

# Push executables to the target device
python host/cli.py push --executables

Monitoring and seed generation

# enable tracing
python host/cli.py monitor --enable
python host/cli.py monitor --status # should return "enabled"

# enable probes
python host/cli.py monitor --list-probes
python host/cli.py monitor --activate <CTX_ID>
# enable monitoring for active probes for the specified duration
python host/cli.py monitor --trace <MONITOR_SEC>

# check trace_pipe in $PWD
python host/cli.py monitor --parse trace_pipe --generate-seed <SEED_DIR>
python host/cli.py push --seed <SEED_DIR>

Starting automated fuzzing

# create CONFIG_FILE for your needs (see default.cfg)
python host/manager.py --config <CONFIG_FILE>

Starting AFL manually

adb shell

# setup necessary dirs and provide some seed

AFL_NO_ARITH=1 AFL_FAST_CAL=1 AFL_NO_FORKSRV=1 AFL_SKIP_CPUFREQ=1 \
  /data/local/tmp/fuzzer -i /data/local/tmp/seed -o /data/local/tmp/out -t 500000+ /data/local/tmp/executor @@

Diagnosing crashes

python host/cli.py diagnose --last-crash

Citing our paper

@inproceedings{song2019periscope,
  title =        {{PeriScope}: An Effective Probing and Fuzzing Framework for
                  the Hardware-{OS} Boundary},
  author =       {Song, Dokyung and Hetzelt, Felicitas and Das, Dipanjan and
                  Spensky, Chad and Na, Yeoul and Volckaert, Stijn and Vigna,
                  Giovanni and Kruegel, Christopher and Seifert, Jean-Pierre and
                  Franz, Michael},
  booktitle =    {Network and Distributed System Security Symposium (NDSS)},
  year =         {2019}
}

periscope-1's People

Contributors

dokyungs avatar file-citas 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.