高级搜索

留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

一种融合时序与深度特征的二阶段CAN总线攻击识别方法

谈名名 张恒 王鑫 李明 张键 杨明

谈名名, 张恒, 王鑫, 李明, 张键, 杨明. 一种融合时序与深度特征的二阶段CAN总线攻击识别方法[J]. 电子与信息学报. doi: 10.11999/JEIT250651
引用本文: 谈名名, 张恒, 王鑫, 李明, 张键, 杨明. 一种融合时序与深度特征的二阶段CAN总线攻击识别方法[J]. 电子与信息学报. doi: 10.11999/JEIT250651
TAN Mingming, ZHANG Heng, WANG Xin, LI Ming, ZHANG Jian, YANG Ming. A Two-Stage Framework for CAN Bus Attack Detection by Fusing Temporal and Deep Features[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT250651
Citation: TAN Mingming, ZHANG Heng, WANG Xin, LI Ming, ZHANG Jian, YANG Ming. A Two-Stage Framework for CAN Bus Attack Detection by Fusing Temporal and Deep Features[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT250651

一种融合时序与深度特征的二阶段CAN总线攻击识别方法

doi: 10.11999/JEIT250651 cstr: 32379.14.JEIT250651
基金项目: 国家自然科学基金(61873106, 62303109, 12401679),江苏省杰出青年科学基金项目(BK20200049)
详细信息
    作者简介:

    谈名名:男,硕士生,研究方向为信息物理系统安全、网络入侵检测

    张恒:男,教授,研究方向为信息物理系统安全、网络安全

    王鑫:男,特聘研究员,研究方向为大小模型协同、分布式人工智能

    李明:男,讲师,研究方向为大数据分析

    张键:男,教授,研究方向为数据挖掘与大数据分析、机器学习

    杨明:男,研究员,研究方向为数据安全、物联网安全

    通讯作者:

    张恒 zhangheng@jou.edu.cn

  • 中图分类号: TN919

A Two-Stage Framework for CAN Bus Attack Detection by Fusing Temporal and Deep Features

Funds: The National Natural Science Foundation of China (61873106, 62303109, 12401679), The Nature Science Foundation of Jiangsu Province for Distinguished Young Scholars (BK20200049)
  • 摘要: 控制器局域网(CAN)因安全机制缺失易遭受网络攻击,现有入侵检测系统在多类攻击识别和车载部署上仍存在挑战。该文提出一种融合时序与深度特征的二阶段CAN总线攻击识别方法,通过“先检测、后分类”的策略,将复杂任务分解,实现效率与精度统一。第1阶段设计了数据负载熵(PDE)与ID频率均值偏差(IFMD)特征,从内容与行为2个维度量化报文异常,并利用双向长短期记忆网络(BiLSTM)捕捉时序依赖,实现高效异常检测;第2阶段针对异常样本,引入一维轻量化ParC1D-Net,通过深度特征精细分析实现多类攻击分类。公开数据集实验表明,该方法在Car-Hacking数据集上准确率和F1分数均达99.99%,优于多种先进方法;消融实验验证PDE与IFMD特征在提升异常检测敏感性和鲁棒性方面的关键作用。此外,方法在GPU和模拟嵌入式CPU环境下测试,模型大小仅0.39 MB,实时检测时延分别为0.62 ms和0.93 ms,具备良好部署与实时处理能力。
  • 图  1  ParC1D-Net模型整体框架图

    图  2  第1阶段BiLSTM网络模型结构

    图  3  ParC1D-Net结构

    图  4  ParC1D Block结构

    图  5  IFMD 特征窗口大小对模型性能的影响

    表  1  二阶段模型关键参数设置

    模型参数第1阶段: BiLSTM模型第2阶段:ParC1D-Net模型
    批量大小设置10241024
    滑动窗口大小30不适用 (N/A)
    损失函数BCEWithLogitsLossCrossEntropyLoss
    优化器AdamAdamW
    优化器学习率0.0010.001
    Epoch设置55
    Dropout率0.50.5
    下载: 导出CSV

    表  2  Car-Hacking数据分布情况

    攻击类型 总报文数量 正常报文数量 攻击报文数量
    DoS 3 665 771 3 078 250 587 521
    Fuzzy 3 838 860 3 347 013 491 847
    Gear 4 443 142 3 845 890 597 252
    RPM 4 621 702 3 966 805 654 897
    下载: 导出CSV

    表  3  Challenge数据分布情况

    报文类型 总报文数量
    DoS 587 521
    Fuzzy 196 979
    Gear 597 252
    RPM 654 897
    Attack free 11 742 542
    下载: 导出CSV

    表  4  Car-Hacking数据集上不同算法间多分类性能比较(%)

    算法年份准确率精确率召回率F1
    Multi-Stage[10]202199.1199.1398.4299.09
    2-Stage Homogeneous[11]202299.4899.0699.2199.21
    HybridSecNet[12]202499.5899.5899.5899.58
    DMLP[13]202599.95--99.95
    本文方法-99.9099.8699.5499.70
    下载: 导出CSV

    表  5  Challenge数据集上不同算法间多分类性能比较(%)

    算法年份准确率精确率召回率F1
    文献[14]模型202386.0885.6786.0985.88
    XGBoost[15]202398.3597.5498.3597.90
    文献[16]模型202595.1099.6099.7096.00
    DMLP202599.46--99.45
    本文方法-99.9099.8699.5499.70
    下载: 导出CSV

    表  6  Car-Hacking数据集消融实验结果表(%)

    模型 准确率 精确率 召回率 F1
    本文模型 99.9 988 ± 0.0 000 99.9 986 ± 0.0 001 99.9 965 ± 0.0 002 99.9 976 ± 0.0 001
    w/o PDE 99.9 977 ± 0.0 002 99.9 974 ± 0.0 001 99.9 936 ± 0.0 007 99.9 955 ± 0.0 004
    w/o IFMD 99.9 239 ± 0.0 014 99.7 876 ± 0.0 058 99.9 109 ± 0.0 103 99.8 491 ± 0.0 028
    w/o PDE&IFMD 99.9 092 ± 0.0 096 99.7 505 ± 0.0 273 99.8 899 ± 0.0 129 99.8 200 ± 0.0 190
    下载: 导出CSV

    表  7  Challenge数据集消融实验结果表(%)

    模型 准确率 精确率 召回率 F1
    本文模型 99.9 037 ± 0.0 029 99.8 622±0.0 068 99.5 414±0.0 131 99.7 012±0.0 089
    w/o PDE 99.8 743 ± 0.0 060 99.8 201 ± 0.0 077 99.4 017 ± 0.0 323 99.6 098 ± 0.0 185
    w/o IFMD 99.8 578 ± 0.0 105 99.8 168 ± 0.0 130 99.3 026 ± 0.0 619 99.5 580 ± 0.0 329
    w/o PDE&IFMD 99.8 279 ± 0.0 110 99.7 336 ± 0.0 507 99.2 003 ± 0.0 540 99.4 651 ± 0.0 342
    下载: 导出CSV

    表  8  不同算法间时空性能比较

    算法年份模型复杂度(MB)平均检测延迟(ms)测试平台
    Multi-Stage20213.570.02Intel i5 CPU
    TCAN-IDS [17]2022-0.05NVIDIA Jetson AGX Xavier
    XGBoost [18]2024-33.59Raspberry Pi 4
    DMLP2025-0.17Raspberry Pi 3B
    本文方法(GPU)-0.390.62±0.10NVIDIA RTX 3090
    本文方法(CPU模拟)-0.390.93±0.18Intel Xeon (单核模拟)
    下载: 导出CSV

    表  9  不同算法间时空性能比较

    模型模型大小 (MB)推理时延 (ms/样本, bs=1)
    单阶段-BiLSTM (多分类)0.3 1280.9 300
    二阶段-S1-BiLSTM0.3 1180.5 628
    二阶段-S2-ParC1D-Net0.0 7770.6 635
    下载: 导出CSV
  • [1] 钱志鸿, 田春生, 郭银景, 等. 智能网联交通系统的关键技术与发展[J]. 电子与信息学报, 2020, 42(1): 2–19. doi: 10.11999/JEIT190787.

    QIAN Zhihong, TIAN Chunsheng, GUO Yinjing, et al. The key technology and development of intelligent and connected transportation system[J]. Journal of Electronics & Information Technology, 2020, 42(1): 2–19. doi: 10.11999/JEIT190787.
    [2] LAMPE B and MENG W Z. Intrusion detection in the automotive domain: A comprehensive review[J]. IEEE Communications Surveys & Tutorials, 2023, 25(4): 2356–2426. doi: 10.1109/COMST.2023.3309864.
    [3] WANG L X, ZHAO Q C, LEE W B, et al. Deploying intrusion detection on in-vehicle networks: Challenges and opportunities[J]. IEEE Network, 2025, 39(1): 306–312. doi: 10.1109/MNET.2024.3486220.
    [4] WU W F, LI R F, XIE G Q, et al. A survey of intrusion detection for in-vehicle networks[J]. IEEE Transactions on Intelligent Transportation Systems, 2020, 21(3): 919–933. doi: 10.1109/TITS.2019.2908074.
    [5] KHEZRI E, HASSANZADEH H, YAHYA R O, et al. Security challenges in internet of vehicles (IoV) for ITS: A survey[J]. Tsinghua Science and Technology, 2025, 30(4): 1700–1723. doi: 10.26599/TST.2024.9010083.
    [6] LAMPE B and MENG W Z. A survey of deep learning-based intrusion detection in automotive applications[J]. Expert Systems with Applications, 2023, 221: 119771. doi: 10.1016/j.eswa.2023.119771.
    [7] ZHANG H K, HU W Z, and WANG X Y. ParC-Net: Position aware circular convolution with merits from ConvNets and transformer[C]. Proceedings of the 17th European Conference on Computer Vision, Tel Aviv, Israel, 2022: 613–630. doi: 10.1007/978-3-031-19809-0_35.
    [8] SEO E, SONG H M, and KIM H K. GIDS: GAN based intrusion detection system for in-vehicle network[C]. Proceedings of 2018 16th Annual Conference on Privacy, Security and Trust (PST), Belfast, Ireland, 2018: 1–6. doi: 10.1109/PST.2018.8514157.
    [9] KANG H, KWAK B I, LEE Y H, et al. Car hacking and defense competition on in-vehicle network[C]. Proceedings of Workshop on Automotive and Autonomous Vehicle Security (AutoSec) 2021, San Diego, CA, USA, 2021, 2021: 25. doi: 10.14722/autosec.2021.23035. (查阅网上资料,未找到本条文献出版地信息,请确认).
    [10] KHAN I A, MOUSTAFA N, PI D C, et al. An enhanced multi-stage deep learning framework for detecting malicious activities from autonomous vehicles[J]. IEEE Transactions on Intelligent Transportation Systems, 2022, 23(12): 25469–25478. doi: 10.1109/TITS.2021.3105834.
    [11] ALMUTLAQ S, DERHAB A, HASSAN M M, et al. Two-stage intrusion detection system in intelligent transportation systems using rule extraction methods from deep neural networks[J]. IEEE Transactions on Intelligent Transportation Systems, 2023, 24(12): 15687–15701. doi: 10.1109/TITS.2022.3202869.
    [12] CHOUGULE A, KULKARNI I, ALLADI T, et al. HybridSecNet: In-vehicle security on controller area networks through a hybrid two-step LSTM-CNN model[J]. IEEE Transactions on Vehicular Technology, 2024, 73(10): 14580–14591. doi: 10.1109/TVT.2024.3413849.
    [13] ALJABRI W, HAMID M A, and MOSLI R. Enhancing real-time intrusion detection system for in-vehicle networks by employing novel feature engineering techniques and lightweight modeling[J]. Ad Hoc Networks, 2025, 169: 103737. doi: 10.1016/j.adhoc.2024.103737.
    [14] 李思涌, 吴书汉, 孙伟. 基于注意力机制的CNN-LSTM网络车内CAN总线入侵检测技术[J]. 信息安全研究, 2023, 9(10): 961–967. doi: 10.12379/j.issn.2096-1057.2023.10.05.

    LI S Y, WU S H, and SUN W. A CNN-LSTM method based on attention mechanism for in-vehicle CAN bus intrusion detection[J]. Journal of Information Security Research, 2023, 9(10): 961–967. doi: 10.12379/j.issn.2096-1057.2023.10.05.
    [15] JEONG Y, KIM H, LEE S, et al. In-vehicle network intrusion detection system using CAN frame-aware features[J]. IEEE Transactions on Intelligent Transportation Systems, 2024, 25(5): 3843–3853. doi: 10.1109/TITS.2023.3323622.
    [16] 陈彦彬, 刘桂雄. 双线性自注意力机制CAN总线入侵检测方法研究[J]. 电子测量技术, 2025, 48(2): 122–130. doi: 10.19651/j.cnki.emt.2417438.

    CHEN Y B and LIU G X. Study on bilinear self-attention mechanism for CAN bus intrusion detection method[J]. Electronic Measurement Technology, 2025, 48(2): 122–130. doi: 10.19651/j.cnki.emt.2417438.
    [17] CHENG P Z, XU K, LI S M, et al. TCAN-IDS: Intrusion detection system for internet of vehicle using temporal convolutional attention network[J]. Symmetry, 2022, 14(2): 310. doi: 10.3390/sym14020310.
    [18] ALMUTLAQ S, DERHAB A, HASSAN M M, et al. Two-stage intrusion detection system in intelligent transportation systems using rule extraction methods from deep neural networks[J]. IEEE Transactions on Intelligent Transportation Systems, 2023, 24(12): 15687–15701. doi: 10.1109/TITS.2022.3202869. (查阅网上资料,本条文献与第11条文献重复,请确认).
  • 加载中
图(5) / 表(9)
计量
  • 文章访问数:  36
  • HTML全文浏览量:  9
  • PDF下载量:  12
  • 被引次数: 0
出版历程
  • 收稿日期:  2025-07-09
  • 修回日期:  2025-09-04
  • 网络出版日期:  2025-09-09

目录

    /

    返回文章
    返回