How to develop secure Web apps

April 10, 2001, 10:57 AM —  InfoWorld — 

The best way to prevent Web application attacks is through education and vigilance. Developers should be educated on secure coding practices, and management should be educated on the risks involved in taking a system live before it has been thoroughly tested. Additionally, administrators and security professionals should constantly monitor vendor Web sites, security Web sites, and security mailing lists to ferret out potential vulnerabilities in the applications and servers used by their Web applications.

Secure coding is only one of many components needed to develop a secure Web application. Ideally, security should be discussed, planned for, and included in all phases of application development, and procedures should be established for ongoing monitoring and maintenance of the Web application. When this occurs, the end result will be a stable, secure Web application.

Developers take notice

* First and foremost, developers should learn never to trust incoming data. A heightened distrust of the end-user goes a long way toward developing a secure Web application; developers should trust only what they control. Because they cannot control the end-user, developers should view all data inputs as potentially hostile and should design controls in the application to validate end-user data inputs.

For example, never assume that anything sent to a client's browser is returned unchanged or that the data entered into a Web form is what it should be. Does a form field that asks for a customer's address really need to contain a "<" symbol? Such symbols usually indicate code to a hacker. Adding filters and input checks significantly reduces the risk of many types of Web application attacks.

* Developers should include all security measures in the application as they are coding it. Using an anonymous Web server account during development to save time even though each end-user will authenticate to the live application with a user name and password can cause problems. Bugs may arise in the authentication code, not to be discovered until a few days before, or even after, the application goes live. Finding bugs at the last minute means that the application launch will be delayed or that it will be launched with bugs. Neither choice is optimal; so include all of the application's elements throughout the development process.

Whenever possible, do not use administrator or superuser accounts to run the application. Although you may save yourself time dealing with access rights and permissions, running everything as root is asking for trouble. With a superuser account, the Web application user will have write access to all database tables. Modifying a few URLs with SQL code, a malicious user can easily wipe out the entire database. Following the security principle of "least privilege" is a must. Least privilege means giving a user the lowest level of permissions necessary for performing a certain task. The user can still enjoy the Web application, and the company can feel safe by knowing that malicious users cannot easily perform illegal operations because their access does not allow it.

* Using HTTP GET requests to send sensitive

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff

VMware ESX Server in the Enterprise
By Edward L. Haletky
Published Dec 29, 2007 by Prentice Hall.
Enter now! | Official rules | Sample chapter

Green IT
By Toby Velte, Anthony Velte, Robert C. Elsenpeter
To be published Oct. 10, 2008 by McGraw Hill Professional
Enter now! | Official rules | About the book

Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

More Resources