KR101962720B1 - Method and apparatus for reverse engineering LUT information in FPGA bitstream - Google Patents

Method and apparatus for reverse engineering LUT information in FPGA bitstream Download PDF

Info

Publication number
KR101962720B1
KR101962720B1 KR1020180147671A KR20180147671A KR101962720B1 KR 101962720 B1 KR101962720 B1 KR 101962720B1 KR 1020180147671 A KR1020180147671 A KR 1020180147671A KR 20180147671 A KR20180147671 A KR 20180147671A KR 101962720 B1 KR101962720 B1 KR 101962720B1
Authority
KR
South Korea
Prior art keywords
lut
bitstream
offset
input pin
information
Prior art date
Application number
KR1020180147671A
Other languages
Korean (ko)
Inventor
김진국
김현숙
권태경
서예지
Original Assignee
국방과학연구소
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 국방과학연구소 filed Critical 국방과학연구소
Priority to KR1020180147671A priority Critical patent/KR101962720B1/en
Application granted granted Critical
Publication of KR101962720B1 publication Critical patent/KR101962720B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/76Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in application-specific integrated circuits [ASIC] or field-programmable devices, e.g. field-programmable gate arrays [FPGA] or programmable logic devices [PLD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

According to the present invention, provided is a lookup table (LUT) information reverse engineering apparatus in an FPGA bit stream. The LUT information reverse engineering apparatus in an FPGA bit stream comprises: an LUT information reverse engineering DB generation unit including an LUT bit stream offset DB, an input pin bit offset DB, and a bit stream-INIT attribute value mapping table; and an LUT realization information reverse engineering unit extracting LUT information from an FPGA bit stream, and converting input pin information and an INIT attribute value into a logical formula to output the logical formula. The LUT used from the FPGA bit stream and a function realized by each LUT can be reverse-engineered into a logical formula form.

Description

FPGA 비트스트림에서의 LUT 정보 역공학 방법 및 장치{Method and apparatus for reverse engineering LUT information in FPGA bitstream}FIELD OF THE INVENTION [0001] The present invention relates to a method and apparatus for LUT information in an FPGA bitstream,

본 발명은 FPGA 비트스트림에서의 정보 역공학 방법 및 장치에 관한 것이다. 보다 상세하게는, FPGA 비트스트림에서의 룩업 테이블(LUT) 정보 역공학 방법 및 장치에 관한 것이다. The present invention relates to a method and apparatus for reverse engineering information in an FPGA bitstream. And more particularly, to a method and apparatus for reverse lookup table (LUT) information reverse engineering in FPGA bitstreams.

하드웨어 기술 언어를 통해 설계된 회로는 합성, 맵핑, 배치 및 결선 단계를 통해 비트스트림으로 변환되어 FPGA에 로드된다. 이와 같은 개발 과정에서 악의적으로 회로를 설계하거나 신뢰되지 않은 IP(Intellectual Property) 코어를 사용하는 등의 경로를 통해 하드웨어 악성기능이 유입될 수 있다. 뿐만 아니라 개발이 완료된 후에도 재프로그래밍하거나 비트스트림을 직접 수정하는 방법으로 하드웨어 악성기능이 삽입될 수 있다. 군사 및 우주항공 등 주요한 부문에 사용되는 FPGA에 악의적인 기능을 수행하는 하드웨어 악성기능이 삽입될 경우 심각한 피해를 초래할 수 있으므로 하드웨어 악성기능을 탐지하는 것이 매우 중요하다.Circuits designed through the hardware description language are converted to bitstreams through synthesis, mapping, placement, and wiring steps and loaded into the FPGA. During this development process, hardware malicious functions can be introduced through routes such as malicious circuit design or use of untrusted intellectual property (IP) cores. In addition, after malware development is completed, hardware malicious functions can be inserted by reprogramming or directly modifying the bitstream. Detecting hardware malicious functions is very important because hardware malicious functions that perform malicious functions on FPGAs used in major sectors such as military and aerospace can cause serious harm.

FPGA 개발 단계에서 주로 사용되는 하드웨어 악성기능 탐지 기법에는 부채널 분석, 로직 테스팅 등의 동적 탐지 방법이 존재한다. 그러나 하드웨어 악성기능을 발현시키는 것이 어렵고, 하드웨어 악성기능의 크기가 작을 경우 탐지가 매우 어렵다는 단점이 있다. 또한 비트스트림을 수정하여 하드웨어 악성기능을 삽입하는 경우에는 변경 기록이 남지 않아 탐지가 어렵다는 문제점이 있다.There are dynamic detection methods such as subchannel analysis and logic testing in hardware malicious function detection technique which is mainly used in FPGA development stage. However, it is difficult to develop hardware malicious functions, and detection is very difficult when hardware malicious functions are small in size. In addition, when a hardware malicious function is inserted by modifying a bit stream, there is a problem that detection of change is difficult because a change record is not left.

하지만, 하드웨어 악성기능 탐지를 목표로 하는 FPGA 비트스트림 역공학 연구 사례는 발표되지 않아, 이에 대한 해결책이 없다는 문제점이 있다. However, there are no cases of FPGA bitstream reverse engineering research aimed at hardware malicious feature detection, and there is no solution.

특히, FPGA family는 Virtex, Artix, Kintex, Spartan 각각은 1 세대 내지 7 세대까지로, 제품군 별로는 2개 이상씩의 기기가 있는데 각 세대에 따라 펌웨어의 구성요소가 모두 상이하다. 따라서, Virtex-5세대 기기에 탑재되는 비트스트림뿐만 아니라, 다른 제품군 및 다른 세대의 FPGA에 대해서는 적용할 수 있는 FPGA 비트스트림 정보 역공학 방법(reverse engineering method)이 요구된다.In particular, the FPGA family includes Virtex, Artix, Kintex, and Spartan, each of which has one to seven generations, and each product family has two or more devices. Therefore, FPGA bitstream information reverse engineering method, which can be applied not only to bitstreams in Virtex-5 generation devices but also to other product families and other generations of FPGAs, is required.

따라서, 본 발명의 목적은 기존 하드웨어 악성기능 탐지 기법의 한계를 보완하기 위해 FPGA 개발 단계의 최종 결과물인 비트스트림을 역공학하여 FPGA에 구현된 기능을 파악하는 방법을 제공하는 것이다.Accordingly, an object of the present invention is to provide a method of recognizing functions implemented in the FPGA by reversing the bitstream, which is the final result of the FPGA development stage, in order to overcome the limitations of the conventional hardware malfunction detection technique.

또한, 본 발명의 목적은 FPGA 비트스트림으로부터 회로 구현을 담당하는 자원인 LUT(Lookup Table)에 대응되는 비트스트림을 추출하여 논리식(Boolean equation) 수준으로 역공학하는 방법을 제공하는 것이다.It is another object of the present invention to provide a method of extracting a bitstream corresponding to a lookup table (LUT), which is a resource responsible for circuit implementation, from a FPGA bitstream and performing reverse engineering to a Boolean equation level.

상기와 같은 과제를 해결하기 위한 본 발명에 따른 FPGA 비트스트림에서의 LUT(Lookup Table) 정보 역공학 장치가 제공된다. 상기 역공학 장치는, LUT 비트스트림 오프셋 DB, 입력 핀 비트 오프셋 DB 및 비트스트림-INIT 속성 값 매핑테이블을 포함하는 LUT 정보 역공학 DB 생성부; 및 FPGA 비트스트림에서 LUT 정보를 추출하고, 입력 핀 정보, INIT 속성 값을 논리식 변환하여 출력하는 LUT 구현 정보 역공학부를 포함하여, FPGA 비트스트림으로부터 사용된 LUT와 각 LUT가 구현한 기능을 논리식 형태로 역공학할 수 있다.In order to solve the above problems, an apparatus for reverse-lookup table (LUT) information in an FPGA bitstream according to the present invention is provided. The reverse engineering apparatus includes a LUT information reverse engineering DB generation unit including an LUT bit stream offset DB, an input pin bit offset DB, and a bit stream-INIT attribute value mapping table; And a LUT implementation information reverse engineering section for extracting LUT information from the FPGA bit stream and logically converting input pin information and INIT attribute values and outputting the LUT information. Can be reverse engineered.

일 실시 예에서, 상기 LUT 정보 역공학 DB 생성부는, 상기 LUT 비트스트림 오프셋 DB를 생성하는 LUT 비트스트림 오프셋 DB 생성부; 상기 입력 핀 비트 오프셋 DB를 생성하는 입력 핀 비트 오프셋 DB 생성부; 및 상기 비트스트림-INIT 속성 값 매핑테이블을 생성하는 비트스트림-INIT 속성 값 매핑테이블 생성부를 포함할 수 있다.In one embodiment, the LUT information reverse engineering DB generator comprises: a LUT bitstream offset DB generator for generating the LUT bitstream offset DB; An input pin bit offset DB generator for generating the input pin bit offset DB; And a bitstream-INIT attribute value mapping table generation unit for generating the bitstream-INIT attribute value mapping table.

일 실시 예에서, 상기 LUT 구현 정보 역공학부는, 상기 FPGA 비트스트림에서 구성 데이터 영역을 추출한 후, 상기 LUT 비트스트림 오프셋 DB를 바탕으로 LUT 비트스트림을 모두 추출하고, 상기 입력 핀 비트 오프셋 DB에 저장된 PIP의 비트 오프셋과 값이 상기 FPGA 비트스트림에서 발견되면 해당 PIP와 연결된 입력 핀이 사용된 것으로 역공학할 수 있다.In one embodiment, the LUT implementation information reverse engineering section may extract a configuration data area from the FPGA bitstream, extract all the LUT bitstreams based on the LUT bitstream offset DB, If the bit offset and value of the PIP are found in the FPGA bitstream, the input pin associated with the PIP may be deemed to be used.

일 실시 예에서, 상기 LUT 정보 추출부는, 상기 입력 핀의 정보가 역공학되면, 해당 입력 핀들의 대한 INIT 속성 값 맵핑 테이블을 적용하여 INIT 속성 값을 도출할 수 있다.In one embodiment, if the input pin information is reverse-engineered, the LUT information extractor may derive an INIT attribute value by applying an INIT attribute value mapping table for the input pins.

일 실시 예에서, 상기 LUT 구현 정보 역공학부는, 상기 LUT 비트스트림을 추출하고 사용된 입력 핀과 상기 INIT 속성 값을 찾은 후, 상기 LUT 비트스트림, 상기 사용된 입력 핀 및 상기 INIT 속성 값을 기반으로 진리표를 생성하는 논리식 변환부를 더 포함할 수 있다.In one embodiment, the LUT implementation information reverse engineering section extracts the LUT bit stream, finds the used input pin and the INIT attribute value, and then, based on the LUT bit stream, the used input pin, and the INIT attribute value And a logical expression conversion unit for generating a truth table.

일 실시 예에서, 상기 논리식 변환부는, 상기 진리표의 입력으로 사용될 입력 핀을 설정하고 출력으로 INIT 속성 값을 설정하여 상기 진리표를 생성한 뒤, 상기 진리표를 논리식으로 변환하여 해당 LUT 정보에 대한 역공학을 완료할 수 있다.In one embodiment, the logical expression conversion unit generates the truth table by setting an input pin to be used as an input of the truth table and an INIT attribute value as an output, converts the truth table into a logical expression, Can be completed.

일 실시 예에서, 상기 LUT 비트스트림 오프셋 DB 생성부는, 상기 FPGA 비트스트림에서 추출된 구성 데이터 영역에서, 각 프레임에 16-bit 씩 각 LUT가 저장하는 64-bit 값의 오프셋을 찾아 상기 LUT 비트스트림 오프셋 DB를 생성할 수 있다.In one embodiment, the LUT bitstream offset DB generator searches for an offset of a 64-bit value stored in each LUT in 16-bit units in each frame in the configuration data area extracted from the FPGA bitstream, An offset DB can be generated.

일 실시 예에서, 상기 입력 핀 비트 오프셋 DB 생성부는, 24개의 입력 핀에 대해 모든 PIP를 확보하고, 구성 데이터(Configuration data)에서 각 PIP의 byteoffset, value를 수집하고, 상기 모든 PIP에 대하여 각각의 byteoffset, value에 대한 상기 입력 핀 비트 오프셋 DB를 구축할 수 있다. 이에 따라, 상기 입력 핀 비트 오프셋 DB는 Boolean equation으로의 역공학에 활용될 수 있다.In one embodiment, the input pin bit offset DB generator may acquire all PIPs for the 24 input pins, collect byte offsets and values of each PIP from the configuration data, the input pin bit offset DB for byte offset, value. Accordingly, the input pin bit offset DB can be utilized for reverse engineering into a Boolean equation.

따라서, 본 발명의 적어도 일 실시예에 따르면, FPGA 비트스트림으로부터 사용된 LUT와 각 LUT가 구현한 기능을 논리식 형태로 역공학할 수 있다는 장점이 있다. Therefore, according to at least one embodiment of the present invention, there is an advantage that the LUT used from the FPGA bitstream and the function implemented by each LUT can be reverse-engineered in logical form.

또한, 본 발명의 적어도 일 실시예에 따르면, 본 발명에서 활용되는 LUT 비트스트림의 특성은 Virtex-5세대 기기 비트스트림에 동일하게 적용할 수 있다는 장점이 있다. Also, according to at least one embodiment of the present invention, the characteristics of the LUT bitstream utilized in the present invention can be equally applied to a Virtex-5 generation device bitstream.

또한, 본 발명의 적어도 일 실시예에 따르면, 여러 분야에 활용될 수 있는 있고, 본 발명을 통해 도출되는 논리식은 Xilinx 사의 문서형 netlist인 XDL에서 나타나는 형태와 일치하므로 netlist로의 역공학을 위해 활용될 수 있다는 장점이 있다.In addition, according to at least one embodiment of the present invention, a logical expression that can be utilized in various fields and derived from the present invention is consistent with a form shown in XDL, a document type netlist of Xilinx corporation, There is an advantage that it can be.

또한, 본 발명을 통해 얻은 결과는 하드웨어 악성기능 탐지에 활용될 수 있고, 하드웨어 악성기능이 구현된 FPGA 비트스트림에 대하여 본 발명에서 제시하는 기법을 적용하여 회로의 기능을 논리식으로 표현할 수 있다는 장점이 있다. In addition, the result obtained through the present invention can be utilized for hardware malicious function detection, and an advantage that the function of a circuit can be expressed by logical expression by applying the technique proposed in the present invention to an FPGA bitstream in which a hardware malicious function is implemented have.

또한, 본 발명의 적어도 일 실시예에 따르면, 추가적으로 다른 자원들에 대한 역공학을 수행하여 하드웨어 악성기능에 대한 특징을 학습하여 탐지하는 것에 활용할 수 있다는 장점이 있다.In addition, according to at least one embodiment of the present invention, there is an advantage that reverse engineering against other resources is further performed to learn and detect features of hardware malicious functions.

도 1은 본 발명에 따른 LUT 정보 역공학 장치의 상세한 구성을 나타낸다.
도 2는 본 발명에 따른 Virtex-5 기기에서의 LUT 배치도를 나타낸다.
도 3은 본 발명에 따른 베릴로그를 이용하여 LUT 모듈을 구현한 코드이다.
도 4는 발명에 따른 LUT 구현에 사용되는 INIT 속성 값을 나타낸다.
도 5는 본 발명에 따른 LUT 비트스트림 오프셋 데이터베이스 생성 과정을 나타낸다.
도 6은 본 발명에 따른 입력 핀 데이터베이스 생성 과정을 나타낸다.
1 shows a detailed configuration of an LUT information reverse engineering apparatus according to the present invention.
2 shows a layout of a LUT in a Virtex-5 device according to the present invention.
FIG. 3 is a code for implementing an LUT module using a Beryllog according to the present invention.
FIG. 4 shows an INIT attribute value used in the LUT implementation according to the present invention.
5 illustrates a process of generating a LUT bitstream offset database according to the present invention.
6 shows a process of generating an input pin database according to the present invention.

상술한 본 발명의 특징 및 효과는 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해 질 것이며, 그에 따라 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. BRIEF DESCRIPTION OF THE DRAWINGS The above and other features and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings, It will be possible.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시 예를 가질 수 있는바, 특정 실시 예들을 도면에 예시하고 상세한 설명에 구체적으로 설명하고자 한다. 그러나 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It is to be understood, however, that the invention is not to be limited to the specific embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용한다.Like reference numerals are used for similar elements in describing each drawing.

제1, 제2등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.The terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.

예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않아야 한다.Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the contextual meaning of the related art and are to be interpreted as either ideal or overly formal in the sense of the present application Should not.

이하의 설명에서 사용되는 구성요소에 대한 접미사 모듈, 블록 및 부는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다. The suffix modules, blocks, and parts for the components used in the following description are given with or taken into consideration only for ease of specification, and do not have their own meaning or role.

이하, 본 발명의 바람직한 실시 예를 첨부한 도면을 참조하여 당해 분야에 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 설명한다. 하기에서 본 발명의 실시 예를 설명함에 있어, 관련된 공지의 기능 또는 공지의 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In the following description of the present invention, detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.

이하에서는, 본 발명에 따른 FPGA 비트스트림에서의 LUT(Lookup Table) 정보 역공학 장치 및 방법에 대해 구체적으로 설명하기로 한다. Hereinafter, an LUT (Lookup Table) information reverse engineering apparatus and method in an FPGA bit stream according to the present invention will be described in detail.

이와 관련하여, 도 1은 본 발명에 따른 LUT 정보 역공학 장치의 상세한 구성을 나타낸다. 도 1을 참조하면, LUT 역공학 장치는 LUT 정보 역공학 DB 생성부(100)와 LUT 구현 정보 역공학부(200)를 포함한다. In this regard, Fig. 1 shows a detailed configuration of the LUT information reverse engineering apparatus according to the present invention. Referring to FIG. 1, the LUT reverse engineering apparatus includes a LUT information reverse engineering DB generator 100 and an LUT implementation information reverse engineering unit 200.

구체적으로, LUT 정보 역공학 DB 생성부(100)는 LUT 비트스트림 오프셋 DB 생성부(110), 입력 핀 비트 오프셋 DB 생성부(120) 및 비트스트림-INIT 속성 값 매핑테이블 생성부(130)을 포함한다. 또한, LUT 구현 정보 역공학부(200)는 LUT 정보 추출부(210)와 논리식 변환부(220)를 포함한다.Specifically, the LUT information reverse engineering DB generation unit 100 includes a LUT bit stream offset DB generation unit 110, an input pin bit offset DB generation unit 120, and a bitstream-INIT attribute value mapping table generation unit 130 . The LUT implementation information reverse engineering section 200 includes an LUT information extraction section 210 and a logical expression conversion section 220.

한편, LUT 정보 역공학 DB 생성부(100)는 LUT 비트스트림 오프셋 DB, 입력 핀 비트 오프셋 DB 및 비트스트림-INIT 속성 값 매핑테이블을 포함하도록 구성된다. 반면에, LUT 구현 정보 역공학부(200)는 FPGA 비트스트림에서 LUT 정보를 추출하고, 입력 핀 정보, INIT 속성 값을 논리식 변환하여 출력하도록 구성된다.Meanwhile, the LUT information reverse engineering DB generator 100 is configured to include a LUT bitstream offset DB, an input pin bit offset DB, and a bitstream-INIT attribute value mapping table. On the other hand, the LUT implementation information inverse engineering section 200 extracts LUT information from the FPGA bitstream, and converts the input pin information and the INIT attribute value into logical form and outputs it.

한편, LUT 비트스트림 오프셋 DB 생성부(110)는 LUT 비트스트림 오프셋 DB를 생성한다. 또한, 입력 핀 비트 오프셋 DB 생성부(120)는 입력 핀 비트 오프셋 DB를 생성한다. 또한, 비트스트림-INIT 속성 값 매핑테이블 생성부(130)는 비트스트림-INIT 속성 값 매핑테이블을 생성한다.Meanwhile, the LUT bitstream offset DB generator 110 generates the LUT bitstream offset DB. Also, the input pin bit offset DB generator 120 generates an input pin bit offset DB. Also, the bitstream-INIT attribute value mapping table generation unit 130 generates a bitstream-INIT attribute value mapping table.

구체적으로, LUT 비트스트림 오프셋 DB 생성부(110)는 PGA 비트스트림에서 추출된 구성 데이터 영역에서, 각 프레임에 16-bit 씩 각 LUT가 저장하는 64-bit 값의 오프셋을 찾아 상기 LUT 비트스트림 오프셋 DB를 생성할 수 있다.Specifically, the LUT bitstream offset DB generator 110 finds an offset of a 64-bit value stored in each LUT in 16-bit units in each frame in the constituent data area extracted from the PGA bitstream, DB can be created.

한편, 입력 핀 비트 오프셋 DB 생성부(120)는 24개의 입력 핀에 대해 모든 PIP를 확보하고, 구성 데이터(Configuration data)에서 각 PIP의 byteoffset, value를 수집할 수 있다. 또한, 상기 모든 PIP에 대하여 각각의 byteoffset, value에 대한 상기 입력 핀 비트 오프셋 DB를 구축할 수 있다. 이에 따라, 상기 입력 핀 비트 오프셋 DB는 논리식(Boolean equation)으로의 역공학에 활용될 수 있다.On the other hand, the input pin bit offset DB generator 120 acquires all PIPs for the 24 input pins, and collects the byte offset and value of each PIP from the configuration data. In addition, the input pin bit offset DB for each byte offset and value can be constructed for all the PIPs. Accordingly, the input pin bit offset DB can be utilized for reverse engineering into a Boolean equation.

한편, 전술한 구성 데이터 영역과 관련하여, 추가적인 실시예로서, FPGA 비트스트림에서 구성 데이터 영역을 동적으로 추출하여 다음과 같은 동작을 수행할 수 있다. 구체적으로, FPGA 비트스트림에서 구성 데이터 영역을 동적으로 추출한 후 데이터베이스(DB)를 바탕으로 LUT 비트스트림을 동적으로 추출한다. 이에 따라 입력 핀 데이터베이스에 저장된 PIP의 비트 오프셋과 값이 비트스트림에서 발견되면 해당 PIP와 연결된 입력 핀이 사용된 것으로 역공학할 수 있다는 장점이 있다.With respect to the above configuration data area, as an additional embodiment, the configuration data area may be dynamically extracted from the FPGA bitstream and the following operation may be performed. Specifically, after extracting the configuration data area dynamically from the FPGA bitstream, the LUT bitstream is dynamically extracted based on the database (DB). Accordingly, if the bit offset and value of the PIP stored in the input pin database are found in the bit stream, the input pin connected to the PIP can be used for reverse engineering.

이와 관련하여, 구성 데이터 영역의 동적 추출과 사용된 입력 핀 역공학 동작은 반복적으로 수행될 수 있다. 이에 따라, 해당 PIP와 연결된 입력 핀이 사용된 것으로 판단되면, 동적으로 추출되는 구성 데이터 영역을 해당 입력 핀과 연관된 구성 데이터 영역으로 한정할 수 있다. 따라서, 한정된 구성 데이터 영역에 대해서 상세하게 역공학을 반복적으로 수행할 수 있다는 장점이 있다.In this regard, the dynamic extraction of the configuration data area and the input pin reverse engineering operations used may be performed iteratively. Accordingly, if it is determined that the input pin connected to the PIP is used, the configuration data area dynamically extracted can be limited to the configuration data area associated with the input pin. Therefore, there is an advantage that the reverse engineering can be repeatedly performed in detail on the limited configuration data area.

반면에, 해당 PIP와 연결된 입력 핀 이외에 다른 입력 핀도 사용된 것으로 판단되면, 동적으로 추출되는 구성 데이터 영역을 역공학 후보인 다른 입력 핀을 포함하도록 확장 가능하다. 이에 따라, 확장된 구성 데이터 영역에 대한 데이터베이스(DB)를 바탕으로 LUT 비트스트림을 동적으로 추출한다. 또한, 확장된 입력 핀 데이터베이스에 저장된 PIP의 비트 오프셋과 값이 비트스트림에서 발견되면 해당 PIP와 연결된 복수의 입력 핀이 사용된 것으로 역공학할 수 있다는 장점이 있다.On the other hand, if it is determined that an input pin other than the input pin connected to the PIP is also used, the configuration data area to be dynamically extracted can be extended to include another input pin that is a reverse engineering candidate. Accordingly, the LUT bit stream is dynamically extracted based on the database (DB) for the extended constituent data area. In addition, if the bit offset and value of the PIP stored in the extended input pin database are found in the bitstream, it is possible to reverse engineer the plurality of input pins connected to the PIP.

한편, 본 발명에 따른 LUT 정보 역공학 DB 생성부(100)와 이들의 상세 구성의 상세한 동작에 대해 살펴보면 다음과 같다.The detailed operation of the LUT information reverse-engineering DB generator 100 and the detailed configuration of the LUT information reverse-engineering DB generator 100 according to the present invention will be described as follows.

1) LUT 정보 역공학 데이터베이스 생성부1) LUT information reverse engineering database generation unit

