Home

Awesome

<p align="center" > <br><br> <img width="45%" src="resources/maat_logo.png"/> <br> <!-- TODO <img src="https://img.shields.io/badge/License-MIT-green" alt="License: MIT"> &nbsp; &nbsp; <img src="https://img.shields.io/badge/Build-Linux-green" alt="Build: Linux"> &nbsp; &nbsp; <img src="https://img.shields.io/badge/Version-v0.2-green" alt="Version: 0.2"> &nbsp; &nbsp; <a href="http://maat.re"><img src="https://img.shields.io/badge/Website-maat.re-blue" alt="Website: maat.re"></a> --> <br> <br> <br> </p>

About

Maat is an open-source Dynamic Symbolic Execution and Binary Analysis framework. It provides various functionalities such as symbolic execution, taint analysis, constraint solving, binary loading, environment simulation, and leverages Ghidra's sleigh library for assembly lifting: https://maat.re

Key features:

Getting started

Installation

To install Maat's python module:

python3 -m pip install pymaat

To install Maat's native SDK and use the C++ API, check out BUILDING.md

Example

from maat import *

# Create a symbolic engine for Linux X86-32bits
engine = MaatEngine(ARCH.X86, OS.LINUX)

# Load a binary with one command line argument
engine.load("./some_binary", BIN.ELF32, args=[engine.vars.new_symbolic_buffer("some_arg", 20)])

# Get current eax value
engine.cpu.eax

# Read 4 bytes at the top of the stack
engine.mem.read(engine.cpu.esp, 4)

# Set a callback displaying every memory read
def show_mem_access(engine):
    mem_access = engine.info.mem_access
    print(f"Instruction at {engine.info.addr} reads {mem_access.size} bytes at {mem_access.addr}")

engine.hooks.add(EVENT.MEM_R, WHEN.BEFORE, callbacks=[show_mem_access])

# Take and restore snapshots
snap = engine.take_snapshot()
engine.restore_snapshot(snap)

# Run the binary
engine.run()

Contact

For general discussions, questions and suggestions, we use Github Discussions

For reporting issues and bugs, please use Github Issues

For anything else, drop an e-mail at boyan.milanov@trailofbits.com