All Projects → beehive-lab → Mambo

beehive-lab / Mambo

Licence: apache-2.0
A low-overhead dynamic binary instrumentation and modification tool for ARM (now with both AArch32 and AArch64 support)

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Mambo

GVProf
GVProf: A Value Profiler for GPU-based Clusters
Stars: ✭ 25 (-87.44%)
Mutual labels:  instrumentation, binary-analysis
instrumentation
Assorted pintools
Stars: ✭ 24 (-87.94%)
Mutual labels:  instrumentation, binary-analysis
Dynamorio
Dynamic Instrumentation Tool Platform
Stars: ✭ 1,828 (+818.59%)
Mutual labels:  instrumentation, binary-analysis
Gordon
Android Test Runner
Stars: ✭ 148 (-25.63%)
Mutual labels:  instrumentation
Appmetrics
App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
Stars: ✭ 1,986 (+897.99%)
Mutual labels:  instrumentation
Coverlet
Cross platform code coverage for .NET
Stars: ✭ 2,303 (+1057.29%)
Mutual labels:  instrumentation
Replica
Ghidra Analysis Enhancer 🐉
Stars: ✭ 194 (-2.51%)
Mutual labels:  binary-analysis
Triton
Triton is a Dynamic Binary Analysis (DBA) framework. It provides internal components like a Dynamic Symbolic Execution (DSE) engine, a dynamic taint engine, AST representations of the x86, x86-64, ARM32 and AArch64 Instructions Set Architecture (ISA), SMT simplification passes, an SMT solver interface and, the last but not least, Python bindings.
Stars: ✭ 1,934 (+871.86%)
Mutual labels:  binary-analysis
Detect It Easy
Program for determining types of files for Windows, Linux and MacOS.
Stars: ✭ 2,982 (+1398.49%)
Mutual labels:  binary-analysis
Opencensus Web
A stats collection and distributed tracing framework
Stars: ✭ 168 (-15.58%)
Mutual labels:  instrumentation
Fuzzfactory
Domain-Specific Fuzzing with Waypoints
Stars: ✭ 167 (-16.08%)
Mutual labels:  instrumentation
Z3 and angr binary analysis workshop
Code and exercises for a workshop on z3 and angr
Stars: ✭ 154 (-22.61%)
Mutual labels:  binary-analysis
Frida Boot
Frida Boot 👢- A binary instrumentation workshop, with Frida, for beginners!
Stars: ✭ 179 (-10.05%)
Mutual labels:  instrumentation
Govector
Vector clock logging library for Go
Stars: ✭ 148 (-25.63%)
Mutual labels:  instrumentation
Gtirb
Intermediate Representation for Binary analysis and transformation
Stars: ✭ 190 (-4.52%)
Mutual labels:  binary-analysis
Devtools Frontend
The Chrome DevTools UI
Stars: ✭ 2,189 (+1000%)
Mutual labels:  instrumentation
Client python
Prometheus instrumentation library for Python applications
Stars: ✭ 2,500 (+1156.28%)
Mutual labels:  instrumentation
Mcsema
Framework for lifting x86, amd64, aarch64, sparc32, and sparc64 program binaries to LLVM bitcode
Stars: ✭ 2,198 (+1004.52%)
Mutual labels:  binary-analysis
Caliper
Caliper is an instrumentation and performance profiling library
Stars: ✭ 162 (-18.59%)
Mutual labels:  instrumentation
Brave
Java distributed tracing implementation compatible with Zipkin backend services.
Stars: ✭ 2,117 (+963.82%)
Mutual labels:  instrumentation

MAMBO: A Low-Overhead Dynamic Binary Modification Tool for ARM

