Macs don’t get viruses? Think again

Mac Virus

Oh how the PC users have longed for this day. One of Apple’s main (and much trumpeted) marketing points being that Mac is practically virus free, many have held the view that this stems largely from Macs (and OS X) being less prominent on the market than Windows-based PCs.

As a long time PC user, I cannot deny that I consider some of the applications in Windows a security train wreck (*cough* IE6 *cough*), but I do agree that the myth about Macs being immune to viruses is overrated to some degree.

Now, many reports say that some pornography sites hold a Mac trojan pretending to be a video codec.

Granted, this is not the first Mac trojan nor the first Mac malware. But, this one seems to be particularly nasty.

Named OSX.RSPlug.A, it appears to Mac users as they’re lured into thinking they’re viewing a video, and acts as a necessary video codec. The computers of users who proceed with the installation will be infested by a DNSChanger that hijacks web requests sent to eBay, PayPal and several online banking websites. Not nice.

Tags: , , , , ,

Protecting against SQL injection attacks

SQL Injection

SQL injection is a serious concern for web developers, as an attacker can use this simple hacking technique to gain access to sensitive data and/or potentially cripple your database. If you haven’t secured your applications, get familiar with the following method and grind it into your coding routine!

I’ve read a lot of guides, and they seem to tend to overcomplicate this, so I’ll be as straight forward as possible. In PHP the easiest way is to pass your data through the mysql_real_escape_string function. By escaping special characters on fields where the user can manipulate the database, you will avoid being vulnerable. Take a look below at the example of what to do and what not to do.

Another safe way of performing MySQL queries in PHP is to use the included mysqli library (you can read up on all the functions at http://php.net/mysqli):

The most important part of protecting yourself is stopping users from being able to pass unaltered database manipulative special characters, like single quotes.

MSDN - SQL Injection Article
Wikipedia - SQL Injection
SecuriTeam - SQL Injection Walkthrough
SitePoint - SQL Injection Attacks, Are You safe?

Tags: , , , ,

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales