Web 应用防火墙 - ModSecurity + CRS

NK 微服务内置 ModSecurity + OWASP CRS。所有付费版含。

两层语义

  • 总开关 waf_enabled:0 整站旁路 / 1 过 WAF
  • 规则集列表 waf_extra_rule_set_ids:叠加 user/system,跟 global 互补

规则集字段

  • paranoia_level 1-4(越严越多误报)
  • anomaly_threshold_inbound/outbound
  • attack 类:enable_sqli / xss / rce / lfi / rfi / php_attack / scanner_detection
  • 响应侧泄露:enable_resp_sql_leak / php_leak / web_shell
  • keyword_rules 自定义关键词数组
  • custom_rules 原始 SecRule 文本(高级)

WAF 攻击日志

waf-log/dates 拉日期列表 + waf-log/list 查具体 — 字段 ts/ip/host/uri/status/rule_id/msg。详见 日志管理