当前位置:网站首页>绕过正则实现SQL注入
绕过正则实现SQL注入
2022-08-02 14:03:00 【H2223】
%27是' %20是空格 --+是为了将后面的代码注释掉
首先使用order by 来查看有多少列
?id=1%27%20order%20by%204--+ 发现4报错了,改成3后就恢复了,说明有3列
联合查询1,2,3
?id=-1%27%20union%20select%201,2,3--+
发现数据出在2,3上了
只要输入查询语句就可以获得所有数据
但在php文件中加入过滤正则
if (preg_match('/select\b[\s\S]*\bfrom/is',$id)){
die('sql injection');
}
被正则表达式捕获了
该正则表达式匹配了select后与form前的单词边界,select和from中间的所有字符
但sql注入要查询数据必须要有select与from,想要绕过正则表达式就要select后或form前有字符
这样是匹配不上了,但是SQL语法也错了
mysql是支持科学计数法的(1e1)
这样既可以绕开正则又不会语法错误
注意1e1会让表格多一列,所以要把3去掉
边栏推荐
猜你喜欢
Linux: CentOS 7 install MySQL5.7
Network pruning (1)
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id ‘c
[ROS](01)创建ROS工作空间
verilog学习|《Verilog数字系统设计教程》夏宇闻 第三版思考题答案(第九章)
c语言三子棋详解!!! (电脑智能下棋)(附上完整代码)
Visual Studio配置OpenCV之后,提示:#include<opencv2/opencv.hpp>无法打开源文件
【VCU】详解S19文件(S-record)
宝塔搭建DM企业建站系统源码实测
C语言sizeof和strlen的区别
随机推荐
Flask framework in-depth two
VS Code无法安装插件之Unable to install because, the extension '' compatible with current version
Unit 12 associated serialization
Flask framework
Verilog Learning Series
[ROS] (02) Create & compile ROS package Package
MongoDB安装流程心得:
执行栈和执行上下文
Unit 13 Mixing in View Base Classes
St. Regis Takeaway Notes - Lecture 10 Swagger
浏览器报错数字代表的大概意思
初识c语言指针
【c】小游戏---扫雷雏形
paddle window10环境下使用conda安装
二进制乘法运算
Briefly write about the use and experience of PPOCRLabel
Deep learning framework pytorch rapid development and actual combat chapter3
宏定义问题记录day2
Steps to connect the virtual machine with xshell_establish a network connection between the host and the vm virtual machine
主存储器(二)