출처 : https://github.com/antonio-morales/Fuzzing101/tree/main/Exercise%201#install-afl AFL++ 깃허브 : https://github.com/AFLplusplus/AFLplusplus |
AFL++을 잘못(?) 설치하면 컴파일러가 덜 빌드될 수도 있다. (내가 그랬다.. fuzzing101 exercise2를 수행하다가 afl-clang-lto가 필요했는데 없었다(?))
1. Install the dependencies
sudo apt-get update
sudo apt-get install -y build-essential python3-dev automake git flex bison libglib2.0-dev libpixman-1-dev python3-setuptools
sudo apt-get install -y lld-11 llvm-11 llvm-11-dev clang-11 || sudo apt-get install -y lld llvm llvm-dev clang
sudo apt-get install -y gcc-$(gcc --version|head -n1|sed 's/.* //'|sed 's/\..*//')-plugin-dev libstdc++-$(gcc --version|head -n1|sed 's/.* //'|sed 's/\..*//')-dev
2. Checkout and build AFL++
cd $HOME
git clone https://github.com/AFLplusplus/AFLplusplus && cd AFLplusplus
export LLVM_CONFIG="llvm-config-11"
make distrib
sudo make install
3. build Complete!
- -i 옵션 : 입력 케이스를 넣어야하는 디렉토리
- -o 옵션 : AFL++이 변형된 파일을 저장할 디렉토리
- -s 옵션 : static random seed
- @@ : 해당 프로그램이 파일을 입력으로 받는 경우에 사용
afl-fuzz -i $HOME/fuzzing_libexif/exif-samples-master/jpg/ -o $HOME/fuzzing_libexif/out/ -s 123 -- $HOME/fuzzing_libexif/install/bin/exif @@