JP6215468B2 - Program protector - Google Patents
Program protector Download PDFInfo
- Publication number
- JP6215468B2 JP6215468B2 JP2016530133A JP2016530133A JP6215468B2 JP 6215468 B2 JP6215468 B2 JP 6215468B2 JP 2016530133 A JP2016530133 A JP 2016530133A JP 2016530133 A JP2016530133 A JP 2016530133A JP 6215468 B2 JP6215468 B2 JP 6215468B2
- Authority
- JP
- Japan
- Prior art keywords
- encrypted
- program
- protection
- code
- unit
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 230000001012 protector Effects 0.000 title description 2
- 238000000034 method Methods 0.000 claims description 31
- 238000012795 verification Methods 0.000 claims description 13
- 239000000284 extract Substances 0.000 claims description 3
- 230000008878 coupling Effects 0.000 claims 1
- 238000010168 coupling process Methods 0.000 claims 1
- 238000005859 coupling reaction Methods 0.000 claims 1
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 230000003068 static effect Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/52—Monitoring 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/14—Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/03—Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
- G06F2221/034—Test or assess a computer or a system
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Storage Device Security (AREA)
Description
本発明は、プログラム保護装置に関するものである。 The present invention relates to a program protection device.
以下に記述される内容は、単に本実施例に係る背景情報のみを提供するだけで、従来技術を構成するものではないことを明らかにして置く。 It is clarified that the contents described below merely provide background information according to the present embodiment, and do not constitute the prior art.
プログラムの重要なロジック(Logic)やアルゴリズムは、バイナリコードで書かれていても、静的(Static)分析ツールまたは動的(Dynamic)分析ツールを利用して容易に分析することができる。しかし、従来のアンチデバッグ(Anti-Debugging)やアンチダンプ(Anti-Dump)機能は、デバッガ(Debugger)のような動的分析ツールからプログラムを保護することができるが、静的分析ツールによる分析を防止するのは難しい。また、静的分析ツールによるプログラムの分析を事前に予防して根本的に防止することは難しく、静的分析ツールによってプログラムが分析され、プログラムの重要なロジックやアルゴリズムが流出された後には、プログラムが変形されたか否かを後で確認して、事後的に対処するしかないため、プログラムの重要なロジックまたはアルゴリズムを保護するには不十分である。 Even if the important logic (Logic) and algorithm of the program are written in binary code, they can be easily analyzed by using a static analysis tool or a dynamic analysis tool. However, the conventional Anti-Debugging and Anti-Dump functions can protect programs from dynamic analysis tools such as Debugger. It is difficult to prevent. In addition, it is difficult to prevent and fundamentally prevent the analysis of a program using a static analysis tool in advance, and after the program is analyzed by the static analysis tool and the important logic and algorithms of the program are leaked, It is not sufficient to protect the critical logic or algorithms of the program, since it can only be checked later and dealt with later.
したがって、静的分析ツールによってプログラムの重要なロジックまたはアルゴリズムが分析されることを防止するとともに、動的分析ツールによる分析も防止することができる方案が必要である。 Therefore, there is a need for a method that can prevent analysis of important logic or algorithms of a program by a static analysis tool and also prevent analysis by a dynamic analysis tool.
本発明は、プログラムが動的または静的ツールによって分析されることを防止するためのプログラム保護装置を提供することを主な目的としている。 The main object of the present invention is to provide a program protection device for preventing a program from being analyzed by a dynamic or static tool.
本実施例の一側面によれば、プログラム保護装置において、暗号化された保護領域、前記暗号化された保護領域の開始地点を表示する開始地点表示部と、前記暗号化された保護領域の終了地点を表示する終了地点表示部とを含む保護領域部と、前記暗号化された保護領域を復号化して実行コード部を生成する復号化部と前記実行コード部を呼び出す保護領域呼び出し部を含む保護領域連結部とを含むことを特徴とするプログラム保護装置を提供する。 According to an aspect of the present embodiment, in the program protection device, an encrypted protection area, a start point display unit that displays a start point of the encrypted protection area, and an end of the encrypted protection area A protection area unit including an end point display unit for displaying a point, a decryption unit for decrypting the encrypted protection region to generate an execution code unit, and a protection region calling unit for calling the execution code unit A program protection device including an area connection unit is provided.
本実施例の他の側面によれば、プログラム保護方法において、プログラムバイナリコードのうち暗号化された保護領域を復号化して実行コードを生成する過程と、前記実行コードを実行する過程と、前記実行コードの無欠性を検証する過程と、前記実行コードの実行が終了すると、前記実行コードを除去し、前記暗号化された保護領域に復元する過程とを含むことを特徴とするプログラム保護方法を提供する。 According to another aspect of the present embodiment, in the program protection method, a process of generating an execution code by decrypting an encrypted protected area of the program binary code, a process of executing the execution code, and the execution Provided is a program protection method comprising a step of verifying the integrity of the code and a step of removing the execution code and restoring it to the encrypted protected area when the execution of the execution code is completed To do.
以上で説明したように、本実施例によれば、プログラムの重要なロジックまたはアルゴリズムを静的(Static)分析ツールまたは動的(Dynamic)分析ツールから保護することができる。つまり、プログラムソースコードをコンパイルしてバイナリコードを生成した後、プログラムの重要なロジックやアルゴリズムを含んでいる少なくとも一つの関数内のバイナリコードを暗号化して、プログラムが実行され、メインメモリにロードされた後でも、暗号化された保護領域が呼び出されるまで、暗号化状態を維持して、暗号化された保護領域を復号化して実行コードを生成して実行し、実行が終了すると、再び暗号化状態に復帰することができるので、静的または動的分析ツールがプログラムを分析しようとしても、暗号化されたバイナリコードのロジックやアルゴリズムを分析することはできない。 As described above, according to the present embodiment, important logic or algorithm of a program can be protected from a static analysis tool or a dynamic analysis tool. In other words, after compiling the program source code to generate binary code, the binary code in at least one function containing the important logic and algorithm of the program is encrypted, the program is executed and loaded into the main memory After that, the encrypted state is maintained until the encrypted protected area is called, the encrypted protected area is decrypted, the execution code is generated and executed, and when execution is completed, the encryption is performed again. Since it can return to the state, even if a static or dynamic analysis tool tries to analyze the program, it cannot analyze the logic or algorithm of the encrypted binary code.
プログラムのバイナリコードのうち、暗号化された保護領域は、暗号化された保護領域が呼び出されたとき、はじめて復号化され、実行コードが生成され、この実行コードの実行が終了するとすぐに、暗号化された状態に戻ることができ、実行コードが実行中であるときを除いては、暗号化された状態を維持することができる。このように、プログラムを暗号化状態に維持すれば、メモリをダンプ(Memory Dump)して、プログラムの実行中にメモリ状態を知ることができても、実行コードが暗号化されているため、プログラムの重要なロジックやアルゴリズムなどを保護することができる。 Of the binary code of the program, the encrypted protected area is decrypted for the first time when the encrypted protected area is called, and an executable code is generated. The encrypted state can be returned, and the encrypted state can be maintained except when the execution code is being executed. In this way, if you keep the program in an encrypted state, even if you can dump the memory (Memory Dump) and know the memory state during the execution of the program, the execution code is encrypted, so the program Can protect important logic and algorithms.
本発明によれば、プログラムの重要なロジックやアルゴリズムと、保護が必要な保護領域を表示するための開始時点と終了地点を含んでおり、プログラムが実行されなくても、プログラムのバイナリコードで暗号化する開始地点と終了地点を見つけて、その部分を暗号化して代替することができるので、プログラムのセキュリティが適用された状態でプログラムを配布することができ、静的分析ツールからプログラムを保護することができる。 According to the present invention, the important logic and algorithm of the program and the start and end points for displaying the protected area that needs to be protected are included, and even if the program is not executed, it is encrypted with the binary code of the program. The program can be distributed with the program security applied, and the program can be distributed with the program security applied, and the program can be protected from static analysis tools. be able to.
一方、暗号化された領域が頻繁に呼び出され、復号化と暗号化を繰り返すことによりプログラムの実行性能が低下される恐れがある場合に、暗号化された領域を復号化する前に、別の保護領域保管部に保存すれば、反復的な暗号化過程を減らすことができ、暗号化された保護領域の呼び出し頻度に応じて、一定の回数までは復号化された状態を維持させることができる。さらに、複数の暗号化された保護領域を含んでいる場合に、各暗号化された保護領域の呼び出し頻度に応じて一部の暗号化された保護領域を別の保護領域保管部に保存するか、あるいは実行コードを再び暗号化するかを選択することができる。 On the other hand, if the encrypted area is called frequently and there is a possibility that the execution performance of the program may be reduced by repeating decryption and encryption, before decrypting the encrypted area, If it is stored in the protection area storage unit, iterative encryption process can be reduced and the decrypted state can be maintained up to a certain number of times depending on the frequency of calling the encrypted protection area. . In addition, when multiple encrypted protected areas are included, whether or not some encrypted protected areas are stored in another protected area storage unit according to the frequency of calling each encrypted protected area Alternatively, the user can choose to encrypt the execution code again.
以下、本実施例を添付された図面を参照して詳細に説明する。 Hereinafter, the present embodiment will be described in detail with reference to the accompanying drawings.
本発明の実施例は、C/C++プログラミング言語を含むネイティブコード(Native Code)を生成することができるすべての言語で書かれたプログラムに適用されることができ、特定のオペレーティングシステムやハードウェアに限定されない。 Embodiments of the present invention can be applied to programs written in any language that can generate native code, including C / C ++ programming languages, and can be applied to specific operating systems and hardware. It is not limited.
図1は、プログラムを実行するコンピュータの例示図である。 FIG. 1 is an exemplary diagram of a computer that executes a program.
プログラムを実行するためのコンピュータ100は、プログラムを補助記憶装置130に保存しておき、プログラムが実行されると、メインメモリ120にロードして、中央処理装置(Central Process Unit; CPU)110で実行して、プログラムの実行結果をディスプレイ140に表示する。コンピュータ100は、コンピュータ100で実行されるプログラムが重要なロジックまたはアルゴリズムを含む暗号化された保護領域を含んでいる場合、プログラム保護装置として使用することができる。
The
本発明の実施例に係るプログラム保護装置は、パーソナルコンピュータ(PC:Personal Computer)、ノートブックコンピュータ、タブレット、個人携帯端末(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)などのコンピュータで読み取り可能な記録/保存媒体である。少なくとも一実施例によれば、マイクロプロセッサは、明細書に記載された動作と機能を1つ以上選択的に実行するようにプログラムすることができる。少なくとも一実施例によれば、マイクロプロセッサは、全体または部分的に特定の構成の特定用途向け半導体(application specific integrated circuit:ASIC)などのハードウェアで具現される。 A program protection apparatus according to an embodiment of the present invention includes a personal computer (PC), a notebook computer, a tablet, a personal digital assistant (PDA), a game console, and a portable multimedia player (PMP: Portable). It is a user terminal such as a multimedia player (PSP), a PlayStation Portable (PSP), a wireless communication terminal, a smartphone (Smart Phone), a TV, or a media player. A program protection apparatus according to an embodiment of the present invention is a server terminal such as an application server and a service server. The program protection device according to the embodiment of the present invention includes (i) a communication device such as a communication modem for communicating with various devices and a wired / wireless communication network, and (ii) data for executing the program. Various devices including a memory for storing, (iii) a microprocessor for executing and controlling a program, and the like can be meant. According to at least one embodiment, the memory is a computer such as a random access memory (RAM), a read only memory (ROM), a flash memory, an optical disk, a magnetic disk, a solid state disk (SSD), or the like. It is a readable recording / storage medium. According to at least one embodiment, the microprocessor can be programmed to selectively perform one or more of the operations and functions described in the specification. According to at least one embodiment, the microprocessor may be implemented in whole or in part with hardware such as an application specific integrated circuit (ASIC) with a specific configuration.
図2a、図2bおよび図2cは、本実施例に係る保護領域連結部と保護領域部の構成図である。 FIG. 2a, FIG. 2b and FIG. 2c are configuration diagrams of a protection region connecting portion and a protection region portion according to this embodiment.
図2aにおいて、保護領域連結部210は、復号化部212、保護領域呼び出し部214、コピー部/暗号化部216を含み、図2bにおいて、保護領域部220は、開始地点表示部222、保護領域224、終了地点表示部226を含んでいる。図2bの保護領域部220は、プログラムをコンパイルして、保護領域に対するセキュリティの適用のための暗号化を実行する前の状態である。図2cにおいて、保護領域部220は、図2bの保護領域224を暗号化して、暗号化された保護領域228に転換した状態を示している。
In FIG. 2a, the protected area linking unit 210 includes a
保護領域連結部210と保護領域部220をC/C++プログラミング言語で作成する場合、マクロ関数(Macro Function)を利用すれば、容易にライブラリ化することができ、開発コストを削減することができる。プログラムのバイナリコードで一定の領域を表示するための開始地点と終了地点を表示するラベル(Label)とマーキングコード(Marking Code)を挿入して、プログラムの実行中に、暗号化されたバイナリコードの一部を復号化して実行コードを生成し、この実行コードを実行するように呼び出す過程は複雑で専門的な技術を要求するが、定型化することができるので、これをマクロ関数で作成することができる。 When the protection area connecting part 210 and the protection area part 220 are created in the C / C ++ programming language, if a macro function is used, it can be easily made into a library and the development cost can be reduced. Insert a label (Label) and a marking code (Marking Code) to display the starting and ending points for displaying a certain area in the program binary code. The process of decrypting a part to generate an executable code and calling it to execute this executable code requires complicated and specialized techniques, but can be standardized, so create this with a macro function Can do.
復号化部212は、保護領域部220の暗号化された保護領域228を復号化して、元の実行コードである保護領域224と同じ実行コード部を生成し、暗号化された保護領域228を代替する。このとき復号化部212は、暗号化された保護領域228を、別の場所に保存することができる。保護領域呼び出し部214は、復号化部212で保護領域部220の暗号化された保護領域228を復号化して生成した実行コード部を呼び出すことにより、実行コード部が実行されるようにする。
The
実行コードの実行が終了すると、保護領域224を再び暗号化された状態に戻しておく必要がある。復号化部212で暗号化された保護領域228を復号化する前に暗号化された保護領域228を別の場所に保管しておいた場合は、コピー部/暗号化部216は、再び、別の場所に保管されている暗号化された保護領域を再びコピーして、プログラムが暗号化状態を維持するようにすることができる。暗号化された保護領域228を、別の場所に保管していない場合は、実行コード部を再びコピー部/暗号化部216で暗号化することができる。
When execution of the execution code is completed, it is necessary to return the protected
しかし、実行コードを再び暗号化する場合は、暗号化された保護領域228が繰り返して呼び出される場合、復号化と暗号化過程が繰り返して実行されるため、プログラムの実行性能を落とす原因になり得る。暗号化された保護領域228が繰り返して呼び出される場合には、暗号化された保護領域228を、別の場所に保管することが望ましい。この場合、別の暗号化過程がなくても、保護領域を暗号化状態に維持させることができる。さらに、繰り返して呼び出されても既に設定された一定の回数内では、実行コード状態を維持できるようにして、性能への影響を最小限に抑えることができる。
However, when re-encrypting the execution code, if the encrypted protected
保護領域部220で、開始地点表示部222と終了地点表示部226は、保護領域の開始地点と終了地点を表示する。開始地点表示部222と終了地点表示部226は、ラベル(Label)とマーキングコード(Marking Code)を含むことができる。ラベルは、プログラムが実行中に復号化部212で復号化する領域の開始地点と終了地点のアドレスを取得するのに使用される。マーキングコードは、プログラムの実行には支障がないアセンブリコードで構成されることがあり、プログラムのソースコードをコンパイルした後、暗号化ツールを使用して保護領域224を暗号化するために、保護領域224の開始地点と終了地点を見つけることができるようにする。
In the protection area unit 220, the start
一方、暗号化ツールで保護領域を暗号化することは、特定の形態のプラットフォームに限らないため、開発用の装備で実行することができ、サーバーでも実行することができる。サーバーで暗号化を実行しようとする場合は、開発用の装備は、暗号化が必要な保護領域をサーバーに送信して暗号化を要請し、暗号化された結果を受信する。 On the other hand, encrypting a protected area with an encryption tool is not limited to a specific form of platform, and can therefore be executed with development equipment and can also be executed with a server. When encryption is to be performed on the server, the development equipment sends a protected area that requires encryption to the server, requests encryption, and receives the encrypted result.
図3a及び図3bは、本実施例に係る暗号化保護領域を含むプログラムがメモリにロードされた状態の構成図である。 3a and 3b are configuration diagrams showing a state in which a program including the encryption protection area according to the present embodiment is loaded in the memory.
図3aは、暗号化保護領域と、暗号化保護領域を連結するための保護領域連結部210を含むプログラムがメインメモリ120で実行中である状態の構成図である。保護領域連結部210で保護領域部220を呼び出して、暗号化保護領域228を復号化して、実行コード部を生成するまでは、図3aの状態が維持される。
FIG. 3a is a configuration diagram of a state in which a program including an encryption protection area and a protection area connection unit 210 for connecting the encryption protection areas is being executed in the
図3bは、図3aの構成に加えて、保護領域保管部310をさらに含んでいる。
FIG. 3b further includes a protected
保護領域保管部310は、プログラムが実行されてすぐ生成することができ、例えば、復号化部212で暗号化保護領域228を復号化する前に生成することができる。そして、暗号化された保護領域228が復号化される前に暗号化された保護領域228を保護領域保管部310に保存することができる。保護領域保管部310に暗号化された保護領域228を保管しておくと、再暗号化処理せずにプログラムを暗号化状態に戻すことができ、保護領域部220が頻繁に繰り返して呼び出される場合にも、暗号化と復号化によるシステム性能への影響を減らすことができる。
The protected
図4は、本実施例に係る保護領域が呼び出された後、保護領域の無欠性を検証する状態の構成図である。 FIG. 4 is a configuration diagram of a state in which the integrity of the protection area is verified after the protection area according to the present embodiment is called.
プログラムは、暗号化された保護領域228を復号化して実行コード部400を生成して暗号化された保護領域228を代替し、実行コード部400を実行する。実行コード部400は、暗号化された保護領域228が暗号化される前のコードと同じ状態である。無欠性検証部410は、実行コード部400の実行を終了した直後、実行コード部400が実行されている間に実行コード部400が変形されたか否かを検証する。本実施例では無欠性の検証は、ハッシュ関数(Hash Function)を利用して説明するが、無欠性の検証方法は、必ずしもこれに限定されず、様々な方法で可能である。
The program decrypts the encrypted protected
ハッシュ関数を利用して無欠性を検証するためには、図2bの保護領域224に対するハッシュコードを予め抽出して、別のファイルやプログラムの内部に保管しておく必要がある。そして、プログラムの実行中に、暗号化された保護領域228を復号化して実行コード部400を生成し、暗号化された保護領域228を代替した後、この実行コード部400を実行した後に、実行コード部400の実行中に実行コードの変形があったのかを確認するために実行終了直後に実行コードをハッシュ関数に入力してハッシュコードを抽出し、既に保管されていたハッシュコードと比較して、一致するか否かを判別する。判別の結果、一致していない場合は、実行中の実行コードが変形されたものなので、プログラムの実行を中断する。ハッシュ関数は、入力値に応じて固有のハッシュコード(Hash Code)を抽出するので、無欠性の検証に使用することができる。無欠性の検証にはMD5、SHA、Checksumなどを含む様々なハッシュ関数を使用することができる。
In order to verify the integrity using a hash function, it is necessary to extract a hash code for the protected
図5は、本実施例に係るプログラムの保護領域が実行される過程のフローチャートである。 FIG. 5 is a flowchart of a process in which the protection area of the program according to this embodiment is executed.
アプリケーションプログラムは補助記憶装置130に保存されており、メインメモリ120にロードされて実行される(S510)。アプリケーションプログラムが実行されている間に暗号化された保護領域228を呼び出す必要がある場合は、保護領域連結部210が先に呼び出され(S520)、復号化部212は、暗号化保護領域228を保護領域保管部310に保管する(S530)。暗号化保護領域228は、保護領域保管部310に保管されている場合もあれば、保管されていない場合もある。保管されていない場合は、復号化された実行コードの実行が終了した後、再暗号化する必要がある。復号化部212は、暗号化保護領域を復号化して(S540)、保護領域224と同じ実行コード部400を生成して実行する(S550)。
The application program is stored in the
無欠性検証部410は、実行コードの実行が終了した直後に実行コードが変形されたか否かを確認するために、無欠性の検証を行い(S560)、プログラムが変形された場合は、プログラムの実行を中断する。無欠性の検証は、ハッシュ検証を介して行うことができる。保護領域部220が暗号化される前の図2bでの保護領域224をハッシュ関数(Hash Function)に入力して、ハッシュコード(Hash Code)を抽出して、抽出されたハッシュコードを別のファイルやプログラムの内部に保存しておくことができる。無欠性の検証を実行するために、暗号化保護領域を復号化して生成した実行コードをハッシュ関数に入力してハッシュコードを抽出し、事前に保存したハッシュコードと一致するか否かを判別し、一致しない場合は、プログラムが変形されたものと判断する。プログラムが変形されていないと判断された場合、保護領域保管部310に保管しておいた暗号化された保護領域をコピーして元の場所に保存する(S570)。
The integrity verifying unit 410 performs integrity verification to check whether or not the executable code has been transformed immediately after the execution of the executable code is completed (S560). Suspend execution. Integrity verification can be performed via hash verification. The protected
以上の説明は、本実施例の技術思想を例示的に説明したにすぎないものであって、本実施例の属する技術分野で通常の知識を有する者であれば、本実施例の本質的な特性から逸脱しない範囲で様々な修正および変形が可能である。したがって、本実施例は、本実施例の技術思想を限定するためのものではなく説明するためのものであり、これらの実施例により、本実施例の技術思想の範囲が限定されるものではない。本実施例の保護範囲は、特許請求の範囲によって分析されるべきであり、それと同等の範囲内にあるすべての技術思想は、本実施例の権利範囲に含まれるものと分析されるべきである。
以下に、本願出願の当初の特許請求の範囲に記載された発明を付記する。
[1] プログラム保護装置において、
暗号化された保護領域、前記暗号化された保護領域の開始地点を表示する開始地点表示部と、前記暗号化された保護領域の終了地点を表示する終了地点表示部を含む保護領域部と、
前記暗号化された保護領域を復号化して実行コード部を生成する復号化部と、前記実行コード部を呼び出す保護領域呼び出し部を含む保護領域連結部とを含むことを特徴とするプログラム保護装置。
[2] 前記開始地点表示部と前記終了地点表示部は、前記プログラムが実行される際に各地点のアドレスを取得するためのラベル(Label)と、
前記プログラムの実行には支障がなく、暗号化する保護領域の開始地点と終了地点を見つけるためのマーキングコード(Marking Code)とを含むことを特徴とする[1]に記載のプログラム保護装置。
[3] 前記暗号化された保護領域は、前記プログラムのバイナリコードが生成された後、前記開始地点表示部に含まれているマーキングコードから前記終了地点表示部に含まれているマーキングコードまでのバイナリコードを暗号化したことを特徴とする[1]に記載のプログラム保護装置。
[4] 前記復号化部は、前記開始地点表示部に含まれているラベルから前記終了地点表示部に含まれているラベルまでのバイナリコードを復号化することを特徴とする[1]に記載のプログラム保護装置。
[5] 前記復号化部が前記実行コード部を生成する前に前記暗号化された保護領域を保存するための保護領域保管部をさらに含むことを特徴とする[1]に記載のプログラム保護装置。
[6] 前記保護領域連結部は、
前記実行コード部の実行が終了すると、前記保護領域保管部に保存された暗号化された保護領域を前記実行コード部に保存するためにコピーするコピー部をさらに含むことを特徴とする[5]に記載のプログラム保護装置。
[7] 前記コピー部は、
前記実行コード部が既に設定された回数を繰り返して実行された後、前記保護領域保管部に保存された暗号化された保護領域を前記実行コード部に保存するためにコピーすることができることを特徴とする[6]に記載のプログラム保護装置。
[8] 前記保護領域連結部は、前記実行コード部の実行が終了すると、前記実行コード部を暗号化する暗号化部をさらに含むことを特徴とする[1]に記載のプログラム保護装置。
[9] 前記プログラム保護装置が複数の暗号化された保護領域を含んでいる場合、
前記暗号化された保護領域のそれぞれの呼び出し頻度に基づいて、
前記暗号化された保護領域を保護領域保管部に保存するか、
前記暗号化された保護領域を前記保護領域保管部に保存せずに、前記暗号化された保護領域に対応する実行コード部を実行した後、前記実行コード部を暗号化するかどうかを、前記暗号化された保護領域ごとに選択することができることを特徴とする[1]に記載のプログラム保護装置。
[10] 前記実行コード部の無欠性を検証するための無欠性検証部をさらに含むことを特徴とする[1]に記載のプログラム保護装置。
[11] 前記無欠性検証部は、前記実行コード部をハッシュ関数に入力して、ハッシュコードを抽出して、既に保存されたハッシュコードと一致するか否かを判別して、一致しない場合は、前記プログラムの実行を中断することを特徴とする[10]に記載のプログラム保護装置。
[12] プログラム保護方法において、
プログラムバイナリコードのうち、暗号化された保護領域を復号化して実行コードを生成する過程と、
前記実行コードを実行する過程と、
前記実行コードの無欠性を検証する過程と、
前記実行コードの実行が終了すると、前記実行コードを削除して、前記暗号化された保護領域に復元する過程とを含むことを特徴とするプログラム保護方法。
[13] 前記実行コードを生成する過程は、前記暗号化された保護領域を別の場所に保存する過程を含むことを特徴とする[12]に記載のプログラム保護方法。
[14] 前記暗号化された保護領域に復元する過程は、
前記暗号化された保護領域が別の場所に保管されている場合、別の場所に保存された暗号化された保護領域をコピーするか、あるいは前記実行コードを暗号化する過程を含むことを特徴とする[12]に記載のプログラム保護方法。
The above description is merely illustrative of the technical idea of the present embodiment. If the person has ordinary knowledge in the technical field to which the present embodiment belongs, the essential features of the present embodiment are described. Various modifications and variations can be made without departing from the characteristics. Therefore, the present embodiment is not intended to limit the technical idea of the present embodiment but to explain it, and the scope of the technical idea of the present embodiment is not limited by these embodiments. . The protection scope of the present embodiment should be analyzed by the claims, and all technical ideas within the equivalent scope should be analyzed to be included in the scope of rights of the present embodiment. .
Hereinafter, the invention described in the scope of claims of the present application will be appended.
[1] In the program protection device,
A protected area including an encrypted protection area, a start point display for displaying a start point of the encrypted protection area, and an end point display for displaying an end point of the encrypted protection area;
A program protection apparatus comprising: a decryption unit that decrypts the encrypted protection region to generate an execution code portion; and a protection region concatenation unit that includes a protection region call unit that calls the execution code portion.
[2] The start point display unit and the end point display unit include a label (Label) for acquiring an address of each point when the program is executed,
The program protection apparatus according to [1], including a marking code for finding a start point and an end point of a protection area to be encrypted without any trouble in the execution of the program.
[3] After the binary code of the program is generated, the encrypted protected area is from the marking code included in the start point display unit to the marking code included in the end point display unit. The program protection device according to [1], wherein the binary code is encrypted.
[4] The decoding unit according to [1], wherein the decoding unit decodes a binary code from a label included in the start point display unit to a label included in the end point display unit. Program protector.
[5] The program protection device according to [1], further including a protection area storage section for storing the encrypted protection area before the decryption section generates the execution code section. .
[6] The protection area connecting portion includes:
When the execution of the execution code unit is finished, the copy unit further includes a copy unit that copies the encrypted protection area stored in the protection area storage unit in order to save the execution code part in the execution code unit [5] The program protection device according to 1.
[7] The copy unit includes:
After the execution code part is repeatedly executed a predetermined number of times, the encrypted protection area stored in the protection area storage part can be copied to be stored in the execution code part. The program protection device according to [6].
[8] The program protection device according to [1], wherein the protection area linking unit further includes an encryption unit that encrypts the execution code part when the execution code part has been executed.
[9] When the program protection device includes a plurality of encrypted protection areas,
Based on the call frequency of each of the encrypted protected areas,
Storing the encrypted protected area in a protected area storage unit;
Whether or not to encrypt the execution code part after executing the execution code part corresponding to the encrypted protection area without storing the encrypted protection area in the protection area storage unit, The program protection device according to [1], wherein the program protection device can be selected for each encrypted protection area.
[10] The program protection device according to [1], further including an integrity verification unit for verifying integrity of the execution code unit.
[11] The integrity verification unit inputs the execution code unit into a hash function, extracts a hash code, determines whether or not the hash code matches a stored hash code, and if not, The program protection device according to [10], wherein execution of the program is interrupted.
[12] In the program protection method,
Of the program binary code, the process of decrypting the encrypted protected area and generating the execution code,
Executing the executable code;
Verifying the integrity of the executable code;
A program protection method comprising: deleting the execution code and restoring the encrypted protection area when execution of the execution code is completed.
[13] The program protection method according to [12], wherein the process of generating the execution code includes a process of storing the encrypted protected area in another place.
[14] The process of restoring to the encrypted protected area includes:
When the encrypted protected area is stored in another location, the process includes copying the encrypted protected area stored in another location or encrypting the execution code. The program protection method according to [12].
Claims (12)
暗号化された保護領域、前記暗号化された保護領域の開始地点を表示する開始地点表示部と、前記暗号化された保護領域の終了地点を表示する終了地点表示部を含む保護領域部と、
前記暗号化された保護領域を復号化して実行コード部を生成する復号化部と、前記実行コード部を呼び出す保護領域呼び出し部を含む保護領域連結部とを含み、
前記復号化部が前記実行コード部を生成する前に前記暗号化された保護領域を保存するための保護領域保管部をさらに含むことを特徴とするプログラム保護装置。 In the program protection device,
A protected area including an encrypted protection area, a start point display for displaying a start point of the encrypted protection area, and an end point display for displaying an end point of the encrypted protection area;
It is seen including a decoding unit which generates the encrypted execution code section decodes the protected area, a protected area connecting portion including a protected area calling unit for calling the execution code section,
The program protection apparatus according to claim 1, further comprising a protected area storage unit for storing the encrypted protected area before the decryption unit generates the execution code part .
前記プログラムの実行には支障がなく、暗号化する保護領域の開始地点と終了地点を見つけるためのマーキングコード(Marking Code)とを含むことを特徴とする請求項1に記載のプログラム保護装置。 The start point display unit and the end point display unit, when the program is executed, a label (Label) for acquiring the address of each point,
2. The program protection apparatus according to claim 1, further comprising a marking code (Marking Code) for finding a start point and an end point of a protection area to be encrypted without any problem in execution of the program.
前記実行コード部の実行が終了すると、前記保護領域保管部に保存された暗号化された保護領域を前記実行コード部に保存するためにコピーするコピー部をさらに含むことを特徴とする請求項1に記載のプログラム保護装置。 The protection area connecting portion is
When the execution of the execution code section is completed, according to claim 1, further comprising a copying unit that copies a protected area that is encrypted is stored in the protected area storage unit for storing the execution code section The program protection device according to 1.
前記実行コード部が既に設定された回数を繰り返して実行された後、前記保護領域保管部に保存された暗号化された保護領域を前記実行コード部に保存するためにコピーすることができることを特徴とする請求項5に記載のプログラム保護装置。 The copy unit
After the execution code part is repeatedly executed a predetermined number of times, the encrypted protection area stored in the protection area storage part can be copied to be stored in the execution code part. The program protection device according to claim 5 .
前記暗号化された保護領域のそれぞれの呼び出し頻度に基づいて、
前記暗号化された保護領域を前記保護領域保管部に保存するか、
前記暗号化された保護領域を前記保護領域保管部に保存せずに、前記暗号化された保護領域に対応する実行コード部を実行した後、前記実行コード部を暗号化するかどうかを、前記暗号化された保護領域ごとに選択することができることを特徴とする請求項1に記載のプログラム保護装置。 When the program protection device includes a plurality of encrypted protection areas,
Based on the call frequency of each of the encrypted protected areas,
To save the encrypted protected regions in the protected area storage unit,
Whether or not to encrypt the execution code part after executing the execution code part corresponding to the encrypted protection area without storing the encrypted protection area in the protection area storage unit, 2. The program protection apparatus according to claim 1, wherein a selection can be made for each encrypted protection area.
プログラムバイナリコードのうち、暗号化された保護領域を復号化して実行コードを生成する過程と、
前記実行コードを実行する過程と、
前記実行コードの無欠性を検証する過程と、
前記実行コードの実行が終了すると、前記実行コードを削除して、前記暗号化された保護領域に復元する過程とを含み、
前記実行コードを生成する過程は、前記暗号化された保護領域を別の場所に保存する過程を含むことを特徴とするプログラム保護方法。 In the program protection method,
Of the program binary code, the process of decrypting the encrypted protected area and generating the execution code,
Executing the executable code;
Verifying the integrity of the executable code;
When the execution of the execution code is completed, remove the execution code, see contains a process to restore the encrypted protected areas,
A method of protecting a program , wherein the step of generating the execution code includes a step of storing the encrypted protected area in another location .
前記暗号化された保護領域が別の場所に保管されている場合、別の場所に保存された暗号化された保護領域をコピーするか、あるいは前記実行コードを暗号化する過程を含むことを特徴とする請求項11に記載のプログラム保護方法。 The process of restoring to the encrypted protected area includes:
When the encrypted protected area is stored in another location, the process includes copying the encrypted protected area stored in another location or encrypting the execution code. The program protection method according to claim 11 .
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR10-2013-0138634 | 2013-11-14 | ||
KR1020130138634A KR101556908B1 (en) | 2013-11-14 | 2013-11-14 | Apparatus For Protecting Binary Code |
PCT/KR2014/010445 WO2015072688A1 (en) | 2013-11-14 | 2014-11-03 | Program protection device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016538640A JP2016538640A (en) | 2016-12-08 |
JP6215468B2 true JP6215468B2 (en) | 2017-10-18 |
Family
ID=53057585
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016530133A Active JP6215468B2 (en) | 2013-11-14 | 2014-11-03 | Program protector |
Country Status (5)
Country | Link |
---|---|
US (1) | US9965621B2 (en) |
JP (1) | JP6215468B2 (en) |
KR (1) | KR101556908B1 (en) |
CN (1) | CN105849737B (en) |
WO (1) | WO2015072688A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108319822B (en) * | 2018-01-05 | 2020-05-12 | 武汉斗鱼网络科技有限公司 | Method, storage medium, electronic device and system for protecting webpage code |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3033562B2 (en) | 1998-09-02 | 2000-04-17 | 富士ゼロックス株式会社 | Method for generating relocatable execution program and execution program generation device |
WO2003090021A2 (en) * | 2002-04-15 | 2003-10-30 | Core Sdi, Incorporated | Security framework for protecting rights in computer software |
JP4226556B2 (en) * | 2002-12-12 | 2009-02-18 | 富士通株式会社 | Program execution control device, OS, client terminal, server, program execution control system, program execution control method, program execution control program |
JP4147472B2 (en) * | 2003-02-28 | 2008-09-10 | 日本電気株式会社 | Computer program editing system and method |
JP4517636B2 (en) * | 2003-12-05 | 2010-08-04 | 富士ゼロックス株式会社 | Execution program creation method, function program, and function program execution method |
JP2006072584A (en) * | 2004-08-31 | 2006-03-16 | Fuji Xerox Co Ltd | Device for creating execution program, method for creating execution program, program processing apparatus, program processing method, and program |
KR100641297B1 (en) * | 2005-08-18 | 2006-11-02 | 삼성전자주식회사 | Semiconductor device using rom scrambling method, and operating method of the device |
US8745406B2 (en) * | 2005-10-17 | 2014-06-03 | Nytell Software LLC | Program executable image encryption |
JP4770425B2 (en) * | 2005-11-24 | 2011-09-14 | 富士ゼロックス株式会社 | Program, method and apparatus for creating protected execution program |
JP5387089B2 (en) | 2009-03-27 | 2014-01-15 | 富士ゼロックス株式会社 | Program and program execution device |
WO2011057393A1 (en) * | 2009-11-13 | 2011-05-19 | Irdeto Canada Corporation | System and method to protect java bytecode code against static and dynamic attacks within hostile execution environments |
NO335189B1 (en) * | 2010-10-26 | 2014-10-20 | Cupp Computing As | Secure data processing system |
WO2012129639A2 (en) * | 2011-03-31 | 2012-10-04 | Irdeto Canada Corporation | Method of securing non-native code |
KR101269089B1 (en) | 2011-08-19 | 2013-05-29 | 고려대학교 산학협력단 | Software modulation prevention method using own encryption |
-
2013
- 2013-11-14 KR KR1020130138634A patent/KR101556908B1/en active IP Right Grant
-
2014
- 2014-11-03 CN CN201480071239.6A patent/CN105849737B/en active Active
- 2014-11-03 JP JP2016530133A patent/JP6215468B2/en active Active
- 2014-11-03 US US15/036,543 patent/US9965621B2/en active Active
- 2014-11-03 WO PCT/KR2014/010445 patent/WO2015072688A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
CN105849737A (en) | 2016-08-10 |
KR101556908B1 (en) | 2015-10-02 |
KR20150055992A (en) | 2015-05-22 |
US9965621B2 (en) | 2018-05-08 |
WO2015072688A1 (en) | 2015-05-21 |
US20160300057A1 (en) | 2016-10-13 |
CN105849737B (en) | 2019-01-08 |
JP2016538640A (en) | 2016-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6227772B2 (en) | Method and apparatus for protecting a dynamic library | |
KR101518420B1 (en) | Apparatus and method for managing apk file in a android platform | |
US20160203087A1 (en) | Method for providing security for common intermediate language-based program | |
KR102433011B1 (en) | Method of apk file protection, apk file protection system performing the same, and storage medium storing the same | |
CN106599629B (en) | Android application program reinforcing method and device | |
WO2016078130A1 (en) | Dynamic loading method for preventing reverse of apk file | |
US20160162686A1 (en) | Method for verifying integrity of dynamic code using hash background of the invention | |
US9256756B2 (en) | Method of encryption and decryption for shared library in open operating system | |
US10296728B2 (en) | Method and system for providing cloud-based application security service | |
US20110271350A1 (en) | method for protecting software | |
CN107273723B (en) | So file shell adding-based Android platform application software protection method | |
CN104217175A (en) | Data read-write method and device | |
CN108133147B (en) | Method and device for protecting executable code and readable storage medium | |
KR102001046B1 (en) | Apparatus and Method of Providing Security, and Apparatus and Method of Executing Security for Common Intermediate Language | |
CN112035803B (en) | Protection method and device based on Windows platform software | |
KR101749209B1 (en) | Method and apparatus for hiding information of application, and method and apparatus for executing application | |
KR101667774B1 (en) | Apparatus and Method of Providing Security for Script Program | |
JP6215468B2 (en) | Program protector | |
JP2010244261A (en) | Information processing apparatus and method | |
CN107688729B (en) | Application program protection system and method based on trusted host | |
CN110659509B (en) | Memory snapshot file generation method and device, electronic equipment and medium | |
CN114297715B (en) | File encryption method, file processing method, file encryption device, file processing device and electronic equipment | |
CN115828190A (en) | PE file data protection method, device, equipment and medium | |
JP2013137646A (en) | Program protection device, program protection method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170518 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170530 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170802 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170822 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170920 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6215468 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |