Got a malware warning from Google, what now? 😰

greg_ohio

New Member
Messages
71
Reaction score
0
Location
Columbus, OH

So I woke up today and saw an email from Google Search Console saying my site has malware. I'm like what?? I run a small blog, nothing fancy. Just some posts about cricket and stuff. I checked the site, it looks fine to me. But Google says it's infected. I'm on shared hosting with Hostinger. I don't know much about security, just installed Wordfence last month after reading here. Did a scan, it says clean. But Google still shows warning. Anyone dealt with this? What should I do first? I'm freaking out a bit. Bhai log help karo 🙏

I'm a student and can't afford those expensive cleanup services. Is there a free way? Or should I just delete everything and start over? I have a backup from last week, but I'm not sure if that's clean either. Also, will this affect my Google rankings? I worked hard on those posts.

Any step by step would be great. Thanks in advance.

danielp77

New Member
Messages
51
Reaction score
0
Location
Melbourne, AU

Bhai don't panic, this is way more common than you think and it's almost always fixable. Whatever you do, do NOT delete the site. You'll lose the rankings you worked for, and half the time the "malware" isn't even in your files.

First thing: go read the actual Security Issues report in Search Console. Click into it and look at the sample URLs Google gives you. That's the single most useful clue you'll get, because it tells you exactly which file got flagged. If the samples are random spammy URLs you never created (like /wp-content/xyz123.php or /?s=cheap-viagra type stuff), that's a different problem than if it's flagging your actual posts.

Also run your domain through Sucuri's free SiteCheck and Google's Transparency Report. Wordfence is decent but it's signature-based and it flat out misses stuff, especially on shared hosting where the infection might not be inside WordPress at all. Check your .htaccess file in the root and every folder. Check wp-content/uploads for any .php file (there should be ZERO of those, if you find one that's your smoking gun). And look at index.php in the root, compare the modified date to your other files.

Since you're on Hostinger, open a ticket and ask them to run a server-side malware scan on your account. They do it free and they'll usually tell you the exact file paths. Shared hosting is a blessing and a curse here, sometimes a neighbour's site gets popped and yours gets caught in it through a symlink or a compromised account. Worth asking them directly.

Your backup is a coin flip. If it was taken while the infection was already sitting in your database (which is super common, they inject scripts into wp_options or into post content), restoring it just re-infects you the minute you request a review. So don't restore blind. Restore it, then scan immediately, and check the DB for weird base64 blobs in wp_options. Change your passwords too, all of them, plus regenerate the salts in wp-config.php.

On rankings: no, it doesn't permanently tank you. You'll lose traffic while the red screen is up, but once you clean it and hit "Request Review", recovery is usually a couple of days. The review is the step people forget, the warning will sit there for weeks if you never click it.

What did the sample URLs in the report look like? That'll narrow this down fast.

zer0cool99

New Member
Messages
67
Reaction score
0
Location
Seattle, WA

Daniel's right about not nuking the site. But your backup from last week is probably dirty too if you didn't notice anything changed, because these injections usually sit dormant for a bit before Google flags them. So don't restore it thinking you're clean.

Hostinger shared is rough for this. I had the exact same thing happen on a hobby site of mine, Wordfence said clean, Sucuri said clean, Google said nope. Turned out the payload was sitting in a .php file inside wp-content/uploads that someone dropped through a vulnerable plugin I forgot to update (old Elementor addon, embarrassing). Wordfence only scanned the DB and core files by default on my plan. Had to manually grep for base64_decode and eval in every folder. Found three of them.

Also check your Hostinger file manager for "modified in last 30 days" filter on your root and wp-content. Anything you didn't touch recently stands out instantly. And read the raw .htaccess, not through the WP editor, because sometimes the redirect code is hidden with whitespace.

The rankings thing, you'll probably dip a bit while the warning is live. Once you clean it and submit a review request in GSC it usually comes back within a week or two. Mine did. Not the end of the world.

What plugin versions are you running? If you got any nulled themes or cracked plugins, that's almost certainly your entry point. Be honest lol.

maria_lopez

New Member
Messages
66
Reaction score
0
Location
Miami, FL

Slight pushback on the "your backup is probably dirty" thing. Not always. If the payload came in through a plugin that got patched or auto-updated after you took that backup, the backup is clean. Don't restore it straight to Hostinger though. Spin it up locally first (LocalWP, XAMPP, whatever), keep it offline, run a scan there, then decide. Costs you an hour, saves you the guesswork.

Daniel's advice about the GSC sample URLs is the right starting point but don't stop at the .htaccess. Check these too:

  • mu-plugins folder (wp-content/mu-plugins). Wordfence and most scanners skip it because it's not part of core.
  • wp-config.php, compare it against a fresh one. Injections love that file because nothing scans it.
  • wp_options table, look for rogue cron entries and anything weird in siteurl/home.
  • wp_posts table. Grep for <script and iframe. DB injections won't show up in any file scan.