News

  • 2021-02-24 PhD opportunities related to MAMBO and security available. If interested, contact mikel.lujan at manchester.ac.uk with the subject APT MAMBO PhD [your surname]
  • 2020-02-22: We've presented our CC paper about MAMBO's API (see Publications and Plugin API below) and the cachesim (an online cache simulator) and memcheck (a memory error checker) plugins. The slides are available here.
  • 2018-04-11: We've presented our ICPE paper. The slides are available here.
  • 2018-01-23: We've ran a tutorial on using MAMBO's API at HiPEAC 2018. The slides are available here.
  • 2017-04-24: An address decoder for load and store instructions was added to the API: mambo_calc_ld_st_addr(). It allows plugin developers to automatically obtain the base address of all data memory accesses. This API function is available for all supported instruction sets: A32, T32, A64. Its usage is demonstrated in the plugins/mtrace.c plugin.
  • 2017-04-04: Significantly improved support for Linux signals was implemented.
  • 2017-04-03: The AArch64 port of MAMBO is officially released. The initial AArch64 porting was done by Guillermo Callaghan .
  • We have presented the TACO paper at HiPEAC 2017, on 25th of January. The slides are available here.

Publications

MAMBO was created as part of Cosmin's EPSRC-funded PhD in the School of Computer Science at the University of Manchester. MAMBO is currently being developed as part of the PAMELA EP/K008730/1 and DOME EP/J016330/1 EPSRC projects.

Status

MAMBO's compatibility with applications is continuously being improved as needed. We are using it on ARMv7 and ARMv8 systems. Our systems run the armhf / arm64 builds of Debian, Ubuntu and Arch Linux ARM. Most GNU/Linux applications work correctly. The following more complex applications and benchmark suites are working correctly under MAMBO on our systems (this is not an exhaustive list):

Also read the Known issues section below.

Build

Prerequisites: an ARM system (physical or virtual) to build and run MAMBO on; dependencies: gcc toolchain, libelf(-dev), ruby (>=1.9.1). Debian or Ubuntu users can install the required packages with sudo apt-get install build-essential libelf-dev ruby.

git clone --recurse-submodules https://github.com/beehive-lab/mambo.git
cd mambo
make

Usage

To launch an application under MAMBO, run:

./dbm <path_to_executable> [application's command line arguments]

For example to run ls -a under MAMBO, execute:

./dbm /bin/ls -a

Tip: When an application running under MAMBO exits, the string We're done; exiting with status: <APPLICATION'S EXIT CODE> will be printed to stderr.

Plugin API

The plugin API is event-driven. Plugins should use a init function with __attribute__((constructor)) to register themselves using mambo_register_plugin(). Once a plugin is registered, it can install callbacks for various events using the mambo_register_*_cb() functions. Callback-related functions are listed in api/plugin_support.h. Code generation functions are listed in api/emit_<INST SET>.h and code generation helpers are listed in api/helpers.h. You can also inspect the sample plugin in the plugins/ directory.

To build MAMBO with plugin support, uncomment the -DPLUGINS_NEW CFLAG in the makefile. Then, the source code or object file(s) of the plugin you're trying to build must be added to the PLUGINS= line in the makefile. Note that multiple plugins can be enabled at the same time (and will work correctly if properly designed). For performance reasons, it is recommended to remove unused plugins from the PLUGINS= list.

Known issues

  • There are two limitations related to signal handling: the data in the siginfo_t structure passed to SA_SIGINFO signal handlers is incorrect: most signals will appear to have been sent via kill() from the application itself; and synchronous signal (SIGSEGV, SIGBUS, SIGFPE, SIGTRAP, SIGILL, SIGSYS) handlers cannot sigreturn(), but can (sig)longjmp().
  • At the moment, code cache invalidation in response to the munmap and __cache_flush system calls are only done in the thread in which the system call is executed. This can potentially lead to execution of stale cached code in other threads.

Reporting bugs

If you think you have found a bug which is not in the list of Known issues, please report it here, on Github. However, note that we have limited time available to investigate and fix bugs which are not affecting the workloads we are using. Therefore, if you can't pinpoint the cause of the bug yourself, we ask that you provide as many details on how to reproduce it, and preferably provide a statically linked executable which triggers it.

Contributions

We welcome contributions. Use pull requests on Github. However, note that we are doing most development in a private git tree and we are working on a number of features which are not quite ready for public release. Therefore, we would strongly encourage you to get in touch before starting to work on anything large, to avoid duplication of effort. We can probably expedite our release of any WIP features you might be interested in, if you do that.

Sandboxing

Note that similarly to most other DBM / DBI frameworks and to optimise performance / development effort, MAMBO is not designed to secure itself against malicious activity from the application it is translating. This means that without hardening MAMBO itself, it would not be possible to use it to implement a secure sandbox.

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].