MIT License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

强化网络安全防线:Western-OC2-Lab 的 Intrusion Detection System-Using-Machine-Learning

项目背景与痛点

在当今的网络环境中,入侵检测系统(IDS)是保护系统免受攻击的关键工具。而传统的基于规则的IDS已不能满足日益复杂的网络威胁。Western-OC2-Lab 的这一项目利用机器学习算法来构建更智能、更灵活的IDS,不仅可以发现已知威胁,还能识别新的威胁模式。

该系统通过集成多种机器学习算法(包括决策树、随机森林、极端梯度提升(XGBoost)、堆叠以及贝叶斯优化等),建立了一个多层安全防护体系。在面对复杂的网络攻击时,能够提供更加全面和高效的检测能力,及时发现并阻止潜在威胁,确保网络环境的安全。

核心技术揭秘

项目的核心在于利用了多种机器学习算法,其数据流图如下所示:

graph TD A[数据收集] --> B[数据预处理] B --> C[特征工程] C --> D[模型培训] D --> E{"模型选择"} E -->|随机森林| F[随机森林模型] E -->|XGBoost| G[XGB模型] E -->|Stacking| H[集成模型] F --> I[模型检测] G --> I H --> I I --> J[安全日志记录]

系统首先收集网络流量数据,经过预处理以适应机器学习的特点后,进行特征工程,从中提取有用的特征,并通过多种机器学习算法进行模型训练。经过交叉验证选择最佳模型。测试阶段则通过实际数据对模型进行评估和反馈调整,以求改进。每个模型生成的日志最终都会汇总到安全日志系统中,以供安全分析。

这种多层次的模型选择为系统提供了强大的容错性和灵活性,使其能够在复杂和多变的网络环境中有效运作。利用 XGboost、随机森林以及堆叠方法,让系统不但对已知的威胁有敏锐的感知,更能自动适应新型网络攻击,为网络安全防护提供了更为稳健的保障。

功能亮点与差异

尽管处于同一领域,Western-OC2-Lab 的 IDS 相较于其他竞品,有以下显著优点:

  1. 集成多种算法:通过引入多个模型并实施堆叠方法,系统能更好地综合不同算法的优点,从而实现更稳定和准确的检测结果。
  2. 自我优化能力:该系统能通过不断的数据学习来自动优化检测敏感度,适应不断演变的威胁环境,这一特质对于防范未知威胁尤为重要。
  3. 高扩展性:由于使用了模块化的架构设计,它可以方便地集成新的机器学习算法或者对现有算法进行参数调整,以此无缝适应未来的安全需求和技术更新。

应用场景与落地建议

在实际部署中,这一项目即可用作网络监控预警,也可纳入到企业级的SIEM系统(Security Information and Event Management)中,作为安全事件的日志分析工具。在实施部署时,要注意以下几点:

  • 数据预处理与特征选择对于系统性能至关重要。
  • 在实际网络环境下,可靠的清洗数据集和不断的算法迭代优化都是不可忽略的步骤。
  • 新模型的验证评估需要精心设计,以确保在未知攻击面前仍能保持较高检测效能。

综合评价

Western-OC2-Lab 的 Intrusion Detection System 无疑是一项令人瞩目的技术突破,它精细周全的设计,创新地将多种机器学习模型引入入侵检测,展现了追求高强度抵御未知威胁的决心。尽管高度依赖于训练数据的质量与多样性,但凭借强大的泛化能力和自我适应特征,成为安全领域里一个充沛且生动的案例。

关于

GitHub 原始描述(英文)

Code for IDS-ML: intrusion detection system development using machine learning algorithms (Decision tree, random forest, extra trees, XGBoost, stacking, k-means, Bayesian optimization..)

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Jupyter Notebook

贡献者

README

Intrusion-Detection-System-Using-Machine-Learning

This repository contains the code for the project “IDS-ML: Intrusion Detection System Development Using Machine Learning”. The code and proposed Intrusion Detection System (IDSs) are general models that can be used in any IDS and anomaly detection applications. In this project, three papers have been published:

The code introduction of this repository is publicly available at:

