Vyoms
Bookmark and Share Rss Feeds

Click here to register on Shine.com - India's Fastest growing Job site!
Web Application Security Testing - Part 5 | Articles | Recent Articles | News Article | Interesting Articles | Technology Articles | Articles On Education | Articles On Corporate | Company Articles | College Articles | Articles on Recession
Hot Jobs
leftMenu Bullet Freshers Jobs
leftMenu Bullet Experienced Jobs
leftMenu Bullet Government Jobs
leftMenu Bullet Walkin Jobs
Placement Section
leftMenu Bullet Company Profiles
leftMenu Bullet Interview Questions
leftMenu Bullet Placement Papers
Interview Ebook
Get 9,000+ Interview Questions & Answers in an eBook.
Interview Questions & Answers Kit
  • 9,000+ Interview Questions
  • All Questions Answered
  • 5 FREE Bonuses
  • Free Upgrades
Resources @ VYOMS
leftMenu Bullet Companies In India
leftMenu Bullet Consultants In India
leftMenu Bullet Colleges In India
leftMenu Bullet Exams In India
leftMenu Bullet Latest Results
leftMenu Bullet Notifications In India
leftMenu Bullet Call Centers In India
leftMenu Bullet Training Institutes In India
leftMenu Bullet Job Communities In India
leftMenu Bullet Courses In India
leftMenu Bullet Jobs by Keyskills
leftMenu Bullet Jobs by Functional Areas
Learn @ VYOMS
leftMenu Bullet GATE Preparation
leftMenu Bullet GRE Preparation
leftMenu Bullet GMAT Preparation
IAS Preparation
leftMenu Bullet SAP Preparation
leftMenu Bullet Testing Preparation
leftMenu Bullet MBA Preparation
News @ VYOMS
leftMenu Bullet Freshers News
leftMenu Bullet Job Articles
leftMenu Bullet Latest News

VYOMS TOP EMPLOYERS

Wipro Technologies
Tata Consultancy Services
Accenture
IBM
Satyam
Genpact
Cognizant Technologies

Home » Articles » Web Application Security Testing - Part 5

Web Application Security Testing - Part 5



Search Jobs:
(For ex: Software Testing Jobs, Java Jobs, .Net Jobs)
 


Article Posted On Date : Friday, February 05, 2010


Web Application Security Testing - Part 5
Advertisements

 In the earlier articles of this series, we have concentrated on errors or mistakes that should be avoided at the code level and importance of data validation at client side and again on server side. If you have not read earlier articles in this series, you might find it interesting to read earlier articles covering many concepts related to web application security testing.
 
In this part we will establish the importance of securing our environment as well for providing complete security to web application. Web application is hosted in the environment, which is accessible from the out side world. Client interact with the server and database, if proper care is not taken vulnerabilities in the environment can be exploited and  as a result security will be compromised. We will discuss, different vulnerabilities related to the environment on which web applications are hosted like stored procedures, command injection, fingerprinting and Denial Of Service. 

Stored Procedure

Stored Procedures are pre-written SQL queries that are supplied by the data-base vendor or third party custom procedures written in-house and integrated into the database.  In general, Stored Procedures can be used to improve security and performance of web application, but you need to make sure that you use them with proper care and give only minimum necessary privilege to the user.

In Microsoft SQL Server, many of the stored procedures integrate the database into operating system. This can allow users with sufficient privileges to create login, schedule tasks and run command line programs which can be very dangerous. In Oracle, this functionality is not available out of the box, but developers can use either Java or PL/SQL languages supported by Oracle to build this functionality.

If you are using Microsoft SQL, one of the most dangerous stored procedure to look for is xp_cmdshell. This is an interface from database to operating system that can allow attacker to run arbitrary commands on the web server machine. To use this stored procedure, you need to pass following command as a separate query

EXEC master.. xp_cmdshell 'any command'

EXEC is the command used to execute this stored procedure and master.. is telling that this stored procedure is not part of current database. Similar to xp_cmdshell , there are many built-in stored procedures for accessing registry, file system and so on.

Protection against this vulnerability lies with the proper access permission. Ideally, every user should be granted permission for only what he needs and everything else should be restricted.

Command Injection

As suggested by the name, command injection is very much similar to the SQL injection. In SQL injection we inject any arbitrary SQL query along with the one intended. Similarly, in command injection we inject additional commands along eith the one intended. Command Injection allows an attacker to easily execute shell commands by piggybacking them off the initial command.

This target is applied mostly at places where input is directed to operating system commands or executable programs that resides on the server. Probability of this vulnerability's presence might be more on the UNIX operating systems because there are many small programs that can be executed from the command line and developers can decide to use them directly as well.

Once you identify place where commands are being passed to the operating system you can now try to piggyback commands after semi column or forcing new line characters. System will treat anything after semicolumn a different command rather than same command. You can also use | ( pipe ) and > (greater than) character to redirect the output to some file using this technique.

Proper safeguard from this attack is obviously, input validation. Along with input validation, exposure to this attack can also be minimized by running the web server as a low-level restricted user. Because all code and system call execute with the permissions of the user account that initiated them, it is wise to ensure that the web server is running as a user that can perform only limited operations.

Server Fingerprinting

Along with all the good knowledge Internet brings to everyone, it also makes it possible for everyone to know about the existing vulnerabilities in different operating system, databases and web servers. There may be chances that some one is still running older version of IIS and Apache, and most of the attackers know vulnerabilities present in these systems. There could be valid business reason for many people to still use the older version.

One of the very important piece of information for any attacker is the knowledge of your web server. If your attacker have information about the web server it can be fairly easy to find out vulnerabilities present in that particular web server.  Attack to identify what kind of web server you web application is running on is called finger printing. Idea is to find the version of the Web server and find a known exploit for it.

