From ed37ae1562a2b2223d1d66ada646e2dc8ef5097d Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 5 Jun 2018 00:05:17 +0200 Subject: [PATCH] Adding new WAF script (Cloudbric) --- lib/core/settings.py | 2 +- txt/checksum.md5 | 3 ++- waf/cloudbric.py | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 waf/cloudbric.py diff --git a/lib/core/settings.py b/lib/core/settings.py index 308baf55f..4ee5deada 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.2.6.2" +VERSION = "1.2.6.3" 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) diff --git a/txt/checksum.md5 b/txt/checksum.md5 index 3cabca07b..687e2db09 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -47,7 +47,7 @@ c9a56e58984420a5abb7a3f7aadc196d lib/core/optiondict.py 0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py a7db43859b61569b601b97f187dd31c5 lib/core/revision.py fcb74fcc9577523524659ec49e2e964b lib/core/session.py -240e554483cc86de3fc483858dc8cb7b lib/core/settings.py +8dc42e1cb53bbbac2172f1edd5077597 lib/core/settings.py 0dfc2ed40adf72e302291f6ecd4406f6 lib/core/shell.py a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py 6306284edcccc185b2df085438572b0d lib/core/target.py @@ -400,6 +400,7 @@ ef722d062564def381b1f96f5faadee3 waf/baidu.py 6a2834daf767491d3331bd31e946d540 waf/binarysec.py 41e399dbfe7b904d5aacfb37d85e1fbf waf/blockdos.py 2f3bbf43be94d4e9ffe9f80e8483d62f waf/ciscoacexml.py +e70fbe03e1338f3d3a412136b033e3d6 waf/cloudbric.py 21b8203fdaaaac3cb7c84fa4dc0627f6 waf/cloudflare.py b16b1c15532103346d5e2f5b8bd1ed36 waf/cloudfront.py ac96f34c254951d301973617064eb1b5 waf/comodo.py diff --git a/waf/cloudbric.py b/waf/cloudbric.py new file mode 100644 index 000000000..df84c67c8 --- /dev/null +++ b/waf/cloudbric.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +""" +Copyright (c) 2006-2018 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__ = "Cloudbric WAF (Cloudbric)" + +def detect(get_page): + retval = False + + for vector in WAF_ATTACK_VECTORS: + page, headers, code = get_page(get=vector) + retval = code >= 400 and all(_ in (page or "") for _ in ("Cloudbric", "Malicious Code Detected")) + + return retval