This repository proposed three intrusion detection systems by implementing many machine learning algorithms, including tree-based algorithms (decision tree, random forest, XGBoost, LightGBM, CatBoost etc.), unsupervised learning algorithms (k-means), ensemble learning algorithms (stacking, proposed LCCDE), and hyperparameter optimization techniques (Bayesian optimization)**.

Paper Abstract

Paper 1: Tree-Based Intelligent Intrusion Detection System in Internet of Vehicles

  The use of autonomous vehicles (AVs) is a promising technology in Intelligent Transportation Systems (ITSs) to improve safety and driving efficiency. Vehicle-to-everything (V2X) technology enables communication among vehicles and other infrastructures. However, AVs and Internet of Vehicles (IoV) are vulnerable to different types of cyber-attacks such as denial of service, spoofing, and sniffing attacks. An intelligent IDS is proposed in this paper for network attack detection that can be applied to not only Controller Area Network (CAN) bus of AVs but also on general IoVs. The proposed IDS utilizes tree-based ML algorithms including decision tree (DT), random forest (RF), extra trees (ET), and Extreme Gradient Boosting (XGBoost). The results from the implementation of the proposed intrusion detection system on standard data sets indicate that the system has the ability to identify various cyber-attacks in the AV networks. Furthermore, the proposed ensemble learning and feature selection approaches enable the proposed system to achieve high detection rate and low computational cost simultaneously.

Figure 1: The overview of the tree-based IDS model.

Paper 2: MTH-IDS: A Multi-Tiered Hybrid Intrusion Detection System for Internet of Vehicles

  Modern vehicles, including connected vehicles and autonomous vehicles, nowadays involve many electronic control units connected through intra-vehicle networks to implement various functionalities and perform actions. Modern vehicles are also connected to external networks through vehicle-to-everything technologies, enabling their communications with other vehicles, infrastructures, and smart devices. However, the improving functionality and connectivity of modern vehicles also increase their vulnerabilities to cyber-attacks targeting both intra-vehicle and external networks due to the large attack surfaces. To secure vehicular networks, many researchers have focused on developing intrusion detection systems (IDSs) that capitalize on machine learning methods to detect malicious cyber-attacks. In this paper, the vulnerabilities of intra-vehicle and external networks are discussed, and a multi-tiered hybrid IDS that incorporates a signature-based IDS and an anomaly-based IDS is proposed to detect both known and unknown attacks on vehicular networks. Experimental results illustrate that the proposed system can accurately detect various types of known attacks on the CAN-intrusion-dataset representing the intra-vehicle network data and the CICIDS2017 dataset illustrating the external vehicular network data.
  The proposed MTH-IDS framework consists of two traditional ML stages (data pre-processing and feature engineering) and four tiers of learning models:

  1. Four tree-based supervised learners — decision tree (DT), random forest (RF), extra trees (ET), and extreme gradient boosting (XGBoost) — used as multi-class classifiers for known attack detection;
  2. A stacking ensemble model and a Bayesian optimization with tree Parzen estimator (BO-TPE) method for supervised learner optimization;
  3. A cluster labeling (CL) k-means used as an unsupervised learner for zero-day attack detection;
  4. Two biased classifiers and a Bayesian optimization with Gaussian process (BO-GP) method for unsupervised learner optimization.

Figure 2: The overview of the MTH-IDS model.

Paper 3: LCCDE: A Decision-Based Ensemble Framework for Intrusion Detection in The Internet of Vehicles

  Modern vehicles, including autonomous vehicles and connected vehicles, have adopted an increasing variety of functionalities through connections and communications with other vehicles, smart devices, and infrastructures. However, the growing connectivity of the Internet of Vehicles (IoV) also increases the vulnerabilities to network attacks. To protect IoV systems against cyber threats, Intrusion Detection Systems (IDSs) that can identify malicious cyber-attacks have been developed using Machine Learning (ML) approaches. To accurately detect various types of attacks in IoV networks, we propose a novel ensemble IDS framework named Leader Class and Confidence Decision Ensemble (LCCDE). It is constructed by determining the best-performing ML model among three advanced ML algorithms (XGBoost, LightGBM, and CatBoost) for every class or type of attack. The class leader models with their prediction confidence values are then utilized to make accurate decisions regarding the detection of various types of cyber-attacks. Experiments on two public IoV security datasets (Car-Hacking and CICIDS2017 datasets) demonstrate the effectiveness of the proposed LCCDE for intrusion detection on both intra-vehicle and external networks.