For file greps, base64_decode and eval are the obvious ones but also search for gzinflate, str_rot13, and assert(. And verify your core files against the official checksums, it takes two minutes:

WordPress release checksums

Last thing, the GSC review request needs specifics. They want to know what you removed and when. If you just click "request review" without touching anything, you'll get denied and it resets your clock. What WP version are you on, and when did you last update plugins? That timeline matters more than anything for figuring out what hit you.

wafflesRgood

New Member
Messages
57
Reaction score
0
Location
Berlin, DE

this is literally what happened to me last year, on my fish tank blog of all things. checked the site, everything looked normal, my readers said it looked normal, but google kept flagging it.

Here's the thing nobody's mentioned yet: a lot of these injections are cloaked. The bad code checks the visitor's user agent and only serves the malicious redirect to Googlebot. So when you open your site in your browser you see your cricket posts, but Google's crawler sees a spam page. That's why "it looks fine to me" means nothing here. Try fetching a page as Googlebot (there are free online tools for it) and see what comes back. Mine returned a wall of gibberish links to a pharmacy site. I almost threw up ngl.

maria's point about the backup, I gotta half disagree. Mine was dirty. I restored it thinking I was safe, got reinfected in like four days, and google flagged me again which was way worse the second time. So test it offline like she said, don't just trust it. I wasted two weeks doing the restore dance.

also Hostinger hPanel has its own malware scanner buried in the advanced section, it caught one file that Wordfence missed completely. worth running before you pay anyone.

how big is your site? if it's under a few hundred posts you might honestly be faster grepping files manually than waiting on support tickets. and check your plugins for anything you don't recognize. I had one called "wp-cache-pro-plus" that I never installed. that was the door.

sarah_2891

New Member
Messages
50
Reaction score
0
Location
Denver, CO

wafflesRgood nailed the thing that trips everyone up. The cloaking is real and it's why "but my site looks fine" is useless here. When I got hit a couple years back the payload was checking user agent AND referrer. So it served clean content to me, clean content to logged-in WP users, and only shit out the spam redirect when it saw a crawler hitting it cold. Fetching as Googlebot in a plain tool can still show you clean if it's checking referrer too, which is sneaky as hell.

zer0cool99's grep list is solid. I'd add preg_replace with the /e modifier and create_function to that list, older injections loved those. And don't sleep on the wp_options cron thing maria mentioned, I've seen a payload that lived entirely in a fake cron job and only ran once a day, so file scans never caught it mid-execution.

On the backup debate, I'm with waffles. Mine was dirty too. Restored it, got flagged again in less than a week. Test offline first, always.

Small thing, if you were thinking about paying for a cleanup, Sucuri's free SiteCheck is fine for a quick look but it's not a full scan, it misses the DB stuff. There's a thread on here about evaluating if Sucuri is still necessary that's worth a read before you spend anything.

What did the GSC sample URLs actually look like though? That tells you almost everything. If they're spammy paths you never made, it's cloaking. If they're your real posts, it's something in the DB. Post them here (blur your domain) and someone can probably guess the vector.

patrick_jones88

New Member
Messages
60
Reaction score
0
Location
Glasgow, UK

wafflesRgood is right about the cloaking, and honestly I'd go further on it: most free "fetch as Googlebot" tools are borderline useless by themselves because they send a Googlebot-looking user agent but no referrer, and half these payloads check both. The URL Inspection Live Test in Search Console was what actually showed me. That test renders the page through Google's own infrastructure. Also pull Google's cached copy of the page from the search results, it shows you what they saw, not what your browser sees.

Something nobody's hit yet though. Check for a second WordPress install you don't remember having. When my old portfolio got flagged, the payload wasn't in my site at all. Someone had dropped a whole throwaway WP install in a folder like /blog2 or /old, and my main site was clean the entire time. Google doesn't care, it flags the domain. Scroll your Hostinger file manager top to bottom looking for any folder you didn't create, and check subdomains too, because there's almost always an abandoned one pointing at the same account.

On the free cleanup, there is one. Hostinger will run a server-side malware scan on a support ticket and it costs nothing. Big difference from the plugin scans: it looks at the actual account files outside the WP install. Ask them specifically to scan for "malicious files in the account" instead of "WordPress malware", otherwise you get a copy paste reply about the plugin. That plus zer0cool99's grep list is your whole toolkit. The paid Sucuri stuff is for when you're truly stuck, not step one.

One pushback on maria's local restore idea, it's good advice but make sure you're running the scan on the offline copy before you even connect it to anything. I restored to a local box and stupidly had it online for a night to "check it looked right". Reinfected through the backup file itself. My own fault entirely.

How many posts are we talking? If it's under 50 a folder by folder walk is faster than automating it.

w0lfpack88

New Member
Messages
72
Reaction score
0
Location
Oslo, NO

patrick_jones88's point about the second WP install is the one I'd chase first honestly. Had this exact thing on an old affiliate site years back, main site was spotless, scans clean, but there was a /wp/ folder I swear I never made sitting in the root with a full install inside it. Someone dropped it through a nulled theme I was dumb enough to use. Google just sees the domain and nukes it either way.

The thing nobody's said yet: pull your raw access logs from Hostinger hPanel (it's under Advanced, logs section). You can see exactly what Googlebot requested and what got served. If the injection is cloaked like waffles said, you'll spot a request where the response size is massive compared to a normal page load. Also look for POST requests to weird .php files you don't recognise, that's usually how the shell got dropped in the first place. Logs only go back so far on shared so grab them now before they rotate.

On the backup thing, I'm with waffles and sarah. Mine was dirty too. Restored, got flagged in five days, felt like an idiot. Test it offline first, no exceptions.

nightowl87

New Member
Messages
60
Reaction score
0
Location
Portland, OR

The "second install" thing just made my stomach drop. I went and looked in my Hostinger file manager and there's a folder called /blog-old that I genuinely do not remember creating. Is that the kind of thing you mean patrick_jones88? It's got a wp-config in it and everything. If that's the source do I just delete the whole folder or do I need to be careful about it?

Also the cloaking stuff scares me because I've been checking my site on my phone and it looks perfect. So all that time I was basically checking nothing. Going to try the URL Inspection Live Test now since that's free.

One dumb question, is the access log thing easy to find in hPanel? I'm on the basic shared plan.

You must log in or register to reply here.