привет, я хочу обновить DDoS защиту для своего вебсайта. я использую платформу…
- User
привет, я хочу обновить DDoS защиту для своего вебсайта. я использую платформу Cloudflare, раздел WAF(Custom Rules). Вот пример одного из моих правил, для отражения DDoS атак: (http.user_agent contains “OPR” and not any(http.request.headers[“sec-ch-ua”][] contains “Opera”)) or (any(http.request.headers[“sec-ch-ua”][] contains “Google Chrome”) and http.user_agent contains “Edg”) or (any(http.request.headers[“sec-ch-ua”][] contains “Google Chrome”) and http.user_agent contains “OPR”) or (any(http.request.headers[“sec-ch-ua”][] contains “Google Chrome”) and http.user_agent contains “Firefox”) or (any(http.request.headers[“sec-ch-ua”][] contains “Google Chrome”) and http.user_agent contains “YaBrowser”) or (any(http.request.headers[“sec-ch-ua”][] contains “Microsoft Edge”) and not http.user_agent contains “Edg”) or (any(http.request.headers[“sec-ch-ua”][] contains “Microsoft Edge”) and http.user_agent contains “Firefox”) or (any(http.request.headers[“sec-ch-ua”][] contains “DuckDuckGo”) and not http.user_agent contains “Edg”) or (any(http.request.headers[“sec-ch-ua”][] contains “YaBrowser”) and not http.user_agent contains “YaBrowser”) or (any(http.request.headers[“sec-ch-ua”][] contains “Yowser”) and not http.user_agent contains “YaBrowser”) or (any(http.request.headers[“x-requested-with”][] contains “XMLHttpRequest”) and not http.request.full_uri contains “api” and not ip.geoip.country in {“AM” “AZ” “BY” “CA” “KZ” “KG” “MD” “PL” “RU” “UA” “UZ” “RO”}) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “sec-ch-ua”) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “content-dpr”) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “dpr”) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “device-memory”) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “sec-ch-ua-arch”) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “sec-ch-ua-model”) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “sec-ch-ua-platform”) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “width”) or (http.user_agent contains “Firefox”) and any(http.request.headers.names[] == “sec-ch-ua-bitness”) or (http.request.headers.truncated) or (cf.tls_client_auth.cert_revoked) or (ip.geoip.asnum eq 8075) or (http.request.uri contains “#”) or (http.request.uri contains “$”) or (http.request.uri contains “%”) or (http.request.uri contains “@”) or (http.request.uri eq “~”) or (cf.threat_score ge 5) or (http.user_agent eq “Mozilla/5.0 (Linux; U; Android 10; pl-pl; Mi MIX 2S Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.116 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.10.0-gn”) or (http.request.uri.query eq “d=1”) or (http.request.uri.query eq “–+”) or (http.user_agent contains “Chromium/4”) or (http.user_agent contains “Chromium/2”) or (http.user_agent contains “Chromium/3”) or (http.user_agent contains “Chromium/5”) or (http.user_agent contains “Chromium/6”) or (http.user_agent contains “; 1.0”) or (ip.geoip.asnum eq 213230) or ((any(http.request.headers[“sec-ch-ua”][] contains “(Not(A:Brand”)) and (not any(http.request.headers[“sec-ch-ua-platform”][] contains “Linux”))) or (((lower(http.user_agent) contains “chrome/”) and (any(http.request.headers.names[] == “sec-ch-ua-mobile”))) and not any(http.request.headers.names[] == “sec-gpc”)) and (not any(http.request.headers[“sec-ch-ua”][*] contains “Chromium”) and not lower(http.user_agent) contains “samsungbrowser” and not lower(http.user_agent) contains “mobile safari” and not lower(http.user_agent) contains “smart tv”) or (http.user_agent eq “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36”) or (http.user_agent eq “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36”)
- Assistant
- User
ok try to create something very amazing rules to block ddos attack via cloudflare waf
- Assistant
- User
try again to create something amazing and really helpful. i think you need to use deep browser header analyzing and headless browser blocking rules
- Assistant
- User
hmm lets think together, how we can block DDoS attack using cloudflare waf, if attacker uses legit useragent and browser headers. we cant use ASN or Country blocking, but we can use any feature in Cloudflare Field Reference or such popular features of another DDoS Protection services like TLS Fingerprinting.
- Assistant
- User
hmm lets think together, how we can block DDoS attack using cloudflare waf, if attacker uses legit useragent and browser headers. we cant use ASN or Country blocking, but we can use any feature in Cloudflare Field Reference or such popular features of another DDoS Protection services like TLS Fingerprinting.
- Assistant
- User
hmm lets think together, how we can block DDoS attack using cloudflare waf, if attacker uses legit useragent and browser headers. we cant use ASN or Country blocking, but we can use any feature in Cloudflare Field Reference
- Assistant