Please use this identifier to cite or link to this item:
https://hdl.handle.net/20.500.11851/12442
Title: | Mqtt Ağına Gerçekleştirilen Saldırıların Makine Öğrenmesi Modelleri ile Tespiti The Detection of Attacks on Mqtt Networks Using Machine Learning Models |
Authors: | Koçak, Mesut | Advisors: | Selçuk, Ali Aydın | Keywords: | Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol Computer Engineering and Computer Science and Control |
Abstract: | Nesnelerin İnterneti (IoT)'nin hızlı gelişimi, çok sayıda cihazın ağlar üzerinden veri paylaşımını mümkün kılmış ve birçok sektörde kayda değer ilerlemelere zemin hazırlamıstır. IoT cihazları arasındaki bu veri alışverişini verimli kılmak amacıyla çeşitli iletişim protokolleri kullanılmaktadır. Bu protokoller arasında, MQTT (Message Queuing Telemetry Transport), düşük bant genişliği gereksinimi ve hafif yapısı ile IoT sistemleri için ideal bir iletişim mekanizması olarak öne çıkmaktadır. Ancak, MQTT protokolünün yaygın benimsenmesi, bu ağlara yönelik siber saldırılar karşısında çeşitli güvenlik açıklarının ortaya çıkmasına da neden olmuştur. Bu çalışma, MQTT ağlarına özgü saldırıların tespitine yönelik olarak makine öğrenmesi tekniklerinin kullanımını incelemekte ve olası tehditlerin belirlenmesini amaçlamaktadır. Çalışmada, özellikle SlowITe ve veri setine sonradan entegre edilen SlowTT saldırı türleri üzerine odaklanılmıştır. Kullanılan veri seti MQTTset, başlangıçta SlowTT saldırılarına ilişkin verileri içermediği için bu saldırılara ait veriler çalışma kapsamında sonradan eklenmiştir. Dengeli bir veri yapısı sağlamak amacıyla, veri setinin %50'si normal trafik verilerinden, geri kalan %50'si ise eşit sayıda SlowITe, SlowTT, Brute Force, Malformed, DoS (Denial of Service) ve Flood saldırılarından oluşturulmuştur. Dengeli veri seti kullanımı, dengesiz veri setlerinin yaygın sınıfı daha iyi tahmin etme eğilimi sorununu ortadan kaldırmakta ve bu sayede tüm sınıfların adil bir şekilde değerlendirilmesini sağlamaktadır. Böylece, algoritmaların performans ölçümleri daha güvenilir hale gelmiştir. Yapılan testlerde, bazı modeller daha düşük performans gösterse de dengeli veri kullanımı sayesinde sınıflar arasında daha doğru bir dağılım ve gerçekçi sonuçlar elde edilmektedir. Çalışmada, dengeli veri seti üzerinde Random Forest, XGBoost, LightGBM, DNN (Deep Neural Network) ve CatBoost gibi farklı makine öğrenmesi algoritmaları ile kapsamlı deneyler gerçekleştirilmistir. İlk aşamada, yeni MQTTset veri seti üzerinde yapılan testlerde, Random Forest modeli en yüksek başarı oranlarını göstermiştir. Diğer modeller de kabul edilebilir performans sergilemiş olmakla birlikte, DNN modeli görece daha düşük bir başarı sergilemiştir. Çalışmanın ikinci aşamasında, veri setine yeni özellikler (TCP window size ve frame time delta) eklenmiş ve bu genişletilmiş veri seti ile aynı modeller tekrar test edilmiştir. Eklenen bu özelliklerle modellerin performansında genel bir artış gözlemlenmiş ve Random Forest, XGBoost, LightGBM ve CatBoost modelleri yüksek başarı oranlarına ulaşmıştır. Ayrıca, kullanılan modellerin sonuçlarını daha derinlemesine incelemek ve hangi özelliklerin model performansına en fazla katkıyı sağladığını belirlemek amacıyla LIME (Local Interpretable Model-agnostic Explanations) ve SHAP (SHapley Additive exPlanations) yöntemleri kullanılmıştır. SHAP analizi, saldırı tespitinde kullanılan makine öğrenmesi modellerinin anlaşılabilirliğini artırmış ve hangi özelliklerin tespit sürecine en fazla katkıyı sağladığını açıkça ortaya koymuştur. Sonuç olarak, bu çalışma, MQTT ağlarına yönelik saldırıların tespitinde makine öğrenmesi tabanlı yaklaşımların etkinliğini göstermektedir. Veriye eklenen yeni özelliklerin saldırı tespit performansını önemli ölçüde artırdığı ve SHAP yöntemi ile hangi özelliklerin tespit sürecinde kritik bir rol oynadığının daha net bir şekilde anlaşıldığı görülmüştür. Bu çalışmada kullanılan yöntemler, IoT ağlarının güvenliğini sağlamada önemli katkılar sunmakta ve potansiyel saldırıların erken tespiti için etkili çözümler sağlamaktadır. The rapid development of the Internet of Things (IoT) has enabled a large number of devices to share data over networks, paving the way for significant advancements across many industries. Various communication protocols are used to ensure the efficient exchange of data among IoT devices. Among these protocols, MQTT (Message Queuing Telemetry Transport) stands out as an ideal communication mechanism for IoT systems due to its low bandwidth requirements and lightweight structure. However, the widespread adoption of the MQTT protocol has also exposed these networks to various security vulnerabilities, making them susceptible to cyberattacks. This study examines the use of machine learning techniques to detect attacks specific to MQTT networks and aims to identify potential threats. The study focuses particularly on the SlowITe attack and the SlowTT attack, which was integrated into the dataset later. The dataset used, called MQTTset, did not originally include data related to SlowTT attacks, so this data was added during the course of the study. To ensure a balanced dataset, %50 of the dataset consists of normal traffic data, while the remaining %50 is equally divided among SlowITe, SlowTT, Brute Force, Malformed, DoS, and Flood attacks. The use of a balanced dataset eliminates the problem of models overfitting to the dominant class in imbalanced datasets, ensuring fair evaluation of all classes. As a result, the performance metrics of the algorithms become more reliable. Although some models exhibited lower performance, using a balanced dataset allowed for more accurate class distribution and realistic outcomes. In this study, comprehensive experiments were conducted using various machine learning algorithms such as Random Forest, XGBoost, LightGBM, DNN (Deep Neural Network), and CatBoost on a balanced dataset. In the initial phase, Random Forest demonstrated the highest success rates in tests performed on the extended MQTTset dataset. While other models also exhibited acceptable performance, the DNN model showed relatively lower success rates. In the second phase of the study, new features (TCP window size and frame time delta) were added to the dataset, and the same models were tested again using this new dataset. With the addition of these features, a general improvement in model performance was observed, and Random Forest, XGBoost, LightGBM, and CatBoost achieved high success rates. Additionally, LIME (Local Interpretable Model-agnostic Explanations) and SHAP (SHapley Additive exPlanations) methods were used to further analyze the results of the models and determine which features contributed the most to model performance. SHAP analysis enhanced the interpretability of the machine learning models used in attack detection and clearly identified the features that contributed most significantly to the detection process. In conclusion, this study demonstrates the effectiveness of machine learning-based approaches in detecting attacks on MQTT networks. It was observed that the addition of new features significantly improved detection performance and that the SHAP method provided clearer insights into which features were most critical in the detection process. The methods used in this study offer significant contributions to securing IoT networks and provide effective solutions for the early detection of potential attacks. |
URI: | https://tez.yok.gov.tr/UlusalTezMerkezi/TezGoster?key=E_eEUHQic_C-LvhxNQn1W--oZpCQlRyJWMUN-rruRRCLxZt5IQCrX6kWbmxa93bU https://hdl.handle.net/20.500.11851/12442 |
Appears in Collections: | Bilgisayar Mühendisliği Yüksek Lisans Tezleri / Computer Engineering Master Theses |
Show full item record
CORE Recommender
Items in GCRIS Repository are protected by copyright, with all rights reserved, unless otherwise indicated.