가) LUT 구현A) Implementation of LUT

Xilinx Virtex-5 기기에는 6개의 입력을 사용하는 LUT가 내장되어 있다. 이는 회로 구현을 위한 자원이 존재하는 slice 내에 포함되어 있으며, 하나의 slice에는 4개의 LUT가 존재한다. 2개의 slice는 하나의 CLB 타일 내에 속한다. 개발자가 설계한 회로가 FPGA 상에 구현될 때에는 LUT가 진리표의 형태로 사용되어 회로가 구현된다. 하나의 LUT에는 진리표의 출력에 해당하는 64-bit를 저장되고 이 값이 비트스트림에 포함된다. 따라서 베릴로그 코드를 사용해서 다른 값을 저장하는 LUT를 구현하고 비트스트림을 비교하여 서로 다른 값이 나타나는 바이트의 위치를 찾는 방식으로 비트스트림에서 LUT가 저장하는 값, 즉 LUT 비트스트림의 위치를 찾을 수 있다.Xilinx Virtex-5 devices have a built-in LUT with six inputs. This is included in the slice where resources for circuit implementation exist, and there are four LUTs in one slice. Two slices belong to one CLB tile. When the circuit designed by the developer is implemented on the FPGA, the LUT is used in the form of a truth table to implement the circuit. One LUT stores 64-bits corresponding to the output of the truth table, and this value is included in the bitstream. Therefore, by implementing the LUT storing different values by using the Beryll code and comparing the bitstreams, the position of the byte in which the different values appear is found. In this way, the value stored in the LUT in the bitstream, that is, the location of the LUT bitstream, .

