IT Security & Network Security News & Reviews - eWeek

IT Security & Network Security News & Reviews: Whodunit? Finding Security Vulnerabilities in Application Code

By Brian Prince on 2009-05-28


Application security has to start during the development process. That means fixing vulnerable code before applications are ever pushed out to the public. Much has been written about the secure software development lifecycle—now it’s time to test security pros and developers alike. Can you find the vulnerabilities in the code?

Sorry—there is no prize involved, just a minor brainteaser for those of you who design applications or are charged with assessing their security. The code on the slides was provided by Veracode and Qualys.

  • of

Whodunit? Finding Security Vulnerabilities in Application Code

by Brian Prince
code provided by Veracode and Qualys

File/Path Manipulation

This occurs when the software allows user input to control or influence paths that are used in filesystem operations. This vulnerability could permit an attacker to access or change system files and other files critical to the application.

The Answer

The code is vulnerable to file/path manipulation because of insufficient input validation (cwe 20) on the fn parameter, which leads to arbitrary file retrieval.

Hands Off the Database

SQL injection is one of the most popular vectors of attack. When executed, the SQL statement fetches a different set of results from the database than the application would have originally requested. The attacker gains unauthorized access to or manipulates the data residing in the database on the server.

The Answer

The code is vulnerable to SQL injection because it creates an ad-hoc query using the employeeID parameter, which is untrusted.

Solving Cross-site Scripting

Cross-site scripting (XSS) remains one of the most common vulnerabilities affecting Web applications. If successful, an exploit could allow hackers to bypass access controls such as same origin policy.

The Answer

In this case, moving the <title> to after the <meta> tag prevents XSS attacks that trick the browser into using UTF-7 to decode the payload when the page should be actually rendered as UTF-8.

  • More slideshows

Advertisement

FEATURED SPONSOR MESSAGE

Start the New Year with business intelligence—it’s a smart move

Join us on February 1 for an encore rebroadcast at either 5 am or 12 noon EST and discover how business intelligence (BI) supports companies in uncertain business and economic climates. Get expert advice on how to create a strategy that fits your organization's needs and budget and see how quickly it can pay for itself.

Click Here

Brought to you by

 

eWEEK Quick LInks