[go: up one dir, main page]

JP2024175588A - Computer program, program protection device, and program protection method - Google Patents

Computer program, program protection device, and program protection method Download PDF

Info

Publication number
JP2024175588A
JP2024175588A JP2023093487A JP2023093487A JP2024175588A JP 2024175588 A JP2024175588 A JP 2024175588A JP 2023093487 A JP2023093487 A JP 2023093487A JP 2023093487 A JP2023093487 A JP 2023093487A JP 2024175588 A JP2024175588 A JP 2024175588A
Authority
JP
Japan
Prior art keywords
monitoring process
program
protected
computer
monitoring
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.)
Pending
Application number
JP2023093487A
Other languages
Japanese (ja)
Inventor
聖木 内海
Masaki Uchiumi
隆 馬場
Takashi Baba
友孝 伊吹
Tomotaka Ibuki
薫 菱川
Kaoru Hishikawa
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dnp Hypertech Co Ltd
Original Assignee
Dnp Hypertech Co Ltd
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 Dnp Hypertech Co Ltd filed Critical Dnp Hypertech Co Ltd
Priority to JP2023093487A priority Critical patent/JP2024175588A/en
Publication of JP2024175588A publication Critical patent/JP2024175588A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

To provide a computer program, a program protection device, and a program protection method that can prevent a debugger attachment by an illegal program.SOLUTION: A computer program causes a computer to execute processing of: starting a first monitoring process by a protected program; starting a second monitoring process by the protected program or the first monitoring process; and monitoring an operation of the first monitoring process by the second monitoring process.SELECTED DRAWING: Figure 2

Description

本発明は、コンピュータプログラム、プログラム保護装置及びプログラム保護方法に関する。 The present invention relates to a computer program, a program protection device, and a program protection method.

悪意を持った攻撃者が不正プログラムをコンピュータに侵入させ、アタッチという行為を行うことで保護対象のプログラムの下で実行中のプロセスのメモリ情報の内容を変更し、あるいはメモリ情報をダンプすることが可能である。このような不正プログラムによって、例えば、メモリ上からデータを抜き取られて海賊版が作成され、あるいは有用な情報が漏洩してしまう。 A malicious attacker can inject a malicious program into a computer and, by performing an action called attachment, change the contents of the memory information of a process running under a protected program, or dump memory information. Such a malicious program can, for example, extract data from memory to create pirated copies or leak useful information.

特許文献1には、ルーチンが攻撃者からのデバッガアタッチを検出した場合、保護対象のプログラムの実行を停止することにより、プログラムに対する許可されていないアクセスを阻止する方法が開示されている。 Patent document 1 discloses a method for preventing unauthorized access to a program by halting execution of the protected program when a routine detects a debugger attachment from an attacker.

特開平11-175336号公報Japanese Patent Application Publication No. 11-175336

しかし、攻撃者は、プロセスの停止や終了を行う権限を有するため、デバッガアタッチを検出するプロセスの停止や終了を行うことで、不正プログラムがデバッガアタッチを実行して保護対象のプログラムの下で実行中のプロセスのメモリ情報の内容を変更し、あるいはメモリ情報をダンプすることが可能になる。 However, because an attacker has the authority to stop or terminate processes, stopping or terminating a process that detects a debugger attachment can allow a malicious program to perform a debugger attachment and change the contents of the memory information of a process running under the protected program, or dump the memory information.

本発明は、斯かる事情に鑑みてなされたものであり、不正プログラムによるデバッガアタッチを防止することができるコンピュータプログラム、プログラム保護装置及びプログラム保護方法を提供することを目的とする。 The present invention has been made in consideration of the above circumstances, and aims to provide a computer program, a program protection device, and a program protection method that can prevent a malicious program from attaching a debugger.

本願は上記課題を解決する手段を複数含んでいるが、その一例を挙げるならば、コンピュータプログラムは、保護対象プログラムに第1監視プロセスを起動させ、前記保護対象プログラム又は前記第1監視プロセスに第2監視プロセスを起動させ、前記第2監視プロセスに、前記第1監視プロセスの動作を監視させる、処理をコンピュータに実行させる。 The present application includes multiple means for solving the above problems, and as one example, a computer program causes a computer to execute the following processing: a first monitoring process is started in a protected program, a second monitoring process is started in the protected program or the first monitoring process, and the second monitoring process monitors the operation of the first monitoring process.

本発明によれば、不正プログラムによるデバッガアタッチを防止することができる。 This invention makes it possible to prevent debugger attachment by malicious programs.

本実施形態のプログラム保護装置の構成の一例を示す図である。1 is a diagram illustrating an example of a configuration of a program protection device according to an embodiment of the present invention. プログラム保護装置のソフトウェア構成の一例を示す図である。FIG. 2 is a diagram illustrating an example of a software configuration of the program protection device. 第1監視プロセスによるアタッチの一例を示す図である。FIG. 13 illustrates an example of an attachment by a first monitoring process. 第2監視プロセスの動作の第1例を示す図である。FIG. 11 illustrates a first example of the operation of a second monitoring process. 攻撃者による攻撃パターンの第1例を示す図である。FIG. 11 is a diagram showing a first example of an attack pattern by an attacker. 攻撃者による攻撃パターンの第2例を示す図である。FIG. 13 is a diagram showing a second example of an attack pattern by an attacker. 第2監視プロセスの動作の第2例を示す図である。FIG. 11 illustrates a second example of the operation of the second monitoring process. 攻撃者による攻撃パターンの第3例を示す図である。FIG. 13 is a diagram showing a third example of an attack pattern by an attacker. プログラム保護装置による処理手順の一例を示す図である。FIG. 11 is a diagram illustrating an example of a processing procedure performed by the program protection device.

