mirror of
https://github.com/Safe3/uusec-waf.git
synced 2025-10-04 06:51:54 +08:00
### Feature Updates **Interface & Management** - Redesigned main program and management interface with improved aesthetics and usability, supports UI language switching (English/Chinese) - Added Rule Collections functionality: Create custom rule templates for batch configuration - Introduced whitelist rules that terminate further rule matching upon success - UUSEC WAF Rules API intelligent suggestions during advanced rule editing:ml-citation - New plugin management supporting hot-reloaded plugins to extend WAF capabilities **Protocol & Optimization** - Supports streaming responses for continuous data push (e.g., LLM stream outputs) - Enables Host header modification during proxying for upstream service access - Search engine validation: `waf.searchEngineValid(dns,ip,ua)` prevents high-frequency rules from affecting SEO indexing - Interception log report generation (HTML/PDF exports) - Automatic rotation of UUSEC WAF error/access logs to prevent performance issues **Security & Infrastructure** - Expanded free SSL certificate support: HTTP-01 & DNS-01 verification across 50+ domain providers - Customizable advanced WAF settings: HTTP2, GZIP, HTTP Caching, SSL protocols, etc - Cluster configuration: Manage UUSEC WAF nodes and ML servers via web UI
49 lines
No EOL
1.4 KiB
Lua
49 lines
No EOL
1.4 KiB
Lua
--[[
|
|
Rule name: HTTP Request Smuggling
|
|
Filtering stage: Request phase
|
|
Threat level: Critical
|
|
Rule description: This rule searches for HTTP/WEBDAV method names that combine with the words HTTP/\d or CR/LF characters. This will point to an attempt to inject a second request into the request in order to bypass testing performed on the main request, such as the CVE9-20372 (Nginx<1.17.7 request smuggling vulnerability). reference resources: http://projects.webappsec.org/HTTP-Request-Smuggling
|
|
--]]
|
|
|
|
|
|
local kvFilter = waf.kvFilter
|
|
local rgx = waf.rgxMatch
|
|
local htmlEntityDecode = waf.htmlEntityDecode
|
|
|
|
local function rMatch(v)
|
|
local m = rgx(htmlEntityDecode(v), "(?:get|post|head|options|connect|put|delete|trace|track|patch|propfind|propatch|mkcol|copy|move|lock|unlock)\\s+[^\\s]+\\s+http/\\d", "josi")
|
|
if m then
|
|
return m, v
|
|
end
|
|
return false
|
|
end
|
|
|
|
local form = waf.form
|
|
if form then
|
|
local m, d = kvFilter(form["FORM"], rMatch)
|
|
if m then
|
|
return m, d, true
|
|
end
|
|
m, d = rMatch(form["RAW"])
|
|
if m then
|
|
return m, d, true
|
|
end
|
|
end
|
|
|
|
local queryString = waf.queryString
|
|
if queryString then
|
|
local m, d = kvFilter(queryString, rMatch)
|
|
if m then
|
|
return m, d, true
|
|
end
|
|
end
|
|
|
|
local cookies = waf.cookies
|
|
if cookies then
|
|
local m, d = kvFilter(cookies, rMatch)
|
|
if m then
|
|
return m, d, true
|
|
end
|
|
end
|
|
|
|
return false |