Kali Linux

Maat : Open-source Symbolic Execution Framework

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

  • Fast & Portable: Designed to scale to real-world applications. Fully written in C++ for good runtime performance. There are hardly any runtime dependencies, and most of them are optional
  • User-friendly: Maat has a flexible debugger-like API, and its features are configurable to adapt to many different use-cases. As any self-respecting modern framework, it comes with Python bindings
  • Multi-arch: With lifting and emulation based on Ghidra’s awesome sleigh library, Maat has the potential to emulate many architectures, including exotic ones

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()

R K

Recent Posts

Install Asterisk on Ubuntu 18.04: Source Build and Secure Config

Asterisk is the most widely deployed open-source PBX (Private Branch Exchange) platform in the world. It…

15 hours ago

Install Ghost on Ubuntu 18.04: Node.js, MySQL, and Nginx SSL

Ghost is an open-source publishing platform built on Node.js. It is designed for bloggers, journalists, and…

15 hours ago

Install Mattermost on Ubuntu 18.04: Nginx SSL Reverse Proxy Setup

Mattermost is an open-source, self-hosted team messaging platform and a direct alternative to Slack. It is…

15 hours ago

Install Ruby on Ubuntu 18.04: apt, Rbenv, and RVM Methods

Ruby is a dynamic, open-source programming language known for its clean, readable syntax. It powers the…

15 hours ago

Install PyCharm on Ubuntu 18.04: Community Edition via Snap

PyCharm is a full-featured Python IDE developed by JetBrains. It includes built-in debugging, embedded Git control,…

16 hours ago

Install PHP on Ubuntu 26.04: Apache, Nginx, and Multiple Versions

PHP 8.5 is included in Ubuntu 26.04's default repositories and is the recommended version for…

3 days ago