Giter VIP home page Giter VIP logo

ebpf-se's Introduction

eBPF-SE

This repository hosts eBPF-SE, a tool that can be used to symbolically execute programs written using the Linux kernel's eBPF framework. eBPF-SE was previously a part of PIX, a tool that automatically extracts performance interfaces from NF code. In case eBPF-SE is useful to you in any published work, please cite the PIX paper published at NSDI'22.

Organization

Subdirectories have their own README files.

  • examples - contains a set of example eBPF programs that eBPF-SE has been used to symbolically execute so far.
  • tool - contains the symbolic execution engine which is based on KLEE
  • libbpf-stubbed - Simple models (stubs) for the Linux kernel's libbpf API that are amenable to symbolic execution. Linking against these models (as opposed to the real implementation of these API functions in the Linux kernel) ensures that eBPF-SE can explore all program paths through the loaded eBPF program without running into path explosion. Current directory is up-to-date with libbpf 1.2.2.

Getting Started

First, setup the tool as follows:

cd tool
./setup-tool.sh
source paths.sh

This step should take approximately 10 minutes and will install the symbolic execution engine along with all of its dependencies (KLEE, klee-uclibc and Z3). This also creates a paths.sh file which contains commands to add klee and its include directory to your path. We recommend adding source ebpf-se/tool/paths.sh to your .bashrc for ease of use.

Then, to test the tool on any of the provided examples (for instance, Katran):

cd examples/katran  # Replace with example of your choice here
make libbpf # This needs to be done only for the first example you run
make xdp-target
make symbex

You should automatically see the KLEE output at the end of third step, which describes the total number of paths explored during symbolic execution. The analysis for Katran, which is one of the more complex eBPF programs, takes approximately 2 minutes and yields 16110 paths.

Using eBPF-SE to analyze your own eBPF programs

Please follow the steps listed in examples/README.md.

Other information

  • All code in this repository was tested on Ubuntu 22.04.

ebpf-se's People

Contributors

simonmen65 avatar rishabh246 avatar nikolabo avatar

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.