以下、本発明の実施の形態を説明する。図1は本実施形態のプログラム保護装置50の構成の一例を示す図である。プログラム保護装置50は、装置全体を制御する制御部51、通信部52、表示部53、操作部54、メモリ55、記憶部56、及び記録媒体読取部57を備える。プログラム保護装置50は、例えば、パーソナルコンピュータ(PC)、ワークステーション(WS)、ゲーム用デバイス、タブレット端末などで構成することができる。 The following describes an embodiment of the present invention. FIG. 1 is a diagram showing an example of the configuration of a program protection device 50 of this embodiment. The program protection device 50 includes a control unit 51 that controls the entire device, a communication unit 52, a display unit 53, an operation unit 54, a memory 55, a storage unit 56, and a recording medium reading unit 57. The program protection device 50 can be configured, for example, as a personal computer (PC), a workstation (WS), a gaming device, a tablet terminal, or the like.

制御部51は、CPU(Central Processing Unit)、MPU(Micro-Processing Unit)、GPU(Graphics Processing Unit)等が所要数組み込まれて構成されている。また、制御部51は、DSP(Digital Signal Processors)、FPGA(Field-Programmable Gate Arrays)などを組み合わせて構成してもよい。 The control unit 51 is configured by incorporating a required number of CPUs (Central Processing Units), MPUs (Micro-Processing Units), GPUs (Graphics Processing Units), etc. The control unit 51 may also be configured by combining DSPs (Digital Signal Processors), FPGAs (Field-Programmable Gate Arrays), etc.

通信部52は、通信モジュールを備え、外部の装置(不図示)との間の通信機能を有する。 The communication unit 52 includes a communication module and has a communication function with an external device (not shown).

表示部53は、液晶ディスプレイ又は有機ELディスプレイなどで構成することができる。なお、表示部53に代えて、外部の表示装置をプログラム保護装置50に接続するようにしてもよい。 The display unit 53 can be configured with a liquid crystal display or an organic EL display. Note that instead of the display unit 53, an external display device may be connected to the program protection device 50.

操作部54は、例えば、キーボード、マウス、タッチパッド又はタッチパネル等で構成され、表示部53に表示される情報に対する操作を受け付けることができる。 The operation unit 54 is composed of, for example, a keyboard, a mouse, a touchpad, or a touch panel, and can accept operations on the information displayed on the display unit 53.

メモリ55は、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ等の半導体メモリで構成することができる。 The memory 55 can be composed of semiconductor memory such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), ROM (Read Only Memory), and flash memory.

記憶部56は、例えば、ハードディスク又は半導体メモリ等で構成することができ、コンピュータプログラム(プログラム製品)としてのアプリケーション10、OS(オペレーティングシステム)60、及び所要の情報を記憶することができる。OS60は、例えば、Windows、MacOS、Linux(いずれも登録商標)などを含む。 The storage unit 56 can be configured, for example, with a hard disk or semiconductor memory, and can store the application 10 as a computer program (program product), an OS (operating system) 60, and required information. The OS 60 includes, for example, Windows, MacOS, Linux (all of which are registered trademarks), etc.

コンピュータプログラム(アプリケーション)10、及びOS60は、メモリ55に展開されて、制御部51により実行される。制御部51は、コンピュータプログラム10で定められた処理(具体的には、後述の保護対象プログラム20、第1監視プロセス30及び第2監視プロセス40それぞれの処理)を実行することができる。ここで、アプリケーション10は、保護対象プログラム20、第1監視プロセス30及び第2監視プロセス40の各実行プログラムを総称するものである。すなわち、制御部51による処理は、保護対象プログラム20、第1監視プロセス30及び第2監視プロセス40による処理でもある。 The computer program (application) 10 and the OS 60 are deployed in memory 55 and executed by the control unit 51. The control unit 51 can execute the processing defined by the computer program 10 (specifically, the processing of the protected program 20, the first monitoring process 30, and the second monitoring process 40, which will be described later). Here, the application 10 collectively refers to the execution programs of the protected program 20, the first monitoring process 30, and the second monitoring process 40. In other words, the processing by the control unit 51 is also the processing by the protected program 20, the first monitoring process 30, and the second monitoring process 40.

