SQL注入常見參數
user(): 數據庫用戶,格式為user() @server
database(): 當前數據庫名稱。
version(): 當前數據版本,例如5.x.x-n1等.........
@@datadir: 數據庫路徑。通常用於load_file時猜測網站路徑等。例如:c:\xxxx\xxxxx\xxxx\data\
concat(): 聯合數據。聯合數據與union不同,union用於聯合兩條SQL語句,而這個用於聯合兩條數據結果。通常聯合兩個字段名,在錯誤回顯中,這個函數會聯合更復雜。例如:concat(username,0x3a,password)。
group_concat(): 用法與上面類似,通常格式如下:group_concat(distinct+user,0x3a,password),group_concat顧名思義,如果管理員賬號不止一個的時候,concat一次只能注入出來一個,進行依次注入太慢,於是使用group_concat把多條數據一次注入出來。
load_file(): 這是MySQL以文本方式讀取文件。需要注意\\等問題。
into outfile() 寫函數
Information_schema.tables: 記錄表名信息的表
Information_schema.columns: 記錄列名信息的表
例:http:// xxxx/ xxx/ xxx.php+x=1+union+select+1,2,3,4+from+information schema. tables where table_ schema=' xxx'