溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

HAL是一款什么工具

發(fā)布時間:2021-12-27 14:17:51 來源:億速云 閱讀:145 作者:小新 欄目:數(shù)據(jù)安全

小編給大家分享一下HAL是一款什么工具,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

   HAL是一款針對網(wǎng)關(guān)級網(wǎng)絡(luò)設(shè)備列表的完整的逆向工程分析套件以及操作框架,該工具專注于提升網(wǎng)絡(luò)安全人員的效率、可擴(kuò)展性和可移植性。HAL附帶了成熟的插件系統(tǒng),允許安全研究人員在內(nèi)核中引入任意功能。

HAL是一款什么工具

除了很多其他的研究項目之外,HAL還被應(yīng)用于大學(xué)安全課程之中:《硬件逆向工程概論》。

功能介紹

1、網(wǎng)絡(luò)設(shè)備列表及其鏈接的自然有向圖表示;

2、支持自定義網(wǎng)關(guān)庫;

3、優(yōu)化C++核心帶來的高性能;

4、模塊化:可以編寫自己的C++插件來進(jìn)行有效的網(wǎng)表分析和操作;

5、提供了功能豐富的用戶操作界面,支持可視化檢測以及交互式分析;

6、集成了Python Shell,可用于跟網(wǎng)表元素交互以及訪問GUI接口;

7、該工具(v1.1.0)目前新增了針對Xilinx Unisim、Xilinx Simprim、Synopsys 90nm、GSCLIB 3.0和UMC 0.18μm庫的支持;

工具安裝

Ubuntu

HAL的release版本通過ppa發(fā)布的。

macOS

使用下列命令并通過homebrew安裝HAL:

brew tap emsec/halbrew install hal

構(gòu)建指令

運(yùn)行下列命令下載并安裝HAL:

git clone https://github.com/emsec/hal.git && cd hal./install_dependencies.shmkdir build && cd buildcmakemakemake install

macOS構(gòu)建

需要使用一個支持OpenMP的編譯器,我們可以通過下列命令安裝:

brew install llvm

然后運(yùn)行下列命令讓cmake使用我們自定義的編譯器:

cmake .. -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++

快速開始

廣大研究人員可以通過命令“hal -g”來安裝或構(gòu)建HAL,并啟動GUI界面。使用命令“hal [--help|-h]”可以查看工具所有可用的選項。我們在examples目錄中提供了樣本網(wǎng)表,以及用于分析的樣本庫,位于路徑plugins/example_gate_library。

從examples目錄加載一個代碼庫,并開啟圖形化分析功能。使用整合的Python Shell或Python腳本窗口來與目標(biāo)進(jìn)行交互。

我們可以枚舉所有的lookup表,并輸出相關(guān)信息:

from hal_plugins import libquine_mccluskeyqm_plugin = libquine_mccluskey.quine_mccluskey()for gate in netlist.get_gates():    if "LUT" in gate.type:        print(gate.name + " (id "+str(gate.id) + ", type " + gate.type + ")")        print("  " + str(len(gate.input_pin_types)) + "-to-" + str(len(gate.output_pin_types)) + " LUT")        boolean_functions = qm_plugin.get_boolean_function_str(gate, False)        for pin in boolean_functions:            print("  " + pin + ": "+boolean_functions[pin])        print("")

比如說針對fsm.vhd樣本,輸出結(jié)果如下:

FSM_sequential_STATE_REG_1_i_2_inst (id 5, type LUT6)  6-to-1 LUT  O: (~I0 I1 ~I2 I3 I4 ~I5) + (I0 ~I2 I3 I4 I5)FSM_sequential_STATE_REG_0_i_2_inst (id 3, type LUT6)  6-to-1 LUT  O: (I2 I3 I4 ~I5) + (I1 I2) + (I0 I1) + (I1 ~I3) + (I1 ~I4) + (I1 ~I5)FSM_sequential_STATE_REG_0_i_3_inst (id 4, type LUT6)  6-to-1 LUT  O: (~I1 ~I2 I3 ~I4 I5) + (I0 I5) + (I0 I4) + (I0 I3) + (I0 I1) + (I0 ~I2)OUTPUT_BUF_0_inst_i_1_inst (id 18, type LUT1)  1-to-1 LUT  O: (~I0)OUTPUT_BUF_1_inst_i_1_inst (id 20, type LUT2)  2-to-1 LUT  O: (~I0 I1) + (I0 ~I1)FSM_sequential_STATE_REG_1_i_3_inst (id 6, type LUT6)  6-to-1 LUT  O: (I0 I2 I4) + (~I1 I2 I4) + (I0 ~I3 I4) + (~I1 ~I3 I4) + (I0 I4 ~I5) + (~I1 I4 ~I5) + (I2 I5) + (I2 I3) + (I1 I5) + (I1 I3) + (I0 I1) + (~I0 I5) + (~I0 I3) + (~I0 ~I1) + (I1 ~I2) + (~I0 ~I2) + (~I3 I5) + (~I2 ~I3) + (~I4 I5) + (I3 ~I4) + (I1 ~I4)

參考引用

如果你需要在學(xué)校或在學(xué)術(shù)研究條件下使用HAL,請使用下列引用方式來標(biāo)記并使用該框架:

@misc{hal,    author = {{EmSec Chair for Embedded Security}},    publisher = {{Ruhr University Bochum}},    title = {{HAL - The Hardware Analyzer}},    year = {2019},    howpublished = {\url{https://github.com/emsec/hal}},}

大家也可以直接引用原始論文:

@article{2018:Fyrbiak:HAL,      author    = {Marc Fyrbiak and                   Sebastian Wallat and                   Pawel Swierczynski and                   Max Hoffmann and                   Sebastian Hoppach and                   Matthias Wilhelm and                   Tobias Weidlich and                   Russell Tessier and                   Christof Paar},  title     	= {{HAL-} The Missing Piece of the Puzzle for Hardware Reverse Engineering,               	  Trojan Detection and Insertion},  journal	= {IEEE Transactions on Dependable and Secure Computing},  year	= {2018},  publisher	= {IEEE},  howpublished = {\url{https://github.com/emsec/hal}}}

許可證協(xié)議

HAL的開發(fā)與發(fā)布遵循MIT開源許可證協(xié)議。

以上是“HAL是一款什么工具”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

hal
AI