WO2015072688A1 - 프로그램 보호 장치 - Google Patents

프로그램 보호 장치 Download PDF

Info

Publication number
WO2015072688A1
WO2015072688A1 PCT/KR2014/010445 KR2014010445W WO2015072688A1 WO 2015072688 A1 WO2015072688 A1 WO 2015072688A1 KR 2014010445 W KR2014010445 W KR 2014010445W WO 2015072688 A1 WO2015072688 A1 WO 2015072688A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
protection area
encrypted
code
program
Prior art date
Application number
PCT/KR2014/010445
Other languages
English (en)
French (fr)
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 US15/036,543 priority Critical patent/US9965621B2/en
Priority to JP2016530133A priority patent/JP6215468B2/ja
Priority to CN201480071239.6A priority patent/CN105849737B/zh
Publication of WO2015072688A1 publication Critical patent/WO2015072688A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • 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
    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/034Test or assess a computer or a system

Definitions

  • This embodiment has a main purpose to provide a program protection device.
  • This embodiment is primarily intended to provide a program protection device for preventing a program from being analyzed by a dynamic or static tool.
  • a program protection device includes an encrypted protection area, a start point display unit for displaying a start point of the encrypted protection area, and an end point display unit for displaying an end point of the encrypted protection area.
  • a protection area portion ;
  • a protection region connection unit including a decryption unit for decrypting the encrypted protection region to generate an execution code unit, and a protection region call unit for calling the execution code unit.
  • a program protection method comprising: generating an execution code by decrypting an encrypted protected area of the program binary code; Executing the executable code; Checking the integrity of the executable code; And when the execution of the execution code is completed, removing the execution code and restoring the encrypted protection area.
  • the present embodiment it is possible to protect important logic or algorithm of a program from a static analysis tool or a dynamic analysis tool.
  • After compiling the program source code to generate the binary code encrypt the binary code in at least one function containing the important logic or algorithm of the program, and the encrypted protected area is called after the program is executed and loaded into main memory. It maintains the encryption state until the last time, decrypts the encrypted protection area, generates and executes the execution code, and returns to the encryption state when the execution ends, and even if the static or dynamic analysis tool analyzes the program, the logic or algorithm of the encrypted binary code Cannot be analyzed.
  • the encrypted protected area of the program's binary code is decrypted when the encrypted protected area is called and the execution code is generated.
  • the encrypted protection area can be returned to the encrypted state immediately. You can keep encrypted except for. In this way, if the program is kept in an encrypted state, even though the memory state can be known by executing a memory dump, the execution code is encrypted to protect important logic or algorithm of the program.
  • the program includes important logic or algorithm of the program and includes a start point and an end point for indicating a protected area that needs to be protected. You can find and encrypt and replace those parts, so you can distribute the program with the program's security applied, protecting the program from static analysis tools.
  • the encrypted area needs to be frequently called and executed, if there is a possibility that the execution performance of the program may be degraded by repeatedly decrypting and encrypting, if the encrypted area is stored in a separate protected area storage area before decryption, repeated encryption The process can be reduced, and the decrypted state can be maintained until a certain number of times depending on the frequency of call of the encrypted protected area.
  • a plurality of encrypted protected areas it is possible to select differently whether to store them in a separate protected area storage unit or to encrypt the execution code again according to the calling frequency of each encrypted protected area.
  • FIG. 1 is an illustration of a computer executing a program.
  • 2A, 2B and 2C are configuration diagrams of the protection region connection unit and the protection region unit according to the present embodiment.
  • 3A and 3B are diagrams illustrating a state in which a program including an encryption protection area is loaded into a memory according to the present embodiment.
  • FIG. 4 is a configuration diagram of a state in which a protection area is called and the integrity of the protection area is checked according to the present embodiment.
  • FIG. 5 is a flowchart of a process of protecting a program according to the present embodiment.
  • Embodiments of the invention may be applied to programs written in any language capable of generating native code, including C / C ++ programming languages, and are not limited to specific operating systems or hardware.
  • FIG. 1 is an illustration of a computer executing a program.
  • the computer 100 for executing a program stores the program in the auxiliary memory device 130, and when the program is executed, loads the program into the main memory 120 to execute the program in the central processing unit (CPU) 110.
  • the execution result of the program is displayed on the display 140.
  • the computer 100 may be used as a program protection device when a program executed in the computer 100 includes an encrypted protection area including important logic or algorithm.
  • Program protection device is a personal computer (PC), notebook computer, tablet (Tablet), personal digital assistant (PDA), game console, portable multimedia player (PMP: Portable Multimedia Player) ), And a user terminal such as PlayStation Portable (PSP), a wireless communication terminal, a smart phone, a TV, a media player, or the like.
  • the program protection apparatus may be a server terminal such as an application server and a service server.
  • a program protection apparatus is (i) a communication device such as a communication modem for performing communication with various devices or wired and wireless communication networks, (ii) a memory for storing data for executing a program, (iii It may mean a variety of devices including a microprocessor for executing and operating a program.
  • the memory may be a computer such as random access memory (RAM), read only memory (ROM), flash memory, optical disk, magnetic disk, solid state disk (SSD), or the like. It may be a readable recording / storage medium.
  • the microprocessor may be programmed to selectively perform one or more of the operations and functions described in the specification.
  • the microprocessor may be implemented as hardware, such as an Application Specific Integrated Circuit (ASIC), in whole or in part.
  • ASIC Application Specific Integrated Circuit
  • 2A, 2B and 2C are configuration diagrams of the protection region connection unit and the protection region unit according to the present embodiment.
  • the protection region connection unit 210 includes a decryption unit 212, a protection region caller 214, and a copy / encryption unit 216.
  • the protection region connection unit 220 includes a start point display unit ( 222, a protection region 224, and an end point display portion 226.
  • the protection area unit 220 of FIG. 2B is a state before compiling a program and performing encryption for applying security to the protection area.
  • the protection area unit 220 displays a state in which the protection area 224 of FIG. 2B is encrypted and then switched to the encrypted protection area 228.
  • protection region connection unit 210 and the protection region unit 220 are written in the C / C ++ programming language
  • macro functions can be easily used to reduce the development cost. Insert the label and marking code to mark the start and end points to mark certain areas of the binary code of the program, and decrypt the part of the encrypted binary code while the program is running.
  • the process of creating and calling to execute this executable code is complex and requires specialized skills, but can be formalized and written as a macro function.
  • the decryption unit 212 decrypts the encrypted protection area 228 and generates the same execution code part as the protection area 224 which is the original execution code to replace the encrypted protection area 228. In this case, the decryption unit 212 may store the encrypted protection area 228 in a separate place.
  • the protection area caller 214 calls the execution unit generated by decrypting the encrypted protection area 228 of the protection area unit 220 by the decryption unit 212.
  • the execution code When the execution code finishes running, it needs to be returned to its encrypted state. If the encrypted protection area 228 is stored in a separate place before the decryption unit 212 decrypts the encrypted protection area 228, the copying / encrypting unit 216 is stored again in a separate place. You can copy the encrypted protected area again to keep the program encrypted. If the encrypted protection area 228 is not stored in a separate place, the execution code unit may again encrypt the copy / encryption unit 216.
  • the executable code is encrypted again, if the encrypted protection region 228 is repeatedly called, the decryption and encryption processes may occur repeatedly, which may cause a decrease in the execution performance of the program.
  • the encrypted protection zone 228 is repeatedly performed, it is preferable to keep the encrypted protection zone 228 in a separate place. In this case, the protection area can be kept in an encrypted state without a separate encryption process.
  • the start point display unit 222 and the end point display unit 226 indicate a point where the protection area starts and ends at the protection area unit 220.
  • the start point display unit 222 and the end point display unit 226 may include a label and a marking code.
  • the label is used to obtain the address of the start point and the end point of the area to be decoded by the decoder 212 while the program is running.
  • the marking code may be composed of assembly code which does not interfere with the execution of the program, and the starting point and the end of the protection area 224 for encrypting the protection area 224 by using an encryption tool after compiling the program source code. Find the point.
  • encrypting the protected area with an encryption tool is not limited to a particular type of platform. It can be done on development equipment, or on a server. When the server performs encryption, it transmits a protected area requiring encryption to the server to request encryption, and receives an encrypted result.
  • 3A and 3B are diagrams illustrating a state in which a program including an encryption protection area is loaded into a memory according to the present embodiment.
  • 3A is a block diagram of a state in which a program including an encryption protection region and a protection region connection unit for connecting the encryption protection region is being executed in the main memory 120.
  • the state of FIG. 3A is maintained until the protection region unit 220 is called by the protection region connection unit 210 to decrypt the encryption protection region 228 to generate the execution code unit.
  • 3B further includes a protection area storage 310 than FIG. 3A.
  • the protected area storage unit 310 may be generated as soon as the program is executed, and may be generated before the decryption unit 212 decrypts the encrypted protected area 228.
  • the encrypted protection zone 228 is stored in the protection zone storage unit 310 before the encrypted protection zone 228 is decrypted while the program is running. By storing the encrypted protection area 228 in the protection area storage unit 310, the program can be returned to the encrypted state without the encryption process again. If the protection area 220 is frequently called repeatedly, encryption and decryption are performed. This can reduce the impact on system performance.
  • FIG. 4 is a configuration diagram of a state in which a protection area is called and the integrity of the protection area is checked according to the present embodiment.
  • the encrypted protection region 228 is decrypted to generate the execution code unit 400 to replace the encrypted protection region 228, and the execution code unit 400 is executed.
  • the execution code unit 400 is in the same state as before the encrypted protection area 228 is encrypted.
  • the integrity checking unit 410 checks whether the execution code unit 400 has been modulated while the execution code unit 400 is executed immediately after the execution of the execution code unit 400 ends. In the present embodiment, the integrity check is described using a hash function, but the integrity check can be performed in various ways without being limited thereto.
  • the hash code for the protection region 224 of FIG. 2B should be extracted in advance and stored in a separate file or program. After executing the execution of the program code 400 after the encrypted protection area 228 is generated by decrypting the encrypted protection area 228 and replacing the encrypted protection area 228, the execution code part is executed. In order to check whether tampering is performed during the execution of the operation 400, the execution code is immediately inputted as a hash function, and the hash code is extracted and compared with the stored hash code to determine whether or not it matches. If the result of the determination does not match, the execution code unit 400 is modulated during execution, and thus execution of the program is stopped.
  • Hash function can be used for integrity check because unique hash code is extracted according to input value. Integrity checks can use a variety of hash functions, including MD5, SHA, and Checksum.
  • FIG. 5 is a flowchart illustrating a process of executing a protection area of a program according to the present embodiment.
  • the application is stored in the auxiliary memory device 130 and then loaded and executed in the main memory 120 (S510). If the encrypted protection area 228 needs to be called while the application is running, the protection area connection unit 210 is called first (S520), and the decryption unit 212 stores the encryption protection area 228 in the protection area. Stored in the unit 310 (S530). The encryption protection region 228 may be stored in the protection region storage unit 310, but may not be stored. If not stored, the decrypted executable code must be re-encrypted after execution. The decryption unit 212 decrypts the encryption protection region (S540) and generates and executes the same execution code unit 400 as the protection region 224 (S550).
  • the integrity check is performed to confirm whether the execution code has been tampered with (S560), and if the program is tampered with, the execution of the program is stopped. Integrity checking can be done through hash checking. Before the protection area 220 is encrypted, the protection area 224 of FIG. 2B is used as an input of a hash function, and a hash code is extracted and stored in a separate file or program. In order to perform integrity check, the execution code generated by decrypting the encryption protected area is used as the input of the hash function to extract the hash code, and it is determined whether the program matches the previously stored hash code. do. If it is determined that the program has not been tampered with, the encrypted protected area stored in the protected area storage unit 310 is copied to the original location (S570).

Abstract

프로그램 보호 장치를 개시한다. 프로그램 보호 장치에 있어서, 암호화된 보호영역, 상기 암호화된 보호영역의 시작 지점을 표시하는 시작지점 표시부 및 상기 암호화된 보호영역의 종료 지점을 표시하는 종료지점 표시부를 포함하는 보호영역부; 및 상기 암호화된 보호영역을 복호화하여 실행코드부를 생성하는 복호화부 및 상기 실행코드부를 호출하는 보호영역 호출부를 포함하는 보호영역 연결부를 포함하는 것을 특징으로 하는 프로그램 보호 장치를 제공한다.

Description

프로그램 보호 장치
본 실시예는 프로그램 보호 장치를 제공하는 데 주된 목적이 있다.
이하에 기술되는 내용은 단순히 본 실시예와 관련되는 배경 정보만을 제공할 뿐 종래기술을 구성하는 것이 아님을 밝혀둔다.
프로그램의 중요한 로직(Logic)이나 알고리즘은 바이너리 코드로 작성되어 있더라도 정적(Static) 분석 도구 또는 동적(Dynamic) 분석 도구를 이용하여 용이하게 분석할 수 있다. 하지만, 종래의 안티디버깅(Anti-Debugging) 이나 안티덤프(Anti-Dump) 기능은 디버거(Debugger)와 같은 동적 분석 도구로부터 프로그램을 보호할 수 있지만 정적 분석 도구에 의한 분석을 방지하기 어렵다. 또한 정적분석 도구에 의한 프로그램 분석을 사전에 예방하거나 근본적으로 방지하기는 어렵고, 정적 분석 도구에 의해 프로그램이 분석되어 프로그램의 중요한 로직이나 알고리즘이 유출된 이후에 프로그램이 변조되었는지 여부를 확인하여 사후적으로 대처할 수밖에 없어 프로그램의 중요한 로직 또는 알고리즘을 보호하기에는 미흡하다.
따라서, 정적 분석 도구에 의해 프로그램의 중요한 로직 또는 알고리즘이 분석되는 것을 방지하면서 동적 분석 도구에 의한 분석도 방지할 수 있는 방안이 필요하다.
본 실시예는, 프로그램이 동적 또는 정적 도구에 의해 분석되는 것을 방지하기 위한 프로그램 보호 장치를 제공하는 데 주된 목적이 있다.
본 실시예의 일 측면에 의하면, 프로그램 보호 장치에 있어서, 암호화된 보호영역, 상기 암호화된 보호영역의 시작 지점을 표시하는 시작지점 표시부 및 상기 암호화된 보호영역의 종료 지점을 표시하는 종료지점 표시부를 포함하는 보호영역부; 및 상기 암호화된 보호영역을 복호화하여 실행코드부를 생성하는 복호화부 및 상기 실행코드부를 호출하는 보호영역 호출부를 포함하는 보호영역 연결부를 포함하는 것을 특징으로 하는 프로그램 보호 장치를 제공한다.
또한, 본 실시예의 다른 측면에 의하면, 프로그램 보호 방법에 있어서, 프로그램 바이너리 코드 중 암호화된 보호영역을 복호화하여 실행코드를 생성하는 과정; 상기 실행코드를 실행하는 과정; 상기 실행코드의 무결성을 검사하는 과정; 및 상기 실행코드의 실행이 종료되면 상기 실행코드를 제거하고 상기 암호화된 보호영역으로 복원하는 과정을 포함하는 것을 특징으로 하는 프로그램 보호 방법을 제공한다.
이상에서 설명한 바와 같이 본 실시예에 의하면, 프로그램의 중요한 로직 또는 알고리즘을 정적(Static) 분석 도구 또는 동적(Dynamic) 분석 도구로부터 보호할 수 있다. 프로그램 소스코드를 컴파일하여 바이너리 코드를 생성한 후 프로그램의 중요한 로직이나 알고리즘을 포함하고 있는 적어도 하나의 함수 내의바이너리코드를 암호화하고, 프로그램이 실행되어 메인메모리에 로딩된 후에도 암호화된 보호영역이 호출되기 전까지 암호화 상태를 유지하고, 암호화된 보호영역을 복호화하여 실행코드를 생성하여 실행하고, 실행이 종료되면 다시 암호화 상태로 복귀하여 정적 또는 동적 분석 도구가 프로그램을 분석하더라도 암호화된 바이너리코드의 로직 또는 알고리즘을 분석할 수 없다.
프로그램의 바이너리 코드 중 암호화된 보호영역은 암호화된 보호영역이 호출될 때 비로소 복호화되고 실행코드가 생성되어, 이 실행코드의 실행이 종료되면 바로 암호화된 상태로 되돌아갈 수 있어 실행코드가 실행 중일 때를 제외하고는 암호화된 상태를 유지할 수 있다. 이처럼 프로그램을 암호화 상태로 유지한다면 메모리를 덤프(Memory Dump)하여 프로그램의 실행 중 메모리 상태를 알 수 있더라도 실행코드가 암호화되어 있어 프로그램의 중요한 로직 또는 알고리즘 등을 보호할 수 있다.
본 발명에 의하면 프로그램의 중요한 로직이나 알고리즘을 포함하고 있어 보호가 필요한 보호영역을 표시하기 위한 시작 시점과 종료 지점을 포함하고 있어 프로그램이 실행되지 않더라도 프로그램의 바이너리 코드에서 암호화할 시작지점과 종료 지점을 찾아 해당 부분을 암호화하여 대체할 수 있으므로 프로그램의 보안이 적용된 상태로 프로그램을 배포할 수 있어 정적 분석 도구로부터 프로그램을 보호할 수 있다.
한편, 암호화된 영역이 자주 호출되어 실행되어야 하는 경우복호화, 암호화를 반복하여 프로그램의 실행 성능을 저하시킬 우려가 있는 경우, 암호화된 영역을 복호화하기 전에 별도의 보호영역 보관부에 저장해 둔다면 반복적인 암호화 과정을 줄일 수 있고, 암호화된 보호영역의 호출빈도에 따라 일정한 횟수까지는 복호화된 상태를 유지시킬 수 있다. 게다가, 복수의 암호화된 보호영역을 포함하고 있는 경우에, 각 암호화된 보호영역의 호출 빈도에 따라 별도의 보호영역보관부에 저장할 것인지 실행코드를 다시 암호화할 것인지 여부를 달리 선택할 수 있다.
도 1은 프로그램을 실행하는 컴퓨터의 예시도이다.
도 2a, 도 2b 및 도 2c는 본 실시예에 따른 보호영역 연결부 및 보호영역부의 구성도이다.
도 3a 및 도 3b는 본 실시예에 따른 암호화 보호영역을 포함하는 프로그램이 메모리에 로딩된 상태의 구성도이다.
도 4는 본 실시예에 따른 보호영역이 호출되고 보호영역의 무결성을 검사하는 상태의 구성도이다.
도 5는 본 실시예에 따른 프로그램을 보호하는 과정의 순서도이다.
이하, 본 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.
본 발명의 실시예는 C/C++ 프로그래밍 언어를 포함하는 네이티브 코드(Native Code)를 생성할 수 있는 모든 언어로 작성된 프로그램에 적용될 수 있고 특정 운영 체제 또는 하드웨어에 한정되지 않는다.
도 1은 프로그램을 실행하는 컴퓨터의 예시도이다.
프로그램 실행하기 위한 컴퓨터(100)는 프로그램을 보조기억장치(130)에 저장해 두고, 프로그램이 실행되면 메인메모리(120)에 로딩하여 중앙처리장치(Central Process Unit; CPU)(110)에서 실행하고, 프로그램의 실행 결과를 디스플레이(140)에 표시한다. 컴퓨터(100)는 컴퓨터(100)에서 실행되는 프로그램이중요한 로직 또는 알고리즘을 포함하는 암호화된 보호영역을 포함하고 있는 경우프로그램 보호 장치로 사용될 수 있다.
발명의 실시예에 따른 프로그램 보호 장치는 개인용 컴퓨터(PC:Personal Computer), 노트북 컴퓨터, 태블릿(Tablet), 개인 휴대 단말기(PDA:Personal Digital Assistant), 게임 콘솔, 휴대형 멀티미디어 플레이어(PMP:Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 무선 통신 단말기(Wireless Communication Terminal), 스마트폰(Smart Phone), TV, 미디어 플레이어 등과 같은 사용자 단말기일 수 있다. 본 발명의 실시예에 따른 프로그램 보호 장치는 응용 서버와 서비스 서버 등 서버 단말기일 수 있다. 본 발명의 실시예에 따른 프로그램 보호 장치는 각기 (i) 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, (ii) 프로그램을 실행하기 위한 데이터를 저장하기 위한 메모리, (iii) 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비하는 다양한 장치를 의미할 수 있다. 적어도 일 실시예에 따르면, 메모리는 램(Random Access Memory: RAM), 롬(Read Only Memory: ROM), 플래시 메모리, 광 디스크, 자기 디스크, 솔리드 스테이트 디스크(Solid State Disk: SSD) 등의 컴퓨터로 판독 가능한 기록/저장매체일 수 있다. 적어도 일 실시예에 따르면, 마이크로프로세서는 명세서에 기재된 동작과 기능을 하나 이상 선택적으로 수행하도록 프로그램될 수 있다. 적어도 일 실시예에 따르면, 마이크로프로세서는 전체 또는 부분적으로 특정한 구성의 주문형반도체(Application Specific Integrated Circuit: ASIC) 등의 하드웨어로써 구현될 수 있다.
도 2a, 도 2b 및 도 2c는 본 실시예에 따른 보호영역 연결부 및 보호영역부의 구성도이다.
도 2a에서 보호영역 연결부(210)는 복호화부(212), 보호영역 호출부(214), 복사부/암호화부(216)를 포함하고, 도 2b에서 보호영역부(220)는 시작지점 표시부(222), 보호영역(224), 종료지점 표시부(226)를 포함하고 있다. 도 2b의 보호영역부(220)는 프로그램을 컴파일하고 보호영역에 대한 보안 적용을 위한 암호화를 수행하기 전의 상태이다. 도 2c에서 보호영역부(220)는 도 2b의 보호영역(224)을 암호화하여 암호화된 보호영역(228)으로 전환한 상태를 표시한다.
보호영역 연결부(210) 및 보호영역부(220)를 C/C++ 프로그래밍 언어로 작성할 경우 매크로 함수(Macro Function)를 이용한다면 용이하게 라이브러리화할 수 있어 개발 비용을 절감할 수 있다. 프로그램의 바이너리 코드에서 일정한 영역을 표시하기 위한 시작 지점과 끝 지점을 표시하는 레이블(Label) 및 마킹 코드(Marking Code)를 삽입하고, 프로그램을 실행 중에 암호화된 바이너리 코드의 일부분을 복호화하여 실행코드를 생성하고, 이 실행코드를 실행하도록 호출하는 과정은 복잡하고 전문적인 기술을 요구하지만, 정형화할 수 있어 이를 매크로 함수로 작성할 수 있다.
복호화부(212)는 암호화된 보호영역(228)을 복호화하여 원래의 실행코드인 보호영역(224)과 동일한 실행코드부를 생성하여 암호화된 보호영역(228)을 대체한다. 이 때 복호화부(212)는 암호화된 보호영역(228)을 별도의 장소에 저장할 수 있다. 보호영역 호출부(214)는 복호화부(212)에서 보호영역부(220)의 암호화된 보호영역(228)을 복호화하여 생성한 실행코드부가 실행되도록 호출한다.
실행코드의 실행이 종료되면, 다시 암호화된 상태로 되돌려 놓을 필요가 있다. 복호화부(212)에서 암호화된 보호영역(228)을 복호화하기 전에 암호화된 보호영역(228)을 별도의 장소에 보관해 두었다면, 복사부/암호화부(216)는 다시별도의 장소에 보관된 암호화된 보호영역을 다시 복사하여 프로그램이 암호화 상태를 유지하도록 할 수 있다. 암호화된 보호영역(228)을 별도의 장소에 보관하지 않은 경우, 실행코드부를 다시 복사부/암호화부(216)에서 암호화할 수 있다.
그러나, 실행코드를 다시 암호화한다면, 암호화된 보호영역(228)이 반복하여 호출되는 경우 복호화, 암호화 과정이 반복하여 발생하므로 프로그램의 실행 성능을 떨어뜨리는 원인이 될 수 있다. 암호화된 보호영역(228)이 반복적으로 수행되는 경우에는 암호화된 보호영역(228)을 별도의 장소에 보관하는 것이 바람직하다. 이 경우 별도의 암호화 과정 없이도 보호영역을 암호화 상태로 유지시킬 수 있다. 뿐만 아니라 기 설정된 일정한 횟수 내에서는 반복되어 호출되어도 실행코드상태를 유지할 수 있도록 하여 성능에 미치는 영향을 최소화할 수 있다.
시작지점 표시부(222) 및 종료지점 표시부(226)는 보호영역부(220)에서 보호영역이 시작되는 지점과 끝나는 지점을 표시한다. 시작지점 표시부(222)및 종료지점 표시부(226)는 레이블(Label)과 마킹 코드(Marking Code)를 포함할 수 있다. 레이블은 프로그램이 실행 중에 복호화부(212)에서 복호화할 영역의 시작 지점과 종료 지점의 주소를 획득하는 데 사용된다. 마킹 코드는 프로그램의 실행에는 지장이 없는 어셈블리 코드로 구성될 수 있고, 프로그램의 소스코드를 컴파일한 후 암호화 툴을 사용하여 보호영역(224)을 암호화하기 위해 보호영역(224)의 시작 지점과 종료 지점을 찾을 수 있도록 한다.
한편, 암호화 툴로 보호영역을 암호화하는 것은 특정한 형태의 플랫폼에 한정되지 않는다. 개발용 장비에서 수행할 수 있고, 서버에서도 수행할 수 있다. 서버에서 암호화를 수행하는 경우 암호화가 필요한 보호영역을 서버에 전송하여 암호화를 요청하고, 암호화된 결과를 수신한다.
도 3a 및 도 3b는 본 실시예에 따른 암호화 보호영역을 포함하는 프로그램이 메모리에 로딩된 상태의 구성도이다.
도 3a는 암호화 보호영역 및 암호화 보호영역을 연결하기 위한 보호영역 연결부를 포함하는 프로그램이 메인메모리(120)에서 실행 중인 상태의 구성도이다. 보호영역 연결부(210)에서 보호영역부(220)를 호출하여 암호화 보호영역(228)이 복호화되어 실행코드부가 생성되기 전까지 도 3a의 모습이 유지된다.
도 3b는 도 3a 보다 보호영역 보관부(310)를 추가로 포함하고 있다.
보호영역 보관부(310)는 프로그램이 실행되자마자 생성될 수 있고, 복호화부(212)에서 암호화 보호영역(228)을 복호화하기 전에 생성할 수 있다. 프로그램이 실행되는 중에 암호화된 보호영역(228)이 복호화되기 전에 암호화된 보호영역(228)을 보호영역 보관부(310)에 저장해 둔다. 보호영역 보관부(310)에 암호화된 보호영역(228)을 보관해 두면 다시 암호화 과정 없이 프로그램을 암호화 상태로 되돌릴 수 있어, 보호영역부(220)가 빈번하게 반복적으로 호출되는 경우에는 암호화 및 복호화로 인한 시스템 성능에 미치는 영향을 줄일 수 있다.
도 4는 본 실시예에 따른 보호영역이 호출되고 보호영역의 무결성을 검사하는 상태의 구성도이다.
암호화된 보호영역(228)을 복호화하여 실행코드부(400)를 생성하여 암호화된 보호영역(228)을 대체하고, 실행코드부(400)를 실행한다. 실행코드부(400)는 암호화된 보호영역(228)이 암호화되기 전과 동일한 상태이다. 무결성 검사부(410)는 실행코드부(400)의 실행을 종료한 직후 실행코드부(400)가 실행되는 동안 실행코드부(400)가 변조되었는지 여부를 검사한다. 본 실시예에서 무결성 검사는 해시함수(Hash Function)를 이용하여 설명하지만, 무결성 검사는 방법은 반드시 이에 한정되는 것은 않고 다양한 방법으로 가능하다.
해시함수를 이용하여 무결성 검사를 하기 위해서는 도 2b의 보호영역(224)에 대한 해시코드를 미리 추출하여 별도의 파일이나 프로그램 내부에 보관해 두어야 한다. 그리고, 프로그램 실행 중 암호화된 보호영역(228)을 복호화하여실행코드부(400)를 생성하고 암호화된 보호영역(228)을 대체한 후 이 실행코드부(400)를 실행한 후에, 실행코드부(400)의 실행 도중 변조가 되었는지를 확인하기위해 실행 종료 직후에 실행코드를 해시함수의 입력으로 하여 해시코드를 추출하고 기 보관된 해시코드와 비교하여 일치하는지 여부를 판별한다. 판별 결과로 일치하지 않을 경우 실행 중에 실행코드부(400)가 변조된 것이므로 프로그램의 실행을 중단한다. 해시함수는 입력값에 따라 고유한 해시코드(Hash Code)가 추출되므로 무결성 검사에 사용될 수 있다. 무결성 검사에는 MD5, SHA, Checksum 등을 포함하는 다양한 해시함수가 사용될 수 있다.
도 5는 본 실시예에 따른 프로그램의 보호영역이 실행되는 과정의순서도이다.
어플리케이션이 보조기억장치(130)에 저장되어 있다가 메인메모리(120)에 로딩되어 실행된다(S510). 어플리케이션이 실행되는 중에 암호화된 보호영역(228)을 호출할 필요가 있을 경우, 보호영역 연결부(210)가 먼저 호출되고(S520), 복호화부(212)는 암호화 보호영역(228)을 보호영역 보관부(310)에 보관한다(S530). 암호화 보호영역(228)은 보호영역 보관부에(310)에 보관될 수 있지만, 보관하지 않을 수 있다. 보관하지 않을 경우, 복호화된 실행코드의 실행이 종료된 후 다시 암호화해야 한다. 복호화부(212)는 암호화 보호영역을 복호화하여(S540) 보호영역(224)과 동일한 실행코드부(400)를 생성하여 실행한다(S550).
실행코드의 실행이 종료된 직후 실행코드가 변조되었는지 여부를 확인하기 위해 무결성 검사를 수행하고(S560) 프로그램이 변조된 경우 프로그램의 실행을 중단한다. 무결성 검사는 해시 검사를 통해 할 수 있다. 보호영역부(220)가암호화되기 전인 도 2b에서의 보호영역(224)을 해시함수(Hash Function)의 입력으로 하여 해시코드(Hash Code)를 추출하여 별도의 파일이나 프로그램 내부에 저장해둔다. 무결성 검사를 수행하기 위해서 암호화 보호영역을 복호화하여 생성한 실행코드를 해시함수의 입력으로 하여 해시코드를 추출하고, 미리 저장해 둔 해시코드와 일치하는지 여부를 판별하여 일치하지 않는다면 프로그램이 변조된 것으로 판단한다. 프로그램이 변조되지 않은 것으로 판별된 경우, 보호영역 보관부(310)에 보관해 둔 암호화된 보호영역을 원래의 위치에 복사한다(S570).
이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.

Claims (14)

  1. 프로그램 보호 장치에 있어서,
    암호화된 보호영역, 상기 암호화된 보호영역의 시작 지점을 표시하는 시작지점 표시부 및 상기 암호화된 보호영역의 종료 지점을 표시하는 종료지점 표시부를 포함하는 보호영역부; 및
    상기 암호화된 보호영역을 복호화하여 실행코드부를 생성하는 복호화부 및 상기 실행코드부를 호출하는 보호영역 호출부를 포함하는 보호영역 연결부를 포함하는 것을 특징으로 하는 프로그램 보호 장치.
  2. 제 1 항에 있어서,
    상기 시작지점 표시부 및 상기 종료지점 표시부는 상기 프로그램이 실행될 때 각 지점의 주소를 획득하기 위한 레이블(Label); 및
    상기 프로그램의 실행에는 지장이 없고 암호화할 보호영역의 시작 지점 및 종료 지점을 찾기 위한 마킹 코드(Marking Code)를 포함하는 것을 특징으로 하는 프로그램 보호 장치.
  3. 제 1 항에 있어서,
    상기 암호화된 보호영역은 상기 프로그램의 바이너리 코드가 생성된 후 상기시작지점 표시부에 포함된 마킹 코드로부터 상기 종료지점 표시부에 포함된 마킹코드까지의 바이너리 코드를 암호화한 것을 특징으로 하는 프로그램 보호 장치.
  4. 제 1 항에 있어서,
    상기 복호화부는 상기 시작지점 표시부에 포함된 레이블로부터 상기 종료지점 표시부에 포함된 레이블까지의 바이너리 코드를 복호화하는 것을 특징으로 하는 프로그램 보호 장치.
  5. 제 1 항에 있어서,
    상기 복호화부가 상기 실행코드부를 생성하기 전에 상기 암호화된 보호영역을 저장하기 위한 보호영역 보관부를 더 포함하는 것을 특징으로 하는 프로그램 보호 장치.
  6. 제 5 항에 있어서,
    상기 보호영역 연결부는,
    상기 실행코드부의 실행이 종료되면 상기 보호영역 보관부에 저장된 암호화된 보호영역을 상기 실행코드부에 복사하는 복사부를 더 포함하는 것을 특징으로 하는 프로그램 보호 장치.
  7. 제 6 항에 있어서,
    상기 복사부는,
    상기 실행코드부가 기 설정된 횟수를 반복하여 실행되고 난 후, 상기 보호영역 보관부에 저장된 암호화된 보호영역을 상기 실행코드부에 복사할 수 있는 것을 특징으로 하는 프로그램 보호 장치.
  8. 제 1 항에 있어서,
    상기 보호영역 연결부는 상기 실행코드부의 실행이 종료되면 상기 실행코드부를 암호화하는 암호화부를 더 포함하는 것을 특징으로 하는 프로그램 보호 장치.
  9. 제 1 항에 있어서,
    상기 프로그램 보호 장치가 복수의 암호화된 보호영역을 포함하는 경우,
    상기 암호화된 보호영역 각각의 호출 빈도에 근거하여,
    상기 암호화된 보호영역을 보호영역 보관부에 저장할 것인지,
    상기 암호화된 보호영역을 상기 보호영역 보관부에 보관하지 않고 상기 암호화된 보호영역에 대응하는 실행코드부를 실행한 후, 상기 실행코드부를 암호화할 것인지를 상기 암호화된 보호영역별로 선택할 수 있는 것을 특징으로 하는 프로그램 보호 장치.
  10. 제 1 항에 있어서,
    상기 실행코드부의 무결성을 검사하기 위한 무결성 검사부를 더 포함하는 것을 특징으로 하는 프로그램 보호 장치.
  11. 제 10 항에 있어서,
    상기 무결성 검사부는 상기 실행코드부를 해시함수의 입력으로 하여 해시코드를 추출하고, 기 저장된 해시코드와 일치하는지 여부를 판별하여, 일치하지 않는 경우 상기 프로그램의 실행을 중단하는 것을 특징으로 하는 프로그램 보호 장치.
  12. 프로그램 보호 방법에 있어서,
    프로그램 바이너리 코드 중 암호화된 보호영역을 복호화하여 실행코드를 생성하는 과정;
    상기 실행코드를 실행하는 과정;
    상기 실행코드의 무결성을 검사하는 과정; 및
    상기 실행코드의 실행이 종료되면 상기 실행코드를 제거하고 상기 암호화된 보호영역으로 복원하는 과정을 포함하는 것을 특징으로 하는 프로그램 보호 방법.
  13. 제 12 항에 있어서,
    상기 실행코드를 생성하는 과정은 상기 암호화된 보호영역을 별도의 장소에 저장하는 과정을 포함하는 것을 특징으로 하는 프로그램 보호 방법.
  14. 제 12 항에 있어서,
    상기 암호화된 보호영역으로 복원하는 과정은,
    상기 암호화된 보호영역이 별도의 장소에 보관된 경우, 상기 실행코드에 별도의 장소에 보관된 암호화된 보호영역을 복사하거나 상기 실행코드를 암호화하는 과정을 포함하는 것을 특징으로 하는 프로그램 보호 방법.
PCT/KR2014/010445 2013-11-14 2014-11-03 프로그램 보호 장치 WO2015072688A1 (ko)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US15/036,543 US9965621B2 (en) 2013-11-14 2014-11-03 Program protection device
JP2016530133A JP6215468B2 (ja) 2013-11-14 2014-11-03 プログラム保護装置
CN201480071239.6A CN105849737B (zh) 2013-11-14 2014-11-03 程序保护装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020130138634A KR101556908B1 (ko) 2013-11-14 2013-11-14 프로그램 보호 장치
KR10-2013-0138634 2013-11-14

Publications (1)

Publication Number Publication Date
WO2015072688A1 true WO2015072688A1 (ko) 2015-05-21

Family

ID=53057585

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2014/010445 WO2015072688A1 (ko) 2013-11-14 2014-11-03 프로그램 보호 장치

Country Status (5)

Country Link
US (1) US9965621B2 (ko)
JP (1) JP6215468B2 (ko)
KR (1) KR101556908B1 (ko)
CN (1) CN105849737B (ko)
WO (1) WO2015072688A1 (ko)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108319822B (zh) * 2018-01-05 2020-05-12 武汉斗鱼网络科技有限公司 一种保护网页代码的方法、存储介质、电子设备和系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3033562B2 (ja) * 1998-09-02 2000-04-17 富士ゼロックス株式会社 再配置可能な実行プログラムの生成方法及び実行プログラム生成装置
JP2007148575A (ja) * 2005-11-24 2007-06-14 Fuji Xerox Co Ltd 保護済み実行プログラムの作成のためのプログラム、方法及び装置
JP2010231477A (ja) * 2009-03-27 2010-10-14 Fuji Xerox Co Ltd プログラム及びプログラム実行装置
KR20130020861A (ko) * 2011-08-19 2013-03-04 고려대학교 산학협력단 자가암호화를 이용한 소프트웨어 변조방지 방법

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003090021A2 (en) * 2002-04-15 2003-10-30 Core Sdi, Incorporated Security framework for protecting rights in computer software
JP4226556B2 (ja) * 2002-12-12 2009-02-18 富士通株式会社 プログラム実行制御装置、os、クライアント端末、サーバ、プログラム実行制御システム、プログラム実行制御方法、プログラム実行制御プログラム
JP4147472B2 (ja) * 2003-02-28 2008-09-10 日本電気株式会社 コンピュータプログラムの編集システム及びその方法
JP4517636B2 (ja) * 2003-12-05 2010-08-04 富士ゼロックス株式会社 実行プログラム作成方法、関数プログラム、及び関数プログラム実行方法
JP2006072584A (ja) * 2004-08-31 2006-03-16 Fuji Xerox Co Ltd 実行プログラム生成装置、実行プログラム生成方法、プログラム処理装置、プログラム処理方法及びプログラム
KR100641297B1 (ko) * 2005-08-18 2006-11-02 삼성전자주식회사 롬 스크램블 방식의 반도체 장치 및 상기 반도체 장치의동작 방법
US8745406B2 (en) * 2005-10-17 2014-06-03 Nytell Software LLC Program executable image encryption
CN102598017B (zh) * 2009-11-13 2016-03-09 爱迪德技术有限公司 提高Java字节码的防窜改能力的系统和方法
NO335189B1 (no) * 2010-10-26 2014-10-20 Cupp Computing As Sikkert databehandlingssystem
US9460281B2 (en) * 2011-03-31 2016-10-04 Irdeto B.V. Method of securing non-native code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3033562B2 (ja) * 1998-09-02 2000-04-17 富士ゼロックス株式会社 再配置可能な実行プログラムの生成方法及び実行プログラム生成装置
JP2007148575A (ja) * 2005-11-24 2007-06-14 Fuji Xerox Co Ltd 保護済み実行プログラムの作成のためのプログラム、方法及び装置
JP2010231477A (ja) * 2009-03-27 2010-10-14 Fuji Xerox Co Ltd プログラム及びプログラム実行装置
KR20130020861A (ko) * 2011-08-19 2013-03-04 고려대학교 산학협력단 자가암호화를 이용한 소프트웨어 변조방지 방법

Also Published As

Publication number Publication date
JP6215468B2 (ja) 2017-10-18
KR20150055992A (ko) 2015-05-22
CN105849737A (zh) 2016-08-10
KR101556908B1 (ko) 2015-10-02
CN105849737B (zh) 2019-01-08
US9965621B2 (en) 2018-05-08
US20160300057A1 (en) 2016-10-13
JP2016538640A (ja) 2016-12-08

Similar Documents

Publication Publication Date Title
JP6227772B2 (ja) 動的ライブラリを保護する方法及び装置
WO2015026091A1 (ko) 공통 중간 언어 기반 프로그램을 위한 보안 제공 방법
CN104680039B (zh) 一种应用程序安装包的数据保护方法及装置
WO2015023093A1 (ko) 해시를 이용한 동적코드의 무결성 검증 방법
CN107273723B (zh) 一种基于so文件加壳的Android平台应用软件保护方法
US20150095653A1 (en) Method and apparatus of creating application package, method and apparatus of executing application package, and recording medium storing application package
CN107077540B (zh) 用于提供基于云的应用安全服务的方法和系统
CN104866739A (zh) 安卓系统中应用程序加密方法及系统
US9256756B2 (en) Method of encryption and decryption for shared library in open operating system
US20110271350A1 (en) method for protecting software
CN112231702A (zh) 应用保护方法、装置、设备及介质
CN108133147B (zh) 可执行代码的保护方法、设备及可读存储介质
CN110633073B (zh) 基于Il2cpp编译的Unity代码混淆的方法
CN109325322B (zh) 用于嵌入式平台的软件知识产权保护系统和方法
CN112035803B (zh) 一种基于Windows平台软件的保护方法及装置
CN110135131B (zh) 一种应用程序的加密方法、存储介质及终端设备
WO2015072688A1 (ko) 프로그램 보호 장치
CN109614773B (zh) 代码自修改方法、装置及电子设备
US20170147798A1 (en) Mobile Device And Method Of Operating Mobile Device
CN115632776B (zh) 密钥烧录方法、装置、电子设备及可读存储介质
CN113591040B (zh) 加密方法及其装置、解密方法及其装置、电子设备和介质
KR20190060181A (ko) 공유 오브젝트의 코드 보호를 위한 보안 제공 장치와 방법, 및 보안 실행 장치와 방법
CN111240699A (zh) 软件产品处理方法和装置、源码解释器
CN116204855A (zh) 防破解的应用程序运行方法、装置、计算机设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14861251

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016530133

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15036543

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14861251

Country of ref document: EP

Kind code of ref document: A1