Adding new WAF scripts

This commit is contained in:
Miroslav Stampar 2019-01-07 01:21:07 +01:00
parent 30497acd0c
commit 54d0678cbe
6 changed files with 58 additions and 5 deletions

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.1.6"
VERSION = "1.3.1.7"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
0dd33e8fe128a0b3bf3f94a463d0a61a lib/core/settings.py
885aad10b81d3eaee5218ffbe29db374 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@ -416,7 +416,7 @@ af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
8fec83056c8728076ab17ab3a2ebbe7b waf/cloudflare.py
8414f766b0171fbc264c46ad40dff237 waf/cloudfront.py
847ee97f6e0f8aeec61afd3e0c91543b waf/comodo.py
f7571543ccb671a63a8139e375d6a4f2 waf/crawlprotect.py
4ed76fdf2add2405bb6157ac025e01b9 waf/crawlprotect.py
f20b14ca9f7c2442fd1e9432d933a75b waf/datapower.py
e49bb75985f60556b4481dc085f3c62b waf/denyall.py
dbe50bbcb1b4664d6cebfcca63e75125 waf/distil.py
@ -427,17 +427,19 @@ a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
588d2f9a8f201e120e74e508564cb487 waf/fortiweb.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
2aa7775dac8df4a3cdb736fdf51dc9cb waf/hyperguard.py
256a7ea2c1cd2745fe788cf8f6123f8a waf/immunify360.py
1adbd0c470d1bbcec370722f05094255 waf/incapsula.py
fb6be55d21a70765e35549af2484f762 waf/__init__.py
a3ee375714987acccc26d1b07c2e8af7 waf/isaserver.py
ce9cf35919a92d65347bb74ca0c5c86f waf/jiasule.py
f44ed04eeb4287c11ce277703ec7d72d waf/knownsec.py
d50d82bec48814eb5b699d302dbdae9a waf/kona.py
10b1c6891494b780d1966e47fca2b58a waf/modsecurity.py
4397c299d27a500851726444fb89759e waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
84e9c68b6ecffafb5ec8cd96acaf62b9 waf/newdefend.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
a59aff03a5b3fb40ea0feb3489677040 waf/onmessage.py
7ff3c93f2c77a984ebbf217c7c38a796 waf/paloalto.py
2979bb64c24256a83625d75a385dde9b waf/profense.py
8de0d46738335a4e498c4ac9038ac3c3 waf/proventia.py

View File

@ -15,5 +15,6 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, code = get_page(get=vector)
retval = code >= 400 and "This site is protected by CrawlProtect" in (page or "")
retval |= "<title>CrawlProtect" in (page or "")
return retval

25
waf/immunify360.py Normal file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env python
"""
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
import re
from lib.core.enums import HTTP_HEADER
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "Imunify360 (CloudLinux Inc.)"
def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
page, headers, _ = get_page(get=vector)
retval = re.search(r"\Aimunify360", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
retval = any(_ in (page or "") for _ in ("protected by Imunify360", "Powered by Imunify360", "imunify360 preloader"))
if retval:
break
return retval

View File

@ -18,7 +18,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector)
retval = re.search(r"Mod_Security|NOYB", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
retval |= any(_ in (page or "") for _ in ("This error was generated by Mod_Security", "One or more things in your request were suspicious", "rules of the mod_security module", "The page you are trying to access is restricted due to a security rule"))
retval |= any(_ in (page or "") for _ in ("This error was generated by Mod_Security", "One or more things in your request were suspicious", "rules of the mod_security module", "The page you are trying to access is restricted due to a security rule", "Protected by Mod Security"))
if retval:
break

25
waf/onmessage.py Normal file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env python
"""
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
import re
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "onMessage Shield (Blackbaud)"
def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
page, headers, _ = get_page(get=vector)
retval = re.search(r"onMessage Shield", headers.get("X-Engine", ""), re.I) is not None
retval |= "This site is protected by an enhanced security system to ensure a safe browsing experience" in (page or "")
retval |= "onMessage SHIELD" in (page or "")
if retval:
break
return retval