Fuzzing

WinAFL Fuzzing

zz! 2025. 5. 10. 00:04
728x90

WinAFL

AFL(American Fuzzy Lop)은 coverage-guided 퍼징 툴이다. Windows에서 사용할 수 있도록 변경을 한 것이 WinAFL 입니다.

 

준비물

Visual Studio 2022

DynamoRIO github

https://github.com/DynamoRIO/dynamorio/releases

 

Releases · DynamoRIO/dynamorio

Dynamic Instrumentation Tool Platform. Contribute to DynamoRIO/dynamorio development by creating an account on GitHub.

github.com

 

 

64bit 환경

자 저같은 경우는 64bit를 대상으로 퍼징을 하겠다고 가정하고 환경을 구성을 해보겠습니다.

x64 Native Tools Command Prompt for VS 2022 를 관리자 권한으로 실행을 합니다.

cd C:\
git clone https://github.com/googleprojectzero/winafl
cd winafl
git submodule update --init --recursive
mkdir build64
cd build64
cmake -G"Visual Studio 17 2022" -A x64 .. -DDynamoRIO_DIR=C:\Users\user\Downloads\DynamoRIO\cmake -DUSE_DRSYMS=1 -DINTELPT=1 -DUSE_COLOR=1
cmake -build . --config Release

여기까지 명령어를 입력하고 가장 중요한 것이 있습니다.

"C:\winafl\build64\bin\Release" 경로에 afl-fuzz.exe 와 winafl.dll 이 존재하는지 확인을 합니다.

https://codetronik.tistory.com/204

 

WinAFL 사용 방법

0. Windows 11 에서 정상적인 실행이 되지 않으므로, hyper-V 등을 통해서 windows 10에서 실행하는 것을 권장한다. 1. 다운로드 : Python3, Visual studio 2022, DynamoRIO(https://github.com/DynamoRIO/dynamorio/releases) 2. 적절

codetronik.tistory.com

 

이제 crash가 저장이 되어 있는 풀더에 가보면 크래시가 있고, 이것을 하네스 프로그램에 넣으면 재현이 된다고 합니다.

역으로 분석을 해서 취약점을 찾고 익스플로잇을 하면 되겠죠?

 

728x90