WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

rmalmain/libvharness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libvharness

Libvharness is a cross-architecture and cross-platform library to create LibAFL QEMU compatible harnesses. It can be built for a large variety of target architectures, for different OSes, while sharing the same API. Two APIs are supported: LibAFL QEMU (lqemu) and Nyx.

Build

The usual stuff for cmake project:

mkdir build
cd build
cmake ..
make -j
cmake --install . --prefix <install_path>

Configuration

There are a few Cmake variables to modify to adapt the build to your needs.

  • CMAKE_TOOLCHAIN_FILE: points to one of the files in toolchains, to choose depending on the target arch.
  • VHARNESS_API: either lqemu or nyx, to choose the target API.

You may also have to configure the right compiler toolchain, using the usual cmake variables for that.

Usage

Once the build is done, <install_path> will contain 2 directories: include and lib.

  • lib: contains the static library to link with. Should be linked with your harness.
  • include: the include files to use. there are 2 files that should be interesting to include:
    • lqemu.h if using the LibAFL QEMU API.
    • nyx.h if using the Nyx API.

femtolibc

To ensure maximum compatibility of the library across architectures, a very minimal libc implementation is available: femtolibc. It is only used for generic toolchains by default, when a full-fledged libc is not considered to be available.

The implementation is not tailored for performance, so it is always better to use another libc when it is available in the toolchain. However, it is not expected to observe major performance overhead in most cases.

About

A library to create easy fuzzing harnesses in VM environments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published