From 608f141f52e55f986e97ed4434700599a322b1dc Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 27 May 2016 15:22:08 +0200 Subject: [PATCH] New waf scripts --- waf/stingray.py | 24 ++++++++++++++++++++++++ waf/yundun.py | 25 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 waf/stingray.py create mode 100644 waf/yundun.py diff --git a/waf/stingray.py b/waf/stingray.py new file mode 100644 index 000000000..8c6dc6b8c --- /dev/null +++ b/waf/stingray.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +""" +Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) +See the file 'doc/COPYING' for copying permission +""" + +import re + +from lib.core.enums import HTTP_HEADER +from lib.core.settings import WAF_ATTACK_VECTORS + +__product__ = "Stingray Application Firewall (Riverbed / Brocade)" + +def detect(get_page): + retval = False + + for vector in WAF_ATTACK_VECTORS: + _, headers, code = get_page(get=vector) + retval = code in (403, 500) and re.search(r"\AX-Mapping-", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None + if retval: + break + + return retval diff --git a/waf/yundun.py b/waf/yundun.py new file mode 100644 index 000000000..eef40d2ca --- /dev/null +++ b/waf/yundun.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +""" +Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) +See the file 'doc/COPYING' for copying permission +""" + +import re + +from lib.core.enums import HTTP_HEADER +from lib.core.settings import WAF_ATTACK_VECTORS + +__product__ = "Yundun Web Application Firewall (Yundun)" + +def detect(get_page): + retval = False + + for vector in WAF_ATTACK_VECTORS: + _, headers, _ = get_page(get=vector) + retval = re.search(r"YUNDUN", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None + retval |= re.search(r"YUNDUN", headers.get("X-Cache", ""), re.I) is not None + if retval: + break + + return retval