当前位置:网站首页>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
边栏推荐
- A solution to the server encountered an internal error that prevented it from fulfilling this request [easy to understand]
- Binary tree non-recursive traversal
- One thing to say, is outsourcing company worth it?
- 【公开课预告】:超分辨率技术在视频画质增强领域的研究与应用
- 面试突击69:TCP 可靠吗?为什么?
- "SDOI2016" Journey Problem Solution
- Pytest初体验
- A high-quality WordPress download site template theme developed abroad
- iNeuOS industrial Internet operating system, equipment operation and maintenance business and "low-code" form development tools
- Architecture Battalion Module 8 Homework
猜你喜欢
Unity-通过预制件和克隆方法动态实现各个UGUI下控件的创建和显示
MATLAB program design and application 2.4 Common internal functions of MATLAB
[Code Hoof Set Novice Village 600 Questions] Merge two numbers without passing a character array
【公开课预告】:超分辨率技术在视频画质增强领域的研究与应用
【论文精读】iNeRF
支付模块实现
Quick Start Tutorial for flyway
一款国外开发的高质量WordPress下载站模板主题
Count characters in UTF-8 string function
Structure of the actual combat battalion module eight operations
随机推荐
Unity-通过预制件和克隆方法动态实现各个UGUI下控件的创建和显示
Chapter VII
The latest masterpiece!Alibaba just released the interview reference guide (Taishan version), I just brushed it for 29 days
关注!海泰方圆加入《个人信息保护自律公约》
Bionic caterpillar robot source code
AI automatic code writing plugin Copilot (co-pilot)
[QNX Hypervisor 2.2用户手册]9.16 system
Realization of character makeup
Student management system on the first day: complete login PyQt5 + MySQL5.8 exit the operation logic
C#中引用类型的变量做为参数在方法调用时加不加 ref 关键字的不同之处
Bika LIMS open source LIMS set - use of SENAITE (detection process)
[Code Hoof Set Novice Village 600 Questions] Merge two numbers without passing a character array
PHP三元(三目)运算符
如何减少软件设计和实现之间鸿沟
ThreadLocal
LeetCode 第 304 场周赛
嵌入式开发没有激情了,正常吗?
Pytest first experience
uniapp小程序检查、提示更新
hboot与recovery、boot.img、system.img