이와 관련하여, 도 2는 본 발명에 따른 Virtex-5 기기에서의 LUT 배치도를 나타낸다. 한편, 도 3은 본 발명에 따른 베릴로그를 이용하여 LUT 모듈을 구현한 코드이다. 한편, 도 4는 발명에 따른 LUT 구현에 사용되는 INIT 속성 값을 나타낸다.In this regard, FIG. 2 shows a layout of a LUT in a Virtex-5 device according to the present invention. FIG. 3 is a code for implementing the LUT module using the Beryllog according to the present invention. Meanwhile, FIG. 4 shows the INIT attribute value used in the LUT implementation according to the invention.

도 2 내지 도 4를 참조하면, LUT 모듈은 .INIT 속성을 가지고 있으며 이는 LUT에 저장될 값을 의미한다. 비트스트림에서 LUT 비트스트림을 정확히 찾기 위해 도 3과 같이 64-bit의 위치를 모두 확인할 수 있도록 .INIT 속성 값을 설정하고 비트스트림을 생성하여 비교한다. Referring to FIGS. 2 to 4, the LUT module has an .INIT attribute, which means a value to be stored in the LUT. In order to accurately locate the LUT bitstream in the bitstream, the .INIT attribute value is set so that all 64-bit positions can be checked as shown in FIG. 3, and a bitstream is generated and compared.

