Giter Site home page Giter Site logo

crypto-sat-solve's Introduction

Mifare Crypto1 algebraic attack using SAT solver

Python module to solve for Mifare classic 48bit key using a single successful sniffed transaction.
This attack requires no dependencies on implementation and typically completes in less than a minute
on a modern PC.

NOTE: For anyone concerned this is breaking security a direct attack has been available for sometime that is magnitudes faster than this SAT solver attack: https://github.com/RfidResearchGroup/proxmark3/blob/master/tools/mfkey/mfkey64.c

Inputs - Single sniffed authentication

  • UID, Nt (plaintext UID and card nonce)
  • enc_nr, enc_ar, enc_at

Compiling

sudo apt-get install libboost-all-dev cmake zlib1g-dev
sudo python3 -m pip install numpy matplotlib pylfsr pycryptosat
git clone [email protected]:tinylabs/crypto-sat-solve.git
cd crypto-sat-solve
git submodule update
cd grainofsalt/build
cmake ../
make -j
cd ../..

Sample usage

time ./Crypto1.py 
key=0x4fd7605e1ce5
uid=0x7a39c16f nt=0x35ecd241 nr=0x4317ee49
0x7c 0x7f 0x52 0xf3 0x68 0x7 0x96 0x75 
0x5b 0xda 0xa 0x41 
===================
Recovering key with algebraic attack...
Key=0x4fd7605e1ce5

real    0m10.304s
user    0m20.684s
sys     0m0.796s

Papers

crypto-sat-solve's People

Contributors

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