13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

364 Chapter 16 <strong>Web</strong> Application Security<br />

personal information as to what securities the users hold <strong>and</strong> how much of each, <strong>and</strong> in<br />

extreme cases, even bank account information for users.<br />

Even the exposure of a table full of names <strong>and</strong> addresses is a serious violation of security.<br />

Customers value their privacy very highly, <strong>and</strong> a huge list of names <strong>and</strong> addresses,<br />

plus some inferred information about them (“all ten thous<strong>and</strong> of these people like to<br />

shop at online tobacco stores”) creates a potential sellable item to marketing firms that<br />

do not play by the rules.<br />

Much worse than simple access to our data, of course, is if somebody finds a way to<br />

manipulate them. A happy bank customer might find his account a few thous<strong>and</strong> dollars<br />

richer, or customer shipping addresses might be modified, causing some happy person<br />

somewhere (presumably one of the people who changed the data) to receive a good<br />

number of packages that should have been sent elsewhere.<br />

Loss or Destruction of Data<br />

Every bit as bad as having unauthorized users gain access to sensitive data is if we suddenly<br />

find that some portion of our data has been deleted or destroyed. If somebody<br />

manages to destroy tables in our database, our business could face irrecoverable consequences.<br />

If we are an online bank that displays bank account information, <strong>and</strong> somehow<br />

all the information for a particular account is lost, we are not a good bank. Much worse,<br />

if the entire table of users is deleted, we will find ourselves spending a large amount of<br />

time reconstructing databases <strong>and</strong> finding out who owns what.<br />

It is important to note that loss or destruction of data does not have to come from<br />

malicious or accidental misuse of our system. If the building in which our servers are<br />

housed burns down, <strong>and</strong> all the servers <strong>and</strong> hard disks with it, we have lost a large<br />

amount of data <strong>and</strong> had better hope that we have adequate backups <strong>and</strong> disaster recovery<br />

plans.<br />

Denial of Service<br />

We have previously talked about denial of service attacks (DoS) <strong>and</strong> their more serious<br />

cousins, distributed denial of service attacks (DDos) as potentially devastating attacks on<br />

our application’s availability. Having your servers rendered useless for hours, if not longer,<br />

can be a serious burden from which to recover. If you consider how ubiquitous many of<br />

the major sites on the Internet are <strong>and</strong> how you always expect them to be there, any<br />

downtime is a problem.<br />

Again, as in the previous section, a DoS can come from forces other than misuse.<br />

Even if we have robust backups stored off-site, if the building with our servers in it<br />

burns down, is buried in a mudslide, or is destroyed by alien invaders, <strong>and</strong> we do not<br />

have a plan for getting those computers back online extremely rapidly, we might find<br />

ourselves losing customers for days.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!