GithubHelp home page GithubHelp logo

icscac's Introduction

Instruction Counting Side Channel Analysis Cheese

A Python script inspired by https://github.com/ChrisTheCoolHut/PinCTF and the like.

It provides easy to use methods of side-channel analysis of binaries by counting instructions. It offers three backends: perf, pin and qemu. pin uses the Intel PIN framework and gives very exact but very slow results. For most binaries the small inaccuracies of perf will not have an effect on the result. qemu is often the best of two worlds with much better performance than pin and very exact results.

Example:

Just the Check Please from PlaidCTF 2023

python3 -m icscac --arg --brute-length -- ./icscac/examples/check @@

length=0 inscount=255635
length=1 inscount=255685
length=2 inscount=255365
...
length=15 inscount=255413
length=16 inscount=30191787
length=17 inscount=255486
...
length=31 inscount=255880
most_instrs=30191787 best_length=16

python3 -m icscac --arg --brute-all -l 16 -- ./icscac/examples/check @@

instr_count=30191457 '0AAAAAAAAAAAAAAA'
instr_count=30191346 '1AAAAAAAAAAAAAAA'
instr_count=30192062 '2AAAAAAAAAAAAAAA'
...
instr_count=40089999 'wat3rT1ghT-bl}z3'
instr_count=40090186 'wat3rT1ghT-bl~z3'

best_idx=13 best_char='A'
found input wat3rT1ghT-blAz3

icscac's People

Contributors

theblupper avatar

Stargazers

 avatar Martin Wennberg 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.