Minor update of WAF scripts

This commit is contained in:
Miroslav Stampar 2019-01-07 15:29:35 +01:00
parent 48cdc6a308
commit 929df9bc34
4 changed files with 6 additions and 5 deletions

View file

@ -18,7 +18,7 @@ def detect(get_page):
page, headers, code = get_page(get=vector)
retval = "The requested URL was rejected. Please consult with your administrator." in (page or "")
retval |= all(_ in (page or "") for _ in ("This page can't be displayed. Contact support for additional information", "The incident ID is:"))
retval |= (code >= 400) and "ID" in (page or "") and re.search(r"\b\d{19}\b", page or "") is not None
retval |= re.search(r"(?i)Support.ID", page or "") and re.search(r"\b\d{19}\b", page or "") is not None
if retval:
break

View file

@ -17,6 +17,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, _ = get_page(get=vector)
retval = re.search(r"has been blocked in accordance with company policy", page or "", re.I) is not None
retval |= all(_ in (page or "") for _ in ("Palo Alto Next Generation Security Platform", "Download Blocked"))
if retval:
break