WAFSmith: A New Open-Source Tool Uses LLMs to Revolutionize WAF Management
Leveraging on LLM’s abilities to mimic cognitive human agents, WAFSmith aims to reduce the friction of WAF rule governance from rule creation to deployment in minutes. It is designed as a highly disruptive tool to augment Blue Team operations in a rapidly evolving threat landscape. It was developed to enhance Blue Team’s capabilities to respond to threats in a fast and effective manner, without compromising business operations. The solution is first of the kind, especially in the open source landscape, a novel approach to solve a challenging problem of WAF rule governance.
Use
[pastacode lang=”markup” manual=”wafsmith%20-h%0A%0AUsage%3A%20wafsmith%20%5Boptions%5D%20%5Bcommand%5D%0A%0AWAFSmith%3A%20LLM%20based%20WAF%20Rule%20Creation%20Framework%0A%0AOptions%3A%0A%20%20-V%2C%20–version%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20output%20the%20version%20number%0A%20%20-h%2C%20–help%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20display%20help%20for%20command%0A%0ACommands%3A%0A%20%20create%20%5Boptions%5D%20%3Cinput%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Create%20ModSecurity%20Rules%0A%20%20evaluate%20%5Boptions%5D%20%3Cpayload-directory%3E%20%20Evaluate%20deployed%20WAF%20rules%20against%20a%20list%20of%20payloads%0A%20%20extract%20%5Boptions%5D%20%3Cinput%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Extract%20payload(s)%20from%20logs%0A%20%20aggregate%20%5Boptions%5D%20%3Cinput%3E%20%20%20%20%20%20%20%20%20%20%20%20%20Optimizing%20ModSecurity%20Rules%0A%20%20help%20%5Bcommand%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20display%20help%20for%20command” message=”” highlight=”” provider=”manual”/]
extract
[pastacode lang=”markup” manual=”wafsmith%20extract%20-h%0A%0AUsage%3A%20wafsmith%20extract%20%5Boptions%5D%20%3Cinput%3E%0A%0AExtract%20payload(s)%20from%20logs%0A%0AArguments%3A%0A%20%20input%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Input%20directory%20%2F%20file%20containing%20the%20Nginx%20log%20files%0A%0AOptions%3A%0A%20%20-o%2C%20–output%20%3Coutput-file%3E%20%20Specify%20the%20output%20file%20for%20the%20newly%20generated%20rule(s)%20if%20any%0A%20%20-k%2C%20–api-key%20%3Ckey%3E%20%20%20%20%20%20%20%20%20OpenAI%20API%20Key%0A%20%20-b%2C%20–base-url%20%3Cbase%3E%20%20%20%20%20%20%20OpenAI%20SDK%20Endpoint%0A%20%20-l%2C%20–model%20%3Cmodel%3E%20%20%20%20%20%20%20%20%20OpenAI%20Model%0A%20%20-x%2C%20–threads%20%3Cthreads%3E%20%20%20%20%20Specify%20the%20number%20of%20threads%20to%20be%20used%20during%20the%20rule%20generation%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20process.%20Default%20is%2010%20(default%3A%2010)%0A%20%20-h%2C%20–help%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20display%20help%20for%20command” message=”” highlight=”” provider=”manual”/]

