当前位置:网站首页>sqli-labs第1关
sqli-labs第1关
2022-07-02 06:29:00 【藤原千花的败北】
草草写的一篇记录文章
概念
SQL注入就是将恶意代码拼接到业务正常的数据库查询,造成数据库信息泄露等危害。
我觉得
要弄懂SQL注入,需要一点计网的知识,最好知道Web开发的整个流程,中间用了哪些技术,为什么需要这种技术。当然,你首先得懂得数据库以及SQL查询,并且程序设计语言和SQL语言之间的结合(推荐一本书《数据库系统概论》)。有了这些基础,SQL注入就自然而然会懂的。
通关思路
输入id,登录正常
尝试闭合语句
单引号报错,推测后端查询语句为:
select * from table where id = ’ input ’
通过order by 枚举,可知字段数为3
由于回显信息较多,优先联合注入
由上图可知,第2、第3个字段为回显信息,故可构造payload,开始注入
库名:
表名:
http://127.0.0.1/sqli-labs/Less-1/?id=-1’ union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=‘security’ --+
字段名:
字段内容:
union select 1,2,group_concat(users,0x7e,password) from users --+
看过几篇教程做题时的记录
1、输入不同id,有不同回显结果,猜测后台sql语句为:select * from table where id= input;
2、单引号测试,报错,推测后台sql语句为:select * from table where id = ‘input’;
3、构造语句,单引号闭合,order by 4出错 ---->3列字段,select 1,2,3,–>回显位置;
4、联合注入: union select 1,2,(构造语句查询信息)–+
1.找漏洞
2.猜解字段数
3.获取数据库名字
4.查表
5.查字段名和字段数值
边栏推荐
- Carla-ue4editor import Roadrunner map file (nanny level tutorial)
- Carsim-問題Failed to start Solver: PATH_ID_OBJ(X) was set to Y; no corresponding value of XXXXX?
- In depth understanding of prototype drawings
- 什么是SQL注入
- Cvpr19 deep stacked hierarchical multi patch network for image deblurring paper reproduction
- MySQL optimization
- 使用Matplotlib绘制图表初步
- Use Wireshark to grab TCP three handshakes
- Li Kou daily one question brushing summary: binary tree chapter (continuous update)
- Matlab-其它
猜你喜欢
乐理基础(简述)
VS Code配置问题
How to wrap qstring strings
Linked list classic interview questions (reverse the linked list, middle node, penultimate node, merge and split the linked list, and delete duplicate nodes)
OpenCV3 6.3 用滤波器进行缩减像素采样
2022 Heilongjiang's latest eight member (Safety Officer) simulated test question bank and answers
Development of digital collection trading website development of metauniverse digital collection
Use C language to receive JSON strings
Use of OpenCV 6.4 median filter
Data reverse attack under federated learning -- gradinversion
随机推荐
Implementation of bidirectional linked list (simple difference, connection and implementation between bidirectional linked list and unidirectional linked list)
Comparable,Comparator,Clonable 接口使用剖析
程序猿学英语-指令式编程
How to apply for a secondary domain name?
Realize bidirectional linked list (with puppet node)
Global and Chinese market of medicine cabinet 2022-2028: Research Report on technology, participants, trends, market size and share
16: 00 interview, came out at 16:08, the question is really too
Force deduction method summary: double pointer
方法递归(斐波那契数列,青蛙跳台阶,汉诺塔问题)
[untitled]
Global and Chinese market of electric cheese grinder 2022-2028: Research Report on technology, participants, trends, market size and share
Jupyter Notebook常用快捷键(在命令模式中按H也可查看)
Global and Chinese market of tillage finishing machines 2022-2028: Research Report on technology, participants, trends, market size and share
力扣每日一题刷题总结:字符串篇(持续更新)
王-课外单词
Carla-UE4Editor导入RoadRunner地图文件(保姆级教程)
St-link connection error invalid ROM table of STM32 difficult and miscellaneous diseases
CarSim problem failed to start solver: path_ ID_ OBJ(X) was set to Y; no corresponding value of XXXXX?
VS Code配置问题
Introduction to anti interception technology of wechat domain name