EN
ENNA

Unicorn Engine

GPL-2.0

๐Ÿงฌ Reverse Engineering ยท C

Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU. It provides a clean API for emulating machine code across x86 (16/32/64-bit), ARM, ARM64, MIPS, SPARC, and M68K architectures. Unlike full system emulators, Unicorn focuses purely on CPU instruction emulation - no OS, no hardware peripherals - which makes it fast and embeddable. Security researchers use Unicorn to emulate specific code snippets (like unpacking routines, decryption functions, or shellcode) without executing them on real hardware, making it invaluable for malware analysis, fuzzing, and binary instrumentation. Unicorn provides hooks for memory access, code execution, and interrupts, allowing fine-grained observation and control of emulated code. Bindings exist for Python, Java, Go, Rust, Ruby, and many other languages.

8.9kstars
1.5kforks
170issues
Updated 1mo ago

Installation

pip (Python)

$ pip install unicorn

brew (macOS)

$ brew install unicorn

from source

$ git clone https://github.com/unicorn-engine/unicorn && cd unicorn && mkdir build && cd build && cmake .. && make

Use Cases

  • Emulating shellcode and unpacking routines for malware analysis
  • Running encryption/decryption functions extracted from binaries in isolation
  • Building custom fuzzers that emulate target code without full OS overhead
  • Instrumenting binary code with hooks on memory access and instruction execution
  • Cross-architecture code emulation for firmware and embedded system analysis

Tags

emulatorcpuqemushellcodefuzzingmulti-archarmarm64cpu-emulatorframeworkm68kmipspowerpcreverse-engineeringriscvs390xsecuritysparcsystemztricorex86x86-64

Alternatives & Comparisons

More in Reverse Engineering