You might think that getting version number is fairly easy since it is specified in one of the headers for HTTP response. Fortunately, these responses can be changed by changing the configuration file on the web server. Nevertheless, you should always make sure that this is indeed changed. You can use tools like HTTPPrint to find out information about web server with some confidence. The only protection against this attack is to know what your attacker already knows and proactively make sure that your environment is protected against known vulnerabilities. It is always a good idea to keep an eye on sites like http://www.securityfocus.com  and http://www.osvdb.org to get information about the known vulnerabilities.

Denial Of Service

Every time you request some operation on your web application there are many processes which happens in the backend. Every request on the web server consume some resources. If an attacker floods web server with many requests and consumes all its resources so that web application becomes unavailable or unresponsive to new requests, it is called Denial of Service ( or DOS ) attack.

To perform this attack, you need to find out the places where web application is taking longest time to return the result. Places where your application is accessing databases or doing complex computations. Attacks like SQL injection can also be used to inject complex SQL queries which can result in Denial of Service.  Another approach could be to request a page but be slow in accepting data in response. Web server will keep connection open until it receives everything. If you can have many connections like these, eventually server will run out of the number of connections it can open and deny service to any new connection request.

It is worth noting here that according to the Internet standards, it is not possible to make more than two connections from the same browser to web server. You will need to write simple script to forks off multiple child processes to request same URL. You also need to check effect of these requests on your web application.

It is very difficult to protect against this attack. Normally clustering and load balancing is used to make sure that large number of requests are handled appropriately. Generally it is not considered a good approach to rely only only on load balancing and for sophisticated high-volume site it is not uncommon to find Intrusion Detection System and Bandwidth management solution to counter this attack.

Hope you found these articles interesting and they gave you some insight on different aspects related to web application security testing. In the next article, we will explore security aspects related to authentication and web services.

These articles are influenced by the book ( "How to Break Web Software" from Mike Andrews and James A. Whittaker ) I have recently read and should be a good read for you if you need information on web application security testing.`



Latest News Alerts
A diabetes breakthrough from India
A team of Indian scientists has discovered a novel form of insulin that could drastically reduce the suffering diabetics face in controlling their blood sugar. For the diabetics, daily painful pinpricks to inject doses of insulin is a routine affair, now in a new discovery scientists claim a single shot of insulin [...]
TamilNadu Open University (TNOU) Distance Education B.ED. Admission 2010
Tamil Nadu Open University (TNOU) ADMISSION NOTIFICATION FOR B.Ed 2010-11 Tamil Nadu Open University Dote Campus Chennai 60025 Website: www.tnou.ac.in B.Ed/B.Ed Special Education (Tamil/English medium) TNOU invites application for admission to Bachelor of Education (B.Ed) (recognized by govt of Tamilnadu, NCTE/DEC) Bachelor of Education in Special Education (B.Ed SE) (recognized by govt of Tamilnadu/RCI, New Delhi) For eligibility [...]
Yeddyurappa rejects CBI probe into illegal mining issue
Even after the high-drama helmet protest by Opposition MLAs, Karnataka CM BS Yeddyurappa on Tuesday rejected the demand of CBI probe into the illegal mining issue, according to reports. Earlier on Monday, raising the pitch on the illegal mining scam, opposition Congress and JD(S) MLAs and MLCs spent the entire night [...]
Cash-less hospitalisation scrapped, patients hit
Insurance companies are scrapping cash-less hospitalisation across the country which is going to affect those in need of medical treatment. Five days ago 34-year-old Nandita was admitted to a hospital with severe anemia. Three days later she has shelled out Rs 70,000 rupees for treatment in cash as despite paying for cashless hospitalisation [...]
KVPY 2010 Kishore Vaigyanik Protsahan Yojana
Applications are invited for KVPY Fellowships for school and college students interested in research careers The department of science and technology, govt of India, offers attractive fellowships (Rs 4000 to Rs 7000 p.m.) and contingency grants (equivalent of four months fellowships per annum) to students studying in XI standard to B.Sc/B.S./Integrated M.Sc [...]
Evening storm lashes Delhi, kills 11
The Capital received the heaviest rainfall of the season on Monday evening. But the respite from three days of heat and sweat was also mired by reports of 11 deaths from across the Capital after the downpour. Six people — two at Dariba Kalan in Chandni Chowk and one at Mori Gate [...]
MS Dhoni signs Rs 200-cr endorsement deal
Team India captain MS Dhoni has signed a 200 crore rupees endorsement deal with a talent management company, taking him past Sachin Tendulkar who earlier held the contract crown. The current deal with a joint venture company, Rhiti Sports Management and Mindscapes One, is for three years. They will manage the Indian skipper’s endorsements [...]
Infosys Profit Unexpectedly Falls After Cut in Prices, Increase in Taxes
Infosys Technologies Ltd., India’s second-largest software exporter, reported profit fell during the first quarter after it cut prices to retain contracts and paid higher taxes. Net income fell 2.6 percent to 14.9 billion rupees ($318 million) in the quarter ended June 30, from 15.3 billion rupees a year earlier, after income taxes [...]


SPONSORS

FREE JOBS NEWSLETTER
3,11,757 [96,218 + 2,15,539] MEMBERS!


Contact Us | Feedback | Link to Us
Copyright © 2001-2009 VYOMS.com. All Rights Reserved. Home | About Us | Jobs | Contact Us | Privacy Policy | Terms & Conditions.
Disclaimer: VYOMS.com has taken all reasonable steps to ensure that information on this site is authentic. Applicants are advised to research bonafides of advertisers independently. VYOMS.com shall not have any responsibility in this regard.
Placement Papers | FREE SMS | C++ Interview Questions | C Interview Questions | Report a Bug | Romantic Shayari | CAT 2009