Showing posts with label Manual testing. Show all posts
Showing posts with label Manual testing. Show all posts

Wednesday, June 5, 2013

SQL INJECTION

            Without proper safeguards, applications are vulnerable to various forms of security attack. One particularly pathetic  method of attack is called SQL injection. Using this method, a hacker can pass string input to an application with the hope of gaining unauthorized access to a database.

            SQL injection is a technique to maliciously exploit applications that use client-supplied data in SQL statements. Attackers trick the SQL engine into executing unintended commands by supplying specially crafted string input, thereby gaining unauthorized access to a database in order to view or manipulate restricted data.

            SQL injection techniques may differ, but they all exploit a single vulnerability in the application. 
The following things might result from SQL injection:
  • The user could log in to the application as another user, even as an administrator.
  • The user could view private information belonging to other users e.g. details of other users’ profiles, their transaction details etc.
  • The user could change application configuration information and the data of the other users.
  • The user could modify the structure of the database; even delete tables in the application database.
  • The user could take control of the database server and execute commands on it at will.
Since, the SQL Injection consequences is severe, The SQL Injection testing must be done during the security testing of an application.

The SQL injection problem should be tested only in the test environment.

If the application has a log in page, it is possible that the application uses a dynamic SQL  statement s  in the Inputbox  or any  text box that gives an input to the application to access the Database user details etc .

If the tester would enter John as the UserName (in the textbox for user name) and Smith as strPassword (in the textbox for password), the SQL statement would become:
SELECT * FROM Users WHERE User_Name = ‘John’ AND Password = ‘Smith’;

If the tester would enter John’– as UserName and ‘smith’ as Password, the SQL statement would become:
SELECT * FROM Users WHERE User_Name = ‘John’– AND Password = ‘Smith’;

Note that the part of the SQL statement after John is turned into a comment. If there were any user with the user name of John in the Users table, the application could allow the tester to log in as the user John. The tester could now view the private information of the user John.

Q)What if the tester does not know the name of any existing user of the application?

In such a case, the tester could try common user names like admin, administrator and sysadmin. If none of these users exist in the database, the tester could enter John’ or ‘x’=’x as UserName and Smith’ or ‘x’=’x  as Password. This would cause the SQL statement to become like the one below.

SELECT * FROM Users WHERE User_Name = ‘John’ or ‘x’='x’ AND Password = ‘Smith’ or ‘x’=’x’;

Since ‘x’=’x’ condition is always true, the result set would consist of all the rows in the Users table. The application could allow the tester to log in as the first user in the Users table.

If the tester would enter John’; DROP table users_details;’—as strUserName and anything as strPassword, the SQL statement would become like the one below.

SELECT * FROM Users WHERE User_Name = ‘John’; DROP table users_details;’ –‘ AND Password = ‘Smith’;

This statement could cause the table “users_details” to be permanently deleted from the database.

Though the above examples deal with using the SQL injection technique only the log in page, the tester should test this technique on all the pages of the application that accept user input in textual format e.g. search pages, feedback pages etc.

Some of the other login bypassing queries are:-

  •                admin' --
  •                admin' #
  •                admin'/*
  •                ' or 1=1--
  •                ' or 1=1#
  •                ' or 1=1/*
  •                ') or '1'='1--
  •                ') or ('1'='1--

Thursday, December 6, 2012

What to Test in a Login Page?

User Interface
Tab Order - Is there a logical order to using the tab key?
Username field focus - when arriving at the page is the cursor focused on the username field?
Use of enter key - does selecting enter activate the Login button?
Accessibility - are the form fields correctly identified and labelled?
The look - does it look ok? Everything aligned ok?
Content - is the content up to scratch? Any typos?
Links - are there any other existing links on the page? Are they valid?

Security
Password - is it shown in asterisks?
Password - can it be copied and pasted?
Password - is there a minimum complexity on the password?
View Source - is valuable information given away in the HTML source code?
SQL Injection - is it vulnerable to SQL input?
Pages - can pages behind the wall be accessed without logging in?
URL Manipulation - can the URLs be edited to gain access where it should not be allowed?
Multiple accounts - can different accounts be logged in at the same time in the same browser?
Cookies - can they be edited? Disabled?

Functionality
Login - is it possible to login successfully? Unsuccessfully?
Logout - if user logs out, do they log out as expected?
Forgot password - does it exist? does the process work? Is it prone to security failure? URL
manipulation?
Back and Forward buttons - how does the application cope when using the browser Back and Forward
buttons?
Remember me - is there a “Remember me” option? Does it as standard? What if password is changed?
Compatibility - is there a need to test in other browsers?
Data - is there a minimum or maximum length of characters? What are the boundaries? What are the
allowed characters?
Error handling - how are errors handled and displayed?

Tuesday, July 10, 2012

What is Web Testing?

  • Web testing is the name given to software testing that focuses on web applications. 
  • Complete testing of a web-based system before going live can help address issues before the system is revealed to the public.
  • Issues such as the security of the web application, the basic functionality of the site, its accessibility to handicapped users and fully able users, as well as readiness for expected traffic and number of users and the ability to survive a massive spike in user traffic, both of which are related to load testing.
Web security testing
  • Web security testing tells us whether Web based applications requirements are met when they are subjected to malicious input data.
Web Testing Checklist
  • Functionality Testing
    • Link Testing
    • Form Testing
    • Cookie Testing
    • HTML/CSS Validation
    • Database Testing
  • Usability testing
    • Navigation Checking
    • Content Checking
  • Interface testing
    • Web server and application server interface
    • Application server and Database server interface.
  • Compatibility testing
    • Browser compatibility
    • Operating system compatibility
    • Mobile browsing
    • Printing options
  • Performance testing
    • Load Testing
    • Stress Testing
  • Security testing
    • URL Manipulation
    • Session Testing
    • SQL Injection
    • Cross Site Scripting
    • Vulnerability Testing
    • Password Cracking
    • Spoofing
For Complete Web Application Checklist, Please visit the below link: http://softwaretestingreference.blogspot.in/p/web-application-testing.html

Monday, July 2, 2012

Manual Testing and Automation Testing.

Manual testing
  • Manual testing is the process of manually testing software for defects. 
  • It requires a tester to play the role of an end user, and use most of all features of the application to ensure correct behavior. 
  • To ensure completeness of testing, the tester often follows a written test plan that leads them through a set of important test cases.
  • Manual testing is a laborious activity that requires the tester to possess a certain set of qualities; to be patient, observant, speculative, creative, innovative, open-minded, resourceful, unopinionated, and skillful.
Automation Testing
  • Test automation is the use of software to control the execution of tests, the comparison of actual outcomes to predicted outcomes, the setting up of test preconditions, and other test control and test reporting functions.
  • Commonly, test automation involves automating a manual process already in place that uses a formalized testing process.
  • Test automation is the process of writing a computer program to do testing that would otherwise need to be done manually. 
  • Once tests have been automated, they can be run quickly and repeatedly. 
  • This is often the most cost effective method for software products that have a long maintenance life, because even minor patches over the lifetime of the application can cause features to break which were working at an earlier point in time.