All Projects → lifting-bits → Microx

lifting-bits / Microx

Licence: apache-2.0
Safely execute an arbitrary x86 instruction

Projects that are alternatives of or similar to Microx

IBMulator
The IBM PS/1 emulator.
Stars: ✭ 62 (-48.33%)
Mutual labels:  emulator, x86
FEX
A fast usermode x86 and x86-64 emulator for Arm64
Stars: ✭ 650 (+441.67%)
Mutual labels:  emulator, x86
qemu-android-x86-runner
Quick Start on How to Run Android x86 in QEMU
Stars: ✭ 102 (-15%)
Mutual labels:  emulator, x86
V86
x86 virtualization in your browser, recompiling x86 to wasm on the fly
Stars: ✭ 12,765 (+10537.5%)
Mutual labels:  x86, emulator
Dustbox Rs
DOS emulator (work in progress)
Stars: ✭ 34 (-71.67%)
Mutual labels:  x86, emulator
x86e
A simple x86 emulator, debugger, and editor in JavaScript.
Stars: ✭ 89 (-25.83%)
Mutual labels:  emulator, x86
emu
cybozu labs youth 7th
Stars: ✭ 50 (-58.33%)
Mutual labels:  emulator, x86
Pcjs
The original IBM PC and other machine emulations in JavaScript
Stars: ✭ 171 (+42.5%)
Mutual labels:  x86, emulator
Bddisasm
bddisasm is a fast, lightweight, x86/x64 instruction decoder. The project also features a fast, basic, x86/x64 instruction emulator, designed specifically to detect shellcode-like behavior.
Stars: ✭ 540 (+350%)
Mutual labels:  x86, emulator
Unicorn
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, X86)
Stars: ✭ 4,934 (+4011.67%)
Mutual labels:  x86, emulator
ts-c99-compiler
ANSI C 16bit Compiler + NASM Assembler + Intel 8086 / 80186 + X87 emulator written entirely in TypeScript
Stars: ✭ 78 (-35%)
Mutual labels:  emulator, x86
I8086.js
16bit Intel 8086 / 80186 + X87 emulator written in TypeScript with REPL assembly compiler and tiny C compiler
Stars: ✭ 54 (-55%)
Mutual labels:  x86, emulator
Dosbox Staging
DOS/x86 emulator focusing on ease of use
Stars: ✭ 412 (+243.33%)
Mutual labels:  x86, emulator
Emu
cybozu labs youth 7th
Stars: ✭ 51 (-57.5%)
Mutual labels:  x86, emulator
Bap
Binary Analysis Platform
Stars: ✭ 1,385 (+1054.17%)
Mutual labels:  x86, emulator
Leash
Browser Shell
Stars: ✭ 108 (-10%)
Mutual labels:  emulator
Nuked Opn2
Cycle-accurate Yamaha YM3438(YM2612) emulator
Stars: ✭ 115 (-4.17%)
Mutual labels:  emulator
Jingos
JingOS - The World’s First Linux-based OS design for Tablets
Stars: ✭ 101 (-15.83%)
Mutual labels:  x86
X64dbg
An open-source x64/x32 debugger for windows.
Stars: ✭ 37,825 (+31420.83%)
Mutual labels:  x86
Xray 16
Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. Join OpenXRay! ;)
Stars: ✭ 1,806 (+1405%)
Mutual labels:  x86

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 .
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].