Home >php教程 >php手册 >php代码审计比较有意思的例子

php代码审计比较有意思的例子

WBOY
WBOYOriginal
2016-06-13 09:35:421416browse

代码审计比较有意思的例子
貌似是去年 ecshop支付漏洞
偶然出来的一个例子,感觉不错。分享下

复制代码 代码如下:


$a=addslashes($_GET['a']);
$b=addslashes($_GET['b']);
print_r($a.'
');
print_r($b.'
');
print_r(str_replace($a,'',$b));
//seay
?>



成功转义反斜杠(\)使得单引号报错。导致注入产生。

来源:http://www.moonsec.com/

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn