Code Monkey home page Code Monkey logo

z3_and_angr_binary_analysis_workshop's Introduction

Intro to Binary Analysis with Z3 and angr

Originally delivered by Sam Brown at Steelcon and hack.lu 2018, this was a three hour workshop introducing attendees to using Z3 and angr for binary analysis. The workshop provided an introduction to SMT solvers, the Z3 SMT solver and its python library and the angr binary analysis framework.

Through out the workshop exercises were provided which aimed to demonstrate potential applications of the technology to assist security researchers in carrying out reverse engineering and vulnerability research.

The slides provide a rough guide for the content and what order to try the exercises in.

Examples and Exercises

Z3

Name Type Description
N Queens Example 'How can N queens be placed on an NxN chessboard so that no two of them attack each other?' Uses Z3 to generate solutions for an N * N chessboard
Hackvent 15 Example Solution and walk through for solving a Hackvent 15 CTF challenge with Z3
Sudoku Exercise Try to solve Sudoku using Z3
RNG Exercise Optional exercises - using Z3 to find non-cryptographically secure random number generators seed value
x86 50/50 Half examples, half DIY - implement simiplified versions of x86 instructions using Z3
Opaque Predicates Exercise Use the instructions implemented previously to identify Opaque Predicates in small sequences of assembly instructions
Equivalence Checking Example Use the instructions implemented previously to identify equivalent sequences of instructions

angr

Name Type Description
opaque_predicates Example Using angr to identify opaque predicates with much less work :)
IOCTLs Example Identify Windows driver IOCTL codes using angr
Hello World 50/50 Exercise and walkthrough on using angr to generate valid arguments for a simple 'License Key Validator'
Bomb Lab Exercise DIY exercise using angr to solve a 'Bomb lab'

Setup

All code is in Python3 and you should only need to install the angr binary analysis framework.

mkvirtualenv --python=$(which python3) angr && python -m pip install angr
workon angr 

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.