Web Applications Security Testing: Genetic Algorithms Based Test Data Generator

Web Applications Security Testing: Genetic Algorithms Based Test Data Generator. Masters thesis, King Fahd University of Petroleum and Minerals.

[img]
Preview
PDF
WST.pdf - Submitted Version

Download (2MB) | Preview

Arabic Abstract

تعاني تطبيقات الإنترنت من العديد من المهددات المتعلقة بالسرية, وخطورة هذه المهددات انه يمكن استخدامها للإضرار بتلك الأنظمة بطرق عديدة. توجد حاليا عدد من البحوث المطروحة والتي تقدم طرق وآليات مختلفة من اجل اختبار سرية تطبيقات الإنترنت والتأكد من خلوها من المهددات الأمنية, في هذا البحث قمنا بتقديم إطار لتصنيف ومقارنه الطرق الموجودة والمستخدمة في اختبارات السرية بالنسبة لتطبيقات الإنترنت. تم في هذا البحث تقديم طريقة جديده لاختبار تطبيقات الإنترنت والتأكد من خلوها من المهددات الأمنية, تحديدا مهددات ال Cross Site Scripting (XSS) وذلك عبر اختبار المسارات المهددة في التطبيق موضوع الاختبار, الطريقة المقدمة في هذا البحث تعمد علي تحويل مشكلة اختبار البرمجيات من حيث السرية الي مشكلة بحث عن افضل بيانات الاختبار الممكنة, سواء كانت رقمية أو حرفية. الحل المقدم في هذا البحث يعتمد علي الخوارزمية الجينية معتمدا علي مبدأ البحث عن افضل بيانات الاختبار التي تودي اذا ما تم استخدامها إلى كشف ماذا كان التطبيق موضوع الاختبار يحتوي علي ثغرات تسمح بحدوث المهدد المذكور. تم استخدام الخوارزمية الجينية مع قاعدة بيانات تحتوي علي عدد من أنماط ال XSS الحقيقية وقد تم تجميع هذه الأنماط من مصادر مختلفة, حيث تقوم الخوارزمية بالاستعانة بقاعدة البيانات المذكورة من اجل توليد مدخلات للتطبيق موضوع الاختبار هي عباره عن أنماط XSS حقيقيه كبيانات اختبار من اجل تغطية المسارات المعرضة لهذه المهددات في التطبيق. يقوم الحل المقدم باختبار تطبيقات إنترنت بنيت باستخدام لغة ال PHP وقواعد بيانات ال MYSQL حيث يتم اختبارها للتأكد من خلوها من مهددات ال XSS بأنواعها المختلفة :Stored, Reflected and DOM based والتي قد تؤدي للعديد من المشاكل المتعلقة بالسرية. تم عمل العديد من التجارب علي تطبيقات مختلفة من أجل التأكد من مدي كفاءه الحل المقترح وجودته, وقد صنفت التجارب إلى قسمين رئيسين الأول منهما يعني باختبار المسارات المهددة في التطبيق موضوع الاختبار كل مسار علي حدة, القسم الثاني من التجارب يعني يأخذ في الاعتبار كل المسارات المهددة دفعة واحده, بالنظر إلى النتائج التي تم الحصول عليها في كل من قسمي التجارب يتبين مدي كفاءه الطريقة المقترحة وجودتها. نسبة لعدم توفر عمل بحثي يتبع نفس الطريقة المقترحة, تمت مقارنة نتائج التجارب مع الآلية العشوائية في اختيار أنماط عشوائيا من قاعدة بيانات ال XSSواستخدامها كمدخلات للتطبيق تحت الاختبار فكانت طريقتنا المقترحة افضل بكثير جدا ومرضية إلى حد بعيد.

English Abstract

Web applications suffer from different security vulnerabilities that could be exploited by hackers to cause harm in a variety of ways. A number of approaches have been proposed to test for security vulnerabilities. In conducting a critical literature survey of the prominent approaches, we developed a framework composed of a set of criteria for classifying and comparing such approaches. Benefitting from applying the framework and the corresponding findings of the survey, we developed a new approach to fill in some identified gaps with regard to testing for security vulnerabilities. In particular, we addressed the problem of automatically generating an effective set of test data (i.e., possible attacks) to test for cross site scripting vulnerabilities (XSS). The objective is to exercise candidate security vulnerable paths in a given script under test (SUT); such a set of test data must be effective in the sense that it uncovers whether any path can indeed be used to launch an attack. Our approach is based on converting the testing problem into a search problem to find effective test data given all input parameters search space where each parameter can be of a string or numeric type. We designed a genetic algorithm based test data generator that uses a database of XSS attack patterns to generate an input value which represents a possible attack, and observe whether the attack is successful. We focused on these different types of XSS vulnerabilities: stored, reflected and DOM based which can lead to different problems like cookie thefts, Web page defacements, etc. We empirically validated our test data generator using case studies of Web applications developed using PHP and MySQL. We present two different sets of experiments, the first set deals with a single vulnerable path at a time and the second set deals with multiple vulnerable paths at a time. Results showed that the proposed test data generator is effective in testing one path at a time as well as testing multiple paths at time. Due to the unavailability of similar work that we can use to benchmark our approach against, we compared results of our approach with a random approach which selects random XSS patterns from the database and used them with the web application under test. Our approach performs much better than the random approach.

Item Type: Thesis (Masters)
Subjects: Computer
Department: College of Computing and Mathematics > Information and Computer Science
Committee Advisor: Ahmed, Moataz
Committee Members: Mahmood, Sajjad and Al-Muhtaseb, Husni
Depositing User: FAKHRELDIN ELKHIDIR (g200901810)
Date Deposited: 03 Jul 2012 12:02
Last Modified: 01 Nov 2019 15:35
URI: http://eprints.kfupm.edu.sa/id/eprint/138699