DOI: https://doi.org/10.1016/j.jss.2026.112856
تاريخ النشر: 2026-03-14
المؤلف: Samuele Pasini وآخرون
الموضوع الرئيسي: الصلابة ضد الهجمات في تعلم الآلة
نظرة عامة
تناقش هذه الفقرة نقاط الضعف في أمان تطبيقات الويب تجاه هجمات البرمجة النصية عبر المواقع (XSS) وفعالية نماذج التعلم العميق (DL) في اكتشاف مثل هذه التهديدات. على الرغم من نجاحها، فإن هذه النماذج عرضة للهجمات العدائية التي تستخدم استراتيجيات قائمة على الطفرات لتجنب الكشف. يقوم المؤلفون بتكرار هجوم عدائي متطور على XSS، مع معالجة مخاوف الصلاحية من الأبحاث السابقة واقتراح Oracle XSS لتعزيز استراتيجيات التقييم. تشير نتائج تجاربهم إلى معدل هروب يتجاوز 96% عندما يتم التخفيف من هذه التهديدات الصلاحية.
في الخاتمة، يوضح المؤلفون تكرارهم لعمل تشين وآخرون (2022)، مع التأكيد على القضاء على تهديدات الصلاحية التي أثرت سابقًا على النتائج المبلغ عنها. يقدمون طريقة محسنة تستهدف الكاشفات مباشرة، بدلاً من استغلال نقاط الضعف في خط أنابيب المعالجة المسبقة. لا تعزز هذه الطريقة فقط شفافية عملية التقييم ولكن تجعل أيضًا الكود ومجموعات البيانات والنتائج متاحة للجمهور. يتم تقديم مقاييس الأداء لنماذج كشف XSS المختلفة، مما يظهر دقة عالية واسترجاع ودقة، إلى جانب معدلات الهروب للهجمات العدائية على هذه النماذج، مما يؤكد فعالية مساهمات المؤلفين.
مقدمة
تسلط مقدمة هذه الورقة البحثية الضوء على التحديات الأمنية المتزايدة التي تطرحها تطبيقات الويب، مع التركيز بشكل خاص على هجمات البرمجة النصية عبر المواقع (XSS)، التي يمكن أن تعرض بيانات المستخدم للخطر وتسهّل الأنشطة الخبيثة. يناقش المؤلفون قيود طرق الكشف الحالية، بما في ذلك التحليل الثابت، الذي قد يؤدي إلى إيجابيات كاذبة، والتحليل الديناميكي، الذي غالبًا ما يؤدي إلى سلبيات كاذبة بسبب عدم كفاية تغطية الاختبار. لتعزيز كشف XSS، استخدمت الدراسات السابقة تقنيات التعلم الآلي، وانتقلت إلى أساليب التعلم العميق (DL) التي تستخدم الشبكات العصبية العميقة (DNNs). ومع ذلك، فإن هذه الشبكات العصبية العميقة عرضة للهجمات العدائية التي يمكن أن تقوض فعاليتها.
تشير الورقة إلى دراسة أجراها تشين وآخرون (2022) التي اقترحت استراتيجية التعلم المعزز (RL) لتوليد أمثلة عدائية لتحدي كاشفات XSS المعتمدة على DNN، محققة دقة كشف تتجاوز 99%. ومع ذلك، يحدد المؤلفون عدة تهديدات لصلاحية نتائج تشين وآخرون، بما في ذلك الانحدار الدلالي المحتمل لبرامج XSS ومشاكل في خط أنابيب المعالجة المسبقة التي قد تؤدي إلى تصنيف خاطئ. استجابةً لذلك، تهدف هذه الورقة إلى تكرار عمل تشين وآخرون باستخدام مجموعة بيانات متاحة للجمهور مع تقديم Oracle XSS لمعالجة التهديدات المحددة. لا تقلل الطريقة المقترحة من هذه المخاوف الصلاحية فحسب، بل تحافظ أيضًا على أداء قابل للمقارنة مع الدراسة الأصلية، مما يساهم في استراتيجية تقييم أكثر قوة في مجال كشف XSS.
طرق
تقدم المنهجية المعروضة في هذه الورقة Oracle XSS مصممة لتقييم صلاحية وتأثير المحتمل للحمولات في سياق هجمات البرمجة النصية عبر المواقع (XSS). يميز Oracle بين نوعين من الحمولة: الحمولة “الحميدة”، التي لا تعدل نموذج كائن الوثيقة (DOM) عند التنفيذ، والحمولة “الخبيثة”، التي تحدث تغييرات يمكن أن تعرض بيئة المتصفح للخطر.
لتقييم هذه الحمولة، يقوم Oracle بمحاكاة تنفيذها من خلال دمجها في صفحة نموذج يتم عرضها بواسطة خادم ويب. يقوم الخادم بمعالجة الحمولة كمعامل، ثم يقوم Oracle بتحليل DOM الناتج لأي تغييرات. إذا تم تحديد اختلافات، يتم تصنيف الحمولة على أنها خبيثة؛ إذا لم يتم ملاحظة أي تغييرات، يتم اعتبارها حميدة. لا تسهل هذه الطريقة فقط التحقق من الحمولة ولكن تساهم أيضًا في تطوير نموذج دفاع قوي، مما يعزز تقييم المنهجيات الحالية، مثل تلك التي اقترحها تشين وآخرون (2022).
نتائج
في دراسة التكرار لتشين وآخرون (2022)، تم تدريب عشرة وكلاء عدائيين لمهاجمة نماذج الكشف المختلفة، مع معالجة عدم الحتمية المتأصلة في عملية التدريب. تشير النتائج، الملخصة في الجدول 5، إلى أن معدلات الهروب (ERs) التي حققها هؤلاء الوكلاء كانت تقريبًا مثالية، متماشية بشكل وثيق مع نتائج الدراسة الأصلية على الرغم من الاختلافات في مجموعة البيانات وخوارزميات التدريب. على وجه التحديد، أظهر نموذج الذاكرة طويلة وقصيرة المدى (LSTM) معدل هروب كان أعلى بمقدار 6.58 نقطة مئوية من المرجع، بينما أظهرت نماذج الشبكة العصبية متعددة الطبقات (MLP) والشبكة العصبية التلافيفية (CNN) معدلات هروب متطابقة وأقل قليلاً (0.99 نقطة مئوية). تشير هذه الاتساق إلى أن الاختلافات في مجموعة البيانات ومنهجية التدريب لم تؤثر بشكل كبير على النتائج العامة، مما يؤكد فعالية الوكلاء العدائيين.
بعد النجاح في التكرار، استكشفت الدراسة تفسيرات محتملة للأداء العالي للوكلاء العدائيين. تم الافتراض أن هؤلاء الوكلاء يستغلون نقاط الضعف المرتبطة بعدم وجود تحقق من الإجراءات وتوليد رموز خارج المفردات أثناء المعالجة المسبقة. يمكن أن تؤدي مثل هذه القضايا إلى تقليل تأثير جوانب أخرى من خوارزميات الكشف. للتحقيق في ذلك، قامت الدراسة بتحليل معدلات الخراب (RRs) للحمولات التي نجحت في التهرب من الكشف، كما هو موضح في الجدول 6. تهدف هذه التحليل إلى توضيح العلاقة بين نقص تحقق الإجراءات ومعدلات الهروب العالية الملاحظة، مما يشير إلى أن الخوارزميات التي تنتج حمولة غير فعالة أو خارج المفردات يمكن أن تحقق معدلات هروب عالية دون تنفيذ هجمات ذات مغزى.
نقاش
تسلط فقرة النقاش في الورقة البحثية الضوء على القضية الحرجة لهجمات البرمجة النصية عبر المواقع (XSS)، التي تتضمن حقن نصوص خبيثة في صفحات الويب، مما يؤدي إلى ثغرات أمنية كبيرة. تصنف الورقة هجمات XSS إلى ثلاثة أنواع: XSS المخزنة، التي تشكل أعلى خطر حيث تؤثر على عدة مستخدمين؛ XSS المنعكسة، التي تستهدف مستخدمين محددين من خلال روابط مضللة؛ وXSS المعتمدة على DOM، التي تتManipulate نموذج كائن الوثيقة على جانب العميل. يؤكد المؤلفون على أهمية اكتشاف هذه الهجمات، مشيرين إلى أنه على الرغم من أن طرق التعلم الآلي (ML) والتعلم العميق (DL) المختلفة قد حققت معدلات دقة عالية في تحديد XSS، إلا أنها لا تزال عرضة للهجمات العدائية التي يمكن أن تتجاوز آليات الكشف.
تناقش الفقرة أيضًا ظهور الهجمات العدائية على كاشفات XSS، خاصة في سياق التقدم في التعلم العميق. توضح عدة أساليب، بما في ذلك تلك التي قدمها تشين وآخرون (2022)، والتي تستفيد من التعلم المعزز (RL) لتوليد أمثلة عدائية بشكل فعال. ومع ذلك، تحدد الورقة تهديدات كبيرة لصلاحية المنهجيات الحالية، مثل عدم وجود تحقق من السلامة الدلالية للحمولات المعدلة وخطوات المعالجة المسبقة التي قد تعطل خصائص الهجوم. يقترح المؤلفون مقاييس مثل معدل الخراب (RR) ومعدل خارج المفردات (OR) لتقييم سلامة الأمثلة العدائية ويبرزون الحاجة إلى تحسين تقنيات التحقق للتخفيف من المخاطر التي تطرحها الهجمات العدائية على أنظمة كشف XSS.
DOI: https://doi.org/10.1016/j.jss.2026.112856
Publication Date: 2026-03-14
Author(s): Samuele Pasini et al.
Primary Topic: Adversarial Robustness in Machine Learning
Overview
The section discusses the vulnerabilities of web application security to Cross-site Scripting (XSS) attacks and the effectiveness of Deep Learning (DL) models in detecting such threats. Despite their success, these models are susceptible to adversarial attacks that utilize mutation-based strategies to evade detection. The authors replicate a state-of-the-art XSS adversarial attack, addressing validity concerns from previous research and proposing an XSS Oracle to enhance evaluation strategies. Their experimental results indicate an escape rate exceeding 96% when these validity threats are mitigated.
In the conclusion, the authors detail their replication of Chen et al. (2022), emphasizing the elimination of validity threats that previously affected reported results. They present an improved method that targets the detectors directly, rather than exploiting vulnerabilities in the preprocessing pipeline. This approach not only enhances the transparency of the evaluation process but also makes the code, datasets, and results publicly accessible. Performance metrics for various XSS detection models are provided, showcasing high precision, recall, and accuracy, alongside the escape rates of adversarial attacks on these models, which further validate the effectiveness of the authors’ contributions.
Introduction
The introduction of this research paper highlights the growing security challenges posed by web applications, particularly focusing on Cross-site Scripting (XSS) attacks, which can compromise user data and facilitate malicious activities. The authors discuss the limitations of existing detection methods, including static analysis, which may yield false positives, and dynamic analysis, which often results in false negatives due to incomplete test coverage. To enhance XSS detection, previous studies have employed machine learning techniques, transitioning to Deep Learning (DL) approaches that utilize Deep Neural Networks (DNNs). However, these DNNs are susceptible to adversarial attacks that can undermine their effectiveness.
The paper references a study by Chen et al. (2022) that proposed a Reinforcement Learning (RL) strategy for generating adversarial examples to challenge DNN-based XSS detectors, achieving over 99% detection accuracy. Nonetheless, the authors identify several threats to the validity of Chen et al.’s findings, including potential semantic degradation of XSS scripts and issues with the preprocessing pipeline that could lead to misclassification. In response, this paper aims to replicate Chen et al.’s work using a publicly available dataset while introducing an XSS Oracle to address the identified threats. The proposed method not only mitigates these validity concerns but also maintains comparable performance to the original study, thereby contributing to a more robust evaluation strategy in the field of XSS detection.
Methods
The methodology presented in this paper introduces an XSS Oracle designed to evaluate the validity and potential impact of payloads in the context of Cross-Site Scripting (XSS) attacks. The Oracle distinguishes between two types of payloads: ‘Benign’ payloads, which do not modify the Document Object Model (DOM) upon execution, and ‘Malicious’ payloads, which do induce changes that can compromise the browser environment.
To assess these payloads, the Oracle simulates their execution by integrating them into a template page rendered by a web server. The server processes the payload as a parameter, and the Oracle subsequently analyzes the resulting DOM for any alterations. If discrepancies are identified, the payload is classified as Malicious; if no changes are observed, it is deemed Benign. This approach not only facilitates the validation of payloads but also contributes to the development of a robust defense model, enhancing the evaluation of existing methodologies, such as that proposed by Chen et al. (2022).
Results
In the replication study of Chen et al. (2022), ten adversarial agents were trained to attack various detection models, addressing the non-determinism inherent in the training process. The results, summarized in Table 5, indicate that the escape rates (ERs) achieved by these agents were nearly perfect, aligning closely with the original study’s findings despite differences in the dataset and training algorithms. Specifically, the Long Short-Term Memory (LSTM) model exhibited an ER that was 6.58 percentage points higher than the reference, while the Multi-Layer Perceptron (MLP) and Convolutional Neural Network (CNN) models showed identical and slightly lower ERs (0.99 percentage points). This consistency suggests that the variations in dataset and training methodology did not significantly affect the overall results, confirming the effectiveness of the adversarial agents.
Following the successful replication, the study explored potential explanations for the high performance of the adversarial agents. It was hypothesized that these agents exploit vulnerabilities linked to the lack of action validation and the generation of out-of-vocabulary tokens during preprocessing. Such issues could render other aspects of the detection algorithms less impactful. To further investigate this, the study analyzed the ruin rates (RRs) of the payloads that successfully evaded detection, as presented in Table 6. This analysis aims to elucidate the relationship between the lack of action validation and the observed high escape rates, suggesting that algorithms producing ineffective or out-of-vocabulary payloads could achieve high ERs without executing meaningful attacks.
Discussion
The discussion section of the research paper highlights the critical issue of Cross-Site Scripting (XSS) attacks, which involve the injection of malicious scripts into web pages, leading to significant security vulnerabilities. The paper categorizes XSS attacks into three types: Stored XSS, which poses the highest risk as it affects multiple users; Reflected XSS, which targets specific users through deceptive URLs; and DOM-based XSS, which manipulates the Document Object Model on the client side. The authors emphasize the importance of detecting these attacks, noting that while various machine learning (ML) and deep learning (DL) methods have achieved high accuracy rates in identifying XSS, they remain vulnerable to adversarial attacks that can bypass detection mechanisms.
The section further discusses the emergence of adversarial attacks on XSS detectors, particularly in the context of deep learning advancements. It outlines several approaches, including those by Chen et al. (2022), which leverage reinforcement learning (RL) to generate adversarial examples effectively. However, the paper identifies significant threats to the validity of existing methodologies, such as the lack of validation for the semantic integrity of modified payloads and the preprocessing steps that may disrupt the attack’s characteristics. The authors propose metrics like Ruin Rate (RR) and Out-Of-Vocabulary Rate (OR) to evaluate the integrity of adversarial examples and highlight the need for improved validation techniques to mitigate the risks posed by adversarial attacks on XSS detection systems.
