PHD theses : Computer Science
Permanent URI for this collectionhttps://repository.neelain.edu.sd/handle/123456789/12169
Browse
Item Design A Model to Detect and Prevent SQL Injection Attack(Al-Neelain University, 2022-04) Abdalla Adel Abdalla HadabiABSTRACT Evaluations of Web applications such as online banking and various other transaction has essentially made them a key component of today’s Internet infrastructure. Web-based systems consist of both infrastructure components and application-specific code. but there are many reports on intrusion from external hackers which compromised the back-end database system. SQL Injection Attacks Represent Two-Third of All Web Application Attacks. An estimated 25% of breaches last year started with an SQL Injection attack. SQL injection attack causes financial losses worldwide as well as user data offensive. Accordingly, SQL injection detection has become a hot topic recently. In this thesis, we proposed a model with two layers to prevent this vulnerability, which use runtime validation to detect the occurrence of such attacks, which evaluation methodology is general and adaptable to any existing system. with no need to modify the client or server and either no need-to-know web application source code, by adding additional middleware between client and server and any checking process done on this middleware, and it represented as a proxy that can do sanitize to the inputs and detect and prevent SQLIA. Additionally, we make an intensive review of the recent SQLIA prevention technics. Accordingly, a number of methods were proposed in the literature to address this vulnerability widely because of its importance and high impact on the security of web applications. The first layer of our proposed model is a sub-model that is based on prepared regular ex- precision patterns, client requests must bypass these patterns to be counted as clean requests, the first layer of our proposed model accuracy reaches 86% for detecting and preventing SQLIA. However, after the check process that is done in the first layer, the clean query is bypassed the second layer of our proposed model that could identify SQL injection attacks effectively based on entry data. We built a machine learning model based on a logistic regression algorithm to detect SQL injection attacks based on historical web log data, the dataset was collected from an online repository website, containing 4201 entries. The model achieved an accuracy of 0.93, sensitivity 0.78, specificity 0.81, and precision of 0.98. Therefore, beyond accuracy, other performance metrics were considered for optimal model design. Using machine learning techniques for SQL attack detection is very useful and can be used even in real-time applications. The overall accuracy for our pro- posed model is 89.5%. المستخلص تطور تطبيقات الويب مثل الخدمات المصرفية عبر الإنترنت والعديد من المعاملات الأخرى جعلت تطبيقات الويب مكونًا رئيسيًا للبنية التحتية للإنترنت. تتكون الأنظمة المستندة إلى الويب من مكونين رئيسين هما البنية التحتية و الاكواد البرمجية الخاصة بالتطبيق وقد تستغل هذه المكونات فى تنفيذ هجمات على تطبيقات الويب. ولكن هناك العديد من التقارير حول انتهاك البيانات من قراصنة خارجيين مما أدى إلى اختراق أنظمة قواعد البيانات. تمثل هجمات حقن الاستعلام الهيكلى (SQL Injection Attacks) ثلثي الهجمات التى تصيب تطبيقات الويب. وتقدر اختراقات حقن الاستعلام الهيكلى بنحو 25٪ من الاختراقات التى حصلت فى العام الماضى. يتسبب هجوم حقن الاستعلام الهيكلى في حدوث خسائر مالية في جميع أنحاء العالم بالإضافة إلى امكانية التحصل على بيانات المستخدمين. وفقًا لذلك ، أصبح اكتشاف ومنع ثغرة حقن الاستعلام الهيكلى موضوعًا ساخنًا مؤخرًا. في هذه الأطروحة ، اقترحنا نموذجًا من مرحلتين لمنع هذه الثغرة الأمنية ، والتي تستخدم التحقق اثناء وقت التشغيل لاكتشاف حدوث مثل هذه الهجمات، ومنهجية تطوير النموذج عامة وقابلة للتكيف مع أي نظام موجود. دون الحاجة إلى تعديل فى جهة العميل أو الخادم ، و بدون الحاجة إلى معرفة الكود المصدري لتطبيق الويب ، ويتم ذلك بإضافة برمجيات وسيطة إضافية بين العميل والخادم على ان تتم أي عملية فحص فى هذه البرامج الوسيطة ، والتى تعتبر بمثابة وكيل يمكنه القيام بتعقيم المدخلات واكتشاف ومنع هجوم حقن الاستعلام الهيكلي. بالإضافة إلى ذلك ، تم عمل مسح دقيق وشامل لتقنيات منع هجوم حقن الاستعلام الهيكلى الحديثة. وفقًا لذلك ، تم اقتراح عدد من الأساليب في دراسات سابقة لمعالجة هذه الثغرة الأمنية على نطاق واسع نظرًا لأهميتها وتأثيرها الكبير على أمان تطبيقات الويب. تمثل المرحلة الاولى من نموذجنا المقترح هي نموذج فرعي يعتمد على أنماط الدقة المنتظمة المُعدَّة (regular expression patterns)، ويجب أن تتجاوز طلبات العميل هذه الأنماط ليتم احتسابها على أنها طلبات نظيفة لا تحتوي على هذا النوع من الهجمات ، وتصل دقة الطبقة الأولى من النموذج المقترح إلى 86٪ لكشف و منع ثغرة حقن الاستعلام الهيكلى. وبالاضافة الى ذلك ، بعد عملية التحقق التي تتم في الطبقة الأولى ، يمرر الاستعلام الطبقة الثانية من نموذجنا المقترح لمزيد من الموثوقية والتي يمكن أن تحد من هجمات حقن الاستعلام الهيكلى بشكل فعال بناءً على البيانات المدخلة. لقد أنشأنا نموذجًا لتعلم الآلي يعتمد على خوارزمية الانحدار اللوجستي (logistic regression algorithm) لاكتشاف هجمات حقن الاستعلام الهيكلى استنادًا إلى بيانات سجل الويب التاريخية ، وتم جمع مجموعة البيانات من موقع مستودع على الإنترنت يحتوي على 4201 مدخل. حقق النموذج الفرعي فى المرحلة الثانية النتائج التالية دقة(accuracy) 0.93 ، حساسية(sensitivity) 0.78 ، خصوصية(specificity) 0.81 ، تحديد(precision) 0.98. وتبعاً ، بالاضافة الى استخدام الدقة، تم اضافة مقاييس أداء أخرى لتصميم نموذج أمثل واكثر جودة فى النتائج. لذلك, يعد استخدام تقنيات تعلم الآلة لاكتشاف ثغرة حقن الاستعلام الهيكلى مفيدًا جدًا ويمكن استخدامه حتى في التطبيقات التى تعمل في وقت التشغيل. تبلغ الدقة الإجمالية لنموذجنا المقترح 89.5٪