Arsyad, Hammuda (2025) Pengembangan Model Deteksi Intrusi Berbasis Jaringan dengan Rust dan Tch-rs. Other thesis, Institut Teknologi Sepuluh Nopember.
![]() |
Text
5025211146-Undergraduate_Thesis.pdf Restricted to Repository staff only Download (3MB) | Request a copy |
Abstract
Dalam era digital yang terus berkembang, ancaman keamanan siber seperti pencurian data, malware, dan serangan DoS menjadi semakin kompleks dan merugikan. Salah satu solusi mitigasi yang efektif adalah penggunaan Network Intrusion Detection System (NIDS) berbasis kecerdasan buatan. Python sering digunakan dalam pengembangan NIDS berbasis deep learning karena kemudahan dan ekosistemnya yang luas, namun memiliki keterbatasan performa. Rust, dengan efisiensi memori dan kecepatan tinggi, menjadi alternatif ideal, terlebih dengan adanya library tch-rs untuk integrasi model Torch. Penelitian ini mengkaji konversi model LSTM berbasis Keras ke Torch tanpa mengubah arsitektur atau bobot, lalu mengimplementasikannya dalam sistem NIDS berbasis Rust. Dataset menggunakan lalu lintas HTTP, dengan sequence length 5, 2 hidden layer, dropout 0,2, dan ukuran kamus 1500. Dilakukan evaluasi dengan membandingkan performa Python-Keras, Python-Torch (CPU dan CUDA), serta Rust-Torch (CPU), dengan fokus pada kecepatan dan durasi eksekusi dari proses ekstraksi payload, pemuatan Tokenizer, pra-pemrosesan, prediksi, serta keseluruhan sistem. Hasil pengujian menunjukkan bahwa perbedaan f2-score antara model berbasis Torch dan model aslinya yang berbasis Keras adalah 0%, yang berarti konversi dilakukan dengan sempurna. Selain itu, implementasi NIDS menggunakan Rust dengan model Torch dan device CPU merupakan konfigurasi yang paling efisien, dengan durasi total sistem sebesar 347,41 detik. Pada proses ekstraksi payload, implementasi di Rust menunjukkan peningkatan kecepatan sebesar 126,5 MB/s atau sekitar 5723,98%, dengan penurunan durasi eksekusi sebesar 940,39 detik atau sekitar 98,3% dibandingkan implementasi di Python. Pra-pemrosesan di Rust juga lebih cepat, dengan peningkatan kecepatan sebesar 354,5 KB/s atau sekitar 110,63%, serta penurunan durasi eksekusi sebesar 177,05 detik atau sekitar 58,9% dibandingkan implementasi di Python. Sementara itu, proses prediksi menggunakan framework Torch dengan device CUDA menjadi yang tercepat, dengan durasi eksekusi sekitar 30,53 detik dan kecepatan mencapai 3178,84 MB/s. Dengan demikian, kombinasi Torch dan Rust terbukti mampu meningkatkan efisiensi sistem NIDS tanpa mengorbankan akurasi.
======================================================================================================================================
In the ever-evolving digital era, cybersecurity threats such as data theft, malware, and DoS attacks are becoming increasingly complex and detrimental. One effective mitigation solution is the use of an artificial intelligence-based Network Intrusion Detection System (NIDS). Python is often used in the development of deep learning-based NIDS due to its simplicity and extensive ecosystem, but it has performance limitations. Rust, with its high memory efficiency and speed, is an ideal alternative, especially with the Tch-rs library for Torch model integration. This study examines the conversion of a Keras-based LSTM model to Torch without changing the architecture or weights, then implementing it in a Rust-based NIDS system. The dataset uses HTTP traffic, with a sequence length of 5, 2 hidden layers, a dropout of 0.2, and a dictionary size of 1500. An evaluation was conducted by comparing the performance of Python-Keras, Python-Torch (CPU and CUDA), and Rust-Torch (CPU), focusing on the speed and execution duration of the payload extraction process, Tokenizer loading, pre-processing, prediction, and the overall system. The test results show that the f2-score difference between the Torch-based model and the original Keras-based model is 0%, meaning the conversion is performed perfectly. In addition, the NIDS implementation using Rust with the Torch model and CPU device is the most efficient configuration, with a total system duration of 347.41 seconds. In the payload extraction process, the Rust implementation shows a speed increase of 126.5 MB/s or about 5723.98%, with a decrease in execution duration of 940.39 seconds or about 98.3% compared to the Python implementation. Pre-processing in Rust is also faster, with a speed increase of 354.5 KB/s or about 110.63%, and a decrease in execution duration of 177.05 seconds or about 58.9% compared to the Python implementation. Meanwhile, the prediction process using the Torch framework with CUDA device is the fastest, with an execution duration of about 30.53 seconds and a speed reaching 3178.84 MB/s. Thus, the combination of Torch and Rust has been proven to increase the efficiency of the NIDS system without sacrificing accuracy.
Item Type: | Thesis (Other) |
---|---|
Uncontrolled Keywords: | Sistem deteksi intrusi, keamanan siber, Rust, tch-rs, keamanan memori, Intrusion Detection System, cyber security, Rust, tch-rs, memory-safe |
Subjects: | Q Science > QA Mathematics > QA76.9.A25 Computer security. Digital forensic. Data encryption (Computer science) |
Divisions: | Faculty of Intelligent Electrical and Informatics Technology (ELECTICS) > Informatics Engineering > 55201-(S1) Undergraduate Thesis |
Depositing User: | Hammuda Arsyad |
Date Deposited: | 28 Jul 2025 09:22 |
Last Modified: | 28 Jul 2025 09:22 |
URI: | http://repository.its.ac.id/id/eprint/122254 |
Actions (login required)
![]() |
View Item |