나) LUT 비트스트림 오프셋 데이터베이스 생성B) Create the LUT bitstream offset database

이와 관련하여, 도 5는 본 발명에 따른 LUT 비트스트림 오프셋 데이터베이스 생성 과정을 나타낸다. 도 5를 참조하면, 생성된 비트스트림을 비교할 때에는 전체 비트스트림에서 실제 FPGA 자원을 설정하는 구성 데이터 영역을 추출하여 비교한다. 구성 데이터 영역은 프레임(frame)이라는 단위로 구성되어 있으며 하나의 frame은 32-bit 길이의 word 41개로 이루어져 있다. LUT가 포함되어 있는 CLB 블록은 총 36개의 frame을 통해 설정되는데 이 중 0 ~ 25번 frame은 CLB 블록의 연결 정보를 포함하고 있으며 나머지 frame들이 회로 구현에 필요한 자원을 구성한다. In this regard, FIG. 5 shows a process of generating a LUT bitstream offset database according to the present invention. Referring to FIG. 5, when comparing the generated bitstreams, a configuration data area for setting actual FPGA resources is extracted and compared in the entire bitstream. The configuration data area is composed of a unit called a frame, and one frame is composed of 41 words of 32-bit length. The CLB block including the LUT is set up through 36 frames in total. Of these, the frames 0 to 25 contain the connection information of the CLB block, and the remaining frames constitute resources necessary for circuit implementation.

