19.04.2013 Views

2KKUU7ita

2KKUU7ita

2KKUU7ita

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

298<br />

Part V: Hacking Applications<br />

Figure 14-12:<br />

A network<br />

camera’s<br />

login credentials<br />

embedded<br />

directly in<br />

its HTML<br />

source<br />

code.<br />

Countermeasures against<br />

unsecured login systems<br />

You can implement the following countermeasures to prevent people from<br />

attacking weak login systems in your web applications:<br />

✓ Any login errors that are returned to the end user should be as generic<br />

as possible, saying something similar to Your user ID and password<br />

combination is invalid.<br />

✓ The application should never return error codes in the URL that differentiate<br />

between an invalid user ID and an invalid password.<br />

If a URL message must be returned, the application should keep it as<br />

generic as possible. Here’s an example:<br />

www.your_web_app.com/login.cgi?success=false<br />

This URL message might not be convenient to the user, but it helps hide<br />

the mechanism and the behind-the-scenes actions from the attacker.

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

Saved successfully!

Ooh no, something went wrong!