コンピュータプログラム10は、通信部52を介して、外部の装置からダウンロードして記憶部56に格納してもよい。また、記録媒体(例えば、CD-ROM等の光学可読ディスク記憶媒体)571に記録されたコンピュータプログラム10を記録媒体読取部57で読み取って記憶部56に格納してもよい。コンピュータプログラム10は、単一のコンピュータ上で、または1つのサイトにおいて配置されるか、もしくは複数のサイトに亘って分散され、通信ネットワークによって相互接続された複数のコンピュータ上で実行されるように展開することができる。 The computer program 10 may be downloaded from an external device via the communication unit 52 and stored in the storage unit 56. Alternatively, the computer program 10 recorded on a recording medium (e.g., an optically readable disk storage medium such as a CD-ROM) 571 may be read by the recording medium reading unit 57 and stored in the storage unit 56. The computer program 10 may be deployed to be executed on a single computer, or on multiple computers located at one site, or distributed across multiple sites and interconnected by a communications network.

図2はプログラム保護装置50のソフトウェア構成の一例を示す図である。図2に示すように、プログラム保護装置50内では、OS60の制御の下でアプリケーション10が実行される。アプリケーション10は、保護対象プログラム20、第1監視プロセス、及び第2監視プロセス40の各実行プログラムが組み込まれている。保護対象プログラム20は、アプリ本体部に相当し、自身の起動処理モジュール及びアプリ実行モジュールなどを含む。保護対象プログラム20、第1監視プロセス30、及び第2監視プロセス40の間の処理は、OS60が提供する機能を用いて行われる。 Figure 2 is a diagram showing an example of the software configuration of the program protection device 50. As shown in Figure 2, within the program protection device 50, an application 10 is executed under the control of an OS 60. The application 10 incorporates the execution programs of a protected program 20, a first monitoring process, and a second monitoring process 40. The protected program 20 corresponds to the main body of the application, and includes its own startup processing module and application execution module. Processing between the protected program 20, the first monitoring process 30, and the second monitoring process 40 is performed using functions provided by the OS 60.

アプリケーション10が起動すると、保護対象プログラム20が起動するとともに、保護対象プログラム20は、自身の子プロセスとして第1監視プロセス30を起動する。また、保護対象プログラム20は、自身の子プロセスとして第2監視プロセス40を起動する。なお、第1監視プロセス30が、自身の子プロセスとして第2監視プロセス40を起動してもよい。 When the application 10 is started, the protected program 20 is started, and the protected program 20 starts the first monitoring process 30 as its child process. The protected program 20 also starts the second monitoring process 40 as its child process. The first monitoring process 30 may also start the second monitoring process 40 as its child process.

第1監視プロセス30は、親プロセスである保護対象プログラム20に対しアタッチを実行する。 The first monitoring process 30 performs an attach to the protected program 20, which is the parent process.

図3は第1監視プロセス30によるアタッチの一例を示す図である。第1監視プロセス30は、保護対象プログラム20にアタッチすることで実行中の保護対象プログラム20の挙動を確認することができる。アタッチは、例えば、ptraceというシステムコールを用いて行うことができる。第1監視プロセス30が、保護対象プログラム20に対してメモリ情報要求を出力すると、保護対象プログラム20は、メモリ情報を第1監視プロセス30へ出力する。保護対象プログラム20と第1監視プロセス30との間の信号(シグナル)のやり取りは、OS60を介して実行される。具体的には、OS60から保護対象プログラム20に発行される制御シグナルはアタッチ後、第1監視プロセス30が受信し、第1監視プロセス30は当該制御シグナルにより保護対象プログラム20への制御シグナルを観測する事ができ、OS60を介して当該シグナルを保護対象プログラム20に再送信する事で、保護対象プログラム20の動作を制御する事ができる。第1監視プロセス30が保護対象プログラム20にアタッチした場合、他のプロセス(不正プログラムを含む)は、保護対象プログラム20にアタッチすることはできない。アタッチすることができるプロセスは1個に限定されているからである。 Figure 3 is a diagram showing an example of attachment by the first monitoring process 30. The first monitoring process 30 can check the behavior of the protection target program 20 during execution by attaching to the protection target program 20. Attachment can be performed, for example, by using a system call called ptrace. When the first monitoring process 30 outputs a memory information request to the protection target program 20, the protection target program 20 outputs the memory information to the first monitoring process 30. Signals (signals) are exchanged between the protection target program 20 and the first monitoring process 30 via the OS 60. Specifically, after attachment, the first monitoring process 30 receives a control signal issued from the OS 60 to the protection target program 20, and the first monitoring process 30 can observe the control signal to the protection target program 20 by the control signal, and can control the operation of the protection target program 20 by retransmitting the signal to the protection target program 20 via the OS 60. When the first monitoring process 30 is attached to the protected program 20, other processes (including malicious programs) cannot be attached to the protected program 20. This is because the number of processes that can be attached is limited to one.

保護対象プログラム20は、第1監視プロセス30を起動し、保護対象プログラム20又は第1監視プロセス30は、第2監視プロセス40を起動する。プロセスの起動は、例えば、forkというシステムコールを用いて行うことができる。第2監視プロセス40は、第1監視プロセス30の動作を監視する。第2監視プロセス40は、保護対象プログラム20の動作を監視してもよい。第1監視プロセス30や保護対象プログラム20の動作の監視は、第2監視プロセス40自身の機能、あるいはOS60が備える機能を用いることができる。 The protected program 20 launches the first monitoring process 30, and the protected program 20 or the first monitoring process 30 launches the second monitoring process 40. The process can be launched, for example, by using a system call called fork. The second monitoring process 40 monitors the operation of the first monitoring process 30. The second monitoring process 40 may also monitor the operation of the protected program 20. The operation of the first monitoring process 30 or the protected program 20 can be monitored using the functions of the second monitoring process 40 itself or the functions of the OS 60.

