Qemu tracer - tracer based on qemu project. It executes binary executable and saves trace data using Protocol Buffer format. The contents of the trace data defined in bap-traces project.
Note: building instructions assume that you're using Ubuntu, but it may work on other systems, that uses apt-get.
Before build qemu tracer, you need to install 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 autoconf libtool protobuf-c-compiler
To install piqi library with opam, use the following command
$ opam install piqi
Download bap-traces with following command
$ git clone https://github.com/BinaryAnalysisPlatform/bap-traces.git
Download qemu tracer with following command
$ git clone clone [email protected]:BinaryAnalysisPlatform/qemu.git -b tracewrap
Change folder to qemu and build tracer with command
$ ./configure --prefix=$HOME --with-tracewrap=`realpath ../bap-traces` \
--extra-ldflags=-Lprotobuf --target-list=arm-linux-user
$ make -C protobuf
$ make
$ make install
To run executable exec
and to save the trace data to exec.trace
, use
$ qemu-arm -tracefile exec.trace exec
Hints: use option -L to set the elf interpreter prefix to 'path'. Use fetchlibs.sh to download arm libraries.
Only ARM target is supported in this branch.