Abstract
dc:descriptionModern software systems are complex, interconnected, and exposed to security threats. It is a necessity for software houses to identify vulnerabilities, which are coding flaws that threaten the software quality and reliability, exposing organizations to cyberattacks, and potentially leading to financial damages. Although software security is traditionally treated as an afterthought added during the deployment phase of the Software Development Life-Cycle (SDLC), Vulnerability Detection (VD) needs to be performed from the early stages of the SDLC to facilitate the early mitigation of vulnerabilities. Several VD techniques have been proposed such as static code analysis, which relies on manually defined rules. However, the rising frequency of reported security incidents suggests that more advanced techniques are required. As Machine Learning (ML) has advanced, learning-based techniques have emerged to detect vulnerabilities, overcoming the limitations of traditional static analysis. An ML-based mechanism that can facilitate the identification of vulnerabilities is Vulnerability Prediction (VP), which predicts the components (e.g., files, functions, etc.) of a software product that are more likely to be vulnerable. Commonly, VP is performed by training ML models in labeled datasets in discriminating vulnerable from non-vulnerable components. We refer to the term VP when predicting the existence of vulnerabilities in software components of high granularity (e.g., package, class, function, etc.), whereas we refer to the term VD when detecting vulnerabilities in a low level of granularity (e.g., line-level). However, existing ML-based methods face important limitations, and no single technique has emerged as a gold standard. There are challenges regarding the used code representation formats and ML models, and especially about the accurate detection of vulnerabilities at low levels of granularity and their categorization. This stresses the need for additional research to outline the field, compare existing methods, and advance the current state-of-the-art. To this end, the purpose of the present dissertation is to study the current literature, and empirically compare different code representations, models, and features. It also aims to propose an innovative and complete VD methodology leveraging cutting-edge techniques from the fields of Artificial Intelligence (AI) and Natural Language Processing (NLP). Specifically, first, this dissertation presents a literature review about ML-based VP. A mapping study is conducted to provide a comprehensive description of the VP domain by examining the goals of the state-of-the-art studies, their datasets, features, and models. The findings highlighted that VP-related research focuses mainly on predicting vulnerable software components. The most utilized datasets consist of real-world software and retrieve information from reports in vulnerability databases, while Deep Learning (DL) algorithms along with methods of representing source code in textual (including text-rich graphs) formats are of growing interest. Subsequently, the present thesis builds ML models that encapsulate concepts from NLP, DL, and Ensemble Learning. Particularly, it examines different word embedding techniques for encoding textual code representations in a numerical format. It then compares and combines software metrics and textual representations for constructing ML-based models. The results revealed the superiority of the text mining-based models over the software metrics-based ones. Our results also indicated that enriching the text mining-based models with software metrics was not found to provide any added value to their predictive performance. Furthermore, the present thesis investigates transfer learning techniques for VP by employing Transformer-based Large Language Models (LLMs). It not only compares various LLMs in VP, but also examines the effect of different implementation choices for transfer learning. The results showed that extracting contextual word embeddings from LLMs to train a separate DL model is a superior approach than sentence embedding extraction and fine-tuning approaches, considering both accuracy and computational cost. Moreover, we present a methodology for line-level vulnerability localization by proposing a Sequence-to-Sequence approach to train an LLM in extracting vulnerable lines out of vulnerable functions. The results showed a great benefit in both accuracy and cost-effectiveness compared to the explainable AI-based state-of-the-art solutions. Finally, Transformer-based models proved to be capable of classifying vulnerable code snippets to vulnerability categories when fine-tuned in a multi-class classification setting.
Degree
thesis:*- Grantor dc:publisher
- Πανεπιστήμιο Μακεδονίας
- Year dc:date
- 2025
Author and committee
dc:creator, dc:contributor.*- Authors dc:creator
-
- Kalouptsoglou, Ilias
- Καλουπτσόγλου, Ηλίας
Subjects
dc:subject × 20- Ασφάλεια λογισμικού
- Πρόβλεψη ευπαθειών
- Ανίχνευση ευπαθειών
- Μηχανική μάθηση
- Βαθιά μάθηση
- Μεταφορά μάθησης
- Εξόρυξη κειμένου
- Software security
- Vulnerability prediction
- Vulnerability detection
- Machine learning
- Deep learning
- Transfer learning
- Text mining
- Επιστήμη Ηλεκτρολόγου Μηχανικού, Ηλεκτρονικού Μηχανικού, Μηχανικού Η/Υ
- Επιστήμες Μηχανικού και Τεχνολογία
- Υπολογιστές, Υλικό (hardware) και Αρχιτεκτονική
- Electrical Engineering, Electronic Engineering, Information Engineering
- Engineering and Technology
- Computer science, Hardware and Architecture
Rights
- Language dc:language
- eng
Identifiers
dc:identifier.*- Identifier
- 10.12681/eadd/58920