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
Life Insurance Corp LIC recruitment Apprentice Development Officers 2010
Life Insurance Corporation of India LIC India Vacancies for 5578 posts of Apprentice Development Officers Recruitment of Apprentice Development Officers Online applications are invited from eligible candidates for selection and appointment as Apprentice Development Officers in the various officers of LIC of India Online Applications are invited from eligible candidates for selection and appointment as [...]
How to apply Bank of Baroda Probationary Officer Jobs 2010 ?
How to apply Bank of Baroda Probationary Officer Jobs 2010 ? 1. Candidates are required to apply On-Line through website www.bankofbaroda.com No other means/ mode of application will be accepted. 2. Candidates are required to have a valid personal e-mail ID. It should be kept active during the currency of this recruitment project. Bank may [...]
Mayawati presented garland made of hundreds of Rs. 1000 notes
It was a one woman show at the BSP rally marking the 76th birth anniversary of its founder Kanshi Ram on Monday with Chief Minister Mayawati being presented a garland made of hundreds of Rs 1000 notes while other leaders were literally relegated to the background. Unlike previous occasions when the BSP supremo [...]
Dhoni leads Super Kings to a facile win
Chennai Super Kings (CSK) snapped Kolkata Knight Riders’ (KKR) winning streak with a comfortable 55-run victory in the Indian Premier League (IPL) III at the Eden Gardens here on Tuesday. The thumping victory can be attributed to CSK’s better planning, ruthless execution and above all an insatiable hunger to return to winning ways. A [...]
CSIR UGC National Eligibility Test (NET-2010) for JRF Important Dates
CSIR UGC NET JUNE 2010 NOTIFICATION notification no 10-2(5)/2010(i)-E.U.-II CSIR UGC NET JUNE 2010 IMPORTANT DATES Date of examination: 20.06.2010 Date of start of sale of application form through banks and on line submission:16.02.2010 Date of close of sale of application form through banks and online submission:17.03.2010 Important dates Schedule for sale of information bulletin through bank (i) Start [...]
Guru Gobind Singh Indraprasatha University (IPU CET) Exam Notification 2010
IPU CET 2010 Exam Dates (Established by Govt. of NCT of Delhi under the Provisions of Guru Gobind Singh Indraprastha University Act (9 of 1998) Kashmere Gate, Delhi – 110006 Website : www.ipu.ac.in Ph.: 011-23900166 – 68 NOTIFICATION OF DATES OF COMMON ENTRANCE TESTS FOR ACADEMIC SESSION 2010 – 2011 The University is pleased to [...]
DA-IICT Btech (ICT) Admissions 2010
ADMISSIONS TO B.E./B.TECH. DEGREE COURSES 2010 DA – IICT, a UGC recognised university, is a major educational and research institution of the Reliance ADAG. Highly qualified faculty, supported by state – of – the – art e – enabled infrastructure brings research – led teaching to the classroom. The Four – Year B [...]
Punjab Technical University Combined Entrance Test 2010
PUNJAB TECHNICAL UNIVERSITY Ladowali Road, Jalandhar – 144 001 Phone No: 0181-2233877, Fax: 2244008 Website: www.ptu.ac.in COMBINED ENTRANCE TEST (CET -2010) CET-2010 on 2nd May, 2010 (For 85% category, Punjab Residents only) The Punjab Technical University, Jalandhar will hold Combined Entrance Test (CET-2010) on 2nd May, 2010 (Sunday) for admission to 1st year of Engineering & Technology [...]


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