A comprehensive binary emulation platform.
Project description
Zelos
Zelos (Zeropoint Emulated Lightweight Operating System) is a python-based binary emulation platform. One use of zelos is to quickly assess the dynamic behavior of binaries via command-line or python scripts. All syscalls are emulated to isolate the target binary. Linux x86_64 (32- and 64-bit), ARM and MIPS binaries are supported. Unicorn provides CPU emulation.
Full documentation is available here.
Installation
Use the package manager pip to install zelos.
pip install zelos
Basic Usage
Command-line
To emulate a binary with default options:
$ zelos my_binary
To view the instructions that are being executed, add the -v
flag:
$ zelos -v my_binary
You can print only the first time each instruction is executed, rather than every execution, using --fasttrace
:
$ zelos -v --fasttrace my_binary
By default, syscalls are emitted on stdout. To write syscalls to a file instead, use the --strace
flag:
$ zelos --strace path/to/file my_binary
Specify any command line arguments after the binary name:
$ zelos my_binary arg1 arg2
Programmatic
import zelos
z = zelos.Zelos("my_binary")
z.start(timeout=3)
Plugins
Zelos supports first- and third-party plugins. Some notable plugins thus far:
- overlay (ida plugin): highlights
zelos
execution trace in IDA with instruction-level comments added. - angr integration: enables symbolic execution in
zelos
. - zdbserver: remote control and debugging of emulated binaries.
- syscall limiter: demonstrates event hooking and provides syscall-based execution and termination options.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Local Development Environment
First, create a new python virtual environment. This will ensure no package version conflicts arise:
$ python3 -m venv ~/.venv/zelos
$ source ~/.venv/zelos/bin/activate
Now clone the repository and change into the zelos
directory:
(zelos) $ git clone git@github.com:zeropointdynamics/zelos.git
(zelos) $ cd zelos
Install an editable version of zelos into the virtual environment. This makes import zelos
available, and any local changes to zelos will be effective immediately:
(zelos) $ pip install -e '.[dev]'
At this point, tests should pass and documentation should build:
(zelos) $ pytest
(zelos) $ cd docs
(zelos) $ make html
Built documentation is found in docs/_build/html/
.
Install zelos pre-commit hooks to ensure code style compliance:
(zelos) $ pre-commit install
In addition to automatically running every commit, you can run them anytime with:
(zelos) $ pre-commit run --all-files
Windows Development:
Commands vary slightly on Windows:
C:\> python3 -m venv zelos_venv
C:\> zelos_venv\Scripts\activate.bat
(zelos) C:\> pip install -e .[dev]
License
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Version 0.1.0] - 2020-05-29
Added
- Plugins: IDA overlays, remote debug server
- Additional plugin APIs
Changed
- Minor syscall emulation improvements
- Memory management overhaul
Removed
- N/A
[Version 0.0.1] - 2020-03-03
Added
- N/A
Changed
- Updated documentation
Removed
- N/A
[Version 0.0.0] - 2020-03-02
Initial public release.
Added
- Initial open source commit.
Changed
- N/A
Removed
- N/A
The Core Zelos Team
- Kevin Valakuzhy - Research Engineer, Developer
- Ryan C. Court - Research Engineer, Developer
- Kevin Z. Snow - Co-Founder, Developer
Special Thanks To
- Fabian Monrose - Co-Founder
- Ann Cox - DHS Program Manager
- Angelos Keromytis - DARPA Program Manager (Former)
- Dustin Fraze - DARPA Program Manager
- Suyup Kim - Intern
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zelos-0.1.0.tar.gz
.
File metadata
- Download URL: zelos-0.1.0.tar.gz
- Upload date:
- Size: 12.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edbfddd87a4d098a01a7e72ec1239794ced08cb3f647bbea90c899d003074cc7 |
|
MD5 | 06994de6e20553c0db02a8e98a67f2ab |
|
BLAKE2b-256 | f908ec7aee5548cb9eef103d401bfb4262371b8e6802cbd5c52d481411d72c18 |
File details
Details for the file zelos-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: zelos-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 12.1 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6e0dd8cefa235549bbb74f18bda72ca03ebe552d40145a610a3ccdb33d1f12a |
|
MD5 | 7f8f71397d6653bf80276bca21c28545 |
|
BLAKE2b-256 | f0fb79bb3d60e7a0bbe307c965074e91ff625c387594a3510759b8edfac1d59e |