図4は第2監視プロセス40の動作の第1例を示す図である。第1監視プロセス30は、保護対象プログラム20にアタッチすることで実行中の保護対象プログラム20の挙動を確認することができる。第2監視プロセス40は、第1監視プロセス30の動作を監視する。なお、第2監視プロセス40は、保護対象プログラム20の動作を監視してもよい。第2監視プロセス40が実施する監視は、例えば、OS60のプロセス管理用のファイルを解析して、当該プロセスの動作状態、アタッチ状態を観測することで行うことができる。 Figure 4 is a diagram showing a first example of the operation of the second monitoring process 40. The first monitoring process 30 can check the behavior of the protected program 20 while it is running by attaching to the protected program 20. The second monitoring process 40 monitors the operation of the first monitoring process 30. The second monitoring process 40 may also monitor the operation of the protected program 20. The monitoring performed by the second monitoring process 40 can be performed, for example, by analyzing a process management file of the OS 60 and observing the operating state and attachment state of the process.

図5は攻撃者による攻撃パターンの第1例を示す図である。第1監視プロセス30は、実行中の保護対象プログラム20にアタッチ中である。この場合、攻撃者が、実行中の保護対象プログラム20に対してアタッチを実行しようとしても、保護対象プログラム20は既に他のプロセス(第1監視プロセス30)によってアタッチされているため、攻撃者は保護対象プログラムにアタッチすることはできない。これにより、保護対象プログラムを不正なアクセスから保護することができ、メモリ上からデータが不正に抜き取られることを防止できる。 Figure 5 shows a first example of an attack pattern by an attacker. The first monitoring process 30 is currently attached to the running protected program 20. In this case, even if the attacker attempts to attach to the running protected program 20, the protected program 20 is already attached by another process (the first monitoring process 30), so the attacker cannot attach to the protected program. This makes it possible to protect the protected program from unauthorized access and prevent data from being illegally extracted from memory.

図6は攻撃者による攻撃パターンの第2例を示す図である。図6Aに示すように、保護対象プログラム20は、第1監視プロセス30にアタッチされ、攻撃者は保護対象プログラム20にアタッチすることができない。そこで、攻撃者は、保護対象プログラム20にアタッチしている第1監視プロセスを終了させようとする。しかし、第2監視プロセス40は、第1監視プロセス30の動作を監視しているので、第1監視プロセス30の終了を検知することができる。図6Bに示すように、第1監視プロセス30の終了を検知した第2監視プロセス40は、保護対象プログラム20の動作を終了させる。 Figure 6 is a diagram showing a second example of an attack pattern by an attacker. As shown in Figure 6A, the protected program 20 is attached to the first monitoring process 30, and the attacker cannot attach to the protected program 20. Therefore, the attacker attempts to terminate the first monitoring process attached to the protected program 20. However, since the second monitoring process 40 monitors the operation of the first monitoring process 30, it can detect the termination of the first monitoring process 30. As shown in Figure 6B, the second monitoring process 40, having detected the termination of the first monitoring process 30, terminates the operation of the protected program 20.

上述のように、制御部51は、第2監視プロセス40が第1監視プロセス30の異常(例えば、不正な一時停止や終了)を検知した場合、第2監視プロセス40に保護対象プログラム20の動作を終了させる。また、制御部51は、第2監視プロセス40が保護対象プログラム20の異常(例えば、不正な一時停止や終了)を検知した場合、第2監視プロセス40に保護対象プログラム20の動作を終了させてもよい。 As described above, when the second monitoring process 40 detects an abnormality (e.g., an unauthorized pause or termination) in the first monitoring process 30, the control unit 51 causes the second monitoring process 40 to terminate the operation of the protected program 20. In addition, when the second monitoring process 40 detects an abnormality (e.g., an unauthorized pause or termination) in the protected program 20, the control unit 51 may cause the second monitoring process 40 to terminate the operation of the protected program 20.

これにより、第2監視プロセス40は、第1監視プロセス30及び保護対象プログラム20に対する攻撃を検知することができ、結果として、保護対象プログラム20を不正なアクセスから保護することができる。また、攻撃者が保護対象プログラム20にアタッチしようとしても、保護対象プログラム20は終了しているので、攻撃者は保護対象プログラム20にアタッチすることができず(図6B参照)、保護対象プログラム20を不正なアクセスから保護することができ、メモリ上からデータが不正に抜き取られることを防止できる。 This allows the second monitoring process 40 to detect attacks on the first monitoring process 30 and the protected program 20, and as a result, the protected program 20 can be protected from unauthorized access. Even if an attacker attempts to attach to the protected program 20, the protected program 20 has terminated, so the attacker cannot attach to the protected program 20 (see FIG. 6B). This protects the protected program 20 from unauthorized access and prevents data from being illegally extracted from memory.

