Skip to content

wasLastResponseDelayed does not use conf.timeSec by default #5912

@zjxszzzcb

Description

@zjxszzzcb

retVal = (threadData.lastQueryDuration >= max(MIN_VALID_DELAYED_RESPONSE, lowerStdLimit))

When I was using sqlmap to test whether a service was vulnerable to SQL injection, I encountered an issue:
sqlmap identified an injection point but misjudged it as a false positive.
When sqlmap used time-based blind injection to verify whether it was a false positive, it employed the following payloads:
SLEEP(5-(IF(69=69,0,5))) Response time 10 seconds, continuing.
SLEEP(5-(IF(69=88,0,5))) Response time about 1 second, continuing.
SLEEP(5-(IF(88=88,0,5))) Response time 11 seconds, continuing.
SLEEP(5-(IF(99 88,0,5))) Response time 8 seconds. Since this expression is an invalid SQL statement, a warning "false positive or unexploitable injection point detected" was triggered, and sqlmap's verification was interrupted.

Due to certain reasons, the service I tested does indeed introduce some delay when the expression is invalid. I wanted to simply increase --time-sec to 15 to verify this vulnerability, but it failed(I resolved the issue by adding --disable-stats. This parameter doesn't seem to appear in the help information? I checked with python sqlmap.py -hh but couldn't find this option.). I don't understand why under default conditions it only checks whether the response time is greater than the mean + 7 times the standard deviation, rather than continuing to check if response time > conf.timeSec?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions