当前位置:网站首页>SQL注入 Less42(POST型堆叠注入)
SQL注入 Less42(POST型堆叠注入)
2022-07-31 22:34:00 【华为云】
前置知识: SQL注入 Less38(堆叠注入)
这题的页面和二次注入类似,但是我们没法注册用户,所以也就没法使用二次注入。
白盒审计,查看代码
$username = mysqli_real_escape_string($con1, $_POST["login_user"]);$password = $_POST["login_password"];
只对username进行了转义操作,而没有对password,所以password是个突破口
用万能密码来测试一下password' or 1=1#
但为什么我们输入的是admin但是登录进去的却是Dumb呢。
因为此处的SQL是
SELECT * FROM users WHERE username='admin' and password='' or 1=1 #'
而and的优先级是高于or的。所以此语句就相当于
select * from users where 1
那么结果则是整张users表。而Dumb处于第一行,因此登录进去的就是Dumb。
用password进行堆叠注入
用户名随便输入
密码';drop table users;
https://blog.csdn.net/weixin_43901998/article/details/107566100
边栏推荐
- VOT2021 game introduction
- [QNX Hypervisor 2.2用户手册]9.14 set
- What is Thymeleaf?How to use.
- 【核心概念】图像分类和目标检测中的正负样本划分以及架构理解
- Count characters in UTF-8 string function
- Financial profitability and solvency indicators
- TypeScript 的组件
- LeetCode 第 304 场周赛
- 信息学奥赛一本通 1941:【07NOIP普及组】Hanoi双塔问题 | 洛谷 P1096 [NOIP2007 普及组] Hanoi 双塔问题
- Commonly used security penetration testing tools (penetration testing tools)
猜你喜欢
Embedded development has no passion, is it normal?
嵌入式开发没有激情了,正常吗?
IJCAI2022 | 代数和逻辑约束的混合概率推理
二叉树非递归遍历
Document management and tools in the development process
Efficient Concurrency: A Detailed Explanation of Synchornized's Lock Optimization
How to debug TestCafe
老牌音乐播放器 WinAmp 发布 5.9 RC1 版:迁移到 VS 2019 完全重建,兼容 Win11
高效并发:Synchornized的锁优化详解
AI automatic code writing plugin Copilot (co-pilot)
随机推荐
如何减少软件设计和实现之间鸿沟
#yyds dry goods inventory# Interview must brush TOP101: the entry node of the ring in the linked list
[NLP] What is the memory of the model!
The difference between adding or not adding the ref keyword when a variable of reference type is used as a parameter in a method call in C#
【公开课预告】:超分辨率技术在视频画质增强领域的研究与应用
The principle of ReentrantLock (to be continued)
uniapp小程序检查、提示更新
A high-quality WordPress download site template theme developed abroad
基于RT1052 Aworks nanopb string 类型固定长度使用方式(二十七)
【ACM】2022.7.31训练赛
Memblaze released the first enterprise-grade SSD based on long-lasting particles. What is the new value behind it?
Embedded development has no passion, is it normal?
20. Support vector machine - knowledge of mathematical principles
Flex layout in detail
老牌音乐播放器 WinAmp 发布 5.9 RC1 版:迁移到 VS 2019 完全重建,兼容 Win11
Golang - from entry to abandonment
Daily practice——Randomly generate an integer between 1-100 and see how many times you can guess.Requirements: The number of guesses cannot exceed 7 times, and after each guess, it will prompt "bigger"
一款国外开发的高质量WordPress下载站模板主题
[Code Hoof Set Novice Village 600 Questions] Leading to the combination of formulas and programs
A solution to the server encountered an internal error that prevented it from fulfilling this request [easy to understand]