优化WAF checkpoint参数文字提示

This commit is contained in:
刘祥超
2023-12-08 15:09:32 +08:00
parent 9226001362
commit 53563f040f

View File

@@ -10,7 +10,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "通用请求Header长度限制", Name: "通用请求Header长度限制",
Prefix: "requestGeneralHeaderLength", Prefix: "requestGeneralHeaderLength",
Description: "通用Header比如Cache-Control、Accept之类的长度限制防止缓冲区溢出攻击", Description: "通用Header比如Cache-Control、Accept之类的长度限制防止缓冲区溢出攻击",
IsRequest: true, IsRequest: true,
IsComposed: true, IsComposed: true,
Priority: 100, Priority: 100,
@@ -18,7 +18,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "通用响应Header长度限制", Name: "通用响应Header长度限制",
Prefix: "responseGeneralHeaderLength", Prefix: "responseGeneralHeaderLength",
Description: "通用Header比如Cache-Control、Date之类的长度限制防止缓冲区溢出攻击", Description: "通用Header比如Cache-Control、Date之类的长度限制防止缓冲区溢出攻击",
IsRequest: false, IsRequest: false,
IsComposed: true, IsComposed: true,
Priority: 100, Priority: 100,
@@ -26,77 +26,77 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "客户端地址IP", Name: "客户端地址IP",
Prefix: "remoteAddr", Prefix: "remoteAddr",
Description: "试图通过分析X-Forwarded-For等Header获取的客户端地址比如192.168.1.100,存在伪造的可能", Description: "试图通过分析X-Forwarded-For等Header获取的客户端地址比如192.168.1.100,存在伪造的可能",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "客户端源地址IP", Name: "客户端源地址IP",
Prefix: "rawRemoteAddr", Prefix: "rawRemoteAddr",
Description: "直接连接的客户端地址比如192.168.1.100", Description: "直接连接的客户端地址比如192.168.1.100",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "客户端端口", Name: "客户端端口",
Prefix: "remotePort", Prefix: "remotePort",
Description: "直接连接的客户端地址端口", Description: "直接连接的客户端地址端口",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "客户端用户名", Name: "客户端用户名",
Prefix: "remoteUser", Prefix: "remoteUser",
Description: "通过BasicAuth登录的客户端用户名", Description: "通过BasicAuth登录的客户端用户名",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "请求URI", Name: "请求URI",
Prefix: "requestURI", Prefix: "requestURI",
Description: "包含URL参数的请求URI类似于 /hello/world?lang=go不包含域名部分", Description: "包含URL参数的请求URI类似于 /hello/world?lang=go不包含域名部分",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "请求路径", Name: "请求路径",
Prefix: "requestPath", Prefix: "requestPath",
Description: "不包含URL参数的请求路径类似于 /hello/world不包含域名部分", Description: "不包含URL参数的请求路径类似于 /hello/world不包含域名部分",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "请求完整URL", Name: "请求完整URL",
Prefix: "requestURL", Prefix: "requestURL",
Description: "完整的请求URL包含协议、域名、请求路径、参数等类似于 https://example.com/hello?name=lily", Description: "完整的请求URL包含协议、域名、请求路径、参数等类似于 https://example.com/hello?name=lily",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "请求内容长度", Name: "请求内容长度",
Prefix: "requestLength", Prefix: "requestLength",
Description: "请求Header中的Content-Length", Description: "请求Header中的Content-Length",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "请求体内容", Name: "请求体内容",
Prefix: "requestBody", Prefix: "requestBody",
Description: "通常在POST或者PUT等操作时会附带请求体最大限制32M", Description: "通常在POST或者PUT等操作时会附带请求体最大限制32M",
IsRequest: true, IsRequest: true,
Priority: 5, Priority: 5,
}, },
{ {
Name: "请求URI和请求体组合", Name: "请求URI和请求体组合",
Prefix: "requestAll", Prefix: "requestAll",
Description: "${requestURI}和${requestBody}组合", Description: "${requestURI}和${requestBody}组合",
IsRequest: true, IsRequest: true,
Priority: 5, Priority: 5,
}, },
{ {
Name: "请求表单参数", Name: "请求表单参数",
Prefix: "requestForm", Prefix: "requestForm",
Description: "获取POST或者其他方法发送的表单参数最大请求体限制32M", Description: "获取POST或者其他方法发送的表单参数最大请求体限制32M",
IsRequest: true, IsRequest: true,
HasParams: true, HasParams: true,
Priority: 5, Priority: 5,
@@ -104,7 +104,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "上传文件", Name: "上传文件",
Prefix: "requestUpload", Prefix: "requestUpload",
Description: "获取POST上传的文件信息最大请求体限制32M", Description: "获取POST上传的文件信息最大请求体限制32M",
Params: []*KeyValue{ Params: []*KeyValue{
NewKeyValue("最小文件尺寸", "minSize"), NewKeyValue("最小文件尺寸", "minSize"),
NewKeyValue("最大文件尺寸", "maxSize"), NewKeyValue("最大文件尺寸", "maxSize"),
@@ -119,7 +119,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "请求JSON参数", Name: "请求JSON参数",
Prefix: "requestJSON", Prefix: "requestJSON",
Description: "获取POST或者其他方法发送的JSON最大请求体限制32M使用点.)符号表示多级数据", Description: "获取POST或者其他方法发送的JSON最大请求体限制32M使用点.)符号表示多级数据",
IsRequest: true, IsRequest: true,
HasParams: true, HasParams: true,
Priority: 5, Priority: 5,
@@ -127,42 +127,42 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "请求方法", Name: "请求方法",
Prefix: "requestMethod", Prefix: "requestMethod",
Description: "比如GET、POST", Description: "比如GET、POST",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "请求协议", Name: "请求协议",
Prefix: "scheme", Prefix: "scheme",
Description: "比如http或https", Description: "比如http或https",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "HTTP协议版本", Name: "HTTP协议版本",
Prefix: "proto", Prefix: "proto",
Description: "比如HTTP/1.1", Description: "比如HTTP/1.1",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "主机名", Name: "主机名",
Prefix: "host", Prefix: "host",
Description: "比如goedge.cn", Description: "比如goedge.cn",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "CNAME", Name: "CNAME",
Prefix: "cname", Prefix: "cname",
Description: "当前网站服务CNAME比如38b48e4f.goedge.cn", Description: "当前网站服务CNAME比如38b48e4f.goedge.cn",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "是否为CNAME", Name: "是否为CNAME",
Prefix: "isCNAME", Prefix: "isCNAME",
Description: "是否为CNAME值为1或0", Description: "是否为CNAME值为1或0",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
DataType: "bool", DataType: "bool",
@@ -170,35 +170,35 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "请求来源URL", Name: "请求来源URL",
Prefix: "referer", Prefix: "referer",
Description: "请求Header中的Referer值", Description: "请求Header中的Referer值",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "客户端信息", Name: "客户端信息",
Prefix: "userAgent", Prefix: "userAgent",
Description: "比如Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103", Description: "比如Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "内容类型", Name: "内容类型",
Prefix: "contentType", Prefix: "contentType",
Description: "请求Header的Content-Type", Description: "请求Header的Content-Type",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "所有cookie组合字符串", Name: "所有cookie组合字符串",
Prefix: "cookies", Prefix: "cookies",
Description: "比如sid=IxZVPFhE&city=beijing&uid=18237", Description: "比如sid=IxZVPFhE&city=beijing&uid=18237",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "单个cookie值", Name: "单个cookie值",
Prefix: "cookie", Prefix: "cookie",
Description: "单个cookie值", Description: "单个cookie值",
IsRequest: true, IsRequest: true,
HasParams: true, HasParams: true,
Priority: 100, Priority: 100,
@@ -206,14 +206,14 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "所有URL参数组合", Name: "所有URL参数组合",
Prefix: "args", Prefix: "args",
Description: "比如name=lu&age=20", Description: "比如name=lu&age=20",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "单个URL参数值", Name: "单个URL参数值",
Prefix: "arg", Prefix: "arg",
Description: "单个URL参数值", Description: "单个URL参数值",
IsRequest: true, IsRequest: true,
HasParams: true, HasParams: true,
Priority: 100, Priority: 100,
@@ -221,14 +221,14 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "所有Header信息", Name: "所有Header信息",
Prefix: "headers", Prefix: "headers",
Description: "使用\\n隔开的Header信息字符串", Description: "使用换行符(\\n隔开的Header信息字符串,每行均为\"NAME: VALUE格式\"。",
IsRequest: true, IsRequest: true,
Priority: 100, Priority: 100,
}, },
{ {
Name: "单个Header值", Name: "单个Header值",
Prefix: "header", Prefix: "header",
Description: "单个Header值", Description: "单个Header值",
IsRequest: true, IsRequest: true,
HasParams: true, HasParams: true,
Priority: 100, Priority: 100,
@@ -236,7 +236,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "国家/地区名称", Name: "国家/地区名称",
Prefix: "geoCountryName", Prefix: "geoCountryName",
Description: "国家/地区名称", Description: "当前访问者国家/地区名称",
IsRequest: true, IsRequest: true,
HasParams: false, HasParams: false,
Priority: 90, Priority: 90,
@@ -244,7 +244,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "省份名称", Name: "省份名称",
Prefix: "geoProvinceName", Prefix: "geoProvinceName",
Description: "中国省份名称", Description: "当前访问者中国省份名称",
IsRequest: true, IsRequest: true,
HasParams: false, HasParams: false,
Priority: 90, Priority: 90,
@@ -252,7 +252,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "城市名称", Name: "城市名称",
Prefix: "geoCityName", Prefix: "geoCityName",
Description: "中国城市名称", Description: "当前访问者中国城市名称",
IsRequest: true, IsRequest: true,
HasParams: false, HasParams: false,
Priority: 90, Priority: 90,
@@ -260,7 +260,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "ISP名称", Name: "ISP名称",
Prefix: "ispName", Prefix: "ispName",
Description: "ISP名称", Description: "当前访问者ISP名称",
IsRequest: true, IsRequest: true,
HasParams: false, HasParams: false,
Priority: 90, Priority: 90,
@@ -268,7 +268,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "CC统计", Name: "CC统计",
Prefix: "cc2", Prefix: "cc2",
Description: "对统计对象进行统计", Description: "对统计对象进行统计",
HasParams: false, HasParams: false,
IsRequest: true, IsRequest: true,
IsComposed: true, IsComposed: true,
@@ -277,7 +277,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "防盗链", Name: "防盗链",
Prefix: "refererBlock", Prefix: "refererBlock",
Description: "对统计对象进行统计", Description: "对统计对象进行统计",
HasParams: false, HasParams: false,
IsRequest: true, IsRequest: true,
IsComposed: true, IsComposed: true,
@@ -286,7 +286,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "CC统计", Name: "CC统计",
Prefix: "cc", Prefix: "cc",
Description: "统计某段时间段内的请求信息不推荐再使用请使用新的CC2统计代替", Description: "统计某段时间段内的请求信息不推荐再使用请使用新的CC2统计代替",
HasParams: true, HasParams: true,
Params: []*KeyValue{ Params: []*KeyValue{
NewKeyValue("请求数", "requests"), NewKeyValue("请求数", "requests"),
@@ -366,14 +366,14 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "响应状态码", Name: "响应状态码",
Prefix: "status", Prefix: "status",
Description: "响应状态码比如200、404、500", Description: "响应状态码比如200、404、500",
IsRequest: false, IsRequest: false,
Priority: 100, Priority: 100,
}, },
{ {
Name: "响应Header", Name: "响应Header",
Prefix: "responseHeader", Prefix: "responseHeader",
Description: "响应Header值", Description: "响应Header值",
IsRequest: false, IsRequest: false,
HasParams: true, HasParams: true,
Priority: 100, Priority: 100,
@@ -381,14 +381,14 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{ {
Name: "响应内容", Name: "响应内容",
Prefix: "responseBody", Prefix: "responseBody",
Description: "响应内容字符串", Description: "响应内容字符串",
IsRequest: false, IsRequest: false,
Priority: 5, Priority: 5,
}, },
{ {
Name: "响应内容长度", Name: "响应内容长度",
Prefix: "bytesSent", Prefix: "bytesSent",
Description: "响应内容长度通过响应的Header Content-Length获取", Description: "响应内容长度通过响应的Header Content-Length获取",
IsRequest: false, IsRequest: false,
Priority: 100, Priority: 100,
}, },