앞서 구현한 LUT의 비트스트림들에서 구성 데이터 영역을 추출하여 비교한 결과, 하나의 LUT 비트스트림은 총 4개의 frame에 나뉘어 나타나는 것을 확인하였다. 같은 Y 좌표를 가지는 slice의 경우 X 좌표가 홀수인 slice 내의 LUT들은 26 ~ 29번 frame에, X 좌표가 짝수인 slice 내의 LUT들은 32 ~ 35번 frame에 걸쳐서 나타나며, 한 개의 frame에 16-bit씩 나타난다. 또한 frame이 FPGA 상에 수직으로 배치되는 특성에 의해 하나의 CLB 블록을 구성하는 36개의 frame이 총 20개의 slice를 구성하는 것을 확인하였다. 이러한 특성을 바탕으로 FPGA 내의 모든 LUT에 대하여 각 LUT가 저장하는 64-bit 값의 오프셋을 찾아 데이터베이스에 저장한다.As a result of extracting the configuration data area from the bitstreams of the LUT implemented previously, it is confirmed that one LUT bitstream is divided into four frames. For slices with the same Y coordinate, LUTs in slice with an X coordinate of odd number are displayed in frames 26 to 29, LUTs in slice with an even X coordinate are displayed over frames 32 to 35, and 16-bit appear. In addition, we confirmed that 36 frames constituting one CLB block constitute 20 slices in total due to the fact that the frame is vertically arranged on the FPGA. Based on these characteristics, the offset of the 64-bit value stored in each LUT for every LUT in the FPGA is found and stored in the database.

다) 입력 핀 비트오프셋 데이터베이스 생성C) Input pin bit offset database creation

이와 관련하여, 도 6은 본 발명에 따른 입력 핀 데이터베이스 생성 과정을 나타낸다. 한편, LUT 비트스트림을 논리식으로 복구하기 위해서는 각 LUT의 6개 입력 핀 중 어떤 입력 핀이 사용되었는지 알아야 한다. LUT의 각 입력 핀은 FPGA에서 신호의 연결을 담당하는 자원인 PIP를 통해 다른 타일과 연결되어 있으며 특정 입력 핀과 연결된 PIP가 사용되었다면 해당 입력 핀을 통해 신호가 입력되는 것으로 간주할 수 있다. 따라서 비트스트림에서 입력 핀과 연결된 PIP의 사용 여부를 파악하기 위해 사용 가능한 모든 PIP를 찾고 이를 실제 구현하여 비트스트림 상에서의 오프셋과 값을 찾아 저장한다. In this regard, FIG. 6 shows a process of generating an input pin database according to the present invention. On the other hand, to recover the LUT bitstream logically, it is necessary to know which of the six input pins of each LUT is used. Each input pin of the LUT is connected to another tile through the PIP, which is the resource responsible for connecting the signal to the FPGA. If a PIP connected to a specific input pin is used, it can be regarded as a signal input through the corresponding input pin. Therefore, to find out whether a PIP connected to an input pin is used in a bitstream, all available PIPs are searched for and the offset and values on the bitstream are stored and stored.

Xilinx 사에서는 XDLRC (Xilinx Design Language Resource) 형식으로 사용 가능한 모든 자원의 정보를 제공하며 이를 통해 입력 핀의 사용 여부를 역공학하는데 필요한 PIP를 파악할 수 있고, 각 PIP는 XDL(Xilinx Design Language)를 통해 구현할 수 있다. XDL을 통해 회로의 기능과는 상관없이 비트스트림 오프셋과 값을 찾고자하는 PIP만 사용하도록 구현할 수 있으며, 이렇게 생성한 비트스트림의 구성 데이터 영역에는 해당 PIP에 대응되는 부분에만 값이 나타난다. 이 과정을 수행하여 각 입력 핀과 연결된 모든 PIP의 비트스트림 오프셋과 값을 찾아 저장한다. FPGA 내에서 같은 종류의 타일은 모두 같은 구성요소를 가지고 있기 때문에 특정 타일을 대상으로 PIP의 비트스트림 오프셋과 값을 찾았다고 하더라도 같은 PIP는 모든 타일에서 같은 비트스트림 오프셋과 값을 가진다. 이러한 특성으로 인해 모든 타일에 대하여 연결정보를 파악하지 않아도 역공학이 가능하다.Xilinx provides information on all resources available in the Xilinx Design Language Resource (XDLRC) format, which allows you to identify the PIPs necessary to reverse engineer the use of input pins. Each PIP can be accessed via Xilinx Design Language Can be implemented. It is possible to implement only the PIP for finding the bitstream offset and value regardless of the function of the circuit through the XDL. In the constituent data area of the bitstream thus generated, the value appears only in the portion corresponding to the corresponding PIP. This process is performed to find and store the bitstream offset and value of all PIPs connected to each input pin. Since all tiles of the same type in the FPGA have the same components, the same PIP has the same bitstream offset and value in all tiles, even if the bitstream offset and value of the PIP are found for a specific tile. Because of this feature, reverse engineering is possible without knowing connection information for all tiles.

라) LUT 비트스트림 - INIT 속성 값 맵핑 테이블 생성D) LUT bitstream - Create INIT attribute value mapping table

