Skip to main content

microx - a micro execution framework

CI

Microx is a single-instruction "micro execution" framework. Microx enables a program to safely execute an arbitrary x86 or x86-64 instruction. Microx does not take over or require a process context in order to execute an instruction. It is easily embedded within other programs, as exampled by the Python bindings.

The microx approach to safe instruction execution of arbitrary instructions is to require the user of microx to manage machine state. Microx is packaged as a C++ Executor class that must be extended. The Python bindings also present a class, microx.Executor, that must be extended. A program extending this class must implement methods such as read_register and read_memory. When supplied with instruction bytes, microx will invoke the class methods in order to pull in the minimal requisite machine state to execute the instruction. After executing the instruction, microx will "report back" the state changes induced by the instruction's execution, again via methods like write_register and write_memory.

The following lists some use-cases of microx:

  • Speculative execution of code within a debugger-like system. In this scenario, microx can be used to execute instructions from the process being debugged, in such a way that the memory and state of the original program will be preserved.
  • Binary symbolic execution. In this scenario, which was the original use-case of microx, a binary symbolic executor can use microx to safely execute an instruction that is not supported or modelled by the symbolic execution system. The use of microx will minimize the amount of symbolic state that may need to be concretized in order to execute the instruction. Microx was used in this fashion in a Python-based binary symbolic executor. Microx comes with Python bindings for this reason.
  • Headless taint tracking. Taint tracking can be implemented with microx, much as it would be with Intel's PIN, but without a process context. Microx can be integrated into a disassembler such as IDA or Binary Ninja and used to execute instruction, performing taint tracking along the way.

Microx uses a combination of JIT-based dynamic binary translation and instruction emulation in order to safely execute x86 instructions. It is a 64-bit library, but it can execute 32-bit instructions that are not supported on 64-bit platforms. It can be easily embedded, as it performs no dynamic memory allocations, and is re-entrant.

Microx depends on Intel's XED instruction encoder and decoder.

Installing

Microx has Python bindings; you can install them via pip on macOS and Linux:

$ pip3 install microx

Building (Python)

If we don't supply a Python wheel for your platform, you can build microx yourself. You'll need at least Python 3.5.

First, build XED:

$ ./scripts/bootstrap.sh

Then, use setup.py build:

$ setup.py build

Building (C++)

Microx's C++ library can be built with CMake.

The CMake build uses XED_DIR to locate the XED library and headers.

To use the third_party XED build:

$ ./scripts/bootstrap.sh
$ export XED_DIR=$(pwd)/third_party

Then, run a normal CMake build:

mkdir build && cd build
cmake ..
cmake --build .

Metadata

Release files for microx 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for microx 1.4.1
File
microx-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
microx-1.4.1-cp310-cp310-macosx_10_15_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.15+ x86-64 Details
microx-1.4.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
microx-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.15+ x86-64 Details
microx-1.4.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
microx-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.15+ x86-64 Details
microx-1.4.1-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
microx-1.4.1-cp37-cp37m-macosx_10_15_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64 Details

Total release size: 14.0 MB

Release files / microx-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL microx-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f40483919bc32997e2cbe3e5453b12ec9d2991405d0634375a3409449c342af8
BLAKE2b-256 checksum
How to use checksums
f3b7987fccf6e77eb531fdef43856538da43830f741f1b5e56c7676fa525b46e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / microx-1.4.1-cp310-cp310-macosx_10_15_x86_64.whl

Download URL microx-1.4.1-cp310-cp310-macosx_10_15_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
565ff6bd983b1ec6f5cac59b13a745aa13fa58a8677fdbcfdac10de246516ce2
BLAKE2b-256 checksum
How to use checksums
80e34f06ff30fb60f453cdff622eb8f49f5f85a2586c2991e0764c5dc5a797f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / microx-1.4.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL microx-1.4.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.9 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
85bd566e09b57f2f8ffa5e021ca745140b282dc2c11eee8614cb3b3eee83e4c4
BLAKE2b-256 checksum
How to use checksums
cc1315f69d251dcab2403448f35a60f38d96f8945e6b98519076db82f674e970
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / microx-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl

Download URL microx-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl
Size 1.3 MB
Tags CPython 3.9 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
a240ef3492e0ab1f9cee410498987dd9ff18c57f64b89aa1e60630fd4aade129
BLAKE2b-256 checksum
How to use checksums
cf570970614078560e212f4982fa4f2249d9b47d383cff3b883e805e80872418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / microx-1.4.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL microx-1.4.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.8 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
aae1adfd1516906795c66d3bad0d974d1c01e6930782e4a99179a6550393cf45
BLAKE2b-256 checksum
How to use checksums
197d33cc4ea99b1fbe7b35de3a53cd5ab9fde4f06742cb55ef8894d23d55dbec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / microx-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl

Download URL microx-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl
Size 1.3 MB
Tags CPython 3.8 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
a9527759e4a07c18440fb17f890fcee2dc4457ec6e4df6755f09cc197c8d7f92
BLAKE2b-256 checksum
How to use checksums
769c112d1695da04fe7c3b9e8ebf3e56ef3be128b044c40051e14614d0e273a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / microx-1.4.1-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL microx-1.4.1-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5e7d5c775ce759914fe5bcc55f7ee2710dc61d6e0ac40c264dac22ff592cd085
BLAKE2b-256 checksum
How to use checksums
edf7cbe4d31723191a410f63cb57d3519ad51dfb4658df76f2c1d064d7987cc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / microx-1.4.1-cp37-cp37m-macosx_10_15_x86_64.whl

Download URL microx-1.4.1-cp37-cp37m-macosx_10_15_x86_64.whl
Size 1.3 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
a30d00935bd6192c88214772e20a0ed133605750ae0c9d77659de8378f6dc6f9
BLAKE2b-256 checksum
How to use checksums
351756e7083ee726bdd8b2ea176119b779b99b35af75d21ce61eeccedb2ecfc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page