Update for an Issue #12

This commit is contained in:
Miroslav Stampar 2012-12-03 14:27:01 +01:00
parent 79fca8e9d5
commit 42a8234c6f
36 changed files with 36 additions and 36 deletions

View File

@ -835,7 +835,7 @@ def __setTamperingFunctions():
priority = PRIORITY.NORMAL if not hasattr(module, '__priority__') else module.__priority__
for name, function in inspect.getmembers(module, inspect.isfunction):
if name == "tamper" and function.func_code.co_argcount == 2:
if name == "tamper":
found = True
kb.tamperFunctions.append(function)
function.func_name = module.__name__

View File

@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOWEST
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces apostrophe character with its UTF-8 full width counterpart

View File

@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOWEST
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces apostrophe character with its illegal double unicode counterpart

View File

@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOWEST
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Appends encoded NULL byte character at the end of payload

View File

@ -14,7 +14,7 @@ __priority__ = PRIORITY.LOWEST
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Base64 all characters in a given payload

View File

@ -14,7 +14,7 @@ __priority__ = PRIORITY.HIGHEST
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces greater than operator ('>') with 'NOT BETWEEN 0 AND #'

View File

@ -17,7 +17,7 @@ __priority__ = PRIORITY.NORMAL
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character after SQL statement with a valid random blank character.
Afterwards replace character = with LIKE operator

View File

@ -14,7 +14,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Double url-encodes all characters in a given payload (not processing
already encoded)

View File

@ -14,7 +14,7 @@ __priority__ = PRIORITY.LOWEST
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Url-encodes all characters in a given payload (not processing already
encoded)

View File

@ -16,7 +16,7 @@ __priority__ = PRIORITY.LOWEST
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against ASP or ASP.NET web applications" % os.path.basename(__file__).split(".")[0])
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Unicode-url-encodes non-encoded characters in a given payload (not
processing already encoded)

View File

@ -17,7 +17,7 @@ __priority__ = PRIORITY.HIGHEST
def dependencies():
singleTimeWarnMessage("tamper script '%s' is unlikely to work against %s" % (os.path.basename(__file__).split(".")[0], DBMS.PGSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces all occurances of operator equal ('=') with operator 'LIKE'

View File

@ -19,7 +19,7 @@ __priority__ = PRIORITY.HIGHER
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s < 5.1" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Adds versioned MySQL comment before each keyword

View File

@ -12,7 +12,7 @@ __priority__ = PRIORITY.HIGHEST
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces instances like 'IFNULL(A, B)' with 'IF(ISNULL(A), B, A)'

View File

@ -13,7 +13,7 @@ __priority__ = PRIORITY.HIGHER
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Embraces complete query with versioned comment

View File

@ -12,7 +12,7 @@ __priority__ = PRIORITY.HIGHER
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Embraces complete query with zero-versioned comment

View File

@ -16,7 +16,7 @@ __priority__ = PRIORITY.NORMAL
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Adds multiple spaces around SQL keywords

View File

@ -13,7 +13,7 @@ from lib.core.enums import PRIORITY
__priority__ = PRIORITY.NORMAL
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces predefined SQL keywords with representations
suitable for replacement (e.g. .replace("SELECT", "")) filters

View File

@ -16,7 +16,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against ASP web applications" % os.path.basename(__file__).split(".")[0])
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Adds a percentage sign ('%') infront of each character

View File

@ -16,7 +16,7 @@ __priority__ = PRIORITY.NORMAL
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces each keyword character with random case value

View File

@ -13,7 +13,7 @@ from lib.core.enums import PRIORITY
__priority__ = PRIORITY.LOW
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Add random comments to SQL keywords
Example: 'INSERT' becomes 'IN/**/S/**/ERT'

View File

@ -14,7 +14,7 @@ __priority__ = PRIORITY.NORMAL
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Appends special crafted string

View File

@ -9,7 +9,7 @@ from lib.core.enums import PRIORITY
__priority__ = PRIORITY.HIGH
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Appends 'sp_password' to the end of the payload for automatic obfuscation from DBMS logs

View File

@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with comments '/**/'

View File

@ -12,7 +12,7 @@ from lib.core.enums import PRIORITY
__priority__ = PRIORITY.LOW
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a dash comment ('--') followed by
a random string and a new line ('\n')

View File

@ -18,7 +18,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a pound character ('#') followed by
a random string and a new line ('\n')

View File

@ -21,7 +21,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s > 5.1.13" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a pound character ('#') followed by
a random string and a new line ('\n')

View File

@ -17,7 +17,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MSSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a random blank character from a
valid set of alternate characters

View File

@ -9,7 +9,7 @@ from lib.core.enums import PRIORITY
__priority__ = PRIORITY.LOW
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a pound character ('#') followed by
a new line ('\n')

View File

@ -17,7 +17,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a random blank character from a
valid set of alternate characters

View File

@ -16,7 +16,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a dash comment ('--') followed by
a new line ('\n')

View File

@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with plus ('+')

View File

@ -14,7 +14,7 @@ __priority__ = PRIORITY.LOW
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces space character (' ') with a random blank character from a
valid set of alternate characters

View File

@ -14,7 +14,7 @@ __priority__ = PRIORITY.HIGHEST
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces UNION ALL SELECT with UNION SELECT

View File

@ -14,7 +14,7 @@ __priority__ = PRIORITY.NORMAL
def dependencies():
pass
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Replaces quote character (') with a multi-byte combo %bf%27 together with
generic comment at the end (to make it work)

View File

@ -18,7 +18,7 @@ __priority__ = PRIORITY.HIGHER
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Encloses each non-function keyword with versioned MySQL comment

View File

@ -19,7 +19,7 @@ __priority__ = PRIORITY.HIGHER
def dependencies():
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s >= 5.1.13" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
def tamper(payload, headers=None):
def tamper(payload, **kwargs):
"""
Encloses each keyword with versioned MySQL comment