Vyoms
Bookmark and Share Rss Feeds

Click here to register on Shine.com - India's Fastest growing Job site!
Web Application Security Testing - Part 3 | 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 3

Web Application Security Testing - Part 3



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


Article Posted On Date : Friday, February 05, 2010


Web Application Security Testing - Part 3
Advertisements

 I hope that you have already read first two parts of this article and familiar with the concept of how web applications are different from traditional client-server applications and what kind of information can be collected from the client. If you have not, you might find it useful to read Part-1 and Part-2 as well.

In this part we will explore how user supplied data can attack your application. We will explore information related to SQL injection, Cross Site Scripting, Directory Traversing etc.

 
Cross-site Scripting ( XSS ) is a mechanism of presenting user with a fraudulent web site content.  Web sites often echo the input data that is entered as some other places with in the application, for example users postings in forums. Sometime postings in forum can also include HTML as well. This HTML, along with the formatting information can also contain client side scripting, which can be dangerous since it will have access to the content of current page. Client side scripting can even steal user's cookies. This type of cross site scripting can be used in places where user write something which is available to all the users. For example, book reviews, blog comments and so on. Another mechanism of using cross site scripting is called reflected cross-site scripting. In this technique, attacker can embed the script into CGI parameter of a URL. When user clicks on the link, real page is loaded and its content changed by the script that is embedded in the URL.

Cross-site scripting attack is best suited for situations when user supplied input data is echoed back the other users. Mostly, this attack exploits the facility of providing user input in HTML format and insert malicious scripts with in ... tags. Apart from direct SCRIPT tag, tags like HTML, BODY, EMBED, FRAME, FRAMESET, IMG, LAYER, META etc. are also known to have this vulnerability. In fact, any tag which support attributes like STYLE, SRC, HREF etc.  are known to be vulnerable.

The best way to protect against this attack is to filter the contents of user supplied data. It should be noted that while filtering, white-lists approach (Allow only trusted code) should be used instead of black-lists approach (Block code with specific tags and allow rest), since it will not cover new vulnerabilities.

SQL Injection is probably one of the well known vulnerabilities in web applications. In this vulnerability, SQL queries can be injected in the form of user input data which can results in number of insecure behavior. For example, on a login page if your application is not protected against SQL injection, you can use it to get all the user names and passwords stored in the database. This technique is mostly used in situations where SQL query is dynamically generated using the data or parameters supplied by user. This vulnerability can be extremely dangerous since SQL is often used for authentication, authorization, billing etc.

Any user input, which becomes part of a SQL query is subject to a possible SQL injection vulnerability. This attack require sound knowledge of database schema for your application and how queries are constructed. Because of the nature of attack and possibility of major threats associated with the attack this is one attack, you should always check in your application. Consider following example to appreciate how serious SQL injection attacks can be -

Suppose your application takes username and password and construct query like this

Select * from Account where username = 'username' and password = 'password' ;

In this query, username and password are passed as parameter and will be replaced in the query. If you pass normal information it should work fine. But how will your query look if you give your username as testuser'--

Select * from Account where username = 'testuser'--' and password = 'password' ;

 Now if you look closely, '--' is SQL comment operator, and effectively it has converted this query into this

Select * from Account where username = 'testuser'

You can understand effect of this query now. You can think of even more serious usage, for example getting list of all the users along with password may be? Yes it is also possible if your application is not tested against this vulnerability.

Similar to most of the attacks, the best way to protect against this attack is proper filtering of parameters at the server side.

Another popular attack in web application is Directory Traversal, in its simplest form, malicious user determines the location of restricted files and views or execute them. Problems associated with this could be ranging from breach of privacy to controlling or modifying the site content. In its simplest form attacker can just guess the file names, directory name and get those files which are residing on the server, but not public as of now.

Directory traversing can also reveal sensitive information if your application and server is not protected properly. Consider this URL -

http://www.somedummyURL.com/getinfo.asp?item=getinfo.asp

