JP2021530014A - Java Debugger blocking method and system for program protection - Google Patents
Java Debugger blocking method and system for program protection Download PDFInfo
- Publication number
- JP2021530014A JP2021530014A JP2020566950A JP2020566950A JP2021530014A JP 2021530014 A JP2021530014 A JP 2021530014A JP 2020566950 A JP2020566950 A JP 2020566950A JP 2020566950 A JP2020566950 A JP 2020566950A JP 2021530014 A JP2021530014 A JP 2021530014A
- Authority
- JP
- Japan
- Prior art keywords
- thread
- java
- computer
- debugger
- virtual machine
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 230000000903 blocking effect Effects 0.000 title claims abstract description 33
- 238000004590 computer program Methods 0.000 claims description 28
- 238000004891 communication Methods 0.000 claims description 20
- 238000010586 diagram Methods 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 37
- 230000006399 behavior Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002411 adverse Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging 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
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
【課題】 プログラム保護のためのJavaデバッガ遮断方法およびシステムを提供する。【解決手段】 コンピュータのプロセッサが実行するJavaデバッガ遮断方法は、コンピュータ上で現在実行中のJava仮想マシンのハンドルを取得する段階、コンピュータ上で現在実行中のスレッドのうちからJavaで予め定義されたデバッグ規約に従って動作するスレッドを確認する段階、および取得したJava仮想マシンのハンドルから前記確認されたスレッドを分離して終了させる段階を含む。【選択図】 図3PROBLEM TO BE SOLVED: To provide a Java debugger blocking method and a system for program protection. A method of blocking the Java debugger executed by a processor of a computer is defined in Java from among the threads currently running on the computer at the stage of acquiring the handle of the Java virtual machine currently running on the computer. It includes a step of confirming a thread that operates according to the debug convention, and a step of separating the confirmed thread from the acquired Java virtual machine handle and terminating it. [Selection diagram] Fig. 3
Description
以下の説明は、プログラム保護のためのJavaデバッガ遮断方法、Javaデバッガ遮断方法を実行するJavaデバッガ遮断システム、コンピュータと結合してJavaデバッガ遮断方法をコンピュータに実行させるためにコンピュータ読み取り可能な記録媒体に記録されたコンピュータプログラムとその記録媒体に関する。 The following description describes a Java debugger blocking method for program protection, a Java debugger blocking system that executes the Java debugger blocking method, and a computer-readable recording medium that is combined with a computer to allow the computer to execute the Java debugger blocking method. Regarding recorded computer programs and their recording media.
クライアント端末に配布されたアプリケーションは、リバースエンジニアリング(リバーシング)によってその動作方式を把握することができるため、このような技術によってアプリケーション機能の盗用を可能にする。また、アプリケーションの機能を修正してアプリケーションの本来の意図とは異なるように動作させることで、アプリケーションが提供するサービスと該当のサービスを提供するシステムの信頼性に良くない影響を与えたりもする。 Since the operation method of the application distributed to the client terminal can be grasped by reverse engineering (reversing), the application function can be stolen by such a technology. In addition, by modifying the function of the application to make it operate differently from the original intention of the application, the reliability of the service provided by the application and the system providing the corresponding service may be adversely affected.
このようなリバースエンジニアリングによるアプリケーションの分析過程では、デバッグ(debugging)の活用が必須となる。デバッグとは、プログラムのエラーを確認して修正する行為を意味するものであって、このような行為のために使用されるプログラムはデバッガと呼ばれる。このようなデバッグは、エラーのない正常なプログラムに対しても実行可能であり、このような場合には、プログラムが本来意図する動作を変更するだけではなく、プログラム内部の動作の原理を把握するための悪意的な目的として使用されることもある。 In the process of analyzing an application by such reverse engineering, it is essential to utilize debugging. Debugging means the act of checking and correcting errors in a program, and the program used for such an act is called a debugger. Such debugging can be performed even for a normal program without errors. In such a case, not only the behavior originally intended by the program is changed, but also the principle of the behavior inside the program is grasped. It may also be used as a malicious purpose for.
従来は、内蔵されたプログラムを保護する目的で、コードの修正と動作形態の理解を難しくするために、本来の動作方式を変更したり一部を暗号化したりする方式である難読化技法が利用されている。例えば、韓国登録特許第10−1328012号は、アプリケーションコード難読化装置およびその方法に関するものであって、アプリケーションに使用されるコードのうち、重要コードおよび重要コードを呼び出すための呼び出しコードをネイティブコード形態に変換する技術を開示している。 Traditionally, obfuscation techniques have been used to protect the built-in programs, changing the original behavior or encrypting some of them to make it difficult to modify the code and understand the behavior. Has been done. For example, Korean Registered Patent No. 10-1328012 relates to an application code obfuscation device and its method, and among the codes used in an application, the important code and the calling code for calling the important code are in the native code form. The technology to convert to is disclosed.
しかし、このような従来技術は、難読化されたコードを実行するために追加の実行時間が必要となり、本来の動作を実行するために特定の時点ではメモリ上に本来のコードがロードされなければならないという問題があった。 However, such prior art requires additional execution time to execute obfuscated code, and the original code must be loaded into memory at a particular point in time to perform the original operation. There was a problem that it did not become.
Javaアプリケーションとデバッガとの通信を定義するデバッグ規約に従って動作するスレッドを終了させることにより、Javaアプリケーションに対するデバッガの影響を遮断することができるJavaデバッガ遮断方法、Javaデバッガ遮断方法を実行するJavaデバッガ遮断システム、コンピュータと結合してJavaデバッガ遮断方法をコンピュータに実行させるためにコンピュータ読み取り可能な記録媒体に記録されたコンピュータプログラムとその記録媒体を提供する。 Java debugger blocking method that can block the influence of the debugger on the Java application by terminating the thread that operates according to the debug convention that defines the communication between the Java application and the debugger, and the Java debugger blocking system that executes the Java debugger blocking method. Provided are a computer program recorded on a computer-readable recording medium and the recording medium thereof in order to combine with a computer and cause the computer to execute a Java debugger blocking method.
コンピュータのプロセッサが実行するJavaデバッガ遮断方法であって、前記コンピュータ上で現在実行中のJava仮想マシンのハンドルを取得する段階、前記コンピュータ上で現在実行中のスレッドのうちからJavaで予め定義されたデバッグ規約に従って動作するスレッドを確認する段階、および前記取得したJava仮想マシンのハンドルから前記確認されたスレッドを分離して終了させる段階を含む、Javaデバッガ遮断方法を提供する。 A method of blocking the Java debugger executed by a computer processor, which is a stage of acquiring the handle of a Java virtual machine currently running on the computer, and is predefined in Java from among the threads currently running on the computer. Provided is a Java debugger blocking method including a step of confirming a thread operating according to a debug rule and a step of separating the confirmed thread from the handle of the acquired Java virtual machine and terminating it.
コンピュータと結合して前記Javaデバッガ遮断方法をコンピュータ実行させるためにコンピュータ読み取り可能な記録媒体に記録された、コンピュータプログラムを提供する。 Provided is a computer program recorded on a computer-readable recording medium for computer execution of the Java debugger blocking method in combination with a computer.
前記Javaデバッガ遮断方法をコンピュータに実行させるためのコンピュータプログラムが記録されていることを特徴とする、コンピュータ読み取り可能な記録媒体を提供する。 Provided is a computer-readable recording medium, characterized in that a computer program for causing a computer to execute the Java debugger blocking method is recorded.
コンピュータ読み取り可能な命令を実行するように実現される少なくとも1つのプロセッサを含み、前記少なくとも1つのプロセッサにより、前記コンピュータ上で現在実行中のJava仮想マシンのハンドルを取得し、前記コンピュータ上で現在実行中のスレッドのうちからJavaで予め定義されたデバッグ規約に従って動作するスレッドを確認し、前記取得したJava仮想マシンのハンドルから前記確認されたスレッドを分離して終了させる、コンピュータ装置を提供する。 Includes at least one processor implemented to execute computer-readable instructions, which obtains the handle of a Java virtual machine currently running on the computer and currently runs on the computer. Provided is a computer device that confirms a thread that operates according to a debug rule defined in Java from among the threads in the inside, separates the confirmed thread from the handle of the acquired Java virtual machine, and terminates the confirmed thread.
Javaアプリケーションとデバッガとの通信を定義するデバッグ規約に従って動作するスレッドを終了させることにより、Javaアプリケーションに対するデバッガの影響を遮断することができる。 The effect of the debugger on the Java application can be blocked by terminating the thread that operates according to the debug convention that defines the communication between the Java application and the debugger.
以下、実施形態について、添付の図面を参照しながら詳しく説明する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.
本発明の実施形態に係るJavaデバッガ遮断システムは、一例として、図2で説明するコンピュータ装置200のようなコンピュータによって実現されてよく、本発明の実施形態に係るJavaデバッガ遮断方法は、コンピュータによって実行されてよい。例えば、コンピュータにおいては、本発明の一実施形態に係るコンピュータプログラム(一例として、特定のサービス提供を受けるためにコンピュータ装置にインストールされたアプリケーション)が実行されてよく、コンピュータは、実行されたコンピュータプログラムの制御にしたがって本発明の一実施形態に係るJavaデバッガ遮断方法を実行してよい。上述したコンピュータプログラムは、コンピュータと結合してJavaデバッガ遮断方法をコンピュータに実行させるためにコンピュータ読み取り可能な記録媒体に記録されてよい。
As an example, the Java debugger blocking system according to the embodiment of the present invention may be realized by a computer such as the
図1は、本発明の一実施形態における、ネットワーク環境の例を示した図である。図1のネットワーク環境は、複数の電子機器110、120、130、140、複数のサーバ150、160、およびネットワーク170を含む例を示している。このような図1は、発明の説明のための一例に過ぎず、電子機器の数やサーバの数が図1のように限定されることはない。
FIG. 1 is a diagram showing an example of a network environment according to an embodiment of the present invention. The network environment of FIG. 1 shows an example including a plurality of
複数の電子機器110、120、130、140は、コンピュータ装置によって実現される固定端末や移動端末であってよい。複数の電子機器110、120、130、140の例としては、スマートフォン、携帯電話、ナビゲーション、PC(personal computer)、ノート型パンコン、デジタル放送用端末、PDA(Personal Digital Assistant)、PMP(Portable Multimedia Player)、タブレットなどがある。一例として、図1では、電子機器1(110)の例としてスマートフォンを示しているが、本発明の実施形態において、電子機器1(110)は、実質的に無線または有線通信方式を利用し、ネットワーク170を介して他の電子機器120、130、140および/またはサーバ150、160と通信することのできる多様な物理的なコンピュータ装置のうちの1つを意味してよい。
The plurality of
通信方式が限定されることはなく、ネットワーク170が含むことのできる通信網(一例として、移動通信網、有線インターネット、無線インターネット、放送網)を利用する通信方式だけではなく、機器間の近距離無線通信が含まれてもよい。例えば、ネットワーク170は、PAN(personal area network)、LAN(local area network)、CAN(campus area network)、MAN(metropolitan area network)、WAN(wide area network)、BBN(broadband network)、インターネットなどのネットワークのうちの1つ以上の任意のネットワークを含んでよい。さらに、ネットワーク170は、バスネットワーク、スターネットワーク、リングネットワーク、メッシュネットワーク、スター−バスネットワーク、ツリーまたは階層的ネットワークなどを含むネットワークトポロジのうちの任意の1つ以上を含んでもよいが、これに限定されることはない。
The communication method is not limited, and not only the communication method using the communication network (for example, mobile communication network, wired Internet, wireless Internet, broadcasting network) that can be included in the
サーバ150、160それぞれは、複数の電子機器110、120、130、140とネットワーク170を介して通信して命令、コード、ファイル、コンテンツ、サービスなどを提供する1つ以上のコンピュータ装置によって実現されてよい。例えば、サーバ150は、ネットワーク170を介して接続した複数の電子機器110、120、130、140に第1サービスを提供するシステムであってよく、サーバ160も、ネットワーク170を介して接続した複数の電子機器110、120、130、140に第2サービスを提供するシステムであってよい。より具体的な例として、サーバ150は、複数の電子機器110、120、130、140にインストールされたアプリケーション(コンピュータプログラム)と連係するサービスを前記第1サービスとして提供してよい。他の例として、サーバ160は、前記第1サービスのためのアプリケーションのインストールファイルを複数の電子機器110、120、130、140に提供するサービスを前記第2サービスとして提供してよい。
Each of the
図2は、本発明の一実施形態における、コンピュータ装置の例を示したブロック図である。上述した複数の電子機器110、120、130、140それぞれやサーバ150、160それぞれは、図2に示したコンピュータ装置200によって実現されてよい。例えば、コンピュータ装置200においては、一実施形態に係るコンピュータプログラムがインストールされて実行されてよく、コンピュータ装置200は、実行されるコンピュータプログラムの制御にしたがって本発明の一実施形態に係るJavaデバッガ遮断方法を実行してよい。
FIG. 2 is a block diagram showing an example of a computer device according to an embodiment of the present invention. Each of the plurality of
このようなコンピュータ装置200は、図2に示すように、メモリ210、プロセッサ220、通信インタフェース230、および入力/出力インタフェース240を含んでよい。メモリ210は、コンピュータ読み取り可能な記録媒体であって、RAM(random access memory)、ROM(read only memory)、およびディスクドライブのような永続的大容量記録装置を含んでよい。ここで、ROMやディスクドライブのような永続的大容量記録装置は、メモリ210とは区分される別の永続的記録装置としてコンピュータ装置200に含まれてもよい。また、メモリ210には、オペレーティングシステムと、少なくとも1つのプログラムコードが記録されてよい。このようなソフトウェア構成要素は、メモリ210とは別のコンピュータ読み取り可能な記録媒体からメモリ210にロードされてよい。このような別のコンピュータ読み取り可能な記録媒体は、フロッピードライブ、ディスク、テープ、DVD/CD−ROMドライブ、メモリカードなどのコンピュータ読み取り可能な記録媒体を含んでよい。他の実施形態において、ソフトウェア構成要素は、コンピュータ読み取り可能な記録媒体ではない通信インタフェース230を通じてメモリ210にロードされてもよい。例えば、ソフトウェア構成要素は、ネットワーク170を介して受信されるファイルによってインストールされるコンピュータプログラムに基づいてコンピュータ装置200のメモリ210にロードされてよい。
Such a
プロセッサ220は、基本的な算術、ロジック、および入出力演算を実行することにより、コンピュータプログラムの命令を処理するように構成されてよい。命令は、メモリ210または通信インタフェース230によって、プロセッサ220に提供されてよい。例えば、プロセッサ220は、メモリ210のような記録装置に記録されたプログラムコードにしたがって受信される命令を実行するように構成されてよい。
通信インタフェース230は、ネットワーク170を介してコンピュータ装置200が他の装置(一例として、上述した記録装置)と互いに通信するための機能を提供してよい。一例として、コンピュータ装置200のプロセッサ220がメモリ210のような記録装置に記録されたプログラムコードにしたがって生成した要求や命令、データ、ファイルなどが、通信インタフェース230の制御にしたがってネットワーク170を介して他の装置に伝達されてよい。これとは逆に、他の装置からの信号や命令、データ、ファイルなどが、ネットワーク170を経てコンピュータ装置200の通信インタフェース230を通じてコンピュータ装置200に受信されてよい。通信インタフェース230を通じて受信された信号や命令、データなどは、プロセッサ220やメモリ210に伝達されてよく、ファイルなどは、コンピュータ装置200がさらに含むことのできる記録媒体(上述した永続的記録装置)に記録されてよい。
The
入力/出力インタフェース240は、入力/出力装置250とのインタフェースのための手段であってよい。例えば、入力装置は、マイク、キーボード、またはマイクなどの装置を、出力装置は、ディスプレイ、スピーカのような装置を含んでよい。他の例として、入力/出力インタフェース240は、タッチスクリーンのように入力と出力のための機能が1つに統合された装置とのインタフェースのための手段であってもよい。入力/出力装置250は、コンピュータ装置200と1つの装置で構成されてもよい。
The input /
また、他の実施形態において、コンピュータ装置200は、図2の構成要素よりも少ないか多くの構成要素を含んでもよい。しかし、大部分の従来技術的構成要素を明確に図に示す必要はない。例えば、コンピュータ装置200は、上述した入力/出力装置250のうちの少なくとも一部を含むように実現されてもよいし、トランシーバ、データベースなどのような他の構成要素をさらに含んでもよい。
Also, in other embodiments, the
図3は、本発明の一実施形態における、Javaデバッガを遮断する過程の例を示した図である。コンピュータ装置200は、Java仮想マシン(Java Virtual Machine)300を含んでよい。Java仮想マシン300は、Java言語で作成されたプログラムを解釈して実行する仮想のコンピュータである。Java言語で記述されたプログラムはJavaコンパイラによってバイトコードのような中間コードに変換されるが、このとき、Java仮想マシン300は、このようなバイトコードを解釈して実行するソフトウェアモジュールであってよい。Javaは、オブジェクト指向プログラミング言語であって、JavaアプリケーションのデバッグのためにJDWP(JavaTM Debug Wire Protocol)のようなJavaアプリケーションとデバッガプロセスとの通信を定義するデバッグ規約を提供する。このとき、このようなデバッグ規約に従って動作するスレッドが存在することがある。図3は、Java仮想マシン300にアタッチ(attach)したn個のスレッド310を示しており、n個のスレッド310のうちスレッドn320をデバッグ規約に従って動作するスレッドとして示している。このとき、スレッドn320は、一般的にJDWPを名称として使用し、JDWPのようなデバッグ規約による機能を実行することにより、コンピュータ装置200にインストールされた他のソフトウェアであるデバッガ330がJavaアプリケーションと通信できるように動作する。例えば、スレッドn320は、デバッガ330が、n個のスレッド310のうち、Javaアプリケーションによる他のスレッドと通信できるようにする機能を提供してよい。
FIG. 3 is a diagram showing an example of a process of shutting off the Java debugger in one embodiment of the present invention. The
デバッガ330は、スレッドn320と連結することができない場合には、Javaアプリケーションによる他のスレッドと通信することができないため、本実施形態では、スレッドn320を終了させることによってJavaアプリケーションをデバッグしようとするデバッガ330を遮断する。図3では「pthread_exit()」340のような処理関数を利用してJava仮想マシン300にアタッチしたJDWPスレッドであるスレッドn320を終了させて無力化することによってデバッガ330を遮断する例を示している。
If the
図4は、本発明の一実施形態における、Javaデバッガ遮断方法の例を示したフローチャートである。本実施形態に係るJavaデバッガ遮断方法は、上述したコンピュータ装置200によって実行されてよい。例えば、コンピュータ装置200のプロセッサ220は、メモリ210が含むオペレーティングシステムのコード、および/または少なくとも1つのプログラムのコードによる制御命令(instruction)を実行するように実現されてよい。例えば、上述したプログラムコードは、デバッグの対象となるJavaアプリケーションのコードであってよい。言い換えれば、Javaアプリケーションは、Javaデバッガを遮断するためのコードを含んでよく、プロセッサ220は、コンピュータ装置200に記録されたJavaアプリケーションのコードが提供する制御命令にしたがってコンピュータ装置200が図3の制御方法に含まれる段階410〜430を実行するようにコンピュータ装置200を制御してよい。実施形態によっては、プログラムのコードは、デバッグの対象となるJavaアプリケーションとは別のプログラムによって提供されてもよい。
FIG. 4 is a flowchart showing an example of the Java debugger blocking method according to the embodiment of the present invention. The Java debugger blocking method according to the present embodiment may be executed by the
段階410で、コンピュータ装置200は、現在実行中のJava仮想マシンのハンドルを取得してよい。Javaコードを実行するすべてのスレッドはJava仮想マシンに連結(attach)しているため、このようなスレッドを「pthread_exit()」のような関数を利用して直ぐに終了させる場合にはJava仮想マシンで衝突が発生する恐れがある。したがって、コンピュータ装置200は、後にスレッドを終了させようとするときに「DetachCurrentThread()」のような関数を利用して終了させようとする関数をJava仮想マシンから予め分離(detach)してからスレッドを終了させてよく、このために、Java仮想マシンのハンドルを予め取得してよい。したがって、実施形態によっては、段階410は、スレッドをJava仮想マシンから分離させる前、一例として、段階420と段階430の間に実行されてもよい。
At
コンピュータ装置200は、「JNI_OnLoad()」のような関数によって呼び出されるJava仮想マシンのハンドルを記録してよい。例えば、仮想マシンのハンドルは、現在実行中のJava仮想マシンのオブジェクトにアクセスするためのアドレスポインタ値であって、Java仮想マシンがネイティブライブラリをロードする時点に先立ち、説明した関数「JNI_OnLoad()」を行うようになり、関数「JNI_OnLoad()」を呼び出す時点に呼び出されるハンドル(現在実行中のプロセッサのJava仮想マシンインスタンス自体に対するポインタ値として、一般的に「JNI_OnLoad()」に伝達される最初のパラメータ「JavaVM*vm」を意味する)を記録してよい。記録されたハンドルは、後にスレッドを分離する場合に、スレッド分離のための関数「DetachCurrentThread()」を呼び出すのに活用されてよい。ただし、コンピュータ上で実行中のJava仮想マシンのハンドルをインポートすることができる方法であれば、上述した関数「JNI_OnLoad()」に限定されることなく使用が可能である。
The
段階420で、コンピュータ装置200は、現在実行中のスレッドのうちからJavaで予め定義されたデバッグ規約に従って動作するスレッドを確認してよい。デバッグ規約は、上述したように、Javaアプリケーションとデバッガプロセスとの通信を定義するJDWPを含んでよい。このようなデバッグ規約に従って動作するスレッドの名称は一般的にはJDWPをそのまま使用するため、コンピュータ装置200は、スレッドのうちで名称がJDWPであるスレッドの識別子を確認することにより、デバッグ規約に従って動作するスレッドを確認してよい。他の実施形態として、コンピュータ装置200は、スレッドのうちからJDWP機能を実行するスレッドの識別子を確認することにより、デバッグ規約に従って動作するスレッドを確認してもよい。また他の実施形態として、コンピュータ装置200は、スレッドそれぞれのタスク情報を取得し、タスク情報に基づいてJDWPに対応するタスク情報を有するスレッドの識別子を確認することにより、デバッグ規約に従って動作するスレッドを確認してもよい。一例として、ユニックス(Unix)を使用するコンピュータ装置200は、PROCファイルシステムで現在実行中のプロセス情報にアクセスしてタスク情報をインポートしてよい。このとき、コンピュータ装置200は、JDWPに該当するタスクによってスレッドの識別子を確認してよい。
At
段階430で、コンピュータ装置200は、取得したJava仮想マシンのハンドルから確認されたスレッドを分離して終了させてよい。このように、デバッグ規約に従って動作するスレッドを終了させることにより、Javaデバッガ(一例として、図3を参照しながら説明したデバッガ330)はデバッグしようとするJavaアプリケーションと通信することができなくなり、これにより、Javaデバッガを遮断させることができるようになる。
At
一方、単にスレッドを終了させる場合には衝突が発生する恐れがあるため、コンピュータ装置200は、スレッドをJava仮想マシンのハンドルから分離させることで安全にスレッドを終了させることができる。
On the other hand, if the thread is simply terminated, a collision may occur. Therefore, the
図5は、本発明の一実施形態における、スレッドをJava仮想マシンのハンドルから分離させる過程の例を示したフローチャートである。図5の段階510〜520は、図4を参照しながら説明した段階430に含まれ、コンピュータ装置200によって実行されてよい。
FIG. 5 is a flowchart showing an example of a process of separating a thread from the handle of the Java virtual machine in one embodiment of the present invention.
段階510で、コンピュータ装置200は、確認されたスレッドの識別子を有する第1スレッドが終了するということを第1スレッドがJava仮想マシンに知らせて終了するように第1スレッドを制御する処理関数を登録してよい。このような処理関数は、図4および図5の段階を実行するようにコンピュータ装置200を制御するためのコンピュータプログラムに含まれてよく、コンピュータ装置200は、このようなコンピュータプログラムのコードによる制御命令にしたがい、コンピュータプログラムに含まれる処理関数をJava仮想マシンに登録してよい。
In
このような処理関数は、段階420で確認されたスレッド、言い換えれば、デバッグ規約に従って動作するスレッド(一例として、JDWPスレッド)が処理関数を実行するときに、JDWPスレッド自身が直ぐに終了するということをJava仮想マシンに知らせるようにするコードを含んでよく、このような知らせによってJDWPスレッドが正常に終了できるような環境が造成されてよく、Java仮想マシンのハンドルからJDWPスレッドが分離されてよい。また、処理関数は、JDWPスレッドが自身を終了させるようにするためのコードをさらに含んでよく、処理関数を実行するJDWPスレッドは自主的に終了してよい。
Such a processing function means that when the thread confirmed in
段階520で、コンピュータ装置200は、第1スレッドが処理関数を実行するように制御してよい。上述したように、第1スレッドが処理関数を実行することにより、第1スレッド自身が自主的に終了するということをJava仮想マシンに知らせた後、自らを終了させるように制御することができる。
At
このとき、第1スレッドが処理関数を実行するようにするために、コンピュータ装置200は、段階510で、スレッドそれぞれが処理関数を呼び出すように制御するユーザ定義シグナルをさらに登録してよく、段階520で、ユーザ定義シグナルを呼び出してスレッドが処理関数を呼び出すように制御してよい。より具体的な例として、ユニックス系列のオペレーティングシステムを使用するコンピュータ装置200の場合は、「sigaction()」のような関数を利用することで、ユーザ定義シグナル(シグナルの番号)とハンドラー(処理関数)をシステム(オペレーティングシステム)上に登録してよい。例えば、コンピュータ装置200は、コンピュータプログラムの制御にしたがって「sigaction()」関数を呼び出してよく、コンピュータプログラムが含むユーザ定義シグナルとハンドラーをコンピュータ装置200に登録してよい。この後、コンピュータプログラムの制御にしたがい、コンピュータ装置200が「kill()」関数を利用してシステムに登録されたユーザ定義シグナルを呼び出すことにより、Java仮想マシンが含むスレッドそれぞれが登録されたハンドラー(処理関数)を呼び出して実行するようになる。このとき、処理関数は、自身を呼び出したスレッドがJDWPスレッドであるかを確認する過程を経てよく、確認されたJDWPスレッド(第1スレッド)は、処理関数が含む機能を利用して自らを終了させるための過程を行ってよい。言い換えれば、コンピュータ装置200は、呼び出されたユーザ定義シグナルを処理するスレッドの識別子を段階420で確認されたJDWPスレッドの識別子と比較して該当のスレッドが確認されたJDWPスレッドと一致するかを確認してよく、該当のスレッドがJDWPスレッドである場合には、JDWPスレッドが処理関数を実行して自身が終了することをJava仮想マシンに知らせ、自身をJava仮想マシンから分離させて終了するように制御してよい。
At this time, in order to allow the first thread to execute the processing function, the
上述したように、JDWPスレッドが終了する場合には、図3を参照しながら説明したデバッガ330のようなJavaデバッガがデバッグしようとするJavaアプリケーションと通信することができなくなるため、JavaデバッガをJavaアプリケーションから遮断することができる。既にJavaアプリケーションとアタッチしたJavaデバッガであったとしても、JDWPスレッドの終了により、JavaデバッガとJavaアプリケーションとはこれ以上の通信が不可能となるため、JavaデバッガはJavaアプリケーションからデタッチ(detach)して遮断される。
As described above, when the JDWP thread is terminated, it becomes impossible for the Java debugger such as the
以上のように、本発明の実施形態によると、Javaアプリケーションとデバッガとの通信を定義するデバッグ規約に従って動作するスレッドを終了させることにより、Javaアプリケーションに対するデバッガの影響を遮断することができる。 As described above, according to the embodiment of the present invention, the influence of the debugger on the Java application can be blocked by terminating the thread that operates according to the debug convention that defines the communication between the Java application and the debugger.
上述したシステムまたは装置は、ハードウェア構成要素、ソフトウェア構成要素、またはハードウェア構成要素とソフトウェア構成要素との組み合わせによって実現されてよい。例えば、実施形態で説明された装置および構成要素は、例えば、プロセッサ、コントローラ、ALU(arithmetic logic unit)、デジタル信号プロセッサ、マイクロコンピュータ、FPGA(field programmable gate array)、PLU(programmable logic unit)、マイクロプロセッサ、または命令を実行して応答することができる様々な装置のように、1つ以上の汎用コンピュータまたは特殊目的コンピュータを利用して実現されてよい。処理装置は、オペレーティングシステム(OS)およびOS上で実行される1つ以上のソフトウェアアプリケーションを実行してよい。また、処理装置は、ソフトウェアの実行に応答し、データにアクセスし、データを記録、操作、処理、および生成してもよい。理解の便宜のために、1つの処理装置が使用されるとして説明される場合もあるが、当業者は、処理装置が複数個の処理要素および/または複数種類の処理要素を含んでもよいことが理解できるであろう。例えば、処理装置は、複数個のプロセッサまたは1つのプロセッサおよび1つのコントローラを含んでよい。また、並列プロセッサのような、他の処理構成も可能である。 The system or device described above may be implemented by a hardware component, a software component, or a combination of the hardware component and the software component. For example, the apparatus and components described in the embodiments include, for example, a processor, a controller, an ALU (arithmetic logic unit), a digital signal processor, a microprocessor, an FPGA (field programgate array), a PLU (programmable log unit), and a microprocessor. It may be implemented utilizing one or more general purpose computers or special purpose computers, such as a processor or various devices capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the OS. The processing device may also respond to the execution of the software, access the data, and record, manipulate, process, and generate the data. For convenience of understanding, one processing device may be described as being used, but one of ordinary skill in the art may indicate that the processing device may include a plurality of processing elements and / or a plurality of types of processing elements. You can understand. For example, the processing device may include multiple processors or one processor and one controller. Other processing configurations, such as parallel processors, are also possible.
ソフトウェアは、コンピュータプログラム、コード、命令、またはこれらのうちの1つ以上の組み合わせを含んでもよく、思うままに動作するように処理装置を構成したり、独立的または集合的に処理装置に命令したりしてよい。ソフトウェアおよび/またはデータは、処理装置に基づいて解釈されたり、処理装置に命令またはデータを提供したりするために、いかなる種類の機械、コンポーネント、物理装置、仮想装置、コンピュータ記録媒体または装置に具現化されてよい。ソフトウェアは、ネットワークによって接続されたコンピュータシステム上に分散され、分散された状態で記録されても実行されてもよい。ソフトウェアおよびデータは、1つ以上のコンピュータ読み取り可能な記録媒体に記録されてよい。 The software may include computer programs, code, instructions, or a combination of one or more of these, configuring the processing equipment to operate at will, or instructing the processing equipment independently or collectively. You may do it. The software and / or data is embodied in any type of machine, component, physical device, virtual device, computer recording medium or device for interpretation based on the processing device or for providing instructions or data to the processing device. May be converted. The software is distributed on a networked computer system and may be recorded or executed in a distributed state. The software and data may be recorded on one or more computer-readable recording media.
実施形態に係る方法は、多様なコンピュータ手段によって実行可能なプログラム命令の形態で実現されてコンピュータ読み取り可能な媒体に記録されてよい。前記コンピュータ読み取り可能な媒体は、プログラム命令、データファイル、データ構造などを単独でまたは組み合わせて含んでよい。前記媒体に記録されるプログラム命令は、実施形態のために特別に設計されて構成されたものであっても、コンピュータソフトウェア当業者に公知な使用可能なものであってもよい。コンピュータ読み取り可能な記録媒体の例としては、ハードディスク、フロッピディスク、および磁気テープのような磁気媒体、CD−ROM、DVDのような光媒体、フロプティカルディスク(floptical disk)のような光磁気媒体、およびROM、RAM、フラッシュメモリなどのようなプログラム命令を記録して実行するように特別に構成されたハードウェア装置が含まれる。プログラム命令の例には、コンパイラによって生成されるもののような機械語コードだけではなく、インタプリタなどを使用してコンピュータによって実行される高級言語コードを含む。 The method according to the embodiment may be implemented in the form of program instructions that can be executed by various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be those specially designed and configured for the embodiment or may be usable known to those skilled in the art of computer software. Examples of computer-readable recording media include hard disks, floppy disks, and magnetic media such as magnetic tapes, optical media such as CD-ROMs and DVDs, and optical magnetic media such as floptic discs. , And hardware devices specially configured to record and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language code, such as those generated by a compiler, but also high-level language code, which is executed by a computer using an interpreter or the like.
以上のように、実施形態を、限定された実施形態および図面に基づいて説明したが、当業者であれば、上述した記載から多様な修正および変形が可能であろう。例えば、説明された技術が、説明された方法とは異なる順序で実行されたり、かつ/あるいは、説明されたシステム、構造、装置、回路などの構成要素が、説明された方法とは異なる形態で結合されたりまたは組み合わされたり、他の構成要素または均等物によって対置されたり置換されたとしても、適切な結果を達成することができる。 As described above, the embodiments have been described based on the limited embodiments and drawings, but those skilled in the art will be able to make various modifications and modifications from the above description. For example, the techniques described may be performed in a different order than the methods described, and / or components such as the systems, structures, devices, circuits described may be in a form different from the methods described. Appropriate results can be achieved even if they are combined or combined, or confronted or replaced by other components or equivalents.
したがって、異なる実施形態であっても、特許請求の範囲と均等なものであれば、添付される特許請求の範囲に属する。 Therefore, even if the embodiments are different, they belong to the attached claims as long as they are equal to the claims.
Claims (15)
前記Javaデバッガ遮断方法は、
前記コンピュータ上で現在実行中のJava仮想マシンのハンドルを取得する段階、
前記コンピュータ上で現在実行中のスレッドのうちからJavaで予め定義されたデバッグ規約に従って動作するスレッドを確認する段階、および
前記取得したJava仮想マシンのハンドルから前記確認されたスレッドを分離して終了させる段階
を含む、コンピュータプログラム。 A computer program that causes a computer to execute the Java debugger blocking method.
The Java debugger blocking method is
Obtaining the handle of the Java virtual machine currently running on the computer,
The stage of confirming the thread that operates according to the debug convention defined in Java from the threads currently running on the computer, and the step of separating the confirmed thread from the handle of the acquired Java virtual machine and terminating it. A computer program that includes stages.
前記スレッドのうちで名称がJDWPであるスレッドの識別子を確認する段階
を含む、請求項1に記載のコンピュータプログラム。 The stage of checking the thread is
The computer program according to claim 1, further comprising a step of confirming an identifier of a thread whose name is JDWP among the threads.
前記スレッドのうちでJDWP機能を実行するスレッドの識別子を確認する段階
を含む、請求項1に記載のコンピュータプログラム。 The stage of checking the thread is
The computer program according to claim 1, further comprising a step of confirming the identifier of the thread that executes the JDWP function among the threads.
前記スレッドそれぞれのタスク情報に基づいてJDWPに対応するタスク情報を有するスレッドの識別子を確認する段階
を含む、請求項1に記載のコンピュータプログラム。 The stage of checking the thread is
The computer program according to claim 1, further comprising a step of confirming an identifier of a thread having task information corresponding to JDWP based on the task information of each thread.
前記確認されたスレッドの識別子を有する第1スレッドが終了するということを前記第1スレッドが前記Java仮想マシンに知らせて終了するように前記第1スレッドを制御する処理関数を登録する段階、および
前記第1スレッドが前記処理関数を実行するように制御する段階
を含み、
前記第1スレッドが前記登録された処理関数を実行することにより、前記第1スレッドが前記Java仮想マシンから分離して終了する、請求項1に記載のコンピュータプログラム。 The step of separating and terminating the confirmed thread is
A step of registering a processing function that controls the first thread so that the first thread notifies the Java virtual machine that the first thread having the confirmed thread identifier is terminated, and the above. Including the step of controlling the first thread to execute the processing function.
The computer program according to claim 1, wherein the first thread separates from the Java virtual machine and terminates by executing the registered processing function.
前記スレッドそれぞれが前記処理関数を呼び出すように制御するユーザ定義シグナルをさらに登録し、
前記制御する段階は、
前記ユーザ定義シグナルを呼び出して前記スレッドが前記処理関数を呼び出すように制御する、請求項6に記載のコンピュータプログラム。 The registration stage is
Further register a user-defined signal that controls each of the threads to call the processing function.
The control step is
The computer program according to claim 6, wherein the user-defined signal is called to control the thread to call the processing function.
コンピュータ上で現在実行中のJava仮想マシンのハンドルを取得する段階、
前記コンピュータ上で現在実行中のスレッドのうちからJavaで予め定義されたデバッグ規約に従って動作するスレッドを確認する段階、および
前記取得したJava仮想マシンのハンドルから前記確認されたスレッドを分離して終了させる段階
を含む、Javaデバッガ遮断方法。 A method of blocking the Java debugger executed by the computer processor.
Getting the handle of the Java virtual machine currently running on your computer,
At the stage of confirming the thread that operates according to the debug convention defined in Java from the threads currently running on the computer, and separating the confirmed thread from the handle of the acquired Java virtual machine and terminating it. Java Debugger blocking method, including steps.
前記スレッドのうちで名称がJDWPであるスレッドの識別子を確認する段階
を含む、請求項8に記載のJavaデバッガ遮断方法。 The stage of checking the thread is
The Java debugger blocking method according to claim 8, further comprising a step of confirming the identifier of the thread whose name is JDWP among the threads.
前記スレッドのうちでJDWP機能を実行するスレッドの識別子を確認する段階
を含む、請求項8に記載のJavaデバッガ遮断方法。 The stage of checking the thread is
The Java debugger blocking method according to claim 8, further comprising a step of confirming the identifier of the thread that executes the JDWP function among the threads.
前記スレッドそれぞれのタスク情報に基づいてJDWPに対応するタスク情報を有するスレッドの識別子を確認する段階
を含む、請求項8に記載のJavaデバッガ遮断方法。 The stage of checking the thread is
The Java debugger blocking method according to claim 8, further comprising a step of confirming an identifier of a thread having task information corresponding to JDWP based on the task information of each thread.
前記確認されたスレッドの識別子を有する第1スレッドが終了するということを前記第1スレッドが前記Java仮想マシンに知らせて終了するように前記第1スレッドを制御する処理関数を登録する段階、および
前記第1スレッドが前記処理関数を実行するように制御する段階
を含み、
前記第1スレッドが前記登録された処理関数を実行することにより、前記第1スレッドが前記Java仮想マシンから分離して終了する、請求項8に記載のJavaデバッガ遮断方法。 The step of separating and terminating the confirmed thread is
A step of registering a processing function that controls the first thread so that the first thread notifies the Java virtual machine that the first thread having the confirmed thread identifier is terminated, and the above. Including the step of controlling the first thread to execute the processing function.
The Java debugger blocking method according to claim 8, wherein the first thread separates from the Java virtual machine and terminates by executing the registered processing function.
前記スレッドそれぞれが前記処理関数を呼び出すように制御するユーザ定義シグナルをさらに登録し、
前記制御する段階は、
前記ユーザ定義シグナルを呼び出して前記スレッドが前記処理関数を呼び出すように制御する、請求項13に記載のJavaデバッガ遮断方法。 The registration stage is
Further register a user-defined signal that controls each of the threads to call the processing function.
The control step is
The Java debugger blocking method according to claim 13, wherein the user-defined signal is called to control the thread to call the processing function.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/KR2018/006069 WO2019231000A1 (en) | 2018-05-29 | 2018-05-29 | Java debugger blocking method and system for protecting program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021530014A true JP2021530014A (en) | 2021-11-04 |
JP7076014B2 JP7076014B2 (en) | 2022-05-26 |
Family
ID=68697575
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020566950A Active JP7076014B2 (en) | 2018-05-29 | 2018-05-29 | Java Debugger blocking method and system for program protection |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7076014B2 (en) |
WO (1) | WO2019231000A1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11175336A (en) * | 1997-10-15 | 1999-07-02 | Dell Usa Lp | Method and system for obstructing non-permitted access of computer program |
JP2001159984A (en) * | 1999-09-10 | 2001-06-12 | Sun Microsyst Inc | Device and method for preventing denial of service attack |
WO2014153680A1 (en) * | 2013-03-27 | 2014-10-02 | Irdeto B.V. | Protecting software application |
KR101632152B1 (en) * | 2015-08-11 | 2016-06-21 | 숭실대학교산학협력단 | Apparatus for preventing dynamic analysis on mobile platform and method thereof |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100781554B1 (en) * | 2004-11-29 | 2007-12-03 | 주식회사 안철수연구소 | Method for preventing from debugging computer program in real time and recording material thereof |
GB2487575B (en) * | 2011-01-28 | 2017-04-12 | Advanced Risc Mach Ltd | Controlling generation of debug exceptions |
KR101519845B1 (en) * | 2013-11-14 | 2015-05-13 | (주)잉카엔트웍스 | Method For Anti-Debugging |
KR101583545B1 (en) * | 2015-07-22 | 2016-01-08 | 주식회사 엔에스에이치씨 | Security providing method of improving security of application in mobile device using respective debugging monitoring |
-
2018
- 2018-05-29 WO PCT/KR2018/006069 patent/WO2019231000A1/en active Application Filing
- 2018-05-29 JP JP2020566950A patent/JP7076014B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11175336A (en) * | 1997-10-15 | 1999-07-02 | Dell Usa Lp | Method and system for obstructing non-permitted access of computer program |
JP2001159984A (en) * | 1999-09-10 | 2001-06-12 | Sun Microsyst Inc | Device and method for preventing denial of service attack |
WO2014153680A1 (en) * | 2013-03-27 | 2014-10-02 | Irdeto B.V. | Protecting software application |
KR101632152B1 (en) * | 2015-08-11 | 2016-06-21 | 숭실대학교산학협력단 | Apparatus for preventing dynamic analysis on mobile platform and method thereof |
Also Published As
Publication number | Publication date |
---|---|
WO2019231000A1 (en) | 2019-12-05 |
JP7076014B2 (en) | 2022-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2691187C1 (en) | System and methods for auditing a virtual machine | |
RU2679175C1 (en) | Method of behavioral detection of malicious programs using a virtual interpreter machine | |
JP5985631B2 (en) | Activate trust level | |
US10013553B2 (en) | Protecting software application | |
JP2017146966A (en) | Method and system for extending function to package file | |
US9910979B2 (en) | Intercepting inter-process communications | |
US10289397B2 (en) | Silent installation of software with dependencies | |
US10078580B2 (en) | Operations to avoid wrapped mobile application operational errors due to interference from wrapper logic components | |
US20210026949A1 (en) | Systems and methods for hardening security systems using live patching | |
CN108121650B (en) | Method and device for testing page user interface | |
US20220075647A1 (en) | Methods and apparatus to protect open and closed operating systems | |
US20190121985A1 (en) | Detecting vulnerabilities in applications during execution | |
US9942268B1 (en) | Systems and methods for thwarting unauthorized attempts to disable security managers within runtime environments | |
US9552481B1 (en) | Systems and methods for monitoring programs | |
US9313218B1 (en) | Systems and methods for providing information identifying the trustworthiness of applications on application distribution platforms | |
JP2018152061A (en) | Secure just-in-time (jit) code generation | |
KR101977428B1 (en) | Content handling for applications | |
JP7076014B2 (en) | Java Debugger blocking method and system for program protection | |
US11921874B2 (en) | Method and system for protecting file using class distribution and sequential memory loading | |
KR102623022B1 (en) | Debugger blocking method and system for program protection | |
US8510719B2 (en) | Real-time user configurable debugging framework | |
US9697018B2 (en) | Synthesizing inputs to preserve functionality | |
JP2014197307A (en) | Monitoring processing method, monitoring processor and monitoring processing system | |
US20200142689A1 (en) | System And Methods for Patch Management | |
US9734312B1 (en) | Systems and methods for detecting when users are uninstalling applications |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210510 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220419 |
|
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: 20220426 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220516 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7076014 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |