SQLMAP POST 注入检测


SQLMAP POST 注入检测

  1. 使用Fiddler等工具模拟Post请求,保存Post的Raw数据到文件中

例如:op.txt

1
2
3
4
5
6
POST http://xxxx.xxxx.com/p HTTP/1.1
User-Agent: Fiddler
Host: xxxx.xxxx.com
Content-Length: 119

orderId=aaaaa

  1. 使用sqlmap验证注入
1
sqlmap.py -r op.txt --batch --risk 3 --level 3
  1. 结果如下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
        ___
__H__
___ ___[)]_____ ___ ___ {1.3.4.13#dev}
|_ -| . [(] | .'| . |
|___|_ ["]_|_|_|__,| _|
|_|V... |_| http://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 11:09:12 /2019-04-04/

[11:09:12] [INFO] parsing HTTP request from 'op.txt'
custom injection marker ('*') found in option '--data'. Do you want to process it? [Y/n/q] Y
[11:09:12] [INFO] testing connection to the target URL
[11:09:13] [INFO] checking if the target is protected by some kind of WAF/IPS
[11:09:13] [INFO] testing if the target URL content is stable
[11:09:13] [INFO] target URL content is stable
[11:09:13] [INFO] testing if (custom) POST parameter '#1*' is dynamic
[11:09:14] [WARNING] (custom) POST parameter '#1*' does not appear to be dynamic
[11:09:14] [WARNING] heuristic (basic) test shows that (custom) POST parameter '#1*' might not be injectable
[11:09:14] [INFO] testing for SQL injection on (custom) POST parameter '#1*'
[11:09:14] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[11:09:17] [INFO] testing 'Boolean-based blind - Parameter replace (original value)'
[11:09:17] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)'
[11:09:19] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[11:09:20] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[11:09:21] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[11:09:23] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace (FLOOR)'
[11:09:23] [INFO] testing 'MySQL inline queries'
[11:09:23] [INFO] testing 'PostgreSQL inline queries'
[11:09:24] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[11:09:24] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[11:09:25] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[11:09:26] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[11:09:27] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind'
[11:09:28] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[11:09:30] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind (IF)'
[11:09:31] [INFO] testing 'Oracle AND time-based blind'
[11:09:32] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[11:09:49] [WARNING] (custom) POST parameter '#1*' does not seem to be injectable
[11:09:49] [CRITICAL] all tested parameters do not appear to be injectable. Try to increase values for '--level'/'--risk' options if you wish to perform more tests. If you suspect that there is some kind of protection mechanism involved (e.g. WAF) maybe you could try to use option '--tamper' (e.g. '--tamper=space2comment') and/or switch '--random-agent'

[*] ending @ 11:09:49 /2019-04-04/