evaluate
[pastacode lang=”markup” manual=”wafsmith%20evaluate%20-h%0A%0AUsage%3A%20wafsmith%20evaluate%20%5Boptions%5D%20%3Cpayload-directory%3E%0A%0AEvaluate%20deployed%20WAF%20rules%20against%20a%20list%20of%20payloads%0A%0AArguments%3A%0A%20%20payload-directory%20%20%20%20%20%20%20%20%20%20%20%20%20%20Input%20directory%20%2F%20file%20containing%20the%20payloads%0A%0AOptions%3A%0A%20%20-e%2C%20–evaded%20%3Cevaded-file%3E%20%20%20%20%20Specify%20the%20output%20file%20for%20evaded%20payload(s)%20if%20any%0A%20%20-s%2C%20–setup%20%3Csetup-directory%3E%20%20Specify%20the%20directory%20which%20contains%20the%20docker%20compose%20enviornment%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setup%0A%20%20-t%2C%20–traffic%20%3Ctraffic%3E%20%20%20%20%20%20%20%20Specify%20directory%20%2F%20file%20containing%20business%20traffic%20content%20for%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20simulation%0A%20%20-p%2C%20–position%20%3Cposition%3E%20%20%20%20%20%20Specify%20the%20postion%20of%20the%20payload%20in%20the%20HTTP%20request.%20Default%20is%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20url-parameters%20(default%3A%20%22url-parameters%22)%0A%20%20-m%2C%20–method%20%3Cmethod%3E%20%20%20%20%20%20%20%20%20%20Specify%20the%20HTTP%20method%20for%20the%20payload.%20Default%20is%20GET.%20(default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22GET%22)%0A%20%20-x%2C%20–threads%20%3Cthreads%3E%20%20%20%20%20%20%20%20Specify%20the%20number%20of%20threads%20to%20be%20used%20during%20the%20rule%20generation%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20process.%20Default%20is%2010%20(default%3A%2010)%0A%20%20-h%2C%20–help%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20display%20help%20for%20command” message=”” highlight=”” provider=”manual”/]
create
[pastacode lang=”markup” manual=”wafsmith%20create%20-h%0A%0AUsage%3A%20wafsmith%20create%20%5Boptions%5D%20%3Cinput%3E%0A%0ACreate%20ModSecurity%20Rules%0A%0AArguments%3A%0A%20%20input%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Input%20directory%20%2F%20file%20containing%20the%20payloads%0A%0AOptions%3A%0A%20%20-o%2C%20–output%20%3Coutput-file%3E%20%20%20%20%20Specify%20the%20output%20file%20for%20the%20newly%20generated%20rule(s)%20if%20any%0A%20%20-e%2C%20–evaded%20%3Cevaded-file%3E%20%20%20%20%20Specify%20the%20output%20file%20for%20evaded%20payload(s)%20if%20any%0A%20%20-s%2C%20–setup%20%3Csetup-directory%3E%20%20Specify%20the%20directory%20which%20contains%20the%20docker%20compose%20enviornment%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setup%0A%20%20-t%2C%20–traffic%20%3Ctraffic%3E%20%20%20%20%20%20%20%20Specify%20directory%20%2F%20file%20containing%20business%20traffic%20content%20for%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20simulation%0A%20%20-k%2C%20–api-key%20%3Ckey%3E%20%20%20%20%20%20%20%20%20%20%20%20OpenAI%20API%20Key%0A%20%20-b%2C%20–base-url%20%3Cbase%3E%20%20%20%20%20%20%20%20%20%20OpenAI%20SDK%20Endpoint%0A%20%20-l%2C%20–model%20%3Cmodel%3E%20%20%20%20%20%20%20%20%20%20%20%20OpenAI%20Model%0A%20%20-p%2C%20–position%20%3Cposition%3E%20%20%20%20%20%20Specify%20the%20postion%20of%20the%20payload%20in%20the%20HTTP%20request.%20Default%20is%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20url-parameters%20(default%3A%20%22url-parameters%22)%0A%20%20-m%2C%20–method%20%3Cmethod%3E%20%20%20%20%20%20%20%20%20%20Specify%20the%20HTTP%20method%20for%20the%20payload.%20Default%20is%20GET.%20(default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22GET%22)%0A%20%20-x%2C%20–threads%20%3Cthreads%3E%20%20%20%20%20%20%20%20Specify%20the%20number%20of%20threads%20to%20be%20used%20during%20the%20rule%20generation%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20process.%20Default%20is%2010%20(default%3A%2010)%0A%20%20-h%2C%20–help%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20display%20help%20for%20command%0A” message=”” highlight=”” provider=”manual”/]
aggregate
[pastacode lang=”markup” manual=”wafsmith%20aggregate%20-h%0A%0AUsage%3A%20wafsmith%20aggregate%20%5Boptions%5D%20%3Cinput%3E%0A%0AOptimizing%20ModSecurity%20Rules%0A%0AArguments%3A%0A%20%20input%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Input%20directory%20%2F%20file%20containing%20the%20list%20of%20payloads%20that%20the%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20rules%20will%20are%20designed%20to%20catch%0A%0AOptions%3A%0A%20%20-r%2C%20–rules%20%3Crules%3E%20%20%20%20%20%20%20%20%20%20%20%20Input%20directory%20%2F%20file%20containing%20the%20list%20of%20rules%20that%20will%20be%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20aggregated%0A%20%20-o%2C%20–output%20%3Coutput-file%3E%20%20%20%20%20Specify%20the%20output%20file%20for%20the%20newly%20generated%20rule(s)%20if%20any%0A%20%20-e%2C%20–evaded%20%3Cevaded-file%3E%20%20%20%20%20Specify%20the%20output%20file%20for%20evaded%20payload(s)%20if%20any%0A%20%20-s%2C%20–setup%20%3Csetup-directory%3E%20%20Specify%20the%20directory%20which%20contains%20the%20docker%20compose%20enviornment%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20setup%0A%20%20-t%2C%20–traffic%20%3Ctraffic%3E%20%20%20%20%20%20%20%20Specify%20directory%20%2F%20file%20containing%20business%20traffic%20content%20for%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20simulation%0A%20%20-k%2C%20–api-key%20%3Ckey%3E%20%20%20%20%20%20%20%20%20%20%20%20OpenAI%20API%20Key%0A%20%20-b%2C%20–base-url%20%3Cbase%3E%20%20%20%20%20%20%20%20%20%20OpenAI%20SDK%20Endpoint%0A%20%20-l%2C%20–model%20%3Cmodel%3E%20%20%20%20%20%20%20%20%20%20%20%20OpenAI%20Model%0A%20%20-p%2C%20–position%20%3Cposition%3E%20%20%20%20%20%20Specify%20the%20postion%20of%20the%20payload%20in%20the%20HTTP%20request.%20Default%20is%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20url-parameters%20(default%3A%20%22url-parameters%22)%0A%20%20-m%2C%20–method%20%3Cmethod%3E%20%20%20%20%20%20%20%20%20%20Specify%20the%20HTTP%20method%20for%20the%20payload.%20Default%20is%20GET.%20(default%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22GET%22)%0A%20%20-x%2C%20–threads%20%3Cthreads%3E%20%20%20%20%20%20%20%20Specify%20the%20number%20of%20threads%20to%20be%20used%20during%20the%20rule%20generation%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20process.%20Default%20is%2010%20(default%3A%2010)%0A%20%20-h%2C%20–help%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20display%20help%20for%20command” message=”” highlight=”” provider=”manual”/]
Install
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.