Skip to content

A fuzzer for Linux eBPF module; build on top of LKL

License

Notifications You must be signed in to change notification settings

ssrg-vt/ebpf-fuzzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eBPF-fuzzer

Build and Test LKL

  1. Install prerequisites

Use the docker image with required dependencies.

docker pull nkhusain/ebpf_fuzzer
docker run -ti nkhusain/ebpf_fuzzer /bin/bash

or Install in your machine directly

sudo apt install -y flex bison libelf-dev

# install Clang-15
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 15
  1. Build LKL Kernel

if you used docker, run docker run -ti nkhusain/ebpf_fuzzer /bin/bash

git clone --single-branch -b dev https://github.com/ssrg-vt/ebpf-fuzzer.git
cd ebpf-fuzzer
cp lkl_ebpf_config arch/lkl/configs/defconfig
make ARCH=lkl defconfig CC=clang-15
  1. Build the lkl tools
make -C tools/lkl ARCH=lkl CC=clang-15 -j8
  1. Build the sample program

tools/lkl/bytecode/hello.c

cd tools/lkl/bytecode/
./build.sh hello

Run eBPF Fuzzer

cd tools/lkl/bytecode/
python3  ebpf_gen.py