当前位置:网站首页>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
Embedded development has no passion, is it normal?
高效并发:Synchornized的锁优化详解
Pytest初体验
手写一个简单的web服务器(B/S架构)
How to debug TestCafe
[Code Hoof Set Novice Village 600 Questions] Leading to the combination of formulas and programs
[Code Hoof Set Novice Village 600 Questions] Merge two numbers without passing a character array
二叉树非递归遍历
不知道该怎么办的同步问题
随机推荐
21. Support Vector Machine - Introduction to Kernel Functions
(26)Blender源码分析之顶层菜单的关于菜单
"APIO2010" Patrol Problem Solution
[Code Hoof Set Novice Village 600 Questions] Leading to the combination of formulas and programs
[Intensive reading of the paper] iNeRF
linux view redis version command (linux view mysql version number)
Bika LIMS open source LIMS set - use of SENAITE (detection process)
LevelSequence source code analysis
C language parsing json string (json object is converted to string)
Golang - from entry to abandonment
C#中引用类型的变量做为参数在方法调用时加不加 ref 关键字的不同之处
【Acwing】第62场周赛 题解
How to identify fake reptiles?
hboot and recovery, boot.img, system.img
Write a database document management tool based on WPF repeating the wheel (1)
IDA PRO中汇编结构体识别
VOT2021 game introduction
Pytest first experience
[QNX Hypervisor 2.2用户手册]9.15 suppress
Efficient Concurrency: A Detailed Explanation of Synchornized's Lock Optimization