Home > Software Quality News > OWASP Guide to Building Secure Web Applications and Web Services, Chapter 22: Denial of Service Attacks
Software Quality News:
EMAIL THIS

OWASP Guide to Building Secure Web Applications and Web Services, Chapter 22: Denial of Service Attacks

By OWASP
27 Jul 2005 | OWASP

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

This article is provided by special arrangement with the Open Web Application Security Project (OWASP). This article is covered by the Creative Commons Share-Alike Attribution 2.5 license. You can find the latest version of this article and more free and open application security tools and documentation at http://www.owasp.org.


Denial of Service Attacks

Objective
To ensure that the application is robust as possible in the face of denial of service attacks.

Platforms Affected
All.

Relevant COBIT Topics
DS5.20 – Firewall architecture and connection with public networks

Description
Denial of Service (DoS) attacks has been primarily targeted against known software, with vulnerabilities that would allow the DoS attack to succeed.

Excessive CPU consumption
Modern MVC style applications are significant code bases in their own right. Many of the non-trivial business requests, such as report generation and statistical analys can consume quite large chunks of CPU time. When the CPU is asked to perform too many tasks at once, performance can suffer.

How to determine if you are vulnerable
Stress test your application to understand where the bottlenecks are.

How to protect yourself

  • Only allow authenticated and authorized users to consume significant CPU requests.

  • Carefully meter access to these bottlenecks and potentially re-code or change parameters to prevent the basic default requests from consuming so much CPU time.

Excessive disk I/O consumption
Database searches, large images, and huge cheap disks lead to unending requests for more disk I/Os. However, the best I/O's are the I/O's not taken. These might be serviced from RAM or simply not performed at all. Once a disk is required to search say a 50 MB index for each and every request, even the most grunty server will fail with even a moderate user load.

How to determine if you are vulnerable
Stress test your application to understand where the bottlenecks are.

How to protect yourself

  • Only allow authenticated and authorized users to consume significant disk I/O requests.

  • Carefully meter access to these bottlenecks and potentially re-code or change parameters to prevent the basic default requests from consuming so much disk time or space.

Excessive network I/O consumption
How to determine if you are vulnerable

  • Profile your application with a network optimization tool.

  • Any page or resource which gives out over a 20x input ratio (ie one kb request returning a 20 kb page and images) is a huge DoS amplifier and will quickly bring your site to its knees if a Slashdot post or attacker hits.

How to protect yourself

  • Only allow authenticated and authorized users to consume significant network requests.

  • Minimize the total size of any unauthenticated pages and resources.

  • Use a DoS shield or similar to help protect against some forms of DoS attack, however, be warned these devices cannot help if the upstream infrastructure has been overwhelmed.

User Account Lockout
A common denial of service attack against operating systems is to lockout user accounts if an account lockout policy is in place.

How to determine if you are vulnerable
Using an automated script, an attacker would try to enumerate various user accounts and lock them out.

How to protect yourself

  • Allow users to select their own account names. They are remarkably good at this.

  • Do not use predictable account numbers or easily guessed account names, like "A1234" "A1235", etc.

  • Record user lockout requests. If more than one account is locked out by the same IP address in a short time (say 30 seconds), prevent access from that source IP address.

  • Automatically unlock accounts after 15 minutes.

Further reading
http://www.corsaire.com/white-papers/040405-application-level-dos-attacks.pdf



Tags: Threat modelingBuilding security into the SDLC (Software development life cycle)VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Threat modeling
Web application security and the PCI DSS
The essentials of Web application threat modeling
How to implement security in Java EE and Java ME
Application security shouldn't involve duct tape, Band-Aids or bubble gum
Stop SQL injection attacks on applications
How to counter XSS attacks
Breaking the same origin barrier of JavaScript
Protection against "zero-minute" exploits
Denial of service and Ajax
CSRF attack vector with Ajax serialization

Building security into the SDLC (Software development life cycle)
Problems caused by skipping analysis stage of SDLC
Inexpensive phase of SDLC to catch and fix bugs
GatherSpace beefs up cloud-based requirements management
ALM: Best of breed vs. complete systems
Software development life cycle phases, iterations, explained step by step
The role of quality assurance (QA) pros in software security
Common software security risks and oversights
Why the quality assurance department should be involved in testing
How to develop secure applications
Secure software development practices 'not rocket science'

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Software Development Methods - Extreme Programming, Agile Programming, Scrum
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts