Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c6621c

Browse files
committed
Minor upgrade for WAF/IDS/IPS detection
1 parent f0500b1 commit 2c6621c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/core/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.5.115"
22+
VERSION = "1.0.5.116"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
@@ -463,7 +463,7 @@
463463
BRUTE_COLUMN_EXISTS_TEMPLATE = "EXISTS(SELECT %s FROM %s)"
464464

465465
# Payload used for checking of existence of IDS/WAF (dummier the better)
466-
IDS_WAF_CHECK_PAYLOAD = "AND 1=1 UNION ALL SELECT 1,2,'<script>',table_name FROM information_schema.tables WHERE 2>1-- ../../../etc/passwd"
466+
IDS_WAF_CHECK_PAYLOAD = "AND 1=1 UNION ALL SELECT 1,NULL,'<script>alert(\"XSS\")</script>',table_name FROM information_schema.tables WHERE 2>1--/**/../../../etc/passwd"
467467

468468
# Data inside shellcodeexec to be filled with random string
469469
SHELLCODEEXEC_RANDOM_STRING_MARKER = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

waf/generic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import re
99

10+
from lib.core.settings import IDS_WAF_CHECK_PAYLOAD
1011
from lib.core.settings import WAF_ATTACK_VECTORS
1112

1213
__product__ = "Generic (Unknown)"
@@ -21,7 +22,7 @@ def detect(get_page):
2122
for vector in WAF_ATTACK_VECTORS:
2223
page, _, code = get_page(get=vector)
2324

24-
if code >= 400:
25+
if code >= 400 or IDS_WAF_CHECK_PAYLOAD in vector and code is None:
2526
retval = True
2627
break
2728

0 commit comments

Comments
 (0)