Git Product home page Git Product logo

falconre

Falconre is a python3 library using pyo3 to wrap:

  • Falcon - A binary analysis framework in Rust
  • Finch - A symbolic executor built on Falcon
  • Raptor - Higher order IR and analysis on top of Falcon

This is alpha-quality software.

What is this really?

This is me (endeav0r) hacking on Falcon and other things to try and automate different simple static analysis tasks.

Here are some things you can try:

Print out all the function calls in a program

git clone https://github.com/endeav0r/corpora
git clone https://github.com/falconre/falconre

# Build some example programs
pushd corpora
./build.sh
popd

# Build falconre in a Docker container
pushd falconre
docker build -t falconre .
# Watch youtube, this will take a few minutes
popd

docker run --rm -ti -v $(pwd):/opt falconre \
  python3 /opt/falconre/examples/print-calls.py \
  /opt/corpora/build/stack_buffer/vuln/one

Find trivial stack buffer overflows

# Run the example stack-writes.py script against a trivially vulnerable stack
# buffer overflow program.
docker run --rm -ti -v $(pwd):/opt falconre \
  python3 /opt/falconre/examples/stack-writes.py \
  /opt/corpora/build/stack_buffer/vuln/one

# Run the example stack-writes.py against a non-vulnerable version of the same
# program.
docker run --rm -ti -v $(pwd):/opt falconre \
  python3 /opt/falconre/examples/stack-writes.py \
  /opt/corpora/build/stack_buffer/not_vuln/one

Symbolically execute a toy amd64 assembly function

docker run --rm -ti -v $(pwd):/opt falconre \
  python3 /opt/falconre/examples/symex-one.py \
  /opt/corpora/build/symex/one

Print out DOT graph of Falcon IL

docker run --rm -ti -v $(pwd):/opt falconre \
  python3 /opt/falconre/examples/falcon-dot-graph.py \
  /opt/corpora/build/symex/one run | dot -Tpng -o /tmp/main.png

Installing

Docker

docker build -t falconre .

Natively on OSX

This is how I use falconre.

Install rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

You'll need this thing called "Rust nightly":

rustup toolchain install nightly
rustup default nightly

Get the dependencies

brew install z3 capstone

Install with setuptools

python3 setup.py install

If you don't want to install with setuptools, assuming you want to run the examples:

cargo build --release
cp target/release/libfalconre.dylib examples/falconre.so

Falcon Binary Analysis Framework's Projects

falcon icon falcon

Binary Analysis Framework in Rust

finch icon finch

Symbolic Execution over Falcon IL

owl icon owl

ROP-Gadget finder in Rust

raptor icon raptor

A Higher level IR over Falcon IL

raptor-gui icon raptor-gui

Gui code to view raptor projects with raptor-api

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.