• 设为首页
  • 收藏本站
  • 积分充值
  • VIP赞助
  • 手机版
  • 微博
  • 微信
    微信公众号 添加方式:
    1:搜索微信号(888888
    2:扫描左侧二维码
  • 快捷导航
    福建二哥 门户 查看主题

    EditPlus查找PHP源码简单数字型注入的正则表达式

    发布者: Error | 发布时间: 2025-6-27 15:21| 查看数: 108| 评论数: 0|帖子模式

    今天看一个项目代码,文件不多,不过每个文件中都N多注入,一个一个看实在太累,索性花了点时间,弄了个正则表达式,搜索出来,然后再将安全的筛选出去。省了不少时间的说。 1.查找select、update、delete语句  
    ((select|SELECT|update|UPDATE|delete|DELETE) .*(from|FROM|set|SET) .*(where|WHERE) .*) 查询语句,对于没有条件判断的基本不存在注入问题,因而仅搜索此语句即可
    例子:
    select * from user where 2.简单的数字型注入  
    ((select|SELECT|update|UPDATE|delete|DELETE) .*(from|FROM|set|SET) .*(where|WHERE) .*=[ ]?["]?["]?\$) 能找到select、update delete三种语句,5种格式的整形注入,如:
    直接变量传入
    select * from guess where id=$subject_id
    update guess set is_valid=0 where id=$subject_id
    delete from guess where id=$subject_id
    =与变量之间存在空格
    select * from guess where id= $subject_id
    update guess set is_valid=0 where id= $subject_id
    delete from guess where id= $subject_id
    变量双引号
    select * from guess where id="$subject_id"
    update guess set is_valid=0 where id="$subject_id"
    delete from guess where id="$subject_id"
    =与双引号之间存在空格
    select * from guess where id= "$subject_id"
    update guess set is_valid=0 where id= "$subject_id"
    delete from guess where id= "$subject_id"
    =与引号、双引号之间存在空格
    select * from guess where id= " $subject_id"
    update guess set is_valid=0 where id= " $subject_id"
    delete from guess where id= " $subject_id"  

    来源:https://www.jb51.net/hack/5264.html
    免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

    最新评论

    QQ Archiver 手机版 小黑屋 福建二哥 ( 闽ICP备2022004717号|闽公网安备35052402000345号 )

    Powered by Discuz! X3.5 © 2001-2023

    快速回复 返回顶部 返回列表