Find details on the design & implementation of Unicorn in this BlackHat USA 2015 slides.
Compile & install Unicorn
There are several methods to compile and install Unicorn.
1. From source code
2. From repositories
This section explains how to install Unicorn on *nix platforms from some software repositories.
2.1 Mac OSX - core engine
Homebrew users can install the core of Unicorn with:
Note that Homebrew installs libraries into its own directory, so you need to tell applications where to find them, for example with:
2.2 Pkgsrc - core engine
Unicorn has been packaged for pkgsrc, thus available for NetBSD, FreeBSD, Bitrig and OpenBSD.
Installation from binary pre-built packages with:
Installation from sources with:
3. Python binding
The easiest way to install Python binding is via pip, where packages for all the Operating Systems, including Windows, are provided. Simply run the below command from prompt (you need sudo on Linux, MacOS for root access).
If you want to install from source, note that Python binding depends on the core, so make sure to install the core before you can use this binding.
On *nix platforms, do:
On Windows, do:
For Windows, after above steps, you need to copy all the DLL files from the Windows core engine in the Download section into directory *C:\locationtopython\Lib\site-packages\unicorn*.
4. Precompiled binaries
At the moment precompiled binaries for Windows & Java are available in our Download section.
If you only want to write your tool in Python, all you need is the Python installer, which includes full Unicorn module. The Windows core engine is not necessary because it is already embedded inside the Python module.
For all the bindings, firstly you still need to install the Windows core engine, which includes the static/dynamic libraries and also the headers (*.h) for C programming.
Java binding is available in JAR package.
After installation, find in tutorials below how to write your tools based on Unicorn using your favorite programming languages.
Unicorn: next generation CPU emulator framework: Blackhat USA 2015 slides (PDF).
Beyond QEMU: A quick technical comparison of Unicorn and QEMU.
Micro-Unicorn-Engine-API-Documentation in Chinese: This API Documentation is simple, it is currently available in Chinese only. This document analyzes Unicorn's data types, apis, and related code implementations.