図7は第2監視プロセス40の動作の第2例を示す図である。第2監視プロセス40は、定期または不定期に自身と同じ動作を実行する別プロセス(新たなプロセス)を生成するとともに、現在のプロセスを終了する。これにより、第2監視プロセス40は、自身が一時停止や終了などの攻撃対象として特定されることを防止できる。 Figure 7 shows a second example of the operation of the second monitoring process 40. The second monitoring process 40 periodically or irregularly generates another process (a new process) that executes the same operations as itself, and terminates the current process. This allows the second monitoring process 40 to prevent itself from being identified as a target of attacks such as suspension or termination.

図7の例では、第2監視プロセス40(プロセスID=01)が動作を実行中に、自身と同じ動作をする新たなプロセスである第2監視プロセス40(プロセスID=10)を生成し、現在実行中の第2監視プロセス40(プロセスID=01)を終了する。 In the example of Figure 7, while the second monitoring process 40 (process ID = 01) is executing an operation, a new process, the second monitoring process 40 (process ID = 10), which performs the same operation as the second monitoring process 40 itself is generated, and the currently executing second monitoring process 40 (process ID = 01) is terminated.

次に、第2監視プロセス40(プロセスID=10)が動作を実行中に、自身と同じ動作をする新たなプロセスである第2監視プロセス40(プロセスID=22)を生成し、現在実行中の第2監視プロセス40(プロセスID=10)を終了する。 Next, while the second monitoring process 40 (process ID = 10) is executing, a new process, a second monitoring process 40 (process ID = 22) that performs the same operation as the second monitoring process 40 itself, is generated, and the currently executing second monitoring process 40 (process ID = 10) is terminated.

同様に、第2監視プロセス40(プロセスID=22)が動作を実行中に、自身と同じ動作をする新たなプロセスである第2監視プロセス40を生成し、現在実行中の第2監視プロセス40(プロセスID=22)を終了する。以降、同様の処理を繰り返す。なお、プロセスIDの例は、プロセスIDが異なることを便宜上示すためのものでID自体は数字に限定されない。 Similarly, while the second monitoring process 40 (process ID = 22) is executing an operation, a new process, a second monitoring process 40, that performs the same operation as itself is generated, and the currently executing second monitoring process 40 (process ID = 22) is terminated. Thereafter, the same processing is repeated. Note that the example process ID is provided merely to conveniently indicate that the process IDs are different, and the IDs themselves are not limited to numbers.

上述のように、制御部51は、第2監視プロセス40に、異なるプロセスIDを有する第2監視プロセス40を起動させる。また、制御部51は、新たな第2監視プロセス40を起動させた場合、直近の古い第2監視プロセス40を終了させる。 As described above, the control unit 51 causes the second monitoring process 40 to start a second monitoring process 40 having a different process ID. In addition, when the control unit 51 starts a new second monitoring process 40, it terminates the most recent, oldest second monitoring process 40.

図8A及び図8Bは攻撃者による攻撃パターンの第3例を示す図である。第1監視プロセス30は、保護対象プログラム20にアタッチ中であるとする。第2監視プロセス(プロセスID=01)40は、第1監視プロセス30の動作を監視している。攻撃者は、第2監視プロセス(プロセスID=01)40を停止又は終了させるべく、第2監視プロセス40のプロセスIDを特定しようとする。第2監視プロセス(プロセスID=01)40は、自身と同じ動作をする新たな第2監視プロセス(プロセスID=02)40を生成する。 Figures 8A and 8B show a third example of an attack pattern by an attacker. Assume that the first monitoring process 30 is attached to the protected program 20. The second monitoring process (process ID = 01) 40 is monitoring the operation of the first monitoring process 30. The attacker attempts to identify the process ID of the second monitoring process 40 in order to stop or terminate the second monitoring process (process ID = 01) 40. The second monitoring process (process ID = 01) 40 generates a new second monitoring process (process ID = 02) 40 that performs the same operation as itself.

新たに生成された第2監視プロセス(プロセスID=02)40は、第1監視プロセス30の動作を監視する。直近の古い第2監視プロセス(プロセスID=01)40は、自身を終了する。前述のようなプロセスの世代交代(新しいプロセスを生成して古いプロセスを終了する)は、攻撃者によるプロセスID特定動作よりも短い(好ましくは十分短い)時間間隔で行うことができる。攻撃者は、既に終了した古い第2監視プロセス40のプロセスID=01のみ特定できるので、新しく生成された第2監視プロセス(プロセスID=02)を停止又は終了させるような介入をすることができない。 The newly created second monitoring process (process ID = 02) 40 monitors the operation of the first monitoring process 30. The most recent old second monitoring process (process ID = 01) 40 terminates itself. The above-mentioned process generation change (creating a new process and terminating the old process) can be performed at a time interval shorter (preferably sufficiently shorter) than the process ID identification operation by an attacker. Because an attacker can only identify the process ID = 01 of the old second monitoring process 40 that has already terminated, he cannot intervene to stop or terminate the newly created second monitoring process (process ID = 02).