FPGA 비트스트림 생성 단계 중 배치 및 결선 단계에서는 합성 및 맵핑 단계에서 결정된 자원들을 실제로 배치하고 각 자원들을 결선하는 과정이 이루어진다. 이 때 최적화된 경로에 따라 배치 및 결선이 이루어지는데 이로 인해 같은 INIT 속성 값을 가지는 LUT라고 하더라도 서로 다른 입력 핀이 사용되거나 각 입력 핀에 연결되는 신호가 달라질 수 있다. 이러한 입력의 치환이 발생함에 따라 LUT에 저장되는 값이 변경되어 INIT 속성 값과 다른 값이 저장될 수 있으므로 LUT 비트스트림으로부터 INIT 속성 값을 도출할 필요가 있다.In the FPGA bit stream generation step, in the placement and wiring step, the resources determined in the synthesis and mapping step are actually arranged and the respective resources are connected. In this case, placement and wiring are performed according to the optimized path, so that different input pins may be used or signal to be connected to each input pin may be different even if the LUT having the same INIT property value is used. As the input substitution occurs, the value stored in the LUT is changed and a value different from the value of the INIT attribute can be stored. Therefore, it is necessary to derive the INIT attribute value from the LUT bitstream.

이를 위해 LUT 비트스트림과 INIT 속성 값 간의 맵핑 관계를 파악한다. 이를 위해서는 전체 INIT 속성 값에서 하나의 비트만 1이 되도록 설정하여 LUT를 구현하고 비트스트림을 생성하여 기록한다. 입력 핀을 사용할 수 있는 모든 경우에 대하여 이 과정을 수행하여 각 경우에 대한 비트스트림 - INIT 속성 값 맵핑 테이블을 생성한다.To do this, we identify the mapping relationship between the LUT bitstream and the INIT attribute value. To do this, the LUT is implemented by setting only one bit to 1 in the entire INIT attribute value, and a bitstream is generated and recorded. This process is performed for all cases where an input pin can be used to generate a bitstream-INIT attribute value mapping table for each case.

이상에서는 본 발명에 따른 LUT 정보 역공학 DB 생성부(100)와 이들의 상세 구성의 상세한 동작에 대해 살펴보았다. 이하에서는, 본 발명에 따른 LUT 구현 정보 역공학부(200)와 이들의 상세 구성의 상세한 동작에 대해 살펴보기로 한다.The detailed operation of the detailed configuration of the LUT information reverse engineering DB generator 100 according to the present invention has been described above. Hereinafter, detailed operation of the LUT implementation information reverse engineering part 200 according to the present invention and its detailed configuration will be described.

이와 관련하여, LUT 정보 추출부(210)는 FPGA 비트스트림에서 구성 데이터 영역을 추출한 후, LUT 비트스트림 오프셋 DB를 바탕으로 LUT 비트스트림을 모두 추출할 수 있다. 또한, LUT 정보 추출부(210)는 입력 핀 비트 오프셋 DB에 저장된 PIP의 비트 오프셋과 값이 상기 FPGA 비트스트림에서 발견되면 해당 PIP와 연결된 입력 핀이 사용된 것으로 역공학할 수 있다. In this regard, the LUT information extracting unit 210 extracts the configuration data area from the FPGA bitstream, and extracts the LUT bitstream based on the LUT bitstream offset DB. If the bit offset and value of the PIP stored in the input pin bit offset DB are found in the FPGA bit stream, the LUT information extraction unit 210 can reverse-process the input pin connected to the corresponding PIP.

또한, LUT 정보 추출부(210)는 상기 입력 핀의 정보가 역공학되면, 해당 입력 핀들의 대한 INIT 속성 값 맵핑 테이블을 적용하여 INIT 속성 값을 도출할 수 있다.If the input pin information is reversed, the LUT information extraction unit 210 may derive an INIT attribute value by applying an INIT attribute value mapping table for the input pins.

한편, LUT 구현 정보 역공학부(220)는 LUT 비트스트림을 추출하고 사용된 입력 핀과 상기 INIT 속성 값을 찾은 후, 상기 LUT 비트스트림, 상기 사용된 입력 핀 및 상기 INIT 속성 값을 기반으로 진리표를 생성할 수 있다.On the other hand, the LUT implementation information inverse engineering section 220 extracts the LUT bit stream, finds the input pin used and the INIT attribute value, and then, based on the LUT bit stream, the input pin used, and the INIT attribute value, Can be generated.

한편, 논리식 변환부(220)는 상기 진리표의 입력으로 사용될 입력 핀을 설정하고 출력으로 INIT 속성 값을 설정하여 상기 진리표를 생성한 뒤, 상기 진리표를 논리식으로 변환하여 해당 LUT 정보에 대한 역공학을 완료할 수 있다.On the other hand, the logical expression conversion unit 220 generates the truth table by setting an input pin to be used as an input of the truth table and an INIT attribute as an output, and then converts the truth table into a logical expression, Can be completed.

전술한 바와 같이, 본 발명에 따른 LUT 정보 추출부(210)와 논리식 변환부(220)의 상세한 동작에 대해 살펴보면 아래와 같다.As described above, the detailed operation of the LUT information extracting unit 210 and the logical expression converting unit 220 according to the present invention will be described below.

2) LUT 구현 정보 역공학부2) LUT implementation information reverse engineering department

가) LUT 정보 추출부A) LUT information extracting unit

FPGA 비트스트림에서 LUT 비트스트림을 추출하기 위해 앞서 생성한 LUT 비트스트림 오프셋 데이터베이스를 활용한다. 먼저 FPGA 비트스트림에서 구성 데이터 영역을 추출한 후 데이터베이스를 바탕으로 LUT 비트스트림을 모두 추출한다. 또한 입력 핀 데이터베이스에 저장된 PIP의 비트 오프셋과 값이 비트스트림에서 발견되면 해당 PIP와 연결된 입력 핀이 사용된 것으로 역공학한다. 입력 핀의 정보가 역공학되면 해당 입력 핀들의 대한 INIT 속성 값 맵핑 테이블을 적용하여 INIT 속성 값을 도출한다.To extract the LUT bitstream from the FPGA bitstream, we utilize the LUT bitstream offset database created earlier. First, the configuration data area is extracted from the FPGA bitstream, and then all the LUT bitstreams are extracted based on the database. Also, if the bit offset and value of the PIP stored in the input pin database are found in the bit stream, it is deemed that the input pin connected to the PIP is used. If the input pin information is reverse-engineered, the INIT attribute value mapping table for the corresponding input pins is applied to derive the INIT attribute value.

나) 논리식 변환B) Conversion of logical expressions

LUT 비트스트림을 추출하고 사용된 입력 핀과 INIT 속성 값을 찾은 후 이를 기반으로 진리표를 생성한다. 진리표의 입력으로 사용된 입력 핀을 설정하고 출력으로 INIT 속성 값을 설정하여 진리표를 생성한 뒤에 이를 논리식으로 변환하면 해당 LUT 정보에 대한 역공학을 완료한다.Extracts the LUT bitstream, finds the input pin used and the value of the INIT attribute, and generates a truth table based on the value. After setting the input pin used as the input of the truth table and setting the value of the INIT attribute as the output, a truth table is generated and converted into a logical expression to complete the reverse engineering of the LUT information.