This URL is requesting itself, in cases like this web server will display source code of getinfo.asp and that can give considerable information to attacker including database connection strings, password, business logic etc. This attack can be dealt in two ways. To restrict web application to serve pages from only web root directory / subdirectories and by using Access Control Lists.

Hope this information was useful to you and can be used to do security testing for your web application. In the next article, we will explore language specific attacks and different mechanism of attacking servers.

You can read more articles on software testing in our article section. You can suggest topics of your interest here , we will try to provide information on those topics as well.

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
Bank of Baroda (BOB) to recruit 1000 Probationary Officers (PO) and 2000 Clerks in March 2010
Bank of Baroda, the country’s third-largest public sector lender, is planning to recruit 3,500 people including officers during the current fiscal. “We are going to recruit about 3,500 people by March 2010 including 2,000 clerks and 1,000 probationary officers,” Bank of Baroda Chairman and Managing Director M D Mallya told media. Besides, the [...]
Alagappa University Distance Education Correspondence Courses Admission 2010
ALAGAPPA UNIVERSITY Directorate of Distance Education, Karaikudi-630003 (TN) Alagappa University Karaikudi – 630003 (A State University Established by the Govt. of Tamil Nadu – Accredited with ‘A’ Grade by NAAC) Directorate of Distance Education Admission notification-2010 Algappa university invites applications for admission to the following programmes offered through distance education for the calendar year 2010 Semester course (2 years) MBA: General, [...]
Madurai Kamaraj University Distance Education Admission Notification 2010 Correspondence Courses
Madurai Kamaraj University (University with potential for excellence) (Recognized by Distance Education Council (DEC), Eligible for Central and State Government Employment) Tel: 0452-2459185, Fax: 0452-2458265, Email: mkudde@mkudde.org, Website: www.mkudde.org IT courses MCA – Any degree with mathematics at +2 level (3 years), MCA (lateral entry) – B.Sc., (C.Sc.)/B.Sc/BCA/Any degree with PGDCA (2 years), BCA - [...]
Sikkim Manipal University Distance Education Admission Notice 2010 Correspondence Courses
Directorate of Distance Education Sikkim Manipal University Admission open Widespread recognition: Recognized by DEC for three academic years – 2009-10 to 2011-12. Sikkim Manipal university is recognized by university grants commission (UGC), ministry of HRD and is a member of association of Indian universities (AIU) Advantage for working professionals: Lateral entry to higher semester [...]
TERI University New Delhi – MA, M.Sc, MBA, M.Tech, Ph.D Admissions 2010
TERI University New Delhi (A deemed university u/s 3 of the UGC, act 1956 Green campus located at Vasant Kunj in South Delhi, the TERI University campus provides a setting that enhances learning and is a showcase of the concepts of modern green buildings MA (Sustainable Development Practice): Global initiative supported by the Mac Arthur [...]
UGC Research Award under Post Doctoral Fellowship-2010
Research Award under Post Doctoral Fellowship-2010 The University Grants Commission invites applications every alternate year for 100 slots of Research Award under Post Doctoral Fellowships in Humanities and Social Sciences; Sciences and Engineering and Technology The objectives of the scheme are to provide opportunities to regularly appointed permanent teachers of universities/institutions/colleges to pursue [...]
IITB – Monash Research Academy – Ph.D Scholarships 2010
IITB-Monash Research Academy (An Indian-Australian research partnership) Attractive Ph.D scholarships The IITB-Monash Research Academy (the Academy) is an exciting partnership between the Indian Institute of Technology, Bombay (IITB) and Monash University, Melbourne (Australia) – two of the world’s leading educational and research institutions The Academy, has designed a jointly-badged Ph.D program in which students can [...]
Karnataka CET Admission 2010
The Karnataka Common Entrance Test-2010 or Karnataka CET 2010 for admission to Medical and Dental, Indian Systems of Medicine & Homoeopathy and Engineering Technology course will be held on 28th to 30th th April 2010 as per the following schedule Karnataka CET 2010 – 28-04-2010 to 30-04-2010 ADMISSION TO PROFESSIONAL COURSES IN KARNATAKA [...]


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