高级搜索

留言板

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

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

基于图神经网络的门级硬件木马检测方法

史江义 温聪 刘鸿瑾 王泽坤 张绍林 马佩军 李康

史江义, 温聪, 刘鸿瑾, 王泽坤, 张绍林, 马佩军, 李康. 基于图神经网络的门级硬件木马检测方法[J]. 电子与信息学报. doi: 10.11999/JEIT221201
引用本文: 史江义, 温聪, 刘鸿瑾, 王泽坤, 张绍林, 马佩军, 李康. 基于图神经网络的门级硬件木马检测方法[J]. 电子与信息学报. doi: 10.11999/JEIT221201
SHI Jiangyi, WEN Cong, LIU Hongjin, WANG Zekun, ZHANG Shaolin, MA Peijun, LI Kang. Hardware Trojan Detection for Gate-level Netlists Based on Graph Neural Network[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT221201
Citation: SHI Jiangyi, WEN Cong, LIU Hongjin, WANG Zekun, ZHANG Shaolin, MA Peijun, LI Kang. Hardware Trojan Detection for Gate-level Netlists Based on Graph Neural Network[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT221201

基于图神经网络的门级硬件木马检测方法

doi: 10.11999/JEIT221201
基金项目: 国家部委计划(2019-XXXX-ZD-101-00)
详细信息
    作者简介:

    史江义:男,博士,教授,研究方向为SOC设计与设计方法学、低功耗设计、物理实现、硬件安全

    温聪:男,硕士生,研究方向为硬件安全、EDA

    刘鸿瑾:男,博士,研究方向为星上计算机

    王泽坤:男,硕士生,研究方向为SoC设计方法、硬件安全

    张绍林:男,博士,研究方向为星上计算机

    马佩军:男,博士,研究方向为集成电路可制造性设计理论与方法

    李康:男,博士,副教授,研究方向为EDA、SoC设计方法

    通讯作者:

    马佩军 pjma@xidian.edu.cn

  • 中图分类号: TN406

Hardware Trojan Detection for Gate-level Netlists Based on Graph Neural Network

Funds: The National Ministry Program (2019-XXXX-ZD-101-00)
  • 摘要: 集成电路(IC)供应链的全球化已经将大多数设计、制造和测试过程从单一的可信实体转移到世界各处各种不可信的第三方实体。使用不可信的第三方知识产权(3PIP)可能面临着设计被对手植入硬件特洛伊木马(HTs)的巨大风险。这些硬件木马可能会使原有设计出现性能降低、信息泄露甚至发生物理层面不可逆的破坏,严重危害消费者的隐私、安全和公司的信誉。现有文献中提出的多种硬件木马检测方法,具有以下缺陷:对黄金参考电路的依赖、测试向量覆盖率的要求甚至是手动代码审查的需要,同时随着集成电路规模的增大,低触发率的硬件木马更加难以被检测。因此针对上述问题,该文提出一种基于图神经网络硬件木马的检测方法,在无需黄金参考电路以及逻辑测试的情况下实现了对门级硬件木马的检测。该方法利用图采样聚合算法(GraphSAGE)学习门级网表中的高维图特征以及相应节点特征,并采用有监督学习进行检测模型的训练。该方法探索了不同聚合方式以及数据平衡方法下的模型的检测能力。该模型在信任库(Trust-Hub)中基于新思90 nm通用库(SAED)的基准训练集的评估下,实现了92.9%的平均召回率以及86.2%的平均F1分数(平均聚合,权重平衡),相比目前最先进的学习模型F1分数提高了8.4%。而应用于基于系统250 nm库(LEDA)的数据量更大的数据集时,分别在组合逻辑类型硬件木马检测中获得平均83.6%的召回率、70.8%的F1,在时序逻辑类型硬件木马检测工作中获得平均95.0%的召回率以及92.8%的F1分数。
  • 图  1  基于GraphSAGE的硬件木马检测框架

    图  2  本文特征向量表示以及GNN模型架构

    图  3  GraphSAGE算法流程

    图  4  权重平衡方式结果对比

    表  1  Trust-Hub数据集

    Trust-Hub所在目录使用库网表数量细节
    Abstraction Level/
    Gate/TRIT-TC, TRIT-TS
    LEDA914基于8个宿主电路的580个组合逻辑硬件木马嵌入网表以及
    334个时序逻辑硬件木马嵌入网表
    Abstraction Level/
    Gate/other benchamrks
    SAED21基于6个宿主电路的14个组合逻辑硬件木马嵌入网表以及
    7个时序逻辑硬件木马嵌入网表
    下载: 导出CSV

    表  2  实验评价指标

    指标类型含义计算公式指标类型含义计算公式
    TN正常节点被判别为正常的数量统计数量FN木马节点被判别为正常的数量统计数量
    TP木马节点被判别为木马的数量统计数量FP正常节点被判别为木马的数量统计数量
    TNR正常节点被判别为正常的概率${\rm{TNR} } = \dfrac{ { {\rm{TN} } } }{ { {\rm{TN} } + {\rm{FP} } } }$Prec被识别节点中真正硬件木马的概率${\rm{Prec} } = \dfrac{ { {\rm{TP} } } }{ { {\rm{TP} } + {\rm{FP} } } }$
    Recall/TPR木马节点被判别为木马的概率${\rm{Recall} } = \dfrac{ { {\rm{TP} } } }{ { {\rm{TP} } + {\rm{FN} } } }$F1Recall和Prec的调和平均数${\rm{F} }1\_{\rm{score} } = \dfrac{ {2 \times {\rm{Prec} } \times {\rm{Recall} } } }{ { {\rm{Prec} } + {\rm{Recall} } } }$
    下载: 导出CSV

    表  3  图神经网络配置参数以及训练参数

    架构参数训练参数
    输入层[n, 25]激活函数ReLU优化器Adam学习率0.001
    隐藏层尺寸128分类函数Softmax批次数量72运行次数200
    MLP尺寸[128, 2]GNN层数3dropout0.1权值衰减5e-4
    下载: 导出CSV

    表  4  SAED数据集门级木马电路信息

    电路名称木马触发器网表门数HT门数电路名称木马触发器网表门数HT门数
    RS232-T1000组合比较器21513S35932-T300比较器546236
    RS232-T1100顺序比较器21612S38417-T100比较器534112
    RS232-T1200顺序比较器21614S38417-T200比较器533415
    RS232-T1300组合比较器2139S38417-T300比较器532944
    RS232-T1400顺序比较器21513S38584-T100比较器64179
    RS232-T1500顺序比较器21614S38584-T200状态机647383
    RS232-T1600顺序比较器21412S38584-T300状态机7204730
    S35932-T100比较器544115S15850-T100组合比较器218227
    S35932-T200比较器543816EthernetMAC10GE-T700顺序比较器10246613
    EthernetMAC10GE-T710顺序比较器10246613EthernetMAC10GE-T720顺序比较器10246613
    EthernetMAC10GE-T730顺序比较器10246613总数4660051124
    下载: 导出CSV

    表  5  SAED采用MEAN聚合的检测结果

    电路名称TPRTNRF1电路名称TPRTNRF1
    RS232-T1000100.0100.0100.0S35932-T30094.4100.097.1
    RS232-T1100100.0100.0100.0S38417-T100100.099.236.4
    RS232-T1200100.0100.0100.0S38417-T200100.099.554.5
    RS232-T1300100.0100.0100.0S38417-T30086.499.988.4
    RS232-T1400100.0100.0100.0S38584-T10044.499.617.1
    RS232-T1500100.0100.0100.0S38584-T20096.4100.095.2
    RS232-T1600100.0100.0100.0S38584-T30099.399.697.8
    S35932-T10093.3100.096.6S15850-T10077.898.148.7
    S35932-T20075.0100.085.7EthernetMAC10GE-T700100.0100.0100.0
    EthernetMAC10GE-T71092.3100.096.0EthernetMAC10GE-T72092.3100.096.0
    EthernetMAC10GE-T730100.0100.0100.0平均92.999.886.2
    下载: 导出CSV

    表  6  本文结果与文献对比(%)

    方法TPRTNRF1方法TPRTNRF1
    GraphSAGE+mean92.999.886.2GramsDet[8]82.196.046.1
    GraphSAGE+pool92.599.884.8R-HTDetector[19]96.894.559.9
    baseline SVM87.397.063.5随机森林[18]63.6100.077.8
    下载: 导出CSV

    表  7  LEDA数据集结果

    组合逻辑硬件木马植入数据集时序逻辑硬件木马植入数据集
    网表名TPFNTNFP网表名TPFNTNFP网表名TPFNTNFP网表名TPFNTNFP
    c2670_T093817765c3540_T0179011322s1423_T40846114764s35932_T40883068390
    s15850_T00361294936s35932_T0158068390s15850_T41722229796s1423_T4222004791
    s15850_T01253296124c5315_T0047120316s15850_T43933229796s13207_T47311123100
    c6288_T0418124160s13207_T01356229812s13207_T462511023082s1423_T4131804782
    c2670_T016617742c5315_T0478022989s15850_T45033029769s15850_T406371229796
    c6288_T0665024160s35932_T0067068390s35932_T41482168390s15850_T4348229823
    c2670_T073717733c5315_T0643323007s1423_T40510434764s35932_T43021068390
    s1423_T008704773s13207_T0144223055s13207_T44020123100s13207_T42539229796
    c2670_T054517733c5315_T0576023007s35932_T4028544782s35932_T43523068390
    s1423_T003524791s35932_T0057068390s1423_T41872168390s13207_T46822123100
    c2670_T095427742s15850_T0142229823s13207_T4496424791s15850_T4298120681227
    s15850_T00944297312s13207_T0056123082s1423_T41217123055s15850_T47520323100
    c3540_T0876411340c5315_T0637123007s35932_T4214204800s35932_T42722068390
    s1423_T011424791s35932_T0189068390s15850_T46832068390s13207_T46121023100
    c3540_T0058111313c6288_T0496024160s13207_T48420029850s15850_T443321297312
    s1423_T005414764s13207_T0116023100s1423_T40712023037s15850_T43319229769
    c3540_T0156211322c6288_T0486024160s35932_T4131704791s35932_T41122068390
    s1423_T014504782s35932_T0166068390s1423_T41162068390s13207_T450871323019
    c3540_T0125011268c6288_T0825024160s13207_T4442004791s35932_T43418068390
    s13207_T00232229416s15850_T00252296718s1423_T42116123100s1423_T42983068390
    平均  TPR = 0.836 TNR = 0.997 F1 = 0.708平均  TPR = 0.950 TNR = 0.998 F1 = 0.928
    下载: 导出CSV
  • [1] HUANG Zhao, WANG Quan, CHEN Yin, et al. A survey on machine learning against hardware Trojan attacks: Recent advances and challenges[J]. IEEE Access, 2020, 8: 10796–10826. doi: 10.1109/ACCESS.2020.2965016
    [2] ELSHAMY M, DI NATALE G, SAYED A, et al. Digital-to-analog hardware Trojan attacks[J]. IEEE Transactions on Circuits and Systems I:Regular Papers, 2022, 69(2): 573–586. doi: 10.1109/TCSI.2021.3116806
    [3] LYU Yangdi and MISHRA P. Automated trigger activation by repeated maximal clique sampling[C]. The 25th Asia and South Pacific Design Automation Conference (ASP-DAC), Beijing, China, 2020.
    [4] JIANG B C, YANG W G, and YANG C Y. An SPC-based forward-backward algorithm for arrhythmic beat detection and classification[J]. Industrial Engineering and Management Systems, 2013, 12(4): 380–388. doi: 10.7232/iems.2013.12.4.380
    [5] SHAKYA B, HE T, SALMANI H, et al. Benchmarking of hardware Trojans and maliciously affected circuits[J]. Journal of Hardware and Systems Security, 2017, 1(1): 85–102. doi: 10.1007/s41635-017-0001-6
    [6] LIU Qiang, ZHAO Pengyong, and CHEN Fuqiang. A hardware Trojan detection method based on structural features of Trojan and host circuits[J]. IEEE Access, 2019, 7: 44632–44644. doi: 10.1109/ACCESS.2019.2908088
    [7] SHEN Haihua, TAN Huazhe, LI Huawei, et al. LMDet: A “naturalness” statistical method for hardware Trojan detection[J]. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 2018, 26(4): 720–732. doi: 10.1109/TVLSI.2017.2781423
    [8] LU Renjie, SHEN Haihua, SU Yu, et al. GramsDet: Hardware Trojan detection based on recurrent neural network[C]. 2019 IEEE 28th Asian Test Symposium (ATS), Kolkata, India, 2019.
    [9] 严迎建, 赵聪慧, 刘燕江. 基于多维结构特征的硬件木马检测技术[J]. 电子与信息学报, 2021, 43(8): 2128–2139. doi: 10.11999/JEIT210003

    YAN Yingjian, ZHAO Conghui, and LIU Yanjiang. Hardware Trojan detection based on multiple structural features[J]. Journal of Electronics &Information Technology, 2021, 43(8): 2128–2139. doi: 10.11999/JEIT210003
    [10] 张颖, 李森, 陈鑫, 等. 基于Xgboost的混合模式门级硬件木马检测方法[J]. 电子与信息学报, 2021, 43(10): 3050–3057. doi: 10.11999/JEIT200874

    ZHANG Ying, LI Sen, CHEN Xin, et al. Hybrid multi-level hardware Trojan detection method for gate-level netlists based on XGBoost[J]. Journal of Electronics &Information Technology, 2021, 43(10): 3050–3057. doi: 10.11999/JEIT200874
    [11] SHI Jiangyi, ZHANG Xinyuan, MA Peijun, et al. Hardware Trojan designs based on high-low probability and partitioned combinational logic with a malicious reset signal[J]. IEEE Transactions on Circuits and Systems II:Express Briefs, 2021, 68(6): 2152–2156. doi: 10.1109/TCSII.2020.3044721
    [12] HASEGAWA K, YANAGISAWA M, and TOGAWA N. A hardware-Trojan classification method utilizing boundary net structures[C]. 2018 IEEE International Conference on Consumer Electronics (ICCE), Las Vegas, USA, 2018: 1–4.
    [13] KOK C H, OOI C Y, INOUE M, et al. Net classification based on testability and netlist structural features for hardware Trojan detection[C]. 2019 IEEE 28th Asian Test Symposium (ATS), Kolkata, India, 2019: 105–1055.
    [14] YASAEI R, YU S Y, and AL FARUQUE M A. GNN4TJ: Graph neural networks for hardware Trojan detection at register transfer level[C]. 2021 Design, Automation & Test in Europe Conference & Exhibition (DATE), Grenoble, France, 2021: 1504–1509.
    [15] MURALIDHAR N, ZUBAIR A, WEIDLER N, et al. Contrastive graph convolutional networks for hardware Trojan detection in third party IP cores[C]. 2021 IEEE International Symposium on Hardware Oriented Security and Trust (HOST), Tysons Corner, USA, 2021: 181–191.
    [16] CHOWDHURY S D, YANG Kaixin, and NUZZO P. ReIGNN: State register identification using graph neural networks for circuit reverse engineering[C]. 2021 IEEE/ACM International Conference on Computer Aided Design (ICCAD), Munich, Germany, 2021: 1–9.
    [17] HAMILTON W L. Graph Representation Learning[M]. Switzerland: Springer, 2020: 1–159.
    [18] KURIHARA T and TOGAWA N. Hardware-Trojan classification based on the structure of trigger circuits utilizing random forests[C]. Proceedings of 2021 IEEE 27th International Symposium on On-Line Testing and Robust System Design (IOLTS), Torino, Italy, 2021: 1–4.
    [19] HASEGAWA K, HIDANO S, NOZAWA K, et al. R-HTDetector: Robust hardware-Trojan detection based on adversarial training[J]. arXiv preprint arXiv: 2205.13702, 2022.
    [20] Trust-HUB[EB/OL]. https://www.trust-hub.org/.
    [21] WANG Minjie, ZHENG Da, YE Zihao, et al. Deep graph library: A graph-centric, highly-performant package for graph neural networks[J]. arXiv preprint arXiv: 1909.01315, 2019.
    [22] YU Shichao, GU Chongyan, LIU Weiqiang, et al. Deep learning-based hardware Trojan detection with block-based netlist information extraction[J]. IEEE Transactions on Emerging Topics in Computing, 2022, 10(4): 1837–1853. doi: 10.1109/TETC.2021.3116484
  • 加载中
图(4) / 表(7)
计量
  • 文章访问数:  176
  • HTML全文浏览量:  83
  • PDF下载量:  17
  • 被引次数: 0
出版历程
  • 收稿日期:  2022-09-15
  • 修回日期:  2022-12-26
  • 网络出版日期:  2022-12-28

目录

    /

    返回文章
    返回