Giter Site home page Giter Site logo

binaryanalysisplatform / qemu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qemu/qemu

9.0 7.0 12.0 445.4 MB

Official QEMU mirror

License: Other

Makefile 0.12% C 79.30% C++ 13.14% Haxe 0.39% Objective-C 0.09% Assembly 0.51% Python 3.84% NSIS 0.01% Shell 1.66% Perl 0.30% GDB 0.01% Emacs Lisp 0.01% Dockerfile 0.01% Meson 0.44% Pawn 0.02% SmPL 0.03% SourcePawn 0.08% GLSL 0.01% Vim Script 0.01% POV-Ray SDL 0.06%

qemu's Introduction

Overview

Qemu tracer - a tracer based on qemu project. It executes a binary executable and saves trace data using Protocol Buffer format. The contents of the trace data is defined in bap-frames project.

Installing released binaries

If you don't want to mess with the source and building, then you can just dowload a tarball with prebuilt binaries. Look at the latest release and it might happen, that we have built binaries for your linux distribution, if it is not the case, then create an issue, and we will build it for you.

Let's pretend, that you're using Ubuntu Trusty, and install it. First download it with your favorite downloader:

wget https://github.com/BinaryAnalysisPlatform/qemu/releases/download/v2.0.0-tracewrap-2.0.0-rc1/qemu-tracewrap-ubuntu-14.04.4-LTS.tgz

Install it in the specified prefix with a command like tar -C <prefix> -xf qemu-tracewrap-ubuntu-14.04.4-LTS.tgz, e.g., to install in your home directory:

tar -C $HOME -xf qemu-tracewrap-ubuntu-14.04.4-LTS.tgz

Build

Preparation

Note: the instructions assume that you're using Ubuntu, but it may work on other systems, that uses apt-get.

Before building the qemu-tracewrap, you need to install the following packages:

  • qemu build dependencies
  • autoconf, libtool, protobuf-c-compiler
  • piqi library

To install qemu build dependencies, use the following command

$ sudo apt-get --no-install-recommends -y build-dep qemu

To install autoconf, libtool, protobuf-c-compiler, use the following command

$ sudo apt-get install autoconf libtool protobuf-c-compiler

To install piqi library with opam, use the following command

$ opam install piqi

Building

Download bap-frames with following command

$ git clone https://github.com/BinaryAnalysisPlatform/bap-frames.git

Download qemu tracer with following command

$ git clone [email protected]:BinaryAnalysisPlatform/qemu.git

Change folder to qemu and build tracer:

$ cd qemu
$ ./configure --prefix=$HOME --with-tracewrap=<absolute-path-to>/bap-frames --target-list=arm-linux-user
$ ninja -C build
$ ninja -C build install

Usage

To run executable exec compiled for arch, use qemu-arch exec command, e.g., qemu-x86_64 /bin/ls. It will dump the trace into ls.frames file. You can configure the filename with -tracefile option, e.g., qemu-arm -tracefile arm.ls.frames ls

Hints: use option -L to set the elf interpreter prefix to 'path'. Use fetchlibs.sh to download arm and x86 libraries.

Notes

Only ARM target is supported in this branch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.