从感染中清除htaccess

时间:2016-02-04 17:49:29

标签: wordpress .htaccess web malware

我有一个简单的wordpress网站,似乎被黑了。我使用了一些插件来扫描它,他们说我的htaccess文件被感染了。现在我可以使用一些帮助来清理它 - 特别是要理解

  • 要清理什么?即htaccess中的“感染”是什么样的?
  • 以后如何防止未经授权访问该文件?

有问题的htaccess是: http://pastebin.com/TcWiQvNP

2 个答案:

答案 0 :(得分:0)

这是默认的wordpress htaccess

    # BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

也是为了许可 将chmd设置为644

答案 1 :(得分:0)

首先,您需要对WHERE [/R dir] [/Q] [/F] [/T] pattern... Description: Displays the location of files that match the search pattern. By default, the search is done along the current directory and in the paths specified by the PATH environment variable. Parameter List: /R Recursively searches and displays the files that match the given pattern starting from the specified directory. /Q Returns only the exit code, without displaying the list of matched files. (Quiet mode) /F Displays the matched filename in double quotes. /T Displays the file size, last modified date and time for all matched files. pattern Specifies the search pattern for the files to match. Wildcards * and ? can be used in the pattern. The "$env:pattern" and "path:pattern" formats can also be specified, where "env" is an environment variable and the search is done in the specified paths of the "env" environment variable. These formats should not be used with /R. The search is also done by appending the extensions of the PATHEXT variable to the pattern. /? Displays this help message. NOTE: The tool returns an error level of 0 if the search is successful, of 1 if the search is unsuccessful and of 2 for failures or errors. Examples: WHERE /? WHERE myfilename1 myfile????.* WHERE $windir:*.* WHERE /R c:\windows *.exe *.dll *.bat WHERE /Q ??.??? WHERE "c:\windows;c:\windows\system32:*.dll" WHERE /F /T *.dll 配置结构有基本的了解,才能了解当前文件的功能并能够正确编辑它。

现在,广泛定义的重定向到一些绝对URL确实看起来很可疑。但我不知道这些网址是否与您的网站或其他网站相对应。

一般来说,你需要确定哪些指令是&#34; alien&#34; - 即与您在服务器上运行的应用程序不对应。