Web Application Security Best

 
 
By Timothy Dyck  |  Posted 2002-10-14 Print this article Print
 
 
 
 
 
 
 


Practices"> Web Application Security Best Practices

  • Dont use C or any language that doesnt have automatic protection against buffer overflows. Java, a Web scripting language or a .Net language are all safe choices.
  • Validate incoming parameters in four ways before using them: their presence or absence, required length, required data type, and range within a set of permissible values. This also applies to variable data coming from cookies because they can be faked.
  • Use a generic error page to avoid leaking application or site configuration information.
  • Use a log-in manager or write standard code that ensures that every page requiring a user log-in checks to see that a log-in token exists in the server session.
  • All HTML output should go through an HTML validation checker that will filter out HTML control characters such as < and > or replace them with matching HTML escape sequences such as &lt and &gt. Dont forget to do this for e-mail as well because HTML-enabled e-mail clients are just Web browsers in disguise.
  • All parameters passed to the database should go through a SQL validation checker to escape special SQL characters such as a single quote.
  • Database access controls on base tables should restrict the Web application log-in to the bare-minimum functionality needed to run the application. Stored procedures that wrap application database calls provide safer ways to wrap application commands and automatic parameter type checking.
  • Encrypt sensitive application data such as user passwords and credit card data so that information loss will be limited if database security is breached.



  •  
     
     
     
    Timothy Dyck is a Senior Analyst with eWEEK Labs. He has been testing and reviewing application server, database and middleware products and technologies for eWEEK since 1996. Prior to joining eWEEK, he worked at the LAN and WAN network operations center for a large telecommunications firm, in operating systems and development tools technical marketing for a large software company and in the IT department at a government agency. He has an honors bachelors degree of mathematics in computer science from the University of Waterloo in Waterloo, Ontario, Canada, and a masters of arts degree in journalism from the University of Western Ontario in London, Ontario, Canada.
     
     
     
     
     
     
     

    Submit a Comment

    Loading Comments...
     
    Manage your Newsletters: Login   Register My Newsletters























     
     
     
     
     
     
     
     
     
     
     
    Rocket Fuel