簡體   English   中英

如何在終端上使用 AFL 運行代碼

[英]How to run the code using AFL on terminal

我有一些我正在嘗試使用 AFL 運行的 github。 代碼: https : //github.com/karimmd/CScanner/tree/cfe7d08bf46b1eed0443f9e27bc089d68a830a45

我想運行該項目並找到漏洞。 我已經把 github 的所有文件放在一個文件夾code ,所以文件結構是 CScanner-master/code/all the files here。 我在終端上使用這個命令:

   hemlatamahaur@Hemlatas-MacBook-Pro desktop % afl-fuzz -i CScanner-master -o code ./input-testcode.c
afl-fuzz 2.56b by <lcamtuf@google.com>
[+] You have 4 CPU cores and 2 runnable tasks (utilization: 50%).
[+] Try parallel jobs - see /usr/local/Cellar/afl-fuzz/2.57b/share/doc/afl/parallel_fuzzing.txt.
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Scanning 'CScanner-master'...
[+] No auto-generated dictionary tokens to reuse.
[*] Creating hard links for all input files...
[*] Validating target binary...

[-] PROGRAM ABORT : Program './input-testcode.c' not found or not executable
         Location : check_binary(), afl-fuzz.c:6873

它一直說沒有文件作為 input-testcode.c

我是 AFL 的新手,所以我可能做錯了。 如何使用 AFL 運行此代碼以查找漏洞。 非常感謝任何幫助。

你必須首先使用 afl-clang 構建你的代碼

afl-clang

$ afl-clang input-testcode.c -o input-testcode

然后:

$ afl-fuzz -i CScanner-master -o code ./input-testcode .

我希望它可以工作 Afl-fuzz 適用於可執行文件

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM