13.09.2016 Views

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Security Threats<br />

347<br />

as ICMP. Detecting hosts on your network being used to attack others is easier than<br />

protecting your machines from attack. If every network administrator could be relied on<br />

to vigilantly monitor his own network, DDoS would not be such a problem.<br />

Because there are so many possible methods of attack, the only really effective defense<br />

is to monitor normal traffic behavior <strong>and</strong> have a pool of experts available to take countermeasures<br />

when abnormal situations occur.<br />

Errors in Software<br />

Any software you have bought, obtained, or written may have serious errors in it. Given<br />

the short development times normally allowed to web projects, the likelihood is high<br />

that this software has some errors. Any business that is highly reliant on computerized<br />

processes is vulnerable to buggy software.<br />

Errors in software can lead to all sorts of unpredictable behavior including service<br />

unavailability, security breaches, financial losses, <strong>and</strong> poor service to customers.<br />

Common causes of errors that you can look for include poor specifications, faulty<br />

assumptions made by developers, <strong>and</strong> inadequate testing.<br />

Poor Specifications<br />

The more sparse or ambiguous your design documentation is, the more likely you are<br />

to end up with errors in the final product. Although it might seem superfluous to you to<br />

specify that when a customer’s credit card is declined, the order should not be sent to<br />

the customer, at least one big-budget site had this bug.The less experience your developers<br />

have with the type of system they are working on, the more precise your specification<br />

needs to be.<br />

Assumptions Made by Developers<br />

A system’s designers <strong>and</strong> programmers need to make many assumptions. Of course, you<br />

hope that they will document their assumptions <strong>and</strong> usually be right. Sometimes,<br />

though, people make poor assumptions. For example, they might assume that input data<br />

will be valid, will not include unusual characters, or will be less than a particular size.<br />

They might also make assumptions about timing, such as the likelihood of two conflicting<br />

actions occurring at the same time or that a complex processing task will always take<br />

more time than a simple task.<br />

Assumptions like these can slip through because they are usually true. A cracker could<br />

take advantage of a buffer overrun because a programmer assumed a maximum length<br />

for input data, or a legitimate user could get confusing error messages <strong>and</strong> leave because<br />

your developers did not consider that a person’s name might have an apostrophe in it.<br />

These sorts of errors can be found <strong>and</strong> fixed with a combination of good testing <strong>and</strong><br />

detailed code review.<br />

Historically, operating system or application-level weaknesses exploited by crackers<br />

have usually related either to buffer overflows or race conditions.

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

Saved successfully!

Ooh no, something went wrong!