I visited a site yesterday and without action on my part, got redirected to some spam advert. I tried to recreate what happened by revisiting the site, but it just loaded as expected. Visited the same site again today, got the redirected spam page again.
The site I got redirected to, judging by the domain, is probably extremely disposable, so it likely changes often. I got redirected to vpizz.rewards.7031.ws/?sov= with a very long URL featuring all sorts variables: &hid, &&nopop, &noalert, &redid, &gsid, &id, &impid, etc.
The popup text says:
Dear browser user,
You are today’s lucky visitor for: December 6, 2016
Please complete this short survey and to say “Thank you” we’ll give you
a chance to win a Mydin RM1000 Voucher®, a Giant RM1000
Voucher®, or a Tesco RM1000 Voucher®!
I’m based in Kota Kinabalu, the website I visited was for a business in Kuala Lumpur, and the company names of the supposed vouchers are actual Malaysian companies.
I had a quick look in the source code of the website to see if I could see anything suspicious.
Everything in the header looked fairly standard, but then I encountered an unusual area that had 98 lines of blank space. On the first line after that, and just before the closing </head> tag, was this suspicious code:
The script was drawing an ambiguously named file from a server in Kazakhstan. Alarm bells.
The line of code is complicated, and the full extent beyond my comprehension, but here’s the gist:
- On your first visit your browser gets a cookie named “__cfgoid” – I think it lasts 30 mins, but looks like it varies;
- You’re then redirected to the spam website;
- If you revisit the original site immediately, nothing happens, because cookie;
- When you come back later (I revisited some 24 hrs later), the process repeats;
- If, after your first visit, you delete the cookie and revisit the original site, it redirects you to google.com, to avoid suspicion (so logs your IP or something more invasive?);
Because it’s not my site and I don’t have access to the files, I can’t tell where it came from, where it hides, or how it gets the code into the WordPress source.
The site runs Piquant theme, modified in the parent theme directly, so it hasn’t been updated. They run version 1.1.1 (released 25 Apr 2016), and the original theme is currently on version 1.2.1 (released 29 Aug 2016). Changelog mostly states updates to included plugins, Instagram Feed, Revslider and Visual Composer.
The following plugins are apparent on the front page:
And that’s a good reason why it’s better to create a child theme instead of modifying the original theme, so that you can keep the original theme, and the plugins that came with it, up to date and secure.
Maybe somebody has info on how to remove this particular malware?