Lifecycle-Aware and Drift-Resilient Machine Learning for Smart Contract Vulnerability Detection

Lifecycle-Aware and Drift-Resilient Machine Learning for Smart Contract Vulnerability Detection. PhD thesis, King Fahd University of Petroleum and Minerals.

[img] PDF
Shikah_J_Alsunaidi_PhD_Dissertation.pdf - Accepted Version
Restricted to Repository staff only until 23 April 2027.

Download (17MB)

Arabic Abstract

تُمكّن العقود الذكية التطبيقات اللامركزية من خلال أتمتة التفاعلات على منصات سلاسل الكتل، دون الحاجة إلى وسطاء موثوقين. وعلى الرغم من ذلك، لا تزال ثغرات العقود الذكية تتسبب في خسائر مالية وتشغيلية كبيرة. وقد أدى التوسع في اعتماد الأنظمة القائمة على سلاسل الكتل إلى زيادة الحاجة إلى تقنيات موثوقة قائمة على التعلم الآلي لاكتشاف ثغرات العقود الذكية قبل النشر وبعده. ومع ذلك، لا تزال أساليب اكتشاف الثغرات الحالية، بما في ذلك أدوات تحليل البرامج التقليدية والأساليب المعتمدة على التعلم الآلي، تعاني من قيود، من أبرزها عدم اتساق وسم الثغرات، ومحدودية تغطية الاكتشاف، ونقص مجموعات البيانات المنظمة، والاستخدام غير الواقعي للميزات عبر مراحل دورة الحياة، وضعف القدرة على التكيف مع الثغرات المتطورة. تعالج هذه الأطروحة هذه القيود من خلال إطار موحد للتعلم الآلي المراعي لدورة الحياة والمقاوم لانجراف البيانات لاكتشاف ثغرات العقود الذكية، حيث يُعزّز موثوقية الاكتشاف في ظل قيود دورة الحياة والزمن عبر تحقيق وسم متسق للثغرات، وبناء مجموعات بيانات مراعية لدورة الحياة، واختيار ميزات مستقرة زمنياً. أولاً، يُجرى تحليل شامل للثغرات الشائعة في العقود الذكية والهجمات المرتبطة بها، إلى جانب مراجعة منهجية لأساليب الكشف القائمة على التعلم الآلي الخاضع للإشراف، بهدف تحديد القيود الرئيسية والفجوات البحثية. ثانياً، يُقترح إطار آلي لوسم العقود الذكية بالثغرات المعروفة من خلال تصنيف موحد للثغرات وآلية تصويت تراعي تداخل الأدوات وقدراتها على الاكتشاف، مما يتيح وسمًا أكثر اتساقًا وموثوقية. ثالثاً، يُطوَّر إطار ومجموعة بيانات عالية الجودة باستخدام نهج مراعي لدورة الحياة يشمل تمثيلات ما قبل النشر وما بعده. وأخيراً، يُقترح إطار لاختيار الميزات المراعي لانجراف البيانات بهدف تحديد الميزات التي تظل ذات دلالة ثابتة عبر تطور الثغرات ومراحل دورة الحياة. تُقيَّم الأساليب المقترحة باستخدام نماذج قائمة على الأشجار لكلٍ من الكشف الثنائي والتصنيف متعدد التسميات، وذلك ضمن بروتوكولات تحقق تراعي البعد الزمني. تُظهر النتائج تحسنًا متسقًا في مقياس PR-AUC وفي القدرة على التعميم الزمني، إلى جانب تقليل أبعاد الميزات والتخفيف من تأثير عدم اتساق الوسوم وقيود توفر الميزات. توفر هذه المساهمات أساسًا منهجيًا للتعلم الآلي المراعي لدورة الحياة والمقاوم لانجراف البيانات لاكتشاف ثغرات العقود الذكية، كما تدعم تطوير حلول أمنية قابلة للتوسع وموثوقة للأنظمة القائمة على سلاسل الكتل.

English Abstract

Smart Contracts (SCs) enable decentralized applications by automating interactions on blockchain platforms, eliminating the need for trusted intermediaries. Despite these advantages, vulnerabilities in SC continue to cause significant financial and operational losses. The increasing adoption of blockchain-based systems has increased the need for reliable Machine Learning (ML)-based techniques to identify vulnerabilities in SCs before and after deployment. However, existing vulnerability detection approaches, including traditional program analysis tools and ML-based methods, remain limited by inconsistent vulnerability labeling, incomplete detection coverage, the lack of structured datasets for supervised learning, unrealistic use of features across lifecycle stages, and weak robustness to evolving vulnerabilities. This dissertation addresses these limitations through a unified, lifecycle-aware and drift-resilient framework for ML-based SC vulnerability detection. It improves detection reliability under realistic lifecycle and temporal constraints by integrating consistent vulnerability labeling, lifecycle-aware dataset construction, and temporally stable feature selection. First, a comprehensive analysis of SC vulnerabilities and their associated attacks is conducted, along with a systematic review of supervised ML-based detection methods, to identify key limitations and research gaps. Second, an automated framework is proposed to label SCs with known vulnerabilities using unified taxonomy mapping and a voting mechanism that accounts for tool overlap and detection capabilities, enabling more consistent annotation. Third, a high-quality SC vulnerability dataset is constructed using a lifecycle-aware approach that incorporates both pre-deployment and post-deployment representations. Finally, a drift-aware feature selection framework is proposed to identify features that remain consistently informative under evolving vulnerabilities and across lifecycle stages. The proposed approaches are evaluated using multiple tree-based ML models for both binary and multi-label vulnerability detection under time-aware validation protocols. The results demonstrate consistent improvements in PR-AUC and temporal generalization under evolving vulnerabilities, while reducing feature dimensionality and mitigating labeling inconsistencies and feature availability constraints. These contributions establish a systematic foundation for lifecycle-aware and drift-resilient ML-based SC vulnerability detection and support the development of scalable and robust security solutions for blockchain-based systems.

Item Type: Thesis (PhD)
Subjects: Computer
Systems
Research
Research > Information Technology
Department: College of Computing and Mathematics > Information and Computer Science
Thesis Advisor:
Hamoud Aljamaan,
Thesis Co-Advisor:
Mohammad Hammoudeh,
Thesis Committee Members:
Mohammad Alshayeb, Sajjad Mahmood, Mahmood Niazi,
Depositing User: SHIKAH ALSUNAIDI (g202007880)
Date Deposited: 29 Apr 2026 06:05
Last Modified: 29 Apr 2026 06:05
URI: http://eprints.kfupm.edu.sa/id/eprint/144135