Stored XSSتحسين حماية التطبيقات الالكترونية ضد ثغرات هجوم التهجين المخزن

Thumbnail Image

Date

2021-01

Journal Title

Journal ISSN

Volume Title

Publisher

جامعة النيلين

Abstract

المستخلص مع ازدياد استخدام التطبيقات الإلكترونية في اداء العديد من الاعمال الحرجة داخل المؤسسات نجد انها اصبحت عرضه للعديد من التهديدات. وعلى الرغم من تطوير عدد من التقنيات والوسائل لحماية وتأمين التطبيقات الإلكترونية الا انها لا زالت هدف ثابت للمهاجمين. تتلخص مشكلة الدراسة في عدم تمكن الزاحف من رصد الصفحات غير المتصلة بهرمية الموقع من خلال الروابط التشعبية. بالإضافة الى صعوبة التأكد من نجاح (وجود) هجوم تهجين الموقع المخزن (Stored XSS) بواسطة أدوات فحص التطبيقات الالكترونية وذلك لان الأثر الحقيقي لهذا الهجوم لا يظهر مباشرة عند مهاجمة هذه الثغرة . تتمثل اهمية الدراسة في ان نجاح ودقة نتائج الفحص للموقع تعتمد بصورة كبيرة على اجراء الفحص لكل اجزاء الموقع وعند عدم معرفة كل الصفحات الموجودة في الموقع فلن يتم فحصها وبالتالي اذا كانت تحتوى على ثغرات فإن هذه الثغرات ستظل موجودة مما يجعل الموقع عرضة للهجمات؛ كما ان احتواء الموقع على ثغرة التهجين المخزن (Stored XSS) يتيح للمهاجم زرع اكواد خبيثة (Payload) في الموقع وتظل هذه الاكواد موجودة ما لم يتم اكتشافها وازالتها من الموقع. تهدف هذه الدراسة الى تطوير أداة لفحص التطبيقات الالكترونية بالاعتماد على منهجية فحص الصندوق الأسود (Black Box)، وتقوم هذه الأداة باختبار وجود ثغرة التهجين المخزن (Stored XSS) من عدمه. كما تقوم بتحسين مرحلة اكتشاف صفحات الموقع الإلكتروني الذى نرغب بفحصه. تم تطوير خوارزميتين في هذه الدراسة، الخوارزمية الاولى هي خوارزمية لتحسين اكتشاف صفحات الموقع الإلكتروني بواسطة الزاحف وتعتمد هذه الخوارزمية على استخدام مفهوم القوى الغاشمة (Brute Force) بالاستفادة من قاموس Fuzzdb وهو قاموس مجانى مفتوح المصدر له العديد من الاستخدامات ومن ضمن هذه الاستخدامات تحسين اكتشاف موارد المواقع الالكترونية. اما الخوارزمية الثانية فهي مصممة لاكتشاف وجود ثغرة التهجين المخزن (Stored XSS) من خلال تصفح الموقع الإلكتروني مرتين على الاقل، المرة الاولى لتخزين الهجوم والمرة الثانية للتأكد من وجود الهجوم الذى تم تخزينه. اخيرا تم تطوير اداة Stored XSS Bruter 1.0 والتي تتضمن الخوارزميات المقترحة وهى اداة من نوع ادوات فحص الصندوق الاسود (Black box) وتمت برمجة هذه الاداة بلغة بايثون. تمت مقارنة الاداة المقترحة مع زاحف للتأكد من فعاليتها في اكتشاف الصفحات غير المتصلة بهرمية الموقع (من خلال الوصلات التشعبية) وتم التوصل الى ان الخوارزمية المقترحة لاكتشاف الصفحات افضل بنسبة 43.3% مقارنة بالزاحف من حيث معدل اكتشاف الموارد لكن من ناحية اخرى نجد ان تنفيذ خوارزمية اكتشاف الموارد ابطأ بمعدل 1638.534 ثانية (يعادل 27 دقيقة) مقارنة بالزاحف. وتمت ايضا مقارنة الاداة المقترحة مع ادوات فحص مستخدمة لفحص تطبيقات الويب (Web Applications Scanning Tools) للتأكد من فعاليتها في اكتشاف هجوم التهجين المخزن (Stored XSS) ومن خلال المقارنة تم التوصل الى ان متوسط اكتشاف هجوم التهجين المخزن (Stored XSS) تبلغ 60% مقارنة مع الادوات الاخرى المستخدمة في المقارنة. ومعدل الإيجابيات الخاطئة (False Positive) يبلغ 0%، بينما بلغ معدل السلبيات الخاطئة (False Negative) 0.4%. Abstract With the increasing use of electronic applications to perform many critical actions within organizations, we find that they have become vulnerable to many threats. Although many technologies and means have been developed to protect and secure electronic applications, they are still a constant target of attackers. The problem of the study is the inability of the crawler to detect the pages that are not related to the site hierarchy through hyperlinks. In addition to the difficulty of ensuring the success (presence) of the Stored XSS attack using electronic web applications scanning tools, because the real impact of this attack does not directly appear when this vulnerability is exploited. The importance of the research is that the success and accuracy of the results of the scanning of the site largely depend on conducting the scanning of all parts of the site, and when all the pages on the site are unknown, they will not be scanned and therefore if they contain vulnerabilities, these vulnerabilities will remain, which makes the site vulnerable to attacks; and that if the site contains  the stored cross site scripting vulnerability (Stored XSS) then it allow the attacker to inject malicious codes (Payload) on the site and these codes will remain unless they are discovered and removed from the site. This study aims to develop a tool for checking electronic web applications, based on the Blackbox scanning methodology, and this tool detects the existence of a stored cross-site scripting vulnerability (Stored XSS). It also improves the discovery phase of the pages of scanning target. Two algorithms were developed in this study, the first algorithm is developed to improve the discovery of website pages by the crawler and this algorithm depends on the use of the concept of brute force by taking advantage of the Fuzzdb dictionary, which is a free open source dictionary that has many uses, and among these uses is improving websites resource discovery. As for the second algorithm, it is designed to detect the existence of a stored Cross-site scripting vulnerability (Stored XSS) by browsing the website at least twice, the first time to store the attack vector and the second time to check for the presence of the stored attack vector. Finally, the Stored XSS Bruter 1.0 Blackbox tool was developed, which includes the proposed algorithms. This tool was programmed by Python. The proposed tool was compared with a crawler to ensure its effectiveness in discovering pages that are not related to the site hierarchy (through hyperlinks) and it was concluded that the proposed algorithm for discovering pages is 43.3% better compared to the crawler in terms of resource discovery rate, but on the other hand we find that the implementation of the algorithm of  Resource discovery is 1638,534 seconds (27 minutes) slower than crawler. The proposed tool was also compared with scanning tools to ensure its effectiveness in detecting the Stored XSS attack. Through the comparison, it was concluded that the average detection of Stored XSS attack by the proposed algorithm is 60% compared to other tools used in comparison, the False Positive rate is 0% and the False Negative rate is 0.4%.

Description

بحث مقدم لنيل درجة الدكتوراة فى تقانة المعلومات

Keywords

تقانة المعلومات, حماية التطبيقات الالكترونية, هجوم التهجين

Citation

Endorsement

Review

Supplemented By

Referenced By