이상에서는, 본 발명에 따른 FPGA 비트스트림에서의 LUT(Lookup Table) 정보 역공학 장치 및 방법에 대해 구체적으로 설명하였다. 이와 같은 FPGA 비트스트림에서의 LUT 정보 역공학 장치 및 방법의 기술적 효과는 다음과 같다.In the foregoing, an apparatus and method for reverse lookup table (LUT) information in an FPGA bitstream according to the present invention has been described in detail. Technical effects of the LUT information reverse engineering apparatus and method in the FPGA bit stream are as follows.

따라서, 본 발명의 적어도 일 실시예에 따르면, FPGA 비트스트림으로부터 사용된 LUT와 각 LUT가 구현한 기능을 논리식 형태로 역공학할 수 있다는 장점이 있다. Therefore, according to at least one embodiment of the present invention, there is an advantage that the LUT used from the FPGA bitstream and the function implemented by each LUT can be reverse-engineered in logical form.

또한, 본 발명의 적어도 일 실시예에 따르면, 본 발명에서 활용되는 LUT 비트스트림의 특성은 Virtex-5세대 기기 비트스트림에 동일하게 적용할 수 있다는 장점이 있다. Also, according to at least one embodiment of the present invention, the characteristics of the LUT bitstream utilized in the present invention can be equally applied to a Virtex-5 generation device bitstream.

또한, 본 발명의 적어도 일 실시예에 따르면, 여러 분야에 활용될 수 있는 있고, 본 발명을 통해 도출되는 논리식은 Xilinx 사의 문서형 netlist인 XDL에서 나타나는 형태와 일치하므로 netlist로의 역공학을 위해 활용될 수 있다는 장점이 있다.In addition, according to at least one embodiment of the present invention, a logical expression that can be utilized in various fields and derived from the present invention is consistent with a form shown in XDL, a document type netlist of Xilinx corporation, There is an advantage that it can be.

또한, 본 발명을 통해 얻은 결과는 하드웨어 악성기능 탐지에 활용될 수 있고, 하드웨어 악성기능이 구현된 FPGA 비트스트림에 대하여 본 발명에서 제시하는 기법을 적용하여 회로의 기능을 논리식으로 표현할 수 있다는 장점이 있다. In addition, the result obtained through the present invention can be utilized for hardware malicious function detection, and an advantage that the function of a circuit can be expressed by logical expression by applying the technique proposed in the present invention to an FPGA bitstream in which a hardware malicious function is implemented have.

또한, 본 발명의 적어도 일 실시예에 따르면, 추가적으로 다른 자원들에 대한 역공학을 수행하여 하드웨어 악성기능에 대한 특징을 학습하여 탐지하는 것에 활용할 수 있다는 장점이 있다.In addition, according to at least one embodiment of the present invention, there is an advantage that reverse engineering against other resources is further performed to learn and detect features of hardware malicious functions.

소프트웨어적인 구현에 의하면, 본 명세서에서 설명되는 절차 및 기능뿐만 아니라 각각의 구성 요소들에 대한 설계 및 파라미터 최적화는 별도의 소프트웨어 모듈로도 구현될 수 있다. 적절한 프로그램 언어로 쓰여진 소프트웨어 어플리케이션으로 소프트웨어 코드가 구현될 수 있다. 상기 소프트웨어 코드는 메모리에 저장되고, 제어부(controller) 또는 프로세서(processor)에 의해 실행될 수 있다.According to a software implementation, the design and parameter optimization for each component as well as the procedures and functions described herein may be implemented as separate software modules. Software code can be implemented in a software application written in a suitable programming language. The software code is stored in a memory and can be executed by a controller or a processor.

Claims (8)

FPGA 비트스트림에서의 LUT(Lookup Table) 정보 역공학 장치에서,
LUT 비트스트림 오프셋 DB, 입력 핀 비트 오프셋 DB 및 비트스트림-INIT 속성 값 매핑테이블을 포함하는 LUT 정보 역공학 DB 생성부; 및
FPGA 비트스트림에서 LUT 정보를 추출하고, 입력 핀 정보, INIT 속성 값을 논리식 변환하여 출력하는 LUT 구현 정보 역공학부를 포함하고,
상기 LUT 구현 정보 역공학부는,
상기 FPGA 비트스트림에서 구성 데이터 영역을 추출한 후, 상기 LUT 비트스트림 오프셋 DB를 바탕으로 LUT 비트스트림을 모두 추출하고, 상기 입력 핀 비트 오프셋 DB에 저장된 PIP의 비트 오프셋과 값이 상기 FPGA 비트스트림에서 발견되면 해당 PIP와 연결된 입력 핀이 사용된 것으로 역공학하는, LUT 정보 추출부를 포함하는, LUT 정보 역공학 장치.
LUT Lookup Table in FPGA Bitstream In a reverse engineering device,
An LUT information reverse engineering DB generation unit including an LUT bit stream offset DB, an input pin bit offset DB, and a bitstream-INIT attribute value mapping table; And
An LUT implementation information inverse extraction section for extracting LUT information from the FPGA bit stream, converting input pin information and INIT attribute values into logical form,
The LUT implementation information reverse engineering section,
Extracts a configuration data region from the FPGA bitstream, extracts all LUT bitstreams based on the LUT bitstream offset DB, and detects a bit offset and value of the PIP stored in the input pin bit offset DB from the FPGA bitstream And a LUT information decompression unit that is deinterleaved as an input pin connected to the PIP.
제1 항에 있어서,
상기 LUT 정보 역공학 DB 생성부는,
상기 LUT 비트스트림 오프셋 DB를 생성하는 LUT 비트스트림 오프셋 DB 생성부;
상기 입력 핀 비트 오프셋 DB를 생성하는 입력 핀 비트 오프셋 DB 생성부; 및
상기 비트스트림-INIT 속성 값 매핑테이블을 생성하는 비트스트림-INIT 속성 값 매핑테이블 생성부를 포함하는, LUT 정보 역공학 장치.
The method according to claim 1,
The LUT information reverse engineering DB generation unit,
A LUT bitstream offset DB generator for generating the LUT bitstream offset DB;
An input pin bit offset DB generator for generating the input pin bit offset DB; And
And a bitstream-INIT attribute value mapping table generation unit for generating the bitstream-INIT attribute value mapping table.
삭제delete 제1 항에 있어서,
상기 LUT 정보 추출부는,
상기 입력 핀의 정보가 역공학되면, 해당 입력 핀들의 대한 INIT 속성 값 맵핑 테이블을 적용하여 INIT 속성 값을 도출하는 것을 특징으로 하는, LUT 정보 역공학 장치.
The method according to claim 1,
The LUT information extracting unit extracts,
Wherein when the information of the input pin is reverse-engineered, an INIT attribute value is derived by applying an INIT attribute value mapping table of the input pins.
제1 항에 있어서,
상기 LUT 구현 정보 역공학부는,
상기 LUT 비트스트림을 추출하고 사용된 입력 핀과 상기 INIT 속성 값을 찾은 후, 상기 LUT 비트스트림, 상기 사용된 입력 핀 및 상기 INIT 속성 값을 기반으로 진리표를 생성하는 논리식 변환부를 더 포함하는, LUT 정보 역공학 장치.
The method according to claim 1,
The LUT implementation information reverse engineering section,
Further comprising a logical expression conversion unit for extracting the LUT bit stream and finding a used input pin and the INIT attribute value, and then generating a truth table based on the LUT bit stream, the used input pin, and the INIT attribute value. Information reverse engineering device.
제5 항에 있어서,
상기 논리식 변환부는,
상기 진리표의 입력으로 사용될 입력 핀을 설정하고 출력으로 INIT 속성 값을 설정하여 상기 진리표를 생성한 뒤, 상기 진리표를 논리식으로 변환하여 해당 LUT 정보에 대한 역공학을 완료하는 것을 특징으로 하는, LUT 정보 역공학 장치.
6. The method of claim 5,
The logical expression conversion unit,
Wherein the LUT information is converted into a logical expression by setting an input pin to be used as an input of the truth table and an INIT attribute value as an output to generate the truth table, Reverse engineering device.
제2 항에 있어서,
상기 LUT 비트스트림 오프셋 DB 생성부는,
상기 FPGA 비트스트림에서 추출된 구성 데이터 영역에서, 각 프레임에 16-bit 씩 각 LUT가 저장하는 64-bit 값의 오프셋을 찾아 상기 LUT 비트스트림 오프셋 DB를 생성하는 것을 특징으로 하는, LUT 정보 역공학 장치.
3. The method of claim 2,
Wherein the LUT bitstream offset DB generator comprises:
Wherein the LUT bitstream offset DB is generated by finding an offset of a 64-bit value stored in each LUT by 16-bit in each frame in the configuration data area extracted from the FPGA bitstream. Device.
제2 항에 있어서,
상기 입력 핀 비트 오프셋 DB 생성부는,
24개의 입력 핀에 대해 모든 PIP를 확보하고, 구성 데이터(Configuration data)에서 각 PIP의 byteoffset, value를 수집하고, 상기 모든 PIP에 대하여 각각의 byteoffset, value에 대한 상기 입력 핀 비트 오프셋 DB를 구축하고,
상기 입력 핀 비트 오프셋 DB는 Boolean equation으로의 역공학에 활용되는 것을 특징으로 하는, LUT 정보 역공학 장치.
3. The method of claim 2,
Wherein the input pin bit offset DB generator comprises:
Acquires all PIPs for 24 input pins, collects byte offsets and values of each PIP from the configuration data, constructs the input pin bit offset DB for each byte offset and value for all PIPs, ,
Wherein the input pin bit offset DB is utilized for reverse engineering into a Boolean equation.
KR1020180147671A 2018-11-26 2018-11-26 Method and apparatus for reverse engineering LUT information in FPGA bitstream KR101962720B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180147671A KR101962720B1 (en) 2018-11-26 2018-11-26 Method and apparatus for reverse engineering LUT information in FPGA bitstream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180147671A KR101962720B1 (en) 2018-11-26 2018-11-26 Method and apparatus for reverse engineering LUT information in FPGA bitstream