Figure 3: The overview of the LCCCDE IDS model.

Implementation

Dataset

CICIDS2017 dataset, a popular network traffic dataset for intrusion detection problems

  • Publicly available at: https://www.unb.ca/cic/datasets/ids-2017.html
  • For the purpose of displaying the experimental results in Jupyter Notebook, the sampled subsets of CICIDS2017 is used in the sample code. The subsets are in the “data” folder.

CAN-intrusion dataset, a benchmark network security dataset for intra-vehicle intrusion detection

Code

  • Tree-based_IDS_GlobeCom19.ipynb: code for the paper “Tree-Based Intelligent Intrusion Detection System in Internet of Vehicles”
  • MTH_IDS_IoTJ.ipynb: code for the paper “MTH-IDS: A Multi-Tiered Hybrid Intrusion Detection System for Internet of Vehicles”
  • LCCDE_IDS_GlobeCom22.ipynb: code for the paper “LCCDE: A Decision-Based Ensemble Framework for Intrusion Detection in The Internet of Vehicles”

Machine Learning Algorithms

  • Decision tree (DT)
  • Random forest (RF)
  • Extra trees (ET)
  • XGBoost
  • LightGBM
  • CatBoost
  • Stacking
  • K-means

Hyperparameter Optimization Methods

  • Bayesian Optimization with Gaussian Processes (BO-GP)
  • Bayesian Optimization with Tree-structured Parzen Estimator (BO-TPE)

If you are interested in hyperparameter tuning of machine learning algorithms, please see the code in the following link:
https://github.com/LiYangHart/Hyperparameter-Optimization-of-Machine-Learning-Algorithms

Requirements & Libraries

Contact-Info

Please feel free to contact us for any questions or cooperation opportunities. We will be happy to help.

Citation

If you find this repository useful in your research, please cite one of the following two articles as:

L. Yang, A. Moubayed, I. Hamieh and A. Shami, “Tree-Based Intelligent Intrusion Detection System in Internet of Vehicles,” 2019 IEEE Global Communications Conference (GLOBECOM), 2019, pp. 1-6, doi: 10.1109/GLOBECOM38437.2019.9013892.

@INPROCEEDINGS{9013892,
  author={Yang, Li and Moubayed, Abdallah and Hamieh, Ismail and Shami, Abdallah},
  booktitle={2019 IEEE Global Communications Conference (GLOBECOM)}, 
  title={Tree-Based Intelligent Intrusion Detection System in Internet of Vehicles}, 
  year={2019},
  pages={1-6},
  doi={10.1109/GLOBECOM38437.2019.9013892}
  }

L. Yang, A. Moubayed, and A. Shami, “MTH-IDS: A Multi-Tiered Hybrid Intrusion Detection System for Internet of Vehicles,” IEEE Internet of Things Journal, vol. 9, no. 1, pp. 616-632, Jan.1, 2022, doi: 10.1109/JIOT.2021.3084796.

@ARTICLE{9443234,
  author={Yang, Li and Moubayed, Abdallah and Shami, Abdallah},
  journal={IEEE Internet of Things Journal}, 
  title={MTH-IDS: A Multitiered Hybrid Intrusion Detection System for Internet of Vehicles}, 
  year={2022},
  volume={9},
  number={1},
  pages={616-632},
  doi={10.1109/JIOT.2021.3084796}}

L. Yang, A. Shami, G. Stevens, and S. DeRusett, “LCCDE: A Decision-Based Ensemble Framework for Intrusion Detection in The Internet of Vehicles," in 2022 IEEE Global Communications Conference (GLOBECOM), 2022, pp. 1-6, doi: 10.1109/GLOBECOM48099.2022.10001280.

@INPROCEEDINGS{10001280,
  author={Yang, Li and Shami, Abdallah and Stevens, Gary and de Rusett, Stephen},
  booktitle={GLOBECOM 2022 - 2022 IEEE Global Communications Conference}, 
  title={LCCDE: A Decision-Based Ensemble Framework for Intrusion Detection in The Internet of Vehicles}, 
  year={2022},
  pages={3545-3550},
  doi={10.1109/GLOBECOM48099.2022.10001280}}

评论

暂无评论