上述のように、本実施形態によれば、攻撃者は、動作中の第2監視プロセス40のプロセスを特定する情報(プロセスID)を知ることができないので、第2監視プロセス40の停止や終了などの攻撃を困難にする。 As described above, according to this embodiment, an attacker cannot know information (process ID) that identifies the second monitoring process 40 while it is running, making it difficult to launch attacks such as stopping or terminating the second monitoring process 40.

図9はプログラム保護装置50による処理手順の一例を示す図である。図9の処理の主体は、保護対象プログラム20、第1監視プロセス30及び第2監視プロセス40であるが、これらの主体を纏めて制御部51としてもよい。保護対象プログラム20が起動し(S11)、保護対象プログラム20は、自身の子プロセスとして第1監視プロセス30を起動する(S12)。第1監視プロセス30が保護対象プログラム20にアタッチする(S13)。アタッチを実行する際には、第1監視プロセス30は、保護対象プログラム20のプロセスIDを取得する。 Figure 9 is a diagram showing an example of a processing procedure by the program protection device 50. The subjects of the processing in Figure 9 are the protected program 20, the first monitoring process 30, and the second monitoring process 40, but these subjects may be collectively referred to as the control unit 51. The protected program 20 is started (S11), and the protected program 20 starts the first monitoring process 30 as its own child process (S12). The first monitoring process 30 attaches to the protected program 20 (S13). When performing the attachment, the first monitoring process 30 obtains the process ID of the protected program 20.

保護対象プログラム20は、自身の子プロセスとして第2監視プロセス40を起動する(S14)。第2監視プロセス40は、第1監視プロセス30のプロセスIDを取得して、第1監視プロセス30の動作を監視する(S15)。なお、第2監視プロセス40に、保護対象プログラム20のプロセスIDを取得させて保護対象プログラム20の動作を監視させてもよい。 The protected program 20 starts the second monitoring process 40 as its own child process (S14). The second monitoring process 40 acquires the process ID of the first monitoring process 30 and monitors the operation of the first monitoring process 30 (S15). Note that the second monitoring process 40 may be caused to acquire the process ID of the protected program 20 and monitor the operation of the protected program 20.

第2監視プロセス40が第1監視プロセス30の異常(一時停止や終了など)を検知したか否かを判定し(S16)、異常を検知した場合(S16でYES)、保護対象プログラム20を終了させ(S17)、処理を終了する。 The second monitoring process 40 determines whether it has detected an abnormality (such as a pause or termination) in the first monitoring process 30 (S16), and if it detects an abnormality (YES in S16), it terminates the protected program 20 (S17) and ends the process.

異常を検知していない場合(S16でNO)、第2監視プロセス40は、第2監視プロセス40のプロセスIDを特定するアクションの有無を判定する(S18)。ここで、第2監視プロセス40のプロセスIDを特定するアクションは、攻撃者によるものとする。プロセスIDを特定するアクションの有無の判定は、第2監視プロセス40自身の機能、あるいはOS60が備える機能を用いることができる。プロセスIDを特定するアクションがある場合(S18でYES)、第2監視プロセス40は、新しいプロセスIDを有する新たな第2監視プロセス40を生成し(S19)、古い第2監視プロセス40を終了し(S20)、後述のステップS21の処理を行う。 If no abnormality is detected (NO in S16), the second monitoring process 40 determines whether or not an action to identify the process ID of the second monitoring process 40 has been taken (S18). Here, it is assumed that the action to identify the process ID of the second monitoring process 40 has been taken by an attacker. The determination of whether or not an action to identify the process ID has been taken can use a function of the second monitoring process 40 itself or a function provided by the OS 60. If an action to identify the process ID has been taken (YES in S18), the second monitoring process 40 generates a new second monitoring process 40 having a new process ID (S19), terminates the old second monitoring process 40 (S20), and performs the processing of step S21 described below.

プロセスIDを特定するアクションがない場合(S18でNO)、第2監視プロセス40は、処理を終了するか否かを判定し(S21)、処理を終了しない場合(S21でNO)、ステップS15以降の処理を続ける。処理を終了する場合(S21でYES)、保護対象プログラム20、第1監視プロセス30及び第2監視プロセス40の処理を終了する。 If there is no action to identify the process ID (NO in S18), the second monitoring process 40 determines whether to end the processing (S21), and if the processing is not to be ended (NO in S21), the processing continues from step S15 onwards. If the processing is to be ended (YES in S21), the processing of the protected program 20, the first monitoring process 30 and the second monitoring process 40 is ended.

上述のように、本実施形態によれば、保護対象プログラム20及び第1監視プロセス30の動作を監視する新たな第2監視プロセス40を生成し、第2監視プロセス40は、保護対象プログラム20及び第1監視プロセス30の一時停止や終了などの不正な介入を検知した場合、保護対象プログラム20を終了させるので、メモリに対する不正なアクセスによってメモリ上からデータが抜き取られることを防止できる。 As described above, according to this embodiment, a new second monitoring process 40 is generated to monitor the operation of the protected program 20 and the first monitoring process 30. If the second monitoring process 40 detects unauthorized intervention such as pausing or terminating the protected program 20 and the first monitoring process 30, it terminates the protected program 20. This makes it possible to prevent data from being extracted from memory through unauthorized access to the memory.