Publications (1)

Publication Number Publication Date
KR101962720B1 true KR101962720B1 (en) 2019-03-27

Family

ID=65907447

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180147671A KR101962720B1 (en) 2018-11-26 2018-11-26 Method and apparatus for reverse engineering LUT information in FPGA bitstream

Country Status (1)

Country Link
KR (1) KR101962720B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110335323A (en) * 2019-06-24 2019-10-15 浙江大学 The bit stream image conversion method of field programmable gate array device
KR102290427B1 (en) * 2020-05-27 2021-08-18 국방과학연구소 Reverse engineering Method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Florian Benz et al. ‘BIL: A Tool-Chain for Bitstream Reverse-Engineering’, ResearchGate, 2015.01.03. http://www.researchgate.net/publications/261050213 *
Hoyoung Yu et al. ‘Recent Advances in FPGA Reverse Engineering’, Electronics 2018, 2018.10.12. *
윤정환외 3인, ‘Bil 비트스트림 역공학 도구 분석 연구’, 정보보호학회 논문지 28권 2호, pp.287-293, 2018.04.* *
정민영외 3인, ‘프로그램된 FPGA 비트스트림 데이터로부터 로직 추출 알고리즘 구현’, 한국콘텐츠학회 논문지 18권 1호, 2018.01.18.* *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110335323A (en) * 2019-06-24 2019-10-15 浙江大学 The bit stream image conversion method of field programmable gate array device
KR102290427B1 (en) * 2020-05-27 2021-08-18 국방과학연구소 Reverse engineering Method

Similar Documents

Publication Publication Date Title
Zhang et al. A comprehensive FPGA reverse engineering tool-chain: From bitstream to RTL code
US9298865B1 (en) Debugging an optimized design implemented in a device with a pre-optimized design simulation
US9864828B1 (en) Hardware acceleration device handoff for using programmable integrated circuits as hardware accelerators
CN109492337B (en) Information flow tracking model generation method of programmable logic device
KR101962720B1 (en) Method and apparatus for reverse engineering LUT information in FPGA bitstream
US20190278884A1 (en) Methodology To Create Constraints And Leverage Formal Coverage Analyzer To Achieve Faster Code Coverage Closure For An Electronic Structure
Choudhury et al. Bi-decomposition of large Boolean functions using blocking edge graphs
CN104809072A (en) Automatic mensurability design method of Perl-based EDIF netlist-grade circuit automatic mensurability design system
KR101962227B1 (en) Method and Apparatus for FPGA Hardware-Trojan Trigger Detection Based on Machine Learning
US7493578B1 (en) Correlation of data from design analysis tools with design blocks in a high-level modeling system
CN115422866A (en) Method for simulating logic system design on simulator and related equipment
Jyothi et al. Taint: Tool for automated insertion of trojans
US7797651B1 (en) Verifying design isolation using bitstreams
US20210240894A1 (en) Recovery of a hierarchical functional representation of an integrated circuit
KR100962858B1 (en) A digital system and a method for error detection thereof
US10666255B1 (en) System and method for compacting X-pessimism fixes for gate-level logic simulation
US11704460B2 (en) System and method for fast and accurate netlist to RTL reverse engineering
JP2019145048A5 (en)
US10783293B2 (en) Circuit design system, checking method, and non-transitory computer readable medium thereof
Yu et al. Multi Look-up Table FPGA Reverse Engineering with Bitstream Extraction and Multiple PIP/PLP Matching
Portillo et al. RERTL: finite state transducer logic recovery at register transfer level
KR102290427B1 (en) Reverse engineering Method
Le et al. Golden reference matching for gate-level netlist functionality identification
US9047428B2 (en) Determining method, computer product, and determining apparatus
US20170132278A1 (en) Systems and Methods for Inferring Landmark Delimiters for Log Analysis

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant