KR101999209B1 - A system and method for encryption of pointers to virtual function tables - Google Patents

A system and method for encryption of pointers to virtual function tables Download PDF

Info

Publication number
KR101999209B1
KR101999209B1 KR1020160183304A KR20160183304A KR101999209B1 KR 101999209 B1 KR101999209 B1 KR 101999209B1 KR 1020160183304 A KR1020160183304 A KR 1020160183304A KR 20160183304 A KR20160183304 A KR 20160183304A KR 101999209 B1 KR101999209 B1 KR 101999209B1
Authority
KR
South Korea
Prior art keywords
virtual function
unit
hash value
encryption
function table
Prior art date
Application number
KR1020160183304A
Other languages
Korean (ko)
Other versions
KR20180078509A (en
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 KR1020160183304A priority Critical patent/KR101999209B1/en
Publication of KR20180078509A publication Critical patent/KR20180078509A/en
Application granted granted Critical
Publication of KR101999209B1 publication Critical patent/KR101999209B1/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/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage

Abstract

본 발명은 가상 함수 테이블 포인터 암호화 시스템 및 그 방법에 관한 것으로, 더욱 상세하게는 복수의 암호키를 사용하여 객체의 클래스별로 가상 함수 테이블 포인터를 암호화 및 복호화 함으로써 외부의 가상 함수 테이블 포인터 변조 공격을 방어할 수 있는 포인터 암호화 시스템 및 그 방법에 관한 것으로서, 객체 생성 시 상기 객체의 클래스를 지칭하는 해시값과 상기 클래스의 가상 함수 테이블 포인터를 암호화 하기 위한 암호키를 생성하도록 명령하는 제어부; 상기 제어부의 명령을 받아 상기 해시값을 생성하는 메모리 관리부; 상기 메모리 관리부로부터 상기 해시값을 전송 받아 저장하는 메모리부; 상기 제어부의 명령을 받아 상기 암호키를 생성하는 난수 키생성부; 및 상기 메모리부와 난수 키생성부로부터 해시값과 암호키를 전송 받아 2차원 배열로 저장하는 암호저장부를 포함하여 구성된다.
본 발명에서 제시하는 가상 함수 테이블 포인터 암호화 시스템 및 그 방법은, 클래스별로 암호키를 할당하여 가상 함수 테이블 포인터를 암호화하여 외부에서의 가상 함수 테이블 변조공격을 방어할 수 있고 성능과 보안의 적절한 수준을 맞출 수 있는 효과가 있다.
The present invention relates to a system and method for encrypting a virtual function table pointer, and more particularly, to a system and method for encrypting and decoding an external virtual function table pointer tampering attack by encrypting and decrypting a virtual function table pointer for each object class using a plurality of encryption keys A controller for instructing to generate a hash value indicating a class of the object and an encryption key for encrypting a virtual function table pointer of the class when an object is created; A memory management unit receiving the command of the control unit and generating the hash value; A memory unit for receiving and storing the hash value from the memory management unit; A random number key generating unit for receiving the command from the control unit and generating the encryption key; And a cipher storage unit for receiving the hash value and the cipher key from the memory unit and the random number key generator and storing the hash value and the cipher key in a two-dimensional array.
The virtual function table pointer encryption system and method thereof according to the present invention can protect a virtual function table tampering attack from outside by encrypting a virtual function table pointer by assigning a cryptographic key to each class, There is an effect that can be adjusted.

Description

가상 함수 테이블 포인터 암호화 시스템 및 그 방법{A system and method for encryption of pointers to virtual function tables}[0001] The present invention relates to a virtual function table pointer encryption system,

본 발명은 가상 함수 테이블 포인터 암호화 시스템 및 그 방법에 관한 것으로, 더욱 상세하게는 복수의 암호키를 사용하여 객체의 클래스별로 가상 함수 테이블 포인터를 암호화 및 복호화 함으로써 외부의 가상 함수 테이블 포인터 변조 공격을 방어할 수 있는 가상 함수 테이블 포인터 암호화 시스템 및 그 방법에 관한 것이다.The present invention relates to a system and method for encrypting a virtual function table pointer, and more particularly, to a system and method for encrypting and decoding an external virtual function table pointer tampering attack by encrypting and decrypting a virtual function table pointer for each object class using a plurality of encryption keys And more particularly, to a virtual function table pointer encryption system and method thereof.

일반적으로 C++은 C언어의 확장판으로 만들어진 객체지향형 프로그래밍 언어로서 각 클래스에서 가상 함수를 정의할 경우 컴파일시 가상 함수 테이블을 생성한다. 가상 함수 테이블은 해당 클래스에 정의된 가상 함수의 주소들의 모음으로 쓰기 불가능한 영역에 위치하여 외부에서 변조가 불가능하다. Generally, C ++ is an object-oriented programming language made up of C language extensions. When defining a virtual function in each class, C ++ creates a virtual function table at compile time. The virtual function table is located in a non-writable area as a collection of addresses of virtual functions defined in the corresponding class and is not modifiable from the outside.

상기 클래스로부터 생성된 객체는 가상 함수 테이블 포인터를 포함하게 되는데 이 포인터는 쓰기 가능한 데이터 영역에 위치하여 외부의 공격에 의해 변조가 가능하다. 외부의 공격자는 공격에 사용되는 가젯의 주소들을 포함한 위조된 가상 함수 테이블을 입력값으로 데이터 영역에 삽입하고 가상 함수 테이블 포인터를 위조된 가상 함수 테이블을 가리키도록 변조한 후, 가상 함수를 호출하여 공격을 수행할 수 있다.The object generated from the class includes a virtual function table pointer, which is located in a writable data area and can be modulated by an external attack. The external attacker inserts the forged virtual function table including the address of the gadget used in the attack into the data area as an input value, modulates the virtual function table pointer to point to the forged virtual function table, Attack can be performed.

가상 함수 테이블 포인터 변조 공격을 막기 위해서는 객체에 있는 가상 함수 테이블 포인터를 암호화하는 방법이 있다. 가상 함수 테이블 포인터를 암호화할 경우 포인터가 외부의 공격에 의해 변조되더라도 복호화 과정에서 변조된 포인터가 예상하지 못한 데이터를 가리키게 되어 변조 공격이 실패하게 된다. Virtual Function Table Pointer To prevent tampering, there is a way to encrypt the virtual function table pointer in the object. When encrypting a virtual function table pointer, even if the pointer is modulated by an external attack, the modulated pointer in the decoding process points to unexpected data, and the modulation attack fails.

허나, 하나의 암호키로 모든 객체를 암호화 할 경우, 해제 후 사용버그를 악용한 가상 함수 테이블 포인터 변조 공격에 노출될 수 있다. 해제된 객체의 공간을 가리키던 포인터는 동일한 위치에 생성된 다른 객체를 가리키게 되는데, 하나의 암호키로 암호화 한 경우 이 포인터를 사용하여 가상 함수를 호출하면 상기 해제된 객체와 다른 객체의 암호키가 같으므로 복호화를 수행할 수 있고 타입이 맞지 않는 객체의 가상 함수 테이블에 접근하여 가상 함수를 호출할 수 있는 문제점이 있었다. However, if all objects are encrypted with one encryption key, they can be exposed to a virtual function table pointer tamper attack that exploits a bug after use. The pointer pointing to the space of the released object points to another object created at the same position. If the object is encrypted with one encryption key, when the virtual function is called using this pointer, the released object and the encryption key of the other object are the same Therefore, there is a problem in that a virtual function can be called by accessing a virtual function table of an object of which type can not be decoded and which can be decoded.

상기한 문제점을 해결하기 위해 모든 객체를 하나의 암호키가 아닌 서로 다른 암호키를 할당할 경우에는 성능 저하가 크게 발생하는 문제점이 있으므로, 성능의 저하를 고려한 보안대책이 필요한 상황이다.In order to solve the above problem, when all the objects are allocated different cryptographic keys rather than one cryptographic key, performance deterioration greatly occurs. Therefore, it is necessary to take security measures considering the degradation of performance.

공개 특허 10-2012-0006334, 공개일자 2012년 01월 18일, '프로그램 카운터 인코딩을 이용한 간접 함수 호출 보호 방법 및 보호 장치Patent Document 1: Japanese Patent Application Laid-Open No. 2001-0006334, published on Jan. 18, 2012 'Indirect function call protection method using program counter encoding and protection device 등록 특허 10-1401953, 등록일자 2014년 05월 26일, '그래픽 처리 장치를 활용한 난수 생성 장치 및 방법'Registered Patent No. 10-1401953, May 26, 2014, entitled " Random Number Generation Device and Method Utilizing Graphic Processing Apparatus "

본 발명은 이와 같은 문제점을 해결하기 위해 창출된 것으로 본 발명의 목적은 클래스별로 암호키를 할당하여 가상 함수 테이블 포인터를 암호화하여 외부에서의 가상 함수 테이블 변조공격을 방어할 수 있고 성능과 보안의 적절한 수준을 맞출 수 있는 가상 함수 테이블 포인터 암호화 시스템 및 그 방법을 제공하는데 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to provide a cryptographic key management method and a cryptographic key management method capable of protecting an external virtual function table modulation attack by encrypting a cryptographic key table pointer by class, And a virtual function table pointer encryption system and method thereof.

상기 목적을 달성하기 위한 본 발명의 관점에 따른 가상 함수 테이블 포인터 암호화 시스템 및 그 방법은 객체 생성 시 상기 객체의 클래스를 지칭하는 해시값과 상기 클래스의 가상 함수 테이블 포인터를 암호화 하기 위한 암호키를 생성하도록 명령하는 제어부; 상기 제어부의 명령을 받아 상기 해시값을 생성하는 메모리 관리부; 상기 메모리 관리부로부터 상기 해시값을 전송 받아 저장하는 메모리부; 상기 제어부의 명령을 받아 상기 암호키를 생성하는 난수 키생성부; 및 상기 메모리부와 난수 키생성부로부터 상기 해시값과 암호키를 전송 받아 2차원 배열로 저장하는 암호저장부를 포함하는 것을 특징으로 한다. According to an aspect of the present invention, there is provided a system and method for encrypting a virtual function table pointer, the method comprising: generating a hash value indicating a class of the object and a cryptographic key for encrypting a virtual function table pointer of the class, ; A memory management unit receiving the command of the control unit and generating the hash value; A memory unit for receiving and storing the hash value from the memory management unit; A random number key generating unit for receiving the command from the control unit and generating the encryption key; And a cipher storage unit for receiving the hash value and the cipher key from the memory unit and the random number key generator and storing the hash value and the cipher key in a two-dimensional array.

본 발명의 바람직한 실시예에 따르면, 상기 메모리 관리부는 32bit로 구성되는 해시값을 생성하는 것을 특징으로 한다.According to a preferred embodiment of the present invention, the memory management unit generates a 32-bit hash value.

본 발명의 바람직한 실시예에 따르면, 상기 난수 키생성부는, 64bit의 난수로 구성되는 암호키를 생성하는 것을 특징으로 한다.According to a preferred embodiment of the present invention, the random number key generation unit generates a cryptographic key having a random number of 64 bits.

본 발명의 바람직한 실시예에 따르면, 상기 제어부는, 상기 암호저장부에 저장된 암호키를 상기 메모리부에 저장되어 있는 해시값을 통해 검색하여 전송 받아 상기 클래스의 가상 함수 테이블 포인터의 암호화 또는 복호화를 수행하는 것을 특징으로 한다.According to a preferred embodiment of the present invention, the control unit searches the hash value stored in the memory unit for the cryptographic key stored in the cryptographic storage unit, receives the hash value, encrypts or decrypts the virtual function table pointer of the class .

본 발명의 바람직한 실시예에 따르면, 상기 메모리부는, 상기 제어부가 암호화를 수행한 상기 클래스의 가상 함수 테이블 포인터의 암호화정보를 저장하는 것을 특징으로 한다.According to a preferred embodiment of the present invention, the memory unit stores encryption information of a virtual function table pointer of the class in which the control unit has performed encryption.

본 발명의 바람직한 실시예에 따르면, 포인터 암호화 시스템을 이용한 포인터 암호화 방법에 있어서, 객체 생성 시 제어부가 상기 객체의 클래스를 지칭하는 해시값과 상기 클래스의 가상 함수 테이블 포인터를 암호화하기 위한 암호키를 생성하도록 명령하는 A 단계; 상기 제어부의 명령을 받아 메모리 관리부가 상기 해시값을 생성하는 B 단계; 메모리부가 상기 메모리 관리부로부터 상기 해시값을 전송 받아 저장하는 C 단계; 상기 제어부의 명령을 받아 난수 키생성부가 상기 암호키를 생성하는 D 단계; 암호저장부가 상기 메모리부와 난수 키생성부로부터 해시값과 암호키를 전송 받아 2차원 배열로 저장하는 E 단계; 상기 제어부가 상기 암호저장부에 저장된 암호키를 상기 메모리부에 저장되어 있는 해시값을 통해 검색하여 전송 받아 상기 클래스의 가상 함수 테이블 포인터의 암호화를 수행하는 F 단계; 상기 제어부가 암호화를 수행한 상기 클래스의 가상 함수 테이블 포인터의 암호화정보를 상기 메모리부에 저장하는 G 단계를 포함하는 것을 특징으로 한다.According to a preferred embodiment of the present invention, there is provided a pointer encryption method using a pointer encryption system, the control unit generating a hash value indicating a class of the object and a cryptographic key for encrypting a virtual function table pointer of the class A; A step B in which the memory management unit receives the command from the control unit and generates the hash value; A memory unit receiving and storing the hash value from the memory management unit; A step D of receiving a command from the control unit and generating a random number key by the random number generating unit; A step E of storing a hash value and an encryption key from the memory unit and the random number key generation unit and storing the hash value and the encryption key in a two-dimensional array; The control unit retrieving the cryptographic key stored in the cryptographic storage unit through a hash value stored in the memory unit, receiving the cryptographic key, and encrypting the virtual function table pointer of the class; And storing the encryption information of the virtual function table pointer of the class in which the control unit has performed encryption in the memory unit.

본 발명의 바람직한 실시예에 따르면, 상기 B 단계는, 상기 메모리 관리부가 32bit로 구성된 해시값을 생성하는 것을 특징으로 한다.According to a preferred embodiment of the present invention, in the step B, the memory management unit generates a 32-bit hash value.

본 발명의 바람직한 실시예에 따르면, 상기 D 단계는, 상기 난수 키생성부가 64bit의 난수로 구성된 암호키를 생성하는 것을 특징으로 한다.According to a preferred embodiment of the present invention, in the step (D), the random number key generator generates a cryptographic key having a random number of 64 bits.

본 발명의 바람직한 실시예에 따르면, 포인터 암호화 시스템을 이용한 포인터 복호화 방법에 있어서, 사용자가 가상 함수를 호출 할 경우 제어부가 메모리부에 저장되어 있는 클래스의 가상 함수 테이블 포인터의 암호화정보와 해시값을 전송 받는 A 단계; 상기 제어부가 상기 해시값을 통해 암호저장부에 저장된 암호키를 검색하는 B 단계; 상기 제어부가 상기 암호키를 전송 받아 상기 클래스의 가상 함수 테이블 포인터의 암호화정보의 복호화를 수행하는 C 단계를 포함하는 것을 특징으로 한다,According to a preferred embodiment of the present invention, in a pointer decryption method using a pointer encryption system, when a user calls a virtual function, the control unit transmits the encryption information and the hash value of the virtual function table pointer of the class stored in the memory unit Receiving step A; A step B in which the control unit retrieves an encryption key stored in the encryption storage unit based on the hash value; And a step C in which the controller receives the encryption key and decrypts the encryption information of the virtual function table pointer of the class.

본 발명에서 제시하는 가상 함수 테이블 포인터 암호화 시스템 및 그 방법은, 클래스별로 암호키를 할당하여 가상 함수 테이블 포인터를 암호화하여 외부에서의 가상 함수 테이블 변조공격을 방어할 수 있고 성능과 보안의 적절한 수준을 맞출 수 있는 효과가 있다.The virtual function table pointer encryption system and method thereof according to the present invention can protect a virtual function table tampering attack from outside by encrypting a virtual function table pointer by assigning a cryptographic key to each class, There is an effect that can be adjusted.

도 1은 본 발명의 일실시예에 따른 가상 함수 테이블 포인터 암호화 시스템의 블록구성도
도 2는 본 발명의 일실시예에 따른 가상 함수 테이블 포인터의 암호화 및 복호화 방법 흐름도
도 3은 본 발명의 일실시예에 따른 암호저장부의 블록구성도
도 4는 본 발명의 일실시예에 따른 암호키 검색방법 예시도
도 5는 본 발명의 일실시예에 따른 암호키 검색방법 흐름도
1 is a block diagram of a virtual function table pointer encryption system according to an embodiment of the present invention;
2 is a flowchart of a method of encrypting and decrypting a virtual function table pointer according to an embodiment of the present invention.
3 is a block diagram of an encryption storage unit according to an embodiment of the present invention.
4 is a diagram illustrating an example of a method of searching for an encryption key according to an embodiment of the present invention.
FIG. 5 is a flowchart illustrating an encryption key search method according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구성될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to explain the present invention in the drawings, parts not related to the description are omitted, and like parts are denoted by similar reference numerals throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 “연결”되어 있다고 할 때, 이는 “직접적으로 연결”되어 있는 경우만이 아니라, 다른 부분을 통해 “간접적으로 연결”되는 경우도 포함하여 어떤 부분이 구성요소를 “포함”한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함 할 수 있는 것을 의미한다.Throughout the specification, when an element is referred to as being "connected" to another element, it is intended to be understood that it is not limited to a "directly connected" element, When " comprising ", it is understood that this does not exclude other elements unless specifically stated to the contrary, it may include other elements.

이하, 본 발명의 바람직한 실시 예를 도면을 참조하여 설명하면 다음과 같다.Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.

클래스에서 가상 함수를 정의하면 컴파일시 가상 함수 테이블을 생성하고, 상기 클래스에서 객체를 생성할 경우 상기 객체는 가상 함수 테이블 포인터를 포함하게 된다. 본 발명은 상기한 가상 함수 테이블 포인터를 암호화하여 외부의 변조 공격으로부터 방어하기 위해 창출된 것으로서, 도 1은 본 발명의 일실시예에 따른 가상 함수 테이블 포인터 암호화 시스템의 블록구성도이며, 도 2는 본 발명의 일실시예에 따른 가상 함수 테이블 포인터의 암호화 및 복호화 방법 흐름도이다. 먼저 도 1에 도시된 바와 같이, 본 발명에 따른 가상 함수 테이블 포인터 암호화 시스템은 객체 생성 시 상기 객체의 클래스를 지칭하는 해시값과 상기 클래스의 가상 함수 테이블 포인터를 암호화 하기 위한 암호키를 생성하도록 명령하는 제어부(110)와 상기 제어부의 명령을 받아 상기 해시값을 생성하는 메모리 관리부(120)와 상기 메모리 관리부(120)로부터 상기 해시값을 전송 받아 저장하는 메모리부(130)와 상기 제어부(110)의 명령을 받아 상기 암호키를 생성하는 난수 키생성부(140) 및 상기 메모리부(130)와 난수 키생성부(140)로부터 상기 해시값과 암호키를 전송 받아 2차원 배열로 저장하는 암호저장부(150)를 포함하여 구성된다.When a virtual function is defined in a class, a virtual function table is created at compile time. When an object is created in the class, the object includes a virtual function table pointer. FIG. 1 is a block diagram of a virtual function table pointer encryption system according to an embodiment of the present invention. FIG. 2 is a block diagram of a virtual function table pointer encryption system according to an embodiment of the present invention. FIG. 4 is a flowchart illustrating a method of encrypting and decrypting a virtual function table pointer according to an exemplary embodiment of the present invention. FIG. As shown in FIG. 1, the virtual function table pointer encryption system according to the present invention includes a command for generating a hash value indicating a class of the object and a cryptographic key for encrypting a virtual function table pointer of the class, A memory unit 130 for receiving the hash value from the memory management unit 120 and storing the hash value and a memory unit 130 for storing the hash value received from the memory management unit 120, A random number key generation unit 140 for receiving the hash value and the encryption key from the memory unit 130 and the random number key generation unit 140 and storing the password in a two-dimensional array (150).

도 1과 2에 도시된 바와 같이, 먼저 객체가 생성되면 상기 제어부(110)는 상기 메모리 관리부(120)에 상기 객체의 클래스를 지칭하는 해시값을 생성하도록 명령하고, 상기 난수 키생성부(140)에 상기 객체가 포함하는 가상 함수 테이블 포인터를 암호화하기 위한 암호키를 생성하도록 명령한다. 상기 메모리 관리부(120)가 해시값을 생성하면 상기 메모리부(130)에 저장되고 상기 난수 키생성부(140)는 암호키를 생성한다. 상기 해시값과 암호키는 상기 암호저장부(150)에 저장되고, 상기 제어부(110)는 상기 가상 함수 테이블 포인터를 암호화하기 위해 상기 암호저장부(150)에 암호키를 요구한다. 상기 제어부(110)는 상기 암호저장부(150)에 저장된 암호키를 상기 메모리부(130)에 저장되어 있는 해시값을 통해 검색하여 전송 받아 상기 가상 함수 테이블 포인터의 암호화를 수행한다. (S100~150) 1 and 2, when an object is generated first, the controller 110 instructs the memory management unit 120 to generate a hash value indicating the class of the object, and the random number key generator 140 ) To generate a cryptographic key for encrypting the virtual function table pointer included in the object. When the memory management unit 120 generates the hash value, it is stored in the memory unit 130, and the random number key generation unit 140 generates the encryption key. The hash value and the encryption key are stored in the encryption storage unit 150 and the controller 110 requests the encryption storage unit 150 to encrypt the virtual function table pointer. The control unit 110 searches the hash value stored in the memory unit 130 for the encryption key stored in the encryption storage unit 150 and encrypts the virtual function table pointer. (S100 to 150)

상기 암호화가 진행되면 가상 함수 테이블 포인터의 암호화정보가 생성되는데, 상기 가상 함수 테이블 포인터의 암호화정보는 암호화된 가상 함수 테이블 포인터의 주소정보를 의미한다. 상기 제어부(110)는 상기 암호화정보를 상기 메모리부(130)에 저장한다. 사용자가 가상 함수를 호출할 경우, 상기 제어부(110)는 상기 메모리부(130)에 저장되어 있는 상기 암호화정보와 해시값을 전송 받고, 상기 암호저장부(150)에 저장된 암호키를 상기 해시값을 통해 검색하여 전송 받아 상기 암호화정보의 복호화를 수행한다. (S160~180) When the encryption is performed, encryption information of the virtual function table pointer is generated. The encryption information of the virtual function table pointer means address information of the encrypted virtual function table pointer. The control unit 110 stores the encryption information in the memory unit 130. When the user calls a virtual function, the control unit 110 receives the encryption information and the hash value stored in the memory unit 130, and stores the encryption key stored in the encryption storage unit 150 into the hash value And decrypts the encrypted information. (S160 to S180)

상기한 방법을 통해 가상 함수 테이블 포인터를 클래스별로 할당된 암호키를 통해 암호화 함으로써 외부에서의 가상 함수 테이블 포인터 변조공격을 방어할 수 있고 성능과 보안의 적절한 수준을 맞출 수 있는 것이다.By encrypting the virtual function table pointer through the cryptographic key assigned to each class through the above-described method, it is possible to prevent the virtual function table pointer tampering attack from the outside, and to adjust the performance and the security level appropriately.

