使用
afl-lto
clang LLVM 編譯器
1.?-help
顯示可用選項
afl-lto --help
其他選項同上,這里不再展開敘述。
afl-lto++
1.?-help
顯示可用選項
afl-lto++ --help
其他選項同上,這里不再展開敘述。
afl-network-client
1. 幫助文檔
afl-network-client
?2. 常規使用
afl-network-client 127.0.0.1 8888 4096
afl-network-server
1. 幫助文檔
afl-network-server
所需參數
2. -i port
客戶端連接的監聽端口
afl-network-server -i 8000 -- ./target
?
執行控制設置
3. -f file
被測程序讀取的輸入文件(stdin)
afl-network-server -i 8000 -f input/sample.txt -- ./target
?
4. -t msec
每次運行的超時時間(1000 毫秒)
afl-network-server -i 8000 -t 1000 -- ./target
5. -m megs
子進程的內存限制(0 MB)
afl-network-server -i 8000 -m 50 -- ./target
6. -Q
使用僅二進制的插樁(QEMU 模式)
afl-network-server -i 8000 -Q -- ./target
7. -U
使用基于 Unicorn 的插樁(Unicorn 模式)
afl-network-server -i 8000 -U -- ./target
8. -W
使用基于 qemu 的 Wine 插樁(Wine 模式)
afl-network-server -i 8000 -W -- ./target
afl-persistent-config
注意:需要使用 root 權限去運行。
sudo afl-persistent-config
afl-plot
1. 幫助文檔
afl-plot
2. afl_state_dir
應指向任何 afl-fuzz 活動或停止實例的現有狀態目錄
3. graph_output_dir
應指向一個空目錄,此工具可將生成的圖表寫入該目錄
4. -g, --graphical
(可選)在圖形窗口中顯示圖表(您需要已構建 afl-plot-ui 才能使用此選項)
afl-plot -g findings/default output-graphs
afl-showmap
1. 幫助文檔
afl-showmap
必需參數
2. -o file
寫入跟蹤數據的文件
afl-showmap -o output/map.txt -- ./target input/sample.txt
?
執行控制設置
3. -t msec
每次運行的超時時間(默認值:1000ms)
afl-showmap -o output/map.txt -t 1000 -- ./target input/sample.txt
4. -m megs
子進程的內存限制(默認值:無)
afl-showmap -o output/map.txt -m 20 -- ./target input/sample.txt
5. -O
使用純二進制插樁(FRIDA 模式)
afl-showmap -o output/map.txt -O -- ./target input/sample.txt
6. -Q
使用純二進制插樁(QEMU 模式)
afl-showmap -o output/map.txt -Q -- ./target input/sample.txt
7. -U
使用基于 Unicorn 的插樁(Unicorn 模式)
afl-showmap -o output/map.txt -U -- ./target input/sample.txt
8. -W
使用基于 qemu 的 Wine 插樁(Wine 模式)(非必需,此處為了與其他 afl-* 工具保持一致)
afl-showmap -o output/map.txt -W -- ./target input/sample.txt
9. -X
使用 Nyx 模式
afl-showmap -o output/map.txt -X -- ./target input/sample.txt
其他設置
10. -i dir
處理此目錄下的所有文件,必須與 -o 選項結合使用。使用 -C 時,-o 表示文件;不使用 -C 時,-o 表示目錄。每個位圖將單獨寫入文件。
afl-showmap -o output/map.txt -i input -- ./target input/sample.txt
11. -I filelist
與 -i 選項類似,-I 表示文件列表。
afl-showmap -o output/map.txt -I files.txt -- ./target input/sample.txt
12. -C
收集覆蓋率,將所有邊寫入 -o 并給出摘要。必須與 -i 選項結合使用。
afl-showmap -o output/map.txt -i input -C -- ./target input/sample.txt
13. -q
接收程序的輸出,不顯示消息。
afl-showmap -o output/map.txt -q -- ./target input/sample.txt
14. -e
僅顯示邊覆蓋率,忽略命中計數。
afl-showmap -o output/map.txt -e -- ./target input/sample.txt
15. -r
顯示實際元組值,而不是 AFL 過濾器值。
afl-showmap -o output/map.txt -r -- ./target input/sample.txt
16. -s
不對映射進行分類。
afl-showmap -o output/map.txt -s -- ./target input/sample.txt
17. -c
允許核心轉儲。
afl-showmap -o output/map.txt -c -- ./target input/sample.txt
afl-system-config
afl-system-config 將系統重新配置為高性能模糊測試狀態。警告:這會降低系統的安全性!請注意,還有一個 afl-persistent-config,用于設置額外的永久配置選項。
注意:需要使用 root 權限去運行。
sudo afl-system-config
afl-tmin
1. 幫助文檔
afl-tmin
?
必需參數
2. -i file
工具需要壓縮的輸入測試用例
3. -o file
最小化數據的最終輸出位置
afl-tmin -i input/sample.txt -o output/map.txt -- ./target
?
執行控制設置
4. -f file
測試程序讀取的輸入文件(標準輸入)
afl-tmin -i input/sample.txt -o output/map.txt -f test -- ./target
5. -t msec
每次運行的超時時間(1000 毫秒)
afl-tmin -i input/sample.txt -o output/map.txt -t 1000 -- ./target
6. -m megs
子進程的內存限制(0 MB)
afl-tmin -i input/sample.txt -o output/map.txt -m 20 -- ./target
7. -O
使用純二進制插樁(FRIDA 模式)
afl-tmin -i input/sample.txt -o output/map.txt -O -- ./target
8. -Q
使用純二進制插樁(QEMU 模式)
afl-tmin -i input/sample.txt -o output/map.txt -Q -- ./target
9. -U
使用基于 Unicorn 的插樁(Unicorn 模式)
afl-tmin -i input/sample.txt -o output/map.txt -U -- ./target
10. -W
使用基于 QEMU 的 Wine 插樁(Wine 模式)(此處并非必需,為了與其他 afl-* 工具保持一致)
afl-tmin -i input/sample.txt -o output/map.txt -W -- ./target
11. -X
使用 Nyx 模式
afl-tmin -i input/sample.txt -o output/map.txt -X -- ./target
最小化設置
12. -e
求解邊僅覆蓋,忽略命中計數
afl-tmin -i input/sample.txt -o output/map.txt -e -- ./target
13. -l bytes
設置最小塊刪除長度以加快最小化速度
afl-tmin -i input/sample.txt -o output/map.txt -l 24 -- ./target
14. -x
將非零退出代碼視為崩潰
afl-tmin -i input/sample.txt -o output/map.txt -x -- ./target
15. -H
最小化掛起(掛起模式)
afl-tmin -i input/sample.txt -o output/map.txt -H -- ./target
afl-whatsup
afl-fuzz 狀態檢查工具
1. 幫助文檔
afl-whatsup
2.?-d
包含失效模糊器的狀態
afl-whatsup -d output
?
3. -m
僅顯示最少量的狀態
afl-whatsup -m output
?
4. -n
無彩色輸出
afl-whatsup -n output
?
5. -s
跳過詳細信息,僅輸出摘要結果
afl-whatsup -s output
總結
AFL++ 作為經典模糊測試工具 AFL 的增強版,不僅繼承了高效的變異引擎和語義感知能力,還引入了多種現代化特性,如持久化模式、QEMU 模擬、協作模糊和自定義調度器等,極大地擴展了其在不同測試場景中的適用性。實際應用表明,AFL++ 在發現內存安全漏洞、未處理的異常邏輯及邊界條件問題方面表現出色,尤其適合構建自動化、安全性強的漏洞挖掘體系。掌握并靈活運用 AFL++,將大大提升安全研究人員在協議測試、二進制分析與軟件審計中的效率和深度。
在此特別強調,本教程僅在合法授權的情況下進行測試和研究,請勿用于其他用途。未經授權使用此類工具可能會侵犯他人隱私,觸犯相關法律,任何因此引發的法律或利益糾紛與本人無關。
歡迎各位大佬,小白來找我交流。