また、第2監視プロセス40は、自身と同じ動作を実行する別プロセスを生成し、現在実行中のプロセスを終了させるので、第2監視プロセス40自身のプロセスIDが特定されることを防止でき、第2監視プロセス40への攻撃を困難にすることができる。 In addition, the second monitoring process 40 creates another process that performs the same operations as itself and terminates the currently running process, which prevents the process ID of the second monitoring process 40 itself from being identified, making it more difficult to attack the second monitoring process 40.

(付記1)コンピュータプログラムは、保護対象プログラムに第1監視プロセスを起動させ、前記保護対象プログラム又は前記第1監視プロセスに第2監視プロセスを起動させ、前記第2監視プロセスに、前記第1監視プロセスの動作を監視させる、処理をコンピュータに実行させる。 (Addendum 1) The computer program causes the computer to execute the following processing: start a first monitoring process in the protected program, start a second monitoring process in the protected program or the first monitoring process, and cause the second monitoring process to monitor the operation of the first monitoring process.

(付記2)コンピュータプログラムは、付記1において、前記保護対象プログラムに対して前記第1監視プロセスをアタッチさせる、処理をコンピュータに実行させる。 (Supplementary Note 2) The computer program in Supplementary Note 1 causes the computer to execute a process that attaches the first monitoring process to the protected program.

(付記3)コンピュータプログラムは、付記1又は付記2において、前記第2監視プロセスが前記第1監視プロセスの異常を検知した場合、前記第2監視プロセスに前記保護対象プログラムの動作を終了させる、処理をコンピュータに実行させる。 (Supplementary Note 3) In the computer program of Supplementary Note 1 or Supplementary Note 2, when the second monitoring process detects an abnormality in the first monitoring process, the computer executes a process to cause the second monitoring process to terminate the operation of the protected program.

(付記4)コンピュータプログラムは、付記1から付記3のいずれか一つにおいて、前記第2監視プロセスに、異なるプロセスIDを有する第2監視プロセスを起動させる、処理をコンピュータに実行させる。 (Appendix 4) In any one of appendices 1 to 3, the computer program causes the computer to execute a process that causes the second monitoring process to start a second monitoring process having a different process ID.

(付記5)コンピュータプログラムは、付記4において、新たな第2監視プロセスを起動させた場合、直近の古い第2監視プロセスを終了させる、処理をコンピュータに実行させる。 (Appendix 5) In appendix 4, the computer program causes the computer to execute a process that terminates the most recent, oldest second monitoring process when a new second monitoring process is started.

(付記6)プログラム保護装置は、制御部を備え、前記制御部は、保護対象プログラムに第1監視プロセスを起動させ、前記保護対象プログラム又は前記第1監視プロセスに第2監視プロセスを起動させ、前記第2監視プロセスに、前記第1監視プロセスの動作を監視させる。 (Additional Note 6) The program protection device includes a control unit, which causes the protected program to start a first monitoring process, causes the protected program or the first monitoring process to start a second monitoring process, and causes the second monitoring process to monitor the operation of the first monitoring process.

(付記7)プログラム保護方法は、保護対象プログラムに第1監視プロセスを起動させ、前記保護対象プログラム又は前記第1監視プロセスに第2監視プロセスを起動させ、前記第2監視プロセスに、前記第1監視プロセスの動作を監視させる。 (Appendix 7) The program protection method has a program to be protected start a first monitoring process, has the program to be protected or the first monitoring process start a second monitoring process, and has the second monitoring process monitor the operation of the first monitoring process.

各実施形態に記載した事項は相互に組み合わせることが可能である。また、特許請求の範囲に記載した独立請求項及び従属請求項は、引用形式に関わらず全てのあらゆる組み合わせにおいて、相互に組み合わせることが可能である。さらに、特許請求の範囲には他の2以上のクレームを引用するクレームを記載する形式(マルチクレーム形式)を用いているが、これに限るものではない。マルチクレームを少なくとも一つ引用するマルチクレーム(マルチマルチクレーム)を記載する形式を用いて記載してもよい。 The matters described in each embodiment can be combined with each other. In addition, the independent claims and dependent claims described in the claims can be combined with each other in any and all combinations regardless of the citation format. Furthermore, the claims use a format in which a claim cites two or more other claims (multi-claim format), but this is not limited to this. They may also be written in a format in which multiple claims cite at least one other claim (multi-multi-claim).

10 アプリケーション
20 保護対象プログラム
30 第1監視プロセス
40 第2監視プロセス
50 プログラム保護装置
51 制御部
52 通信部
53 表示部
54 操作部
55 メモリ
56 記憶部
57 記録媒体読取部
571 記録媒体
60 OS
REFERENCE SIGNS LIST 10 Application 20 Program to be protected 30 First monitoring process 40 Second monitoring process 50 Program protection device 51 Control unit 52 Communication unit 53 Display unit 54 Operation unit 55 Memory 56 Storage unit 57 Recording medium reading unit 571 Recording medium 60 OS

Claims (7)