도 3은 본 발명의 일실시예에 따른 암호저장부의 블록구성도이다. 상기 제어부(110)의 명령에 의해 메모리 관리부(120)가 생성한 해시값은 32bit로 구성되어 상기 메모리부(120)에 저장된 후, 상기 암호저장부(150)에 저장되며, 상기 제어부(110)의 명령에 의해 상기 난수 키생성부(140)가 생성한 암호키는 62bit의 난수로 구성되어 상기 암호저장부(150)에 저장된다. 상기 암호저장부(150)는 해시값과 암호키를 2차원 배열로서 저장하게 된다. 3 is a block diagram of a cryptographic storage unit according to an embodiment of the present invention. The hash value generated by the memory management unit 120 by the instruction of the control unit 110 is composed of 32 bits and is stored in the memory unit 120 and then stored in the encryption storage unit 150, The cryptographic key generated by the random number key generating unit 140 by the instruction of the random number generating unit 140 consists of a random number of 62 bits and is stored in the cryptographic storage unit 150. [ The encryption storage unit 150 stores the hash value and the encryption key as a two-dimensional array.

도 4는 본 발명의 일실시예에 따른 암호키 검색방법 예시도이다. 도 4에 도시된 바와 같이, 상기 제어부(110)는 상기 가상 함수 테이블 포인터를 암호화 및 복호화 하기위해 상기 암호저장부(150)로부터 암호키를 전송 받는데, 상기 제어부(110)가 상기 메모리부(130)에 저장되어 있는 해시값을 전송 받아 상기 암호저장부(150)에 전송하면, 상기 암호저장부(150)는 상기 해시값과 일치하는 암호키를 매치부(151)를 통해서 검색 및 출력하여 상기 제어부(110)로 전송하는 과정을 통해서 진행된다. 4 is a diagram illustrating an example of a method of searching for an encryption key according to an embodiment of the present invention. 4, the control unit 110 receives the encryption key from the encryption storage unit 150 to encrypt and decrypt the virtual function table pointer. The control unit 110 controls the memory unit 130 The cryptographic storage unit 150 retrieves and outputs the cryptographic key corresponding to the hash value through the matching unit 151 and transmits the cryptographic key to the cryptographic storage unit 150. [ To the control unit 110, as shown in FIG.

도 5는 본 발명의 일실시예에 따른 암호키 검색방법 흐름도이다. 도 5에 도시된 바와 같이, 상기 암호저장부(150)에서의 암호키 검색방법은, 상기 제어부(110)에서 해시값을 입력 받는 과정과(S200) 상기 암호저장부(150)에서 상기 해시값을 저장하고 매치부의 모든 비트를 0으로 초기화 하는 과정과(S210) 상기 저장한 해시값을 상기 암호저장부(150)에 미리 저장되어 있는 해시값 및 암호키로 이루어진 2차원 배열과 비교하는 과정과(S220) 상기 입력 받은 해시값과 같은 값이 존재하면 상기 매치부(151)가 Mn 비트에 1을 설정하고 상기 입력 받은 해시값과 같은 값이 없으면 상기 매치부(151)가 Mn 비트에 0을 설정하는 과정과(S230~250) 매치부의 Mn 비트에 1로 설정된 배열 항목을 가져오는 과정과(S260) 가져온 배열 항목의 암호키를 출력하여 제어부로 전송하는 과정(S270)으로 진행된다.5 is a flowchart illustrating a method of searching for an encryption key according to an embodiment of the present invention. 5, the encryption key retrieving method in the encryption storing unit 150 includes a process of receiving a hash value from the controller 110 (S200) and a process of receiving the hash value from the encryption storing unit 150 (S210), and comparing the stored hash value with a two-dimensional array of hash values and encryption keys stored in advance in the encryption storage unit 150 (step S220) If there is a value equal to the received hash value, the matching unit 151 sets 1 to the Mn bit and if the received hash value does not have the same value, the matching unit 151 sets the Mn bit to 0 (S230 to S250), fetching an array item set to 1 in the Mn bit of the matching unit (S260), and outputting the encryption key of the imported array item to the controller (S270).

본 발명은 도면에 도시된 실시 예(들)를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형이 이루어질 수 있으며, 상기 설명된 실시 예(들)의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다. While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those skilled in the art that various changes and modifications may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. May be constructed by selectively or in combination. Accordingly, the true scope of the present invention should be determined by the technical idea of the appended claims.

100 : 시스템
110 : 제어부
120 : 메모리 관리부
130 : 메모리부
140 : 난수 키생성부
150 : 암호저장부
151 : 매치부
100: System
110:
120: memory management unit
130: memory unit
140: a random number key generation unit
150:
151:

Claims (9)

포인터 암호화 시스템(100)에 있어서,
객체 생성 시 상기 객체의 클래스를 지칭하는 해시값과 상기 클래스의 가상 함수 테이블 포인터를 암호화 하기 위한 암호키를 생성하도록 명령하는 제어부(110);
상기 제어부(110)의 명령을 받아 상기 해시값을 생성하는 메모리 관리부(120);
상기 메모리 관리부(120)로부터 상기 해시값을 전송 받아 저장하는 메모리부(130);
상기 제어부(110)의 명령을 받아 상기 암호키를 생성하는 난수 키생성부(140); 및
상기 메모리부(130)와 난수 키생성부(140)로부터 상기 해시값과 암호키를 전송 받아 2차원 배열로 저장하는 암호저장부(150);
를 포함하되,
상기 제어부(110)는,
상기 암호저장부(150)에 저장된 암호키를 상기 메모리부(130)에 저장되어 있는 해시값을 통해 검색하여 전송 받아 상기 클래스의 가상 함수 테이블 포인터의 암호화 또는 복호화를 수행하는 것을 특징으로 하는 가상 함수 테이블 포인터 암호화 시스템.
In the pointer encryption system 100,
A control unit (110) for generating a hash value indicating a class of the object and an encryption key for encrypting a virtual function table pointer of the class when the object is created;
A memory management unit 120 receiving the command of the controller 110 to generate the hash value;
A memory unit 130 for receiving and storing the hash value from the memory management unit 120;
A random number key generating unit 140 for receiving the command of the controller 110 and generating the encryption key; And
A password storage unit 150 for receiving the hash value and the encryption key from the memory unit 130 and the random number key generation unit 140 and storing the hash value and the encryption key in a two-dimensional array;
, ≪ / RTI &
The control unit 110,
And a virtual function table pointer of the class is encrypted or decrypted by retrieving the cryptographic key stored in the cryptographic storage unit (150) through a hash value stored in the memory unit (130) Table pointer encryption system.
제 1항에 있어서,
상기 메모리 관리부(120)는,
32bit로 구성되는 해시값을 생성하는 것을 특징으로 하는 가상 함수 테이블 포인터 암호화 시스템.
The method according to claim 1,
The memory management unit 120,
And generates a hash value composed of 32 bits.
제 1항에 있어서,
상기 난수 키생성부(140)는,
64bit의 난수로 구성되는 암호키를 생성하는 것을 특징으로 하는 가상 함수 테이블 포인터 암호화 시스템.
The method according to claim 1,
The random-number key generating unit 140 generates random-
And generates a cryptographic key composed of a 64-bit random number.
삭제delete 제 1항에 있어서,
상기 메모리부(130)는,
상기 제어부(110)가 암호화를 수행한 상기 클래스의 가상 함수 테이블 포인터의 암호화정보를 저장하는 것을 특징으로 하는 가상 함수 테이블 포인터 암호화 시스템.
The method according to claim 1,
The memory unit 130 includes:
Wherein the control unit (110) stores encryption information of a virtual function table pointer of the class in which the encryption is performed.
삭제delete 삭제delete 삭제delete 삭제delete
KR1020160183304A 2016-12-30 2016-12-30 A system and method for encryption of pointers to virtual function tables KR101999209B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160183304A KR101999209B1 (en) 2016-12-30 2016-12-30 A system and method for encryption of pointers to virtual function tables

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160183304A KR101999209B1 (en) 2016-12-30 2016-12-30 A system and method for encryption of pointers to virtual function tables

Publications (2)

Publication Number Publication Date
KR20180078509A KR20180078509A (en) 2018-07-10
KR101999209B1 true KR101999209B1 (en) 2019-07-11

Family

ID=62915757

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160183304A KR101999209B1 (en) 2016-12-30 2016-12-30 A system and method for encryption of pointers to virtual function tables

Country Status (1)

Country Link
KR (1) KR101999209B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902515B (en) * 2019-01-10 2021-07-20 西安纸贵互联网科技有限公司 True data verification method and system
CN110278446B (en) * 2019-06-20 2022-01-28 北京字节跳动网络技术有限公司 Method and device for determining virtual gift display information and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101499535B1 (en) 2013-05-29 2015-03-06 주식회사 엘지씨엔에스 Computer-executable hybrid application performing method, coumputer-excutable device and storage media performing the same
WO2016190476A1 (en) 2015-05-27 2016-12-01 삼성에스디에스 주식회사 Method for managing encryption key for cloud service and apparatus thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101473298A (en) * 2006-06-20 2009-07-01 Nxp股份有限公司 Random number generator system, method for generating random numbers
KR101256149B1 (en) 2010-07-12 2013-04-19 홍익대학교 산학협력단 Method and apparatus for securing indirect function calls by using program counter encoding
KR101216995B1 (en) * 2010-12-03 2012-12-31 충남대학교산학협력단 A code encryption and decryption device against reverse engineering based on indexed table and the method thereof
KR101401953B1 (en) 2013-01-08 2014-05-30 홍익대학교 산학협력단 Apparatus and method for generating random number using graphic processing unit
KR101438432B1 (en) * 2013-02-21 2014-09-12 고려대학교 산학협력단 User denial and data integrity verification method by storage service

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101499535B1 (en) 2013-05-29 2015-03-06 주식회사 엘지씨엔에스 Computer-executable hybrid application performing method, coumputer-excutable device and storage media performing the same
WO2016190476A1 (en) 2015-05-27 2016-12-01 삼성에스디에스 주식회사 Method for managing encryption key for cloud service and apparatus thereof

Also Published As

Publication number Publication date
KR20180078509A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
US8634549B2 (en) Ciphertext key chaining
CN108449172B (en) Encryption/decryption method and integrated circuit of computing device
US8767959B2 (en) Block encryption
US8347114B2 (en) Method and apparatus for enforcing a predetermined memory mapping
CN110650010B (en) Method, device and equipment for generating and using private key in asymmetric key
CN109564553B (en) Multi-stage memory integrity method and apparatus
US20080285747A1 (en) Encryption-based security protection method for processor and apparatus thereof
CN104298932B (en) A kind of call method and device of SO files
CN107506659B (en) Data protection system and method of general database based on SGX
US11308241B2 (en) Security data generation based upon software unreadable registers
CN105577379A (en) Information processing method and apparatus thereof
CN105450620A (en) Information processing method and device
US20080025503A1 (en) Security method using self-generated encryption key, and security apparatus using the same
US20150242332A1 (en) Self-encrypting flash drive
US11783094B2 (en) System and method for providing protected data storage in data memory
CN110855433B (en) Data encryption method and device based on encryption algorithm and computer equipment
EP2629225A1 (en) System, devices and methods for collaborative execution of a software application comprising at least one encrypted instruction
US20170046280A1 (en) Data processing device and method for protecting a data processing device against attacks
US9729319B2 (en) Key management for on-the-fly hardware decryption within integrated circuits
US8804953B2 (en) Extensive ciphertext feedback
KR20170097509A (en) Operation method based on white-box cryptography and security apparatus for performing the method
US8041033B2 (en) Cipher feedback with variable block chaining
US20140108818A1 (en) Method of encrypting and decrypting session state information
US20200044838A1 (en) Data encryption method and system using device authentication key
US20180013551A1 (en) Apparatus for obfuscating and restoring program execution code and method thereof

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right