WAF-A-MoLE:針對Web應用防火墻的基于變異的模糊測試工具
關于WAF-A-MoLE
WAF-A-MoLE是一款功能強大的基于變異的模糊測試工具,該工具可以幫助廣大研究人員對基于ML的Web應用防火墻進行模糊測試。
只需提供一條SQL注入查詢語句,該工具便能夠嘗試生成一個可繞過目標WAF的語義不變的變種查詢。我們可以使用WAF-A-MoLE來探索解決方案空間,找到目標分類器未發現的危險“盲點”,并且可以使用此工具評估產品的穩健性。
工具體系架構

WAF-A-MoLE可以獲取初始Payload并將其插入Payload池中,Payload池將負責管理一個Payload優先級隊列。
在每次迭代過程中,Payload池的頭部會被傳遞給模糊。在模糊器中,通過應用一個可用的變異操作符,對Payload池進行隨機變異。
變異操作
變異操作都是語義保留的,它們利用了SQL語言(在這個版本中是MySQL)的高表達能力。
以下是當前版本WAF-A-MoLE中可用的變異操作:
工具要求
工具下載&安裝
廣大研究人員可以使用下列命令將該項目源碼克隆至本地:
- git clone https://github.com/AvalZ/WAF-A-MoLE.git
然后運行下列命令完成依賴組件的安裝:
- pip install -r requirements.txt
工具使用
(1) wafamole --help
- Usage: wafamole [OPTIONS] COMMAND [ARGS]...
- Options:
- --help Show this message and exit.
- Commands:
- evade Launch WAF-A-MoLE against a target classifier.
(2) wafamole evade --help
- Usage: wafamole evade [OPTIONS] MODEL_PATH PAYLOAD
- Launch WAF-A-MoLE against a target classifier.
- Options:
- -T, --model-type TEXT Type of classifier to load
- -t, --timeout INTEGER Timeout when evading the model
- -r, --max-rounds INTEGER Maximum number of fuzzing rounds
- -s, --round-size INTEGER Fuzzing step size for each round (parallel fuzzing
- steps)
- --threshold FLOAT Classification threshold of the target WAF [0.5]
- --random-engine TEXT Use random transformations instead of evolution
- engine. Set the number of trials
- --output-path TEXT Location were to save the results of the random
- engine. NOT USED WITH REGULAR EVOLUTION ENGINE
- --help Show this message and exit.
性能評估

項目地址
WAF-A-MoLE:【GitHub傳送門】