保護対象プログラムに第1監視プロセスを起動させ、
前記保護対象プログラム又は前記第1監視プロセスに第2監視プロセスを起動させ、
前記第2監視プロセスに、前記第1監視プロセスの動作を監視させる、
処理をコンピュータに実行させるコンピュータプログラム。
causing the protected program to launch a first monitoring process;
causing the protected program or the first monitoring process to launch a second monitoring process;
causing the second monitoring process to monitor the operation of the first monitoring process;
A computer program that causes a computer to carry out processing.
前記保護対象プログラムに対して前記第1監視プロセスをアタッチさせる、
処理をコンピュータに実行させる請求項1に記載のコンピュータプログラム。
Attaching the first monitoring process to the protected program;
2. A computer program product according to claim 1, which causes a computer to carry out a process.
前記第2監視プロセスが前記第1監視プロセスの異常を検知した場合、前記第2監視プロセスに前記保護対象プログラムの動作を終了させる、
処理をコンピュータに実行させる請求項1に記載のコンピュータプログラム。
when the second monitoring process detects an abnormality in the first monitoring process, causing the second monitoring process to terminate the operation of the protected program;
2. A computer program product according to claim 1, which causes a computer to carry out a process.
前記第2監視プロセスに、異なるプロセスIDを有する第2監視プロセスを起動させる、
処理をコンピュータに実行させる請求項1から請求項3までのいずれか一項に記載のコンピュータプログラム。
causing the second monitoring process to launch a second monitoring process having a different process ID;
A computer program product according to any one of claims 1 to 3, which causes a computer to carry out a process.
新たな第2監視プロセスを起動させた場合、直近の古い第2監視プロセスを終了させる、
処理をコンピュータに実行させる請求項4に記載のコンピュータプログラム。
When a new second monitoring process is started, the most recent old second monitoring process is terminated.
5. A computer program product according to claim 4, which causes a computer to carry out a process.
制御部を備え、
前記制御部は、
保護対象プログラムに第1監視プロセスを起動させ、
前記保護対象プログラム又は前記第1監視プロセスに第2監視プロセスを起動させ、
前記第2監視プロセスに、前記第1監視プロセスの動作を監視させる、
プログラム保護装置。
A control unit is provided,
The control unit is
causing the protected program to launch a first monitoring process;
causing the protected program or the first monitoring process to launch a second monitoring process;
causing the second monitoring process to monitor the operation of the first monitoring process;
Program protection device.
保護対象プログラムに第1監視プロセスを起動させ、
前記保護対象プログラム又は前記第1監視プロセスに第2監視プロセスを起動させ、
前記第2監視プロセスに、前記第1監視プロセスの動作を監視させる、
プログラム保護方法。
causing the protected program to launch a first monitoring process;
causing the protected program or the first monitoring process to launch a second monitoring process;
causing the second monitoring process to monitor the operation of the first monitoring process;
Program protection method.
JP2023093487A 2023-06-06 2023-06-06 Computer program, program protection device, and program protection method Pending JP2024175588A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023093487A JP2024175588A (en) 2023-06-06 2023-06-06 Computer program, program protection device, and program protection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2023093487A JP2024175588A (en) 2023-06-06 2023-06-06 Computer program, program protection device, and program protection method

Publications (1)

Publication Number Publication Date
JP2024175588A true JP2024175588A (en) 2024-12-18

Family

ID=93893158

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023093487A Pending JP2024175588A (en) 2023-06-06 2023-06-06 Computer program, program protection device, and program protection method

Country Status (1)

Country Link
JP (1) JP2024175588A (en)

Similar Documents

Publication Publication Date Title
RU2691187C1 (en) System and methods for auditing a virtual machine
KR100368947B1 (en) Integrity checking an executable module and associated protected service provider module
JP6706273B2 (en) Behavioral Malware Detection Using Interpreted Virtual Machines
US7263721B2 (en) Password protection
US8621628B2 (en) Protecting user mode processes from improper tampering or termination
CN109815698B (en) Method and non-transitory machine-readable storage medium for performing security actions
US9832215B2 (en) Automatic content inspection system for exploit detection
KR101034415B1 (en) Computer security management in virtual machines or enhanced operating systems
US7721333B2 (en) Method and system for detecting a keylogger on a computer
JP4938576B2 (en) Information collection system and information collection method
JP4048382B1 (en) Information processing system and program
US20050132122A1 (en) Method, apparatus and system for monitoring system integrity in a trusted computing environment
US8495741B1 (en) Remediating malware infections through obfuscation
US7665139B1 (en) Method and apparatus to detect and prevent malicious changes to tokens
WO2017027103A1 (en) Systems and methods for detecting unknown vulnerabilities in computing processes
AU2013259469A1 (en) Methods and apparatus for identifying and removing malicious applications
EP2937807B1 (en) Monitoring device and monitoring method
CN107330328B (en) Method and device for defending against virus attack and server
US20070266435A1 (en) System and method for intrusion detection in a computer system
US10902122B2 (en) Just in time memory analysis for malware detection
US11556645B2 (en) Monitoring control-flow integrity
KR101013419B1 (en) System protection devices and methods
Kovah et al. How many million bioses would you like to infect?
JP2024175588A (en) Computer program, program protection device, and program protection method
WO2022015494A1 (en) System management states