mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 21:21:33 +00:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43c9e21c56 | ||
|
|
a831865633 | ||
|
|
578c41f6de | ||
|
|
dc01f2e773 | ||
|
|
db327a8538 | ||
|
|
aefb815064 | ||
|
|
014978cebc | ||
|
|
287371337d | ||
|
|
62a3618353 | ||
|
|
366a3f9336 | ||
|
|
74d2b60cf3 | ||
|
|
9e892e93f3 | ||
|
|
0bbf5f9467 | ||
|
|
8be4b29fd1 | ||
|
|
0507234add | ||
|
|
c3d9a1c2d4 | ||
|
|
9e8b28be7c | ||
|
|
f3f4a4cb37 | ||
|
|
2280f3ff2d | ||
|
|
d6cf038e48 | ||
|
|
2dfc383700 | ||
|
|
f20e7b403a | ||
|
|
36e62fe8a7 | ||
|
|
2542b6d241 | ||
|
|
bc13d8923b | ||
|
|
e51db6b355 | ||
|
|
6d28ca1f93 | ||
|
|
03e4741a69 | ||
|
|
b899ab9eb3 | ||
|
|
2e017eee99 | ||
|
|
a296d22195 | ||
|
|
ad11749b15 | ||
|
|
75a64245c5 | ||
|
|
9e00202823 | ||
|
|
df977d93d4 | ||
|
|
b0ca52086a |
@@ -1,6 +1,6 @@
|
||||
# sqlmap
|
||||
|
||||
[](https://api.travis-ci.org/sqlmapproject/sqlmap) [](https://www.python.org/) [](https://raw.githubusercontent.com/sqlmapproject/sqlmap/master/LICENSE) [](https://twitter.com/sqlmap)
|
||||
[](https://api.travis-ci.org/sqlmapproject/sqlmap) [](https://www.python.org/) [](https://raw.githubusercontent.com/sqlmapproject/sqlmap/master/LICENSE) [](https://twitter.com/sqlmap) [](https://badge.fury.io/py/sqlmap)
|
||||
|
||||
sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester and a broad range of switches lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out-of-band connections.
|
||||
|
||||
|
||||
@@ -25,10 +25,11 @@ from setuptools import setup, find_packages
|
||||
setup(
|
||||
name='sqlmap',
|
||||
version='$VERSION',
|
||||
description="Automatic SQL injection and database takeover tool",
|
||||
description='Automatic SQL injection and database takeover tool',
|
||||
long_description='sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester and a broad range of switches lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out-of-band connections.',
|
||||
author='Bernardo Damele Assumpcao Guimaraes, Miroslav Stampar',
|
||||
author_email='bernardo@sqlmap.org, miroslav@sqlmap.org',
|
||||
url='https://sqlmap.org',
|
||||
url='http://sqlmap.org',
|
||||
download_url='https://github.com/sqlmapproject/sqlmap/archive/$VERSION.zip',
|
||||
license='GNU General Public License v2 (GPLv2)',
|
||||
packages=find_packages(),
|
||||
|
||||
8
extra/wafdetectify/__init__.py
Normal file
8
extra/wafdetectify/__init__.py
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
pass
|
||||
121
extra/wafdetectify/wafdetectify.py
Normal file
121
extra/wafdetectify/wafdetectify.py
Normal file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
import cookielib
|
||||
import glob
|
||||
import httplib
|
||||
import inspect
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import urllib
|
||||
import urllib2
|
||||
import urlparse
|
||||
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
NAME, VERSION, AUTHOR = "WAF Detectify", "0.1", "sqlmap developers (@sqlmap)"
|
||||
TIMEOUT = 10
|
||||
HEADERS = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Cache-Control": "max-age=0"}
|
||||
SQLMAP_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
||||
SCRIPTS_DIR = os.path.join(SQLMAP_DIR, "waf")
|
||||
LEVEL_COLORS = {"o": "\033[00;94m", "x": "\033[00;91m", "!": "\033[00;93m", "i": "\033[00;92m"}
|
||||
CACHE = {}
|
||||
WAF_FUNCTIONS = []
|
||||
|
||||
def get_page(get=None, url=None, host=None, data=None):
|
||||
key = (get, url, host, data)
|
||||
|
||||
if key in CACHE:
|
||||
return CACHE[key]
|
||||
|
||||
page, headers, code = None, {}, httplib.OK
|
||||
|
||||
url = url or ("%s%s%s" % (sys.argv[1], '?' if '?' not in sys.argv[1] else '&', get) if get else sys.argv[1])
|
||||
if not url.startswith("http"):
|
||||
url = "http://%s" % url
|
||||
|
||||
try:
|
||||
req = urllib2.Request("".join(url[_].replace(' ', "%20") if _ > url.find('?') else url[_] for _ in xrange(len(url))), data, HEADERS)
|
||||
conn = urllib2.urlopen(req, timeout=TIMEOUT)
|
||||
page = conn.read()
|
||||
headers = conn.info()
|
||||
except Exception, ex:
|
||||
code = getattr(ex, "code", None)
|
||||
page = ex.read() if hasattr(ex, "read") else getattr(ex, "msg", "")
|
||||
headers = ex.info() if hasattr(ex, "info") else {}
|
||||
|
||||
result = CACHE[key] = page, headers, code
|
||||
|
||||
return result
|
||||
|
||||
def colorize(message):
|
||||
if not subprocess.mswindows and sys.stdout.isatty():
|
||||
message = re.sub(r"\[(.)\]", lambda match: "[%s%s\033[00;49m]" % (LEVEL_COLORS[match.group(1)], match.group(1)), message)
|
||||
message = message.replace("@sqlmap", "\033[00;96m@sqlmap\033[00;49m")
|
||||
message = message.replace(NAME, "\033[00;93m%s\033[00;49m" % NAME)
|
||||
|
||||
return message
|
||||
|
||||
def main():
|
||||
global WAF_FUNCTIONS
|
||||
|
||||
print colorize("%s #v%s\n by: %s\n" % (NAME, VERSION, AUTHOR))
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
exit(colorize("[x] usage: python %s <hostname>" % os.path.split(__file__)[-1]))
|
||||
|
||||
cookie_jar = cookielib.CookieJar()
|
||||
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie_jar))
|
||||
urllib2.install_opener(opener)
|
||||
|
||||
sys.path.insert(0, SQLMAP_DIR)
|
||||
|
||||
for found in glob.glob(os.path.join(SCRIPTS_DIR, "*.py")):
|
||||
dirname, filename = os.path.split(found)
|
||||
dirname = os.path.abspath(dirname)
|
||||
|
||||
if filename == "__init__.py":
|
||||
continue
|
||||
|
||||
if dirname not in sys.path:
|
||||
sys.path.insert(0, dirname)
|
||||
|
||||
try:
|
||||
if filename[:-3] in sys.modules:
|
||||
del sys.modules[filename[:-3]]
|
||||
module = __import__(filename[:-3].encode(sys.getfilesystemencoding() or "utf8"))
|
||||
except ImportError, msg:
|
||||
exit(colorize("[x] cannot import WAF script '%s' (%s)" % (filename[:-3], msg)))
|
||||
|
||||
_ = dict(inspect.getmembers(module))
|
||||
if "detect" not in _:
|
||||
exit(colorize("[x] missing function 'detect(get_page)' in WAF script '%s'" % found))
|
||||
else:
|
||||
WAF_FUNCTIONS.append((_["detect"], _.get("__product__", filename[:-3])))
|
||||
|
||||
WAF_FUNCTIONS = sorted(WAF_FUNCTIONS, key=lambda _: "generic" in _[1].lower())
|
||||
|
||||
print colorize("[i] %d WAF scripts loaded" % len(WAF_FUNCTIONS))
|
||||
|
||||
found = False
|
||||
for function, product in WAF_FUNCTIONS:
|
||||
if found and "unknown" in product.lower():
|
||||
continue
|
||||
|
||||
if function(get_page):
|
||||
print colorize("[!] WAF/IPS/IDS identified as '%s'" % product)
|
||||
found = True
|
||||
|
||||
if not found:
|
||||
print colorize("[o] nothing found")
|
||||
|
||||
print
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -140,11 +140,11 @@ def action():
|
||||
conf.dbmsHandler.udfInjectCustom()
|
||||
|
||||
# File system options
|
||||
if conf.rFile:
|
||||
conf.dumper.rFile(conf.dbmsHandler.readFile(conf.rFile))
|
||||
if conf.fileRead:
|
||||
conf.dumper.rFile(conf.dbmsHandler.readFile(conf.fileRead))
|
||||
|
||||
if conf.wFile:
|
||||
conf.dbmsHandler.writeFile(conf.wFile, conf.dFile, conf.wFileType)
|
||||
if conf.fileWrite:
|
||||
conf.dbmsHandler.writeFile(conf.fileWrite, conf.fileDest, conf.fileWriteType)
|
||||
|
||||
# Operating system options
|
||||
if conf.osCmd:
|
||||
|
||||
@@ -13,6 +13,7 @@ import random
|
||||
import re
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
@@ -90,6 +91,7 @@ from lib.core.settings import NON_SQLI_CHECK_PREFIX_SUFFIX_LENGTH
|
||||
from lib.core.settings import SLEEP_TIME_MARKER
|
||||
from lib.core.settings import SUHOSIN_MAX_VALUE_LENGTH
|
||||
from lib.core.settings import SUPPORTED_DBMS
|
||||
from lib.core.settings import UNICODE_ENCODING
|
||||
from lib.core.settings import URI_HTTP_HEADER
|
||||
from lib.core.settings import UPPER_RATIO_BOUND
|
||||
from lib.core.threads import getCurrentThreadData
|
||||
@@ -761,7 +763,7 @@ def checkSqlInjection(place, parameter, value):
|
||||
infoMsg = "executing alerting shell command(s) ('%s')" % conf.alert
|
||||
logger.info(infoMsg)
|
||||
|
||||
process = subprocess.Popen(conf.alert, shell=True)
|
||||
process = subprocess.Popen(conf.alert.encode(sys.getfilesystemencoding() or UNICODE_ENCODING), shell=True)
|
||||
process.wait()
|
||||
|
||||
kb.alerted = True
|
||||
@@ -1357,7 +1359,10 @@ def checkWaf():
|
||||
value = "" if not conf.parameters.get(PLACE.GET) else conf.parameters[PLACE.GET] + DEFAULT_GET_POST_DELIMITER
|
||||
value += "%s=%s" % (randomStr(), agent.addPayloadDelimiters(payload))
|
||||
|
||||
pushValue(kb.redirectChoice)
|
||||
pushValue(conf.timeout)
|
||||
|
||||
kb.redirectChoice = REDIRECTION.YES
|
||||
conf.timeout = IDS_WAF_CHECK_TIMEOUT
|
||||
|
||||
try:
|
||||
@@ -1366,7 +1371,9 @@ def checkWaf():
|
||||
retVal = True
|
||||
finally:
|
||||
kb.matchRatio = None
|
||||
|
||||
conf.timeout = popValue()
|
||||
kb.redirectChoice = popValue()
|
||||
|
||||
if retVal:
|
||||
warnMsg = "heuristics detected that the target "
|
||||
|
||||
@@ -1347,7 +1347,7 @@ def parseTargetDirect():
|
||||
conf.hostname = "localhost"
|
||||
conf.port = 0
|
||||
|
||||
conf.dbmsDb = details.group("db")
|
||||
conf.dbmsDb = details.group("db").strip() if details.group("db") is not None else None
|
||||
conf.parameters[None] = "direct connection"
|
||||
|
||||
break
|
||||
@@ -2908,15 +2908,15 @@ def filterStringValue(value, charRegex, replacement=""):
|
||||
|
||||
return retVal
|
||||
|
||||
def filterControlChars(value):
|
||||
def filterControlChars(value, replacement=' '):
|
||||
"""
|
||||
Returns string value with control chars being supstituted with ' '
|
||||
Returns string value with control chars being supstituted with replacement character
|
||||
|
||||
>>> filterControlChars(u'AND 1>(2+3)\\n--')
|
||||
u'AND 1>(2+3) --'
|
||||
"""
|
||||
|
||||
return filterStringValue(value, PRINTABLE_CHAR_REGEX, ' ')
|
||||
return filterStringValue(value, PRINTABLE_CHAR_REGEX, replacement)
|
||||
|
||||
def isDBMSVersionAtLeast(version):
|
||||
"""
|
||||
|
||||
@@ -608,22 +608,22 @@ def _setMetasploit():
|
||||
raise SqlmapFilePathException(errMsg)
|
||||
|
||||
def _setWriteFile():
|
||||
if not conf.wFile:
|
||||
if not conf.fileWrite:
|
||||
return
|
||||
|
||||
debugMsg = "setting the write file functionality"
|
||||
logger.debug(debugMsg)
|
||||
|
||||
if not os.path.exists(conf.wFile):
|
||||
errMsg = "the provided local file '%s' does not exist" % conf.wFile
|
||||
if not os.path.exists(conf.fileWrite):
|
||||
errMsg = "the provided local file '%s' does not exist" % conf.fileWrite
|
||||
raise SqlmapFilePathException(errMsg)
|
||||
|
||||
if not conf.dFile:
|
||||
if not conf.fileDest:
|
||||
errMsg = "you did not provide the back-end DBMS absolute path "
|
||||
errMsg += "where you want to write the local file '%s'" % conf.wFile
|
||||
errMsg += "where you want to write the local file '%s'" % conf.fileWrite
|
||||
raise SqlmapMissingMandatoryOptionException(errMsg)
|
||||
|
||||
conf.wFileType = getFileType(conf.wFile)
|
||||
conf.fileWriteType = getFileType(conf.fileWrite)
|
||||
|
||||
def _setOS():
|
||||
"""
|
||||
@@ -1509,14 +1509,14 @@ def _cleanupOptions():
|
||||
if conf.url:
|
||||
conf.url = conf.url.strip()
|
||||
|
||||
if conf.rFile:
|
||||
conf.rFile = ntToPosixSlashes(normalizePath(conf.rFile))
|
||||
if conf.fileRead:
|
||||
conf.fileRead = ntToPosixSlashes(normalizePath(conf.fileRead))
|
||||
|
||||
if conf.wFile:
|
||||
conf.wFile = ntToPosixSlashes(normalizePath(conf.wFile))
|
||||
if conf.fileWrite:
|
||||
conf.fileWrite = ntToPosixSlashes(normalizePath(conf.fileWrite))
|
||||
|
||||
if conf.dFile:
|
||||
conf.dFile = ntToPosixSlashes(normalizePath(conf.dFile))
|
||||
if conf.fileDest:
|
||||
conf.fileDest = ntToPosixSlashes(normalizePath(conf.fileDest))
|
||||
|
||||
if conf.sitemapUrl and not conf.sitemapUrl.lower().startswith("http"):
|
||||
conf.sitemapUrl = "http%s://%s" % ('s' if conf.forceSSL else '', conf.sitemapUrl)
|
||||
@@ -1699,7 +1699,7 @@ def _setConfAttributes():
|
||||
conf.tests = []
|
||||
conf.trafficFP = None
|
||||
conf.HARCollectorFactory = None
|
||||
conf.wFileType = None
|
||||
conf.fileWriteType = None
|
||||
|
||||
def _setKnowledgeBaseAttributes(flushAll=True):
|
||||
"""
|
||||
|
||||
@@ -165,9 +165,9 @@ optDict = {
|
||||
},
|
||||
|
||||
"File system": {
|
||||
"rFile": "string",
|
||||
"wFile": "string",
|
||||
"dFile": "string",
|
||||
"fileRead": "string",
|
||||
"fileWrite": "string",
|
||||
"fileDest": "string",
|
||||
},
|
||||
|
||||
"Takeover": {
|
||||
|
||||
@@ -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.2.8.0"
|
||||
VERSION = "1.2.9.0"
|
||||
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)
|
||||
@@ -367,7 +367,7 @@ URI_INJECTABLE_REGEX = r"//[^/]*/([^\.*?]+)\Z"
|
||||
SENSITIVE_DATA_REGEX = r"(\s|=)(?P<result>[^\s=]*%s[^\s]*)\s"
|
||||
|
||||
# Options to explicitly mask in anonymous (unhandled exception) reports (along with anything carrying the <hostname> inside)
|
||||
SENSITIVE_OPTIONS = ("hostname", "answers", "data", "dnsDomain", "googleDork", "authCred", "proxyCred", "tbl", "db", "col", "user", "cookie", "proxy", "rFile", "wFile", "dFile", "testParameter", "authCred")
|
||||
SENSITIVE_OPTIONS = ("hostname", "answers", "data", "dnsDomain", "googleDork", "authCred", "proxyCred", "tbl", "db", "col", "user", "cookie", "proxy", "fileRead", "fileWrite", "fileDest", "testParameter", "authCred")
|
||||
|
||||
# Maximum number of threads (avoiding connection issues and/or DoS)
|
||||
MAX_NUMBER_OF_THREADS = 10
|
||||
@@ -406,7 +406,7 @@ REFLECTED_VALUE_MARKER = "__REFLECTED_VALUE__"
|
||||
REFLECTED_BORDER_REGEX = r"[^A-Za-z]+"
|
||||
|
||||
# Regular expression used for replacing non-alphanum characters
|
||||
REFLECTED_REPLACEMENT_REGEX = r".+"
|
||||
REFLECTED_REPLACEMENT_REGEX = r"[^\n]{1,100}"
|
||||
|
||||
# Maximum time (in seconds) spent per reflective value(s) replacement
|
||||
REFLECTED_REPLACEMENT_TIMEOUT = 3
|
||||
|
||||
@@ -571,7 +571,7 @@ def _createFilesDir():
|
||||
Create the file directory.
|
||||
"""
|
||||
|
||||
if not conf.rFile:
|
||||
if not conf.fileRead:
|
||||
return
|
||||
|
||||
conf.filePath = paths.SQLMAP_FILES_PATH % conf.hostname
|
||||
@@ -674,7 +674,7 @@ def _createTargetDirs():
|
||||
conf.outputPath = getUnicode(conf.outputPath)
|
||||
|
||||
try:
|
||||
with codecs.open(os.path.join(conf.outputPath, "target.txt"), "w+", UNICODE_ENCODING) as f:
|
||||
with openFile(os.path.join(conf.outputPath, "target.txt"), "w+") as f:
|
||||
f.write(kb.originalUrls.get(conf.url) or conf.url or conf.hostname)
|
||||
f.write(" (%s)" % (HTTPMETHOD.POST if conf.data else HTTPMETHOD.GET))
|
||||
f.write(" # %s" % getUnicode(subprocess.list2cmdline(sys.argv), encoding=sys.stdin.encoding))
|
||||
|
||||
@@ -471,13 +471,13 @@ def cmdLineParser(argv=None):
|
||||
# File system options
|
||||
filesystem = OptionGroup(parser, "File system access", "These options can be used to access the back-end database management system underlying file system")
|
||||
|
||||
filesystem.add_option("--file-read", dest="rFile",
|
||||
filesystem.add_option("--file-read", dest="fileRead",
|
||||
help="Read a file from the back-end DBMS file system")
|
||||
|
||||
filesystem.add_option("--file-write", dest="wFile",
|
||||
filesystem.add_option("--file-write", dest="fileWrite",
|
||||
help="Write a local file on the back-end DBMS file system")
|
||||
|
||||
filesystem.add_option("--file-dest", dest="dFile",
|
||||
filesystem.add_option("--file-dest", dest="fileDest",
|
||||
help="Back-end DBMS absolute filepath to write to")
|
||||
|
||||
# Takeover options
|
||||
|
||||
@@ -137,10 +137,14 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
|
||||
seq1 = seq1.replace(REFLECTED_VALUE_MARKER, "")
|
||||
seq2 = seq2.replace(REFLECTED_VALUE_MARKER, "")
|
||||
|
||||
if kb.heavilyDynamic:
|
||||
seq1 = seq1.split("\n")
|
||||
seq2 = seq2.split("\n")
|
||||
|
||||
seqMatcher.set_seq1(seq1)
|
||||
seqMatcher.set_seq2(seq2)
|
||||
|
||||
ratio = round(seqMatcher.quick_ratio(), 3)
|
||||
ratio = round(seqMatcher.quick_ratio() if not kb.heavilyDynamic else seqMatcher.ratio(), 3)
|
||||
|
||||
# If the url is stable and we did not set yet the match ratio and the
|
||||
# current injected value changes the url page content
|
||||
|
||||
@@ -490,7 +490,7 @@ class Connect(object):
|
||||
page = Connect._connReadProxy(conn) if not skipRead else None
|
||||
|
||||
if conn:
|
||||
code = conn.code
|
||||
code = (code or conn.code) if conn.code == kb.originalCode else conn.code # do not override redirection code (for comparison purposes)
|
||||
responseHeaders = conn.info()
|
||||
responseHeaders[URI_HTTP_HEADER] = conn.geturl()
|
||||
else:
|
||||
|
||||
@@ -9,6 +9,8 @@ import httplib
|
||||
import urllib2
|
||||
|
||||
from lib.core.data import conf
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.exception import SqlmapConnectionException
|
||||
|
||||
class HTTPSPKIAuthHandler(urllib2.HTTPSHandler):
|
||||
def __init__(self, auth_file):
|
||||
@@ -19,5 +21,10 @@ class HTTPSPKIAuthHandler(urllib2.HTTPSHandler):
|
||||
return self.do_open(self.getConnection, req)
|
||||
|
||||
def getConnection(self, host, timeout=None):
|
||||
# Reference: https://docs.python.org/2/library/ssl.html#ssl.SSLContext.load_cert_chain
|
||||
return httplib.HTTPSConnection(host, cert_file=self.auth_file, key_file=self.auth_file, timeout=conf.timeout)
|
||||
try:
|
||||
# Reference: https://docs.python.org/2/library/ssl.html#ssl.SSLContext.load_cert_chain
|
||||
return httplib.HTTPSConnection(host, cert_file=self.auth_file, key_file=self.auth_file, timeout=conf.timeout)
|
||||
except IOError, ex:
|
||||
errMsg = "error occurred while using key "
|
||||
errMsg += "file '%s' ('%s')" % (self.auth_file, getSafeExString(ex))
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
|
||||
@@ -108,7 +108,7 @@ class UDF:
|
||||
return output
|
||||
|
||||
def udfCheckNeeded(self):
|
||||
if (not conf.rFile or (conf.rFile and not Backend.isDbms(DBMS.PGSQL))) and "sys_fileread" in self.sysUdfs:
|
||||
if (not conf.fileRead or (conf.fileRead and not Backend.isDbms(DBMS.PGSQL))) and "sys_fileread" in self.sysUdfs:
|
||||
self.sysUdfs.pop("sys_fileread")
|
||||
|
||||
if not conf.osPwn:
|
||||
|
||||
@@ -501,7 +501,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||
count = threadData.shared.start
|
||||
|
||||
for i in xrange(startCharIndex, endCharIndex + 1):
|
||||
output += '_' if currentValue[i] is None else currentValue[i]
|
||||
output += '_' if currentValue[i] is None else filterControlChars(currentValue[i] if len(currentValue[i]) == 1 else ' ', replacement=' ')
|
||||
|
||||
for i in xrange(length):
|
||||
count += 1 if currentValue[i] is not None else 0
|
||||
@@ -518,7 +518,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||
status = ' %d/%d (%d%%)' % (_, length, int(100.0 * _ / length))
|
||||
output += status if _ != length else " " * len(status)
|
||||
|
||||
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), filterControlChars(output)))
|
||||
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), output))
|
||||
|
||||
runThreads(numThreads, blindThread, startThreadMsg=False)
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ def checkDependencies():
|
||||
except ImportError:
|
||||
warnMsg = "sqlmap requires 'python-impacket' third-party library for "
|
||||
warnMsg += "out-of-band takeover feature. Download from "
|
||||
warnMsg += "'http://code.google.com/p/impacket/'"
|
||||
warnMsg += "'https://github.com/coresecurity/impacket'"
|
||||
logger.warn(warnMsg)
|
||||
missing_libraries.add('python-impacket')
|
||||
|
||||
@@ -76,7 +76,7 @@ def checkDependencies():
|
||||
except ImportError:
|
||||
warnMsg = "sqlmap requires 'python-ntlm' third-party library "
|
||||
warnMsg += "if you plan to attack a web application behind NTLM "
|
||||
warnMsg += "authentication. Download from 'http://code.google.com/p/python-ntlm/'"
|
||||
warnMsg += "authentication. Download from 'https://github.com/mullender/python-ntlm'"
|
||||
logger.warn(warnMsg)
|
||||
missing_libraries.add('python-ntlm')
|
||||
|
||||
@@ -101,7 +101,7 @@ def checkDependencies():
|
||||
warnMsg += "be able to take advantage of the sqlmap TAB "
|
||||
warnMsg += "completion and history support features in the SQL "
|
||||
warnMsg += "shell and OS shell. Download from "
|
||||
warnMsg += "'http://ipython.scipy.org/moin/PyReadline/Intro'"
|
||||
warnMsg += "'https://pypi.org/project/pyreadline/'"
|
||||
logger.warn(warnMsg)
|
||||
missing_libraries.add('python-pyreadline')
|
||||
|
||||
|
||||
@@ -903,7 +903,7 @@ def dictionaryAttack(attack_dict):
|
||||
|
||||
if hash_regex in (HASH.MD5_BASE64, HASH.SHA1_BASE64, HASH.SHA256_BASE64, HASH.SHA512_BASE64):
|
||||
item = [(user, hash_.decode("base64").encode("hex")), {}]
|
||||
elif hash_regex in (HASH.MYSQL, HASH.MYSQL_OLD, HASH.MD5_GENERIC, HASH.SHA1_GENERIC, HASH.APACHE_SHA1):
|
||||
elif hash_regex in (HASH.MYSQL, HASH.MYSQL_OLD, HASH.MD5_GENERIC, HASH.SHA1_GENERIC, HASH.SHA224_GENERIC, HASH.SHA256_GENERIC, HASH.SHA384_GENERIC, HASH.SHA512_GENERIC, HASH.APACHE_SHA1):
|
||||
item = [(user, hash_), {}]
|
||||
elif hash_regex in (HASH.SSHA,):
|
||||
item = [(user, hash_), {"salt": hash_.decode("base64")[20:]}]
|
||||
|
||||
@@ -129,7 +129,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"]
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
|
||||
if re.search(r"-log$", kb.data.banner):
|
||||
banVer += ", logging enabled"
|
||||
|
||||
@@ -68,7 +68,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"] if 'dbmsVersion' in kb.bannerFp else None
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
banVer = Format.getDbms([banVer])
|
||||
value += "\n%sbanner parsing fingerprint: %s" % (blank, banVer)
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"]
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
|
||||
if re.search(r"-log$", kb.data.banner):
|
||||
banVer += ", logging enabled"
|
||||
|
||||
@@ -47,7 +47,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"] if 'dbmsVersion' in kb.bannerFp else None
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
|
||||
if re.search(r"-log$", kb.data.banner):
|
||||
banVer += ", logging enabled"
|
||||
|
||||
@@ -44,7 +44,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"] if 'dbmsVersion' in kb.bannerFp else None
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
banVer = Format.getDbms([banVer])
|
||||
value += "\n%sbanner parsing fingerprint: %s" % (blank, banVer)
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
release = kb.bannerFp["dbmsRelease"] if 'dbmsRelease' in kb.bannerFp else None
|
||||
version = kb.bannerFp["dbmsVersion"] if 'dbmsVersion' in kb.bannerFp else None
|
||||
servicepack = kb.bannerFp["dbmsServicePack"] if 'dbmsServicePack' in kb.bannerFp else None
|
||||
release = kb.bannerFp.get("dbmsRelease")
|
||||
version = kb.bannerFp.get("dbmsVersion")
|
||||
servicepack = kb.bannerFp.get("dbmsServicePack")
|
||||
|
||||
if release and version and servicepack:
|
||||
banVer = "%s %s " % (DBMS.MSSQL, release)
|
||||
|
||||
@@ -37,7 +37,7 @@ class Connector(GenericConnector):
|
||||
|
||||
try:
|
||||
self.connector = pymysql.connect(host=self.hostname, user=self.user, passwd=self.password, db=self.db, port=self.port, connect_timeout=conf.timeout, use_unicode=True)
|
||||
except (pymysql.OperationalError, pymysql.InternalError), msg:
|
||||
except (pymysql.OperationalError, pymysql.InternalError, pymysql.ProgrammingError), msg:
|
||||
raise SqlmapConnectionException(msg[1])
|
||||
except struct.error, msg:
|
||||
raise SqlmapConnectionException(msg)
|
||||
|
||||
@@ -124,7 +124,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "\n%scomment injection fingerprint: %s" % (blank, comVer)
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"] if "dbmsVersion" in kb.bannerFp else None
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
|
||||
if banVer and re.search(r"-log$", kb.data.banner):
|
||||
banVer += ", logging enabled"
|
||||
|
||||
@@ -46,7 +46,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"] if 'dbmsVersion' in kb.bannerFp else None
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
banVer = Format.getDbms([banVer])
|
||||
value += "\n%sbanner parsing fingerprint: %s" % (blank, banVer)
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"] if 'dbmsVersion' in kb.bannerFp else None
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
banVer = Format.getDbms([banVer])
|
||||
value += "\n%sbanner parsing fingerprint: %s" % (blank, banVer)
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"]
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
banVer = Format.getDbms([banVer])
|
||||
value += "\n%sbanner parsing fingerprint: %s" % (blank, banVer)
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class Fingerprint(GenericFingerprint):
|
||||
value += "active fingerprint: %s" % actVer
|
||||
|
||||
if kb.bannerFp:
|
||||
banVer = kb.bannerFp["dbmsVersion"]
|
||||
banVer = kb.bannerFp.get("dbmsVersion")
|
||||
banVer = Format.getDbms([banVer])
|
||||
value += "\n%sbanner parsing fingerprint: %s" % (blank, banVer)
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ class Custom:
|
||||
try:
|
||||
query = raw_input("sql-shell> ")
|
||||
query = getUnicode(query, encoding=sys.stdin.encoding)
|
||||
query = query.strip("; ")
|
||||
except KeyboardInterrupt:
|
||||
print
|
||||
errMsg = "user aborted"
|
||||
|
||||
@@ -601,6 +601,8 @@ class Databases:
|
||||
|
||||
if values is None:
|
||||
values = inject.getValue(query, blind=False, time=False)
|
||||
if values and isinstance(values[0], basestring):
|
||||
values = [values]
|
||||
|
||||
if Backend.isDbms(DBMS.MSSQL) and isNoneValue(values):
|
||||
index, values = 1, []
|
||||
|
||||
@@ -579,15 +579,15 @@ shLib =
|
||||
|
||||
# Read a specific file from the back-end DBMS underlying file system.
|
||||
# Examples: /etc/passwd or C:\boot.ini
|
||||
rFile =
|
||||
fileRead =
|
||||
|
||||
# Write a local file to a specific path on the back-end DBMS underlying
|
||||
# file system.
|
||||
# Example: /tmp/sqlmap.txt or C:\WINNT\Temp\sqlmap.txt
|
||||
wFile =
|
||||
fileWrite =
|
||||
|
||||
# Back-end DBMS absolute filepath to write the file to.
|
||||
dFile =
|
||||
fileDest =
|
||||
|
||||
|
||||
# These options can be used to access the back-end database management
|
||||
|
||||
20
thirdparty/ansistrm/ansistrm.py
vendored
20
thirdparty/ansistrm/ansistrm.py
vendored
@@ -181,16 +181,16 @@ class ColorizingStreamHandler(logging.StreamHandler):
|
||||
reset = self.reset
|
||||
message = message.replace(counter, ''.join((self.csi, str(self.color_map["yellow"] + 30), 'm', counter, reset)), 1)
|
||||
|
||||
match = re.search(r"'([^']+)'", message) # single-quoted
|
||||
if level != "PAYLOAD" and match:
|
||||
string = match.group(1)
|
||||
if not message.endswith(self.reset):
|
||||
reset = self.reset
|
||||
elif self.bold in message: # bold
|
||||
reset = self.reset + self.bold
|
||||
else:
|
||||
reset = self.reset
|
||||
message = message.replace(string, ''.join((self.csi, str(self.color_map["white"] + 30), 'm', string, reset)), 1)
|
||||
if level != "PAYLOAD":
|
||||
for match in re.finditer(r"[^\w]'([^']+)'", message): # single-quoted
|
||||
string = match.group(1)
|
||||
if not message.endswith(self.reset):
|
||||
reset = self.reset
|
||||
elif self.bold in message: # bold
|
||||
reset = self.reset + self.bold
|
||||
else:
|
||||
reset = self.reset
|
||||
message = message.replace("'%s'" % string, "'%s'" % ''.join((self.csi, str(self.color_map["white"] + 30), 'm', string, reset)), 1)
|
||||
else:
|
||||
message = ''.join((self.csi, ';'.join(params), 'm', message, self.reset))
|
||||
|
||||
|
||||
@@ -21,14 +21,16 @@ e4805169a081b834ca51a60a150c7247 extra/shutils/newlines.py
|
||||
1056d1112ba5130868178cb495d22b1d extra/shutils/regressiontest.py
|
||||
1e5532ede194ac9c083891c2f02bca93 extra/sqlharvest/__init__.py
|
||||
b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py
|
||||
0f581182871148b0456a691ae85b04c0 lib/controller/action.py
|
||||
94872ce72dc2628cdedf2eb82cba716e lib/controller/checks.py
|
||||
1e5532ede194ac9c083891c2f02bca93 extra/wafdetectify/__init__.py
|
||||
0142de525def5e3f17092dcc1ed67c95 extra/wafdetectify/wafdetectify.py
|
||||
3459c562a6abb9b4bdcc36925f751f3e lib/controller/action.py
|
||||
7493c782345a60f6c00c9281d51a494e lib/controller/checks.py
|
||||
c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py
|
||||
c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
|
||||
0adf547455a76dc71e6a599e52da1ed9 lib/core/agent.py
|
||||
fd8f239e259afaf5f24bcf34a0ad187f lib/core/bigarray.py
|
||||
ee1b800e860263b877a2b292a3e4becd lib/core/common.py
|
||||
3652331fec15a31ace15d8cce4024495 lib/core/common.py
|
||||
0d082da16c388b3445e656e0760fb582 lib/core/convert.py
|
||||
9f87391b6a3395f7f50830b391264f27 lib/core/data.py
|
||||
72016ea5c994a711a262fd64572a0fcd lib/core/datatype.py
|
||||
@@ -40,18 +42,18 @@ ab3f4f3e3019add5f4a2e28f7e8748a4 lib/core/enums.py
|
||||
cada93357a7321655927fc9625b3bfec lib/core/exception.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py
|
||||
458a194764805cd8312c14ecd4be4d1e lib/core/log.py
|
||||
05f72baa2db4073bb0273d7fc1df13eb lib/core/optiondict.py
|
||||
8e759d4c8711a5980d4bdc2d044a4fd4 lib/core/option.py
|
||||
7d6edc552e08c30f4f4d49fa93b746f1 lib/core/optiondict.py
|
||||
6826030069e1cd88eb87603a50b2d251 lib/core/option.py
|
||||
c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
|
||||
6783160150b4711d02c56ee2beadffdb lib/core/profiling.py
|
||||
6f654e1715571eff68a0f8af3d62dcf8 lib/core/readlineng.py
|
||||
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
|
||||
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
|
||||
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
|
||||
355a1680a1f53013390849ca50322c0e lib/core/settings.py
|
||||
bdb6b2b1b842c4f5e2874fe3a199f648 lib/core/settings.py
|
||||
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
|
||||
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
|
||||
12bed9603b6fba3e5ffda11d584bc449 lib/core/target.py
|
||||
815d1cf27f0f8738d81531e73149867d lib/core/target.py
|
||||
72d499ca8d792e90a1ebfb2ad2341a51 lib/core/testing.py
|
||||
e896992e4db26605ab1e73615b1f9434 lib/core/threads.py
|
||||
c40758411bb0bd68764d78e0bb72bd0f lib/core/unescaper.py
|
||||
@@ -59,7 +61,7 @@ b35636650cfe721f5cc47fb91737c061 lib/core/update.py
|
||||
e772deb63270375e685fa5a7b775c382 lib/core/wordlist.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/__init__.py
|
||||
7620f1f4b8791e13c7184c06b5421754 lib/parse/banner.py
|
||||
babf5c48bc6a3797fc459706af4465cd lib/parse/cmdline.py
|
||||
7b2a20d7f149cc2522275e5df23bdc54 lib/parse/cmdline.py
|
||||
fb2e2f05dde98caeac6ccf3e67192177 lib/parse/configfile.py
|
||||
3794ff139869f5ae8e81cfdbe5714f56 lib/parse/handler.py
|
||||
6bab53ea9d75bc9bb8169d3e8f3f149f lib/parse/headers.py
|
||||
@@ -69,15 +71,15 @@ f2af274126ce0a789027d35d367f2b9e lib/parse/payloads.py
|
||||
492654567e72b6a14584651fcd9f16e6 lib/parse/sitemap.py
|
||||
30eed3a92a04ed2c29770e1b10d39dc0 lib/request/basicauthhandler.py
|
||||
2b81435f5a7519298c15c724e3194a0d lib/request/basic.py
|
||||
c0cabedead14b8a23353b606672cff42 lib/request/comparison.py
|
||||
039f0f7cf997856fa2f6e8d5d69f7ae9 lib/request/connect.py
|
||||
859b6ad583e0ffba154f17ee179b5b89 lib/request/comparison.py
|
||||
e284905d23658b85e94a5dd37bfb80b2 lib/request/connect.py
|
||||
dd4598675027fae99f2e2475b05986da lib/request/direct.py
|
||||
2044fce3f4ffa268fcfaaf63241b1e64 lib/request/dns.py
|
||||
98535d0efca5551e712fcc4b34a3f772 lib/request/httpshandler.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/request/__init__.py
|
||||
a5cbc19ee18bd4b848515eb3ea3291f0 lib/request/inject.py
|
||||
aaf956c1e9855836c3f372e29d481393 lib/request/methodrequest.py
|
||||
51eeaa8abf5ba62aaaade66d46ff8b00 lib/request/pkihandler.py
|
||||
83c7a13e38ad5eedb6bb13463a7a9e90 lib/request/pkihandler.py
|
||||
2c3774b72586985719035b195f144d7b lib/request/rangehandler.py
|
||||
3cd9d17fc52bb62db29e0e24fc4d8a97 lib/request/redirecthandler.py
|
||||
7f12d8f3b6665ed7053954bba70ff718 lib/request/templates.py
|
||||
@@ -86,10 +88,10 @@ acc1db3667bf910b809eb279b60595eb lib/takeover/icmpsh.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/takeover/__init__.py
|
||||
46ff5840b29531412bcaa05dac190413 lib/takeover/metasploit.py
|
||||
fb9e34d558293b5d6b9727f440712886 lib/takeover/registry.py
|
||||
48575dde7bb867b7937769f569a98309 lib/takeover/udf.py
|
||||
6a49f359b922df0247eb236126596336 lib/takeover/udf.py
|
||||
f6f835e4190a55e42d13c1e7ca3f728f lib/takeover/web.py
|
||||
debc36a3ff80ba915aeeee69b21a8ddc lib/takeover/xp_cmdshell.py
|
||||
0e9d37cbeabd1bbbfe2c53f01bbb6a6e lib/techniques/blind/inference.py
|
||||
db208ab47de010836c6bf044e2357861 lib/techniques/blind/inference.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/techniques/blind/__init__.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/techniques/dns/__init__.py
|
||||
799faf9008527d2e9da9d923e50f685a lib/techniques/dns/test.py
|
||||
@@ -103,11 +105,11 @@ debc36a3ff80ba915aeeee69b21a8ddc lib/takeover/xp_cmdshell.py
|
||||
77ff35587af9e3dfde63b8327e230f9a lib/utils/api.py
|
||||
37dfb641358669f62c2acedff241348b lib/utils/brute.py
|
||||
31b1e7eb489eac837db6a2bc1dcb7da7 lib/utils/crawler.py
|
||||
de9620f03231d8329ee8434884b6bacd lib/utils/deps.py
|
||||
f9867bbfcd6d31916ca73e72e95fd881 lib/utils/deps.py
|
||||
f7af65aa47329d021e2b2cc8521b42a4 lib/utils/getch.py
|
||||
7af29f61302c8693cd6436d4b69e22d3 lib/utils/har.py
|
||||
062e4e8fc43ac54305a75ddd0d482f81 lib/utils/hashdb.py
|
||||
4d5b2262ad495301706a4cf4c565abec lib/utils/hash.py
|
||||
05dbc49838ca0454ce401ad616acf8c5 lib/utils/hash.py
|
||||
011d2dbf589e0faa0deca61a651239cc lib/utils/htmlentities.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/utils/__init__.py
|
||||
010d8327239d33af4ce9f25683cfc012 lib/utils/pivotdumptable.py
|
||||
@@ -121,35 +123,35 @@ e9e73cd6bd814dd7823a9da913cea61c lib/utils/xrange.py
|
||||
b9d2761f47fec3d98b88311a263fd5db plugins/dbms/access/connector.py
|
||||
3f1c50a1507d1c2f69c20c706230e2e2 plugins/dbms/access/enumeration.py
|
||||
fcc66fc377db3681f7890ec55675564b plugins/dbms/access/filesystem.py
|
||||
c2428c5c73d049abf4442ec1b9404a25 plugins/dbms/access/fingerprint.py
|
||||
cdd082981b421248ece0e7cf278071ff plugins/dbms/access/fingerprint.py
|
||||
e657b1b7a295a38ac9ce515158164f00 plugins/dbms/access/__init__.py
|
||||
77686d7c7e287d5db0a9a87f2c7d4902 plugins/dbms/access/syntax.py
|
||||
2f1d8706b51497623b2b59c07b552bdc plugins/dbms/access/takeover.py
|
||||
8df07c2805aceb7d6fb4add40de84795 plugins/dbms/db2/connector.py
|
||||
4deeda463003ab71e7d2f34a263b5bbf plugins/dbms/db2/enumeration.py
|
||||
da9dccd1f9ec2cf1e53295125dd983a0 plugins/dbms/db2/filesystem.py
|
||||
b54dbf44590a5cbefb2b4f8e9a01a383 plugins/dbms/db2/fingerprint.py
|
||||
ce434fc05a7ad236c49a155d62f0cac4 plugins/dbms/db2/fingerprint.py
|
||||
95b35cbd859bbced44e7f8fd84486d75 plugins/dbms/db2/__init__.py
|
||||
82d96d8fcfd565129580260040555623 plugins/dbms/db2/syntax.py
|
||||
25f0fb28e9defcab48a2e946fbb7550a plugins/dbms/db2/takeover.py
|
||||
53bd7de27d37958f543f5329362ac298 plugins/dbms/firebird/connector.py
|
||||
bc4d71116d7296d63894484f2e60ade2 plugins/dbms/firebird/enumeration.py
|
||||
c3ca81000200e5ab4210e9bf2e04ce93 plugins/dbms/firebird/filesystem.py
|
||||
bd2159afbe83c70059f57712b4ae0189 plugins/dbms/firebird/fingerprint.py
|
||||
bf98dbd666c162088f23ee697c065010 plugins/dbms/firebird/fingerprint.py
|
||||
d4ea3036492b8ae15340548b2936021f plugins/dbms/firebird/__init__.py
|
||||
c56f2dabe88fd761a1a9a51e4d104088 plugins/dbms/firebird/syntax.py
|
||||
1522a29bd4b54ea78bb2855fc32b6c72 plugins/dbms/firebird/takeover.py
|
||||
271a7f16e781d56a0a31a3d5515a1945 plugins/dbms/hsqldb/connector.py
|
||||
95919592e5bb83df00b99bb9e8a70977 plugins/dbms/hsqldb/enumeration.py
|
||||
616595e74ecb644271cbbd31815d92e0 plugins/dbms/hsqldb/filesystem.py
|
||||
b7d693a6f5f39fee0a65f2d7b0830c5e plugins/dbms/hsqldb/fingerprint.py
|
||||
aabc2b877a3696b99912bdf362c0fb69 plugins/dbms/hsqldb/fingerprint.py
|
||||
fd369161778d6b48d7f1f7fc14dcdb5c plugins/dbms/hsqldb/__init__.py
|
||||
4673ebfdce9859718c19e8a7765da8d3 plugins/dbms/hsqldb/syntax.py
|
||||
7c0535736215ca612756cf589adb249b plugins/dbms/hsqldb/takeover.py
|
||||
97dac442190bd4ffac3ba292e2abfd4c plugins/dbms/informix/connector.py
|
||||
c54d70e4847c6327bd3110c4d8723b04 plugins/dbms/informix/enumeration.py
|
||||
da9dccd1f9ec2cf1e53295125dd983a0 plugins/dbms/informix/filesystem.py
|
||||
35eac2f3837a72940eb50753dc4566e5 plugins/dbms/informix/fingerprint.py
|
||||
b182f01c2ba82aa94fbe4948383ea98d plugins/dbms/informix/fingerprint.py
|
||||
9dac94c8f76acf0be65b6c57ecdb5c34 plugins/dbms/informix/__init__.py
|
||||
aa77fec4fe6b2d7ca4a91aebd9ff4e21 plugins/dbms/informix/syntax.py
|
||||
25f0fb28e9defcab48a2e946fbb7550a plugins/dbms/informix/takeover.py
|
||||
@@ -164,48 +166,48 @@ bf7842bb291e2297c3c8d1023eb3e550 plugins/dbms/maxdb/takeover.py
|
||||
decc645344bb93aca504a71ba2e4cad4 plugins/dbms/mssqlserver/connector.py
|
||||
f1f1541a54faf67440179fa521f99849 plugins/dbms/mssqlserver/enumeration.py
|
||||
65911fdc86fa6322e72319e6488a0bb8 plugins/dbms/mssqlserver/filesystem.py
|
||||
08914da79141713bd69a25c3cc7f06a8 plugins/dbms/mssqlserver/fingerprint.py
|
||||
6cf74341fc84588205e02b70b2f0f5b6 plugins/dbms/mssqlserver/fingerprint.py
|
||||
f25c50a95e5390ecd32be5a011637349 plugins/dbms/mssqlserver/__init__.py
|
||||
612be1929108e7b4512a49a4a3837bbc plugins/dbms/mssqlserver/syntax.py
|
||||
3c0845fa526e1bb7bbe636fcfcbcc4a6 plugins/dbms/mssqlserver/takeover.py
|
||||
f6e1f3f09f32b9cb2ca11c016d373423 plugins/dbms/mysql/connector.py
|
||||
11a5724fdc0b0c0eb2626d952cda216a plugins/dbms/mysql/connector.py
|
||||
445164daf59b890aeacc968af58fcb53 plugins/dbms/mysql/enumeration.py
|
||||
4578fa29f04d0a75499f9668466ded07 plugins/dbms/mysql/filesystem.py
|
||||
4e23494d0a8f41c22ec3861fb404e9f7 plugins/dbms/mysql/fingerprint.py
|
||||
34d951003dca386719c4d91384d2669a plugins/dbms/mysql/fingerprint.py
|
||||
30065993f8300994e4658634121609e9 plugins/dbms/mysql/__init__.py
|
||||
0e2adbee217f5b94dcc124d24b8dde99 plugins/dbms/mysql/syntax.py
|
||||
403591e638b6bfdb840d52bd3138ee56 plugins/dbms/mysql/takeover.py
|
||||
f772070dba85976a7894dac5046b93ea plugins/dbms/oracle/connector.py
|
||||
e1ffee36fd18f33f34bb4bac4ae43f14 plugins/dbms/oracle/enumeration.py
|
||||
c326b0d8bed92be67888b0242f565ac8 plugins/dbms/oracle/filesystem.py
|
||||
538395c0e5ccb1b6befc17f129f45f29 plugins/dbms/oracle/fingerprint.py
|
||||
85a5d474faaf14df5a5a84c9f232c1d6 plugins/dbms/oracle/fingerprint.py
|
||||
9cbce3d3747c67f18e65f9c1eb910b0e plugins/dbms/oracle/__init__.py
|
||||
5c2f1611c3ceface38a7e95650391ae6 plugins/dbms/oracle/syntax.py
|
||||
bcdbd9c04d7d5a911e0e31abe1a24f0f plugins/dbms/oracle/takeover.py
|
||||
f99c23db4ee6a6b8c0edbf684d360ad3 plugins/dbms/postgresql/connector.py
|
||||
7cdb821884e5f15084d1bea7f8a50574 plugins/dbms/postgresql/enumeration.py
|
||||
c8bb829d45752b98e6a03817b92e0fe5 plugins/dbms/postgresql/filesystem.py
|
||||
d30806e39996e6d273f0af888f5710a4 plugins/dbms/postgresql/fingerprint.py
|
||||
c490b23b19e40e15cfbdbb026386bbd7 plugins/dbms/postgresql/fingerprint.py
|
||||
470860d3e85d11a67f2220bffaa415e7 plugins/dbms/postgresql/__init__.py
|
||||
20e6f48f496348be45f3402ebc265dbb plugins/dbms/postgresql/syntax.py
|
||||
1287acf330da86a93c8e64aff46e3b65 plugins/dbms/postgresql/takeover.py
|
||||
80a2083a4fb7809d310c3d5ecc94e3c5 plugins/dbms/sqlite/connector.py
|
||||
5194556e6b1575b1349f8ccfd773952b plugins/dbms/sqlite/enumeration.py
|
||||
90fa97b84998a01dba7cc8c3329a1223 plugins/dbms/sqlite/filesystem.py
|
||||
ed52c198f3346ceabdef676e9f5d3c0f plugins/dbms/sqlite/fingerprint.py
|
||||
9b1f236857b8a64750e8662be21abb69 plugins/dbms/sqlite/fingerprint.py
|
||||
f639120d42b33b6ca67930bddbf2ac1f plugins/dbms/sqlite/__init__.py
|
||||
964e59d2eba619b068b0a15cea28efe0 plugins/dbms/sqlite/syntax.py
|
||||
3364b2938d7040c507cd622c323557dc plugins/dbms/sqlite/takeover.py
|
||||
9e64e67291a4c369bad8b8cf2cfa722a plugins/dbms/sybase/connector.py
|
||||
426698152f63504061e5875e64957691 plugins/dbms/sybase/enumeration.py
|
||||
74de450dd6d6d006aa9c7eed56e6b09a plugins/dbms/sybase/filesystem.py
|
||||
c8ee0deaa2309e96d9a409ff1524f3ad plugins/dbms/sybase/fingerprint.py
|
||||
0329ab09187614bea02398def59695ec plugins/dbms/sybase/fingerprint.py
|
||||
a3db8618eed5bb2807b6f77605cba9cc plugins/dbms/sybase/__init__.py
|
||||
36acb9a5966af21b32e8558b0d50653d plugins/dbms/sybase/syntax.py
|
||||
79f6c7017db4ded8f74a0117188836ff plugins/dbms/sybase/takeover.py
|
||||
34d181a7086d6dfc7e72ae5f8a4cfe0f plugins/generic/connector.py
|
||||
e6cd1c5a5244d83396b401f7db43d323 plugins/generic/custom.py
|
||||
156c227dbe765da3d0fd2976fbe18d8b plugins/generic/databases.py
|
||||
ce6a6ff713852b5eca7b78316cc941c4 plugins/generic/custom.py
|
||||
78813e60e7108f78ef1af46d360f41bf plugins/generic/databases.py
|
||||
4e2b366bb9cfdaaed719b219913357c6 plugins/generic/entries.py
|
||||
d82f2c78c1d4d7c6487e94fd3a68a908 plugins/generic/enumeration.py
|
||||
0c8abe66a78edca0660bfb8049d109e2 plugins/generic/filesystem.py
|
||||
@@ -285,7 +287,7 @@ f2b9eac52d346315f5705f71beeda791 tamper/varnish.py
|
||||
0e40966a51d1eb5d42a2159d2015a8a4 tamper/versionedkeywords.py
|
||||
0fba004bf1be6edbefbda89f23f4e518 tamper/versionedmorekeywords.py
|
||||
de532c4e3160039335010c499129d54f tamper/xforwardedfor.py
|
||||
b25b47ddeeb62e5857fd5ad17fd454b5 thirdparty/ansistrm/ansistrm.py
|
||||
1996d6afa985a526df02efa1bf121976 thirdparty/ansistrm/ansistrm.py
|
||||
d41d8cd98f00b204e9800998ecf8427e thirdparty/ansistrm/__init__.py
|
||||
8e775c25bc9e84891ad6fcb4f0005c23 thirdparty/beautifulsoup/beautifulsoup.py
|
||||
cb2e1fe7c404dff41a2ae9132828f532 thirdparty/beautifulsoup/__init__.py
|
||||
@@ -390,10 +392,10 @@ d9006810684baf01ea33281d21522519 udf/postgresql/windows/32/8.3/lib_postgresqlud
|
||||
ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqludf_sys.dll_
|
||||
0d3fe0293573a4453463a0fa5a081de1 udf/postgresql/windows/32/9.0/lib_postgresqludf_sys.dll_
|
||||
336d0b0d2be333f5a6184042c85464fd waf/360.py
|
||||
667cacdcd4ba650c9a436f081a79cd64 waf/airlock.py
|
||||
a73a40d201b39f3387714c59934331e4 waf/airlock.py
|
||||
7da7970b45512b0233450dbd8088fde0 waf/anquanbao.py
|
||||
b61329e8f8bdbf5625f9520ec010af1f waf/armor.py
|
||||
dec64f18c23962d279cc1cde6469afed waf/asm.py
|
||||
2fe5335fde7a7f5b19d2f363a55ce805 waf/asm.py
|
||||
6ea7b4ff5f111acb0b24186ef82c3f2d waf/aws.py
|
||||
ef722d062564def381b1f96f5faadee3 waf/baidu.py
|
||||
07bc4b531d2353c9acfbfcada94ff12b waf/barracuda.py
|
||||
@@ -402,25 +404,25 @@ ef722d062564def381b1f96f5faadee3 waf/baidu.py
|
||||
41e399dbfe7b904d5aacfb37d85e1fbf waf/blockdos.py
|
||||
2f3bbf43be94d4e9ffe9f80e8483d62f waf/ciscoacexml.py
|
||||
ba84f296cb52f5e78a0670b98d7763fa waf/cloudbric.py
|
||||
feda0f2a5172325f39e8e3e38c45f73d waf/cloudflare.py
|
||||
b16b1c15532103346d5e2f5b8bd1ed36 waf/cloudfront.py
|
||||
94b50385a9d462492e3a639d71aaa1c3 waf/cloudflare.py
|
||||
29ba81741fd7e220a95fe7c5fae76e1a waf/cloudfront.py
|
||||
ac96f34c254951d301973617064eb1b5 waf/comodo.py
|
||||
56d58c982c2cf775e0f8dc6767f336fd waf/datapower.py
|
||||
1538b661e35843074f4599be93b3fae9 waf/denyall.py
|
||||
0182d23b34cf903537f77f4ec4b144bf waf/distil.py
|
||||
aade02eb8f6a4a214a53db0fd0f2aae6 waf/dosarrest.py
|
||||
357cbc0a17a44e4f64062b799c718e0b waf/dotdefender.py
|
||||
9760a22990f55ab51ea4eedabd939055 waf/dotdefender.py
|
||||
7ec3f2a90914b501100685aa66aadf02 waf/edgecast.py
|
||||
954bebd4a246d8b88794de00ccaecd3b waf/expressionengine.py
|
||||
a2ce6cde682f78e1fd561dc40611877e waf/fortiweb.py
|
||||
eb56ac34775cc3c5f721ec967d04b283 waf/generic.py
|
||||
ade1299c435db7b9e35cf1166ed9d859 waf/generic.py
|
||||
1c70655551b8296ceeb19292a342e620 waf/hyperguard.py
|
||||
2a52c09e4ce1f2a5976ce53b415ef496 waf/incapsula.py
|
||||
0359ca07b6e3ee0e4505ad5bfaa1de79 waf/incapsula.py
|
||||
1e5532ede194ac9c083891c2f02bca93 waf/__init__.py
|
||||
30ae98958fb35061d9a4145cc74c0489 waf/isaserver.py
|
||||
5a5c9452b9779bf39c208ebe26c98fdb waf/jiasule.py
|
||||
898f53c12133da3e946301f4aa97d538 waf/knownsec.py
|
||||
81e6bf619c7bb73c4b62e2439e60e95a waf/kona.py
|
||||
15a50edd48961ea168648a370f42e123 waf/kona.py
|
||||
b17a154fe7959619eaafffa60e14199f waf/modsecurity.py
|
||||
d09a50713daf3c0a2594ed4f50c57adb waf/naxsi.py
|
||||
bf573d01d56e585f4ad57132bc594934 waf/netcontinuum.py
|
||||
@@ -447,7 +449,7 @@ dffa9cebad777308714aaf83b71635b4 waf/teros.py
|
||||
b37210459a13de40bf07722c4d032c33 waf/trafficshield.py
|
||||
fe01932df9acea7f6d23f03c6b698646 waf/urlscan.py
|
||||
a687449cd4e45f69e33b13d41e021480 waf/uspses.py
|
||||
f3a81da13ee098e94edd965ea4b37b04 waf/varnish.py
|
||||
ab329be0231efdd360ebabd24c0e5315 waf/varnish.py
|
||||
20840afc269920826deac2b6c00d6b9c waf/wallarm.py
|
||||
11205abf397ae9072adc3234b656ade9 waf/watchguard.py
|
||||
9bf34539f382987490d2239d8ef0a651 waf/webappsecure.py
|
||||
@@ -455,7 +457,7 @@ f3a81da13ee098e94edd965ea4b37b04 waf/varnish.py
|
||||
11a5c6b10ced11e505a74e36ee2503b3 waf/wordfence.py
|
||||
68e332530fab216d017ede506c3fec2f waf/yundun.py
|
||||
bea35ba732ccc9548e6c4023cea6832b waf/yunsuo.py
|
||||
705ac8663513c12150cb5623ef4a04fb waf/zenedge.py
|
||||
47f8f6623841232a93c5229d6c1bebfe waf/zenedge.py
|
||||
dc394c5b90ada0a5d5853b5ad1f7d56d xml/banner/generic.xml
|
||||
d8925c034263bf1b83e7d8e1c78eec57 xml/banner/mssql.xml
|
||||
7b21aeb3ad66d7686eacd23a6346292c xml/banner/mysql.xml
|
||||
@@ -467,7 +469,7 @@ d48c971769c6131e35bd52d2315a8d58 xml/banner/servlet-engine.xml
|
||||
d989813ee377252bca2103cea524c06b xml/banner/sharepoint.xml
|
||||
350605448f049cd982554123a75f11e1 xml/banner/x-aspnet-version.xml
|
||||
817078783e1edaa492773d3b34d8eef0 xml/banner/x-powered-by.xml
|
||||
201b8bb7888f500294a9831bb47ce7a7 xml/boundaries.xml
|
||||
6debc049a8049b890ca109a731c60782 xml/boundaries.xml
|
||||
0d0d4bd0e06c99dd8eb4f92acc25caf3 xml/errors.xml
|
||||
a279656ea3fcb85c727249b02f828383 xml/livetests.xml
|
||||
3318571fac8df058f19ea85780606643 xml/payloads/boolean_blind.xml
|
||||
|
||||
@@ -17,7 +17,7 @@ def detect(get_page):
|
||||
|
||||
for vector in WAF_ATTACK_VECTORS:
|
||||
_, headers, _ = get_page(get=vector)
|
||||
retval = re.search(r"\AAL[_-]?(SESS|LB)=", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
|
||||
retval = re.search(r"\AAL[_-]?(SESS|LB)", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
|
||||
if retval:
|
||||
break
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ def detect(get_page):
|
||||
for vector in WAF_ATTACK_VECTORS:
|
||||
page, _, _ = 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:"))
|
||||
if retval:
|
||||
break
|
||||
|
||||
|
||||
@@ -17,12 +17,14 @@ def detect(get_page):
|
||||
|
||||
for vector in WAF_ATTACK_VECTORS:
|
||||
page, headers, code = get_page(get=vector)
|
||||
retval = re.search(r"cloudflare", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
|
||||
|
||||
if code >= 400:
|
||||
retval |= re.search(r"cloudflare", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
|
||||
retval |= re.search(r"\A__cfduid=", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
|
||||
retval |= headers.get("cf-ray") is not None
|
||||
retval |= re.search(r"CloudFlare Ray ID:|var CloudFlare=", page or "") is not None
|
||||
retval |= all(_ in (page or "") for _ in ("Attention Required! | Cloudflare", "Please complete the security check to access"))
|
||||
retval |= all(_ in (page or "") for _ in ("Attention Required! | Cloudflare", "Sorry, you have been blocked"))
|
||||
|
||||
if retval:
|
||||
break
|
||||
|
||||
@@ -18,9 +18,7 @@ def detect(get_page):
|
||||
for vector in WAF_ATTACK_VECTORS:
|
||||
_, headers, _ = get_page(get=vector)
|
||||
|
||||
retval |= re.search(r"cloudfront", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
|
||||
retval |= re.search(r"cloudfront", headers.get("X-Cache", ""), re.I) is not None
|
||||
retval |= headers.get("X-Amz-Cf-Id") is not None
|
||||
retval = re.search(r"Error from cloudfront", headers.get("X-Cache", ""), re.I) is not None
|
||||
|
||||
if retval:
|
||||
break
|
||||
|
||||
@@ -15,7 +15,7 @@ def detect(get_page):
|
||||
for vector in WAF_ATTACK_VECTORS:
|
||||
page, headers, _ = get_page(get=vector)
|
||||
retval = headers.get("X-dotDefender-denied", "") == "1"
|
||||
retval |= "dotDefender Blocked Your Request" in (page or "")
|
||||
retval |= any(_ in (page or "") for _ in ("dotDefender Blocked Your Request", '<meta name="description" content="Applicure is the leading provider of web application security', "Please contact the site administrator, and provide the following Reference ID:"))
|
||||
if retval:
|
||||
break
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ def detect(get_page):
|
||||
|
||||
if code >= 400 or (IDS_WAF_CHECK_PAYLOAD in vector and (code is None or re.search(GENERIC_PROTECTION_REGEX, page or "") and not re.search(GENERIC_PROTECTION_REGEX, original or ""))):
|
||||
if code is not None:
|
||||
kb.wafSpecificResponse = "HTTP/1.1 %s\n%s\n%s" % (code, "".join(_ for _ in headers.headers or [] if not _.startswith("URI")), page)
|
||||
kb.wafSpecificResponse = "HTTP/1.1 %s\n%s\n%s" % (code, "".join(_ for _ in (headers.headers if headers else {}) or [] if not _.startswith("URI")), page)
|
||||
|
||||
retval = True
|
||||
break
|
||||
|
||||
@@ -19,7 +19,8 @@ def detect(get_page):
|
||||
page, headers, _ = get_page(get=vector)
|
||||
retval = re.search(r"incap_ses|visid_incap", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
|
||||
retval |= re.search(r"Incapsula", headers.get("X-CDN", ""), re.I) is not None
|
||||
retval |= "Incapsula incident ID" in (page or "")
|
||||
retval |= any(_ in (page or "") for _ in ("Incapsula incident ID", "_Incapsula_Resource?", "?subject=WAF Block Page:"))
|
||||
retval |= all(_ in (page or "") for _ in ("Application Firewall Error", "If you feel you have been blocked in error, please contact Customer Support"))
|
||||
retval |= headers.get("X-Iinfo") is not None
|
||||
if retval:
|
||||
break
|
||||
|
||||
@@ -17,7 +17,7 @@ def detect(get_page):
|
||||
|
||||
for vector in WAF_ATTACK_VECTORS:
|
||||
page, headers, code = get_page(get=vector)
|
||||
retval = code in (400, 403, 501) and re.search(r"Reference #[0-9a-f.]+", page or "", re.I) is not None
|
||||
retval = code in (400, 403, 501) and all(_ in (page or "") for _ in ("Access Denied", "You don't have permission to access", "on this server", "Reference"))
|
||||
retval |= re.search(r"AkamaiGHost", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
|
||||
if retval:
|
||||
break
|
||||
|
||||
@@ -17,10 +17,7 @@ def detect(get_page):
|
||||
|
||||
for vector in WAF_ATTACK_VECTORS:
|
||||
page, headers, code = get_page(get=vector)
|
||||
retval = headers.get("X-Varnish") is not None
|
||||
retval |= re.search(r"varnish\Z", headers.get(HTTP_HEADER.VIA, ""), re.I) is not None
|
||||
retval |= re.search(r"varnish", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
|
||||
retval |= code == 404 and re.search(r"\bXID: \d+", page or "") is not None
|
||||
retval = code == 404 and re.search(r"\bXID: \d+", page or "") is not None
|
||||
retval |= code >= 400 and "Request rejected by xVarnish-WAF" in (page or "")
|
||||
if retval:
|
||||
break
|
||||
|
||||
@@ -16,8 +16,9 @@ def detect(get_page):
|
||||
retval = False
|
||||
|
||||
for vector in WAF_ATTACK_VECTORS:
|
||||
_, headers, code = get_page(get=vector)
|
||||
page, headers, code = get_page(get=vector)
|
||||
retval = code >= 400 and re.search(r"\AZENEDGE", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
|
||||
retval |= all(_ in (page or "") for _ in ("Your request has been blocked", "Incident ID", "/__zenedge/assets/"))
|
||||
if retval:
|
||||
break
|
||||
|
||||
|
||||
@@ -310,6 +310,16 @@ Formats:
|
||||
<prefix></prefix>
|
||||
<suffix># [RANDSTR]</suffix>
|
||||
</boundary>
|
||||
|
||||
<!-- e.g. admin' AND [INFERENCE] OR 'foo'='bar' AND password=$password -->
|
||||
<boundary>
|
||||
<level>3</level>
|
||||
<clause>1</clause>
|
||||
<where>1,2</where>
|
||||
<ptype>2</ptype>
|
||||
<prefix>'</prefix>
|
||||
<suffix> OR '[RANDSTR1]'='[RANDSTR2]</suffix>
|
||||
</boundary>
|
||||
<!-- End of WHERE/HAVING clause boundaries -->
|
||||
|
||||
<!-- Pre-WHERE generic boundaries (e.g. "UPDATE table SET '$_REQUEST["name"]' WHERE id=1" or "INSERT INTO table VALUES('$_REQUEST["value"]') WHERE id=1)"-->
|
||||
|
||||
Reference in New Issue
Block a user