WO2019231000A1 - 프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템 - Google Patents

프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템 Download PDF

Info

Publication number
WO2019231000A1
WO2019231000A1 PCT/KR2018/006069 KR2018006069W WO2019231000A1 WO 2019231000 A1 WO2019231000 A1 WO 2019231000A1 KR 2018006069 W KR2018006069 W KR 2018006069W WO 2019231000 A1 WO2019231000 A1 WO 2019231000A1
Authority
WO
WIPO (PCT)
Prior art keywords
thread
java
computer
debugger
threads
Prior art date
Application number
PCT/KR2018/006069
Other languages
English (en)
French (fr)
Inventor
정상민
임승현
전상훈
Original Assignee
라인플러스 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 라인플러스 주식회사 filed Critical 라인플러스 주식회사
Priority to JP2020566950A priority Critical patent/JP7076014B2/ja
Priority to PCT/KR2018/006069 priority patent/WO2019231000A1/ko
Publication of WO2019231000A1 publication Critical patent/WO2019231000A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation

Definitions

  • Java debugger blocking method for protecting the program
  • Java debugger blocking system that performs the Java debugger blocking method
  • computer program stored in a computer readable recording medium in combination with a computer to execute the Java debugger blocking method on the computer. It relates to a recording medium.
  • Debugging is essential in the analysis of applications through reverse engineering. Debugging is the act of checking for and fixing errors in a program, and the program used to do this is called a debugger. Such debugging can be performed on a normal program without errors. In this case, not only can the intended behavior of the original program be changed, but also can be used for malicious purposes to grasp the operation principle inside the program.
  • Korean Patent No. 10-1328012 relates to an apparatus for obfuscating an application code and a method thereof, and a technology for converting an important code and a calling code for calling an important code into a native code form among codes used in an application. Is starting.
  • this conventional technology requires an additional execution time to execute obfuscated code, and has a problem in that the original code must be loaded into memory at a specific point in time to perform the original operation.
  • Java debugger blocking method that can block the effect of debugger on Java application by terminating a thread that runs according to debugging protocol that defines communication between Java application and debugger, Java debugger blocking system that performs Java debugger blocking method, computer And a computer program stored on a computer readable recording medium for executing the Java debugger blocking method on a computer.
  • CLAIMS 1.
  • a method for blocking a Java debugger executed by a processor of a computer comprising: obtaining a handle of a Java virtual machine currently running on the computer; Identifying a thread operating according to a debugging convention predefined in Java among threads currently running on the computer; And separating and terminating the identified thread from the handle of the obtained Java virtual machine.
  • a computer program stored in a computer readable recording medium for computer executing the Java debugger blocking method is provided.
  • a computer program for recording a computer program for executing the Java debugger blocking method is provided.
  • At least one processor implemented to execute computer readable instructions, wherein the at least one processor obtains a handle of a Java virtual machine currently running on the computer, and among the threads currently running on the computer.
  • the present invention provides a computer device for identifying a thread operating according to a debugging convention defined in Java and separating and terminating the identified thread from a handle of the obtained Java virtual machine.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention.
  • FIG. 3 is a diagram illustrating an example of a process of blocking a Java debugger in an embodiment of the present invention.
  • FIG. 4 is a flowchart illustrating an example of a Java debugger blocking method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart illustrating an example of a process of detaching a thread from a handle of a Java virtual machine, according to an exemplary embodiment.
  • the Java debugger blocking system may be implemented through a computer such as the computer device 200 described with reference to FIG. 2, and the Java debugger blocking method according to the embodiments of the present invention may be a computer. It can be performed through.
  • a computer may be driven by a computer program (for example, an application installed in a computer device to receive a specific service) according to an embodiment of the present invention, and the computer may be run according to the control of the driven computer program.
  • the Java debugger blocking method may be performed according to an embodiment of the present invention.
  • the computer program described above may be stored in a computer-readable recording medium in combination with a computer to cause the computer to execute the Java debugger blocking method.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • the network environment of FIG. 1 illustrates an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170.
  • 1 is an example for describing the present invention, and the number of electronic devices or the number of servers is not limited as shown in FIG. 1.
  • the plurality of electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented as computer devices.
  • Examples of the plurality of electronic devices 110, 120, 130, and 140 include a smart phone, a mobile phone, a navigation device, a computer, a notebook computer, a digital broadcasting terminal, a personal digital assistant (PDA), and a portable multimedia player (PMP). Tablet PC).
  • FIG. 1 illustrates the shape of a smart phone as an example of the electronic device 1 110, in the embodiments of the present invention, the electronic device 1 110 may use a wireless or wired communication method to substantially connect the network 170. It may mean one of various physical devices that can communicate with other electronic devices 120, 130, 140 and / or servers 150, 160.
  • the communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired internet, a wireless internet, a broadcasting network) that the network 170 may include, but also a short range wireless communication between devices.
  • the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). And one or more of networks such as the Internet.
  • the network 170 may also include any one or more of network topologies, including bus networks, star networks, ring networks, mesh networks, star-bus networks, trees, or hierarchical networks, but It is not limited.
  • Each of the servers 150 and 160 communicates with the plurality of electronic devices 110, 120, 130, and 140 through the network 170 to provide a command, code, file, content, service, or the like. It may be implemented in devices.
  • the server 150 may be a system that provides a first service to a plurality of electronic devices 110, 120, 130, and 140 connected through the network 170, and the server 160 may also have a network ( It may be a system that provides a second service to the plurality of electronic devices 110, 120, 130, and 140 connected through the 170.
  • the server 150 may provide a service associated with an application (computer program) installed in the plurality of electronic devices 110, 120, 130, and 140 as the first service.
  • the server 160 may provide a service for providing an installation file of an application for the first service to a plurality of electronic devices 110, 120, 130, and 140 as the second service.
  • FIG. 2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention.
  • Each of the plurality of electronic devices 110, 120, 130, and 140 or each of the servers 150 and 160 described above may be implemented by the computer device 200 shown in FIG. 2.
  • a computer program according to an embodiment may be installed and run on the computer device 200, and the computer device 200 may block Java debugger according to embodiments of the present invention under the control of the driven computer program. The method can be performed.
  • the computer device 200 may include a memory 210, a processor 220, a communication interface 230, and an input / output interface 240.
  • the memory 210 may be a computer-readable recording medium, and may include a permanent mass storage device such as random access memory (RAM), read only memory (ROM), and a disk drive.
  • RAM random access memory
  • ROM read only memory
  • the non-volatile mass storage device such as a ROM and a disk drive may be included in the computer device 200 as a separate permanent storage device separate from the memory 210.
  • the memory 210 may store an operating system and at least one program code. These software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210.
  • Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, disk, tape, DVD / CD-ROM drive, memory card, and the like.
  • the software components may be loaded into the memory 210 via the communication interface 230 rather than the computer readable recording medium.
  • software components may be loaded into memory 210 of computer device 200 based on a computer program installed by files received via network 170.
  • the processor 220 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. Instructions may be provided to the processor 220 by the memory 210 or the communication interface 230. For example, the processor 220 may be configured to execute a command received according to a program code stored in a recording device such as the memory 210.
  • the communication interface 230 may provide a function for the computer device 200 to communicate with other devices (eg, storage devices described above) through the network 170. For example, a request, a command, data, a file, etc. generated by the processor 220 of the computer device 200 according to a program code stored in a recording device such as the memory 210 may be controlled according to the control of the communication interface 230. 170 may be transferred to other devices. Conversely, signals, commands, data, files, and the like from other devices may be received by the computer device 200 via the communication interface 230 of the computer device 200 via the network 170. Signals, commands, data, and the like received through the communication interface 230 may be transmitted to the processor 220 or the memory 210, and the files and the like may be further included in the storage medium (described above). Persistent storage).
  • the input / output interface 240 may be a means for interfacing with the input / output device 250.
  • the input device may include a device such as a microphone, a keyboard or a mouse
  • the output device may include a device such as a display or a speaker.
  • the input / output interface 240 may be a means for interfacing with a device in which functions for input and output are integrated into one, such as a touch screen.
  • the input / output device 250 may be configured as the computer device 200 and one device.
  • the computer device 200 may include fewer or more components than the components of FIG. 2. However, it is not necessary to clearly show most of the prior art components.
  • the computer device 200 may be implemented to include at least some of the input and output devices 250 described above, or may further include other components such as a transceiver, a database, and the like.
  • the computer device 200 may include a Java virtual machine 300.
  • the Java virtual machine 300 is a virtual computer that interprets and executes a program written in the Java language.
  • a program described in the Java language is converted into intermediate code such as byte code by a Java compiler, and the Java virtual machine 300 may be a software module that interprets and executes the byte code.
  • Java is an object-oriented programming language that provides debugging conventions that define the communication between a Java application and a debugger process, such as the Java TM Debug Wire Protocol (JDWP), for debugging Java applications. At this time, there may be a thread operating according to such debugging convention.
  • JDWP Java TM Debug Wire Protocol
  • the thread n (320) generally uses the JDWP as a name, and performs a function according to a debugging convention such as JDWP to enable the debugger 330, which is another software installed in the computer device 200, to communicate with the Java application. can do.
  • the thread n 320 may provide a function to enable the debugger 330 to communicate with another thread according to a Java application among the n threads 310.
  • the debugger 330 Since the debugger 330 cannot communicate with another thread according to the Java application when the thread n 320 cannot be connected, the debugger 330 which debugs the Java application by terminating the thread n 320 in the present embodiment. Can be blocked. 3 illustrates an example in which the debugger 330 is blocked by terminating and incapacitating thread n 320, which is a JDWP thread attached to the Java virtual machine 300, through a processing function such as "pthread_exit ()" 340. It is shown.
  • the Java debugger blocking method according to the present embodiment may be performed by the computer device 200 described above.
  • the processor 220 of the computer device 200 may be implemented to execute a control instruction according to code of an operating system and / or code of at least one program included in the memory 210.
  • the above program code may be code of a Java application to be debugged.
  • the Java application may include code for blocking the Java debugger
  • the processor 220 is a computer device 200 according to the control command provided by the code of the Java application stored in the computer device 200 is shown in FIG.
  • the computer apparatus 200 may be controlled to perform the steps 410 to 430 included in the control method.
  • the code of the program may be provided through a program separate from the Java application to be debugged.
  • the computer device 200 may obtain a handle of a currently running Java virtual machine. All threads that execute Java code are attached to the Java virtual machine, so if you terminate these threads directly using a function like "pthread_exit ()", the Java virtual machine may crash. Therefore, the computer device 200 may terminate the thread by detaching the function to be terminated from the Java virtual machine in advance by using a function such as "DetachCurrentThread ()" when the thread is to be terminated later.
  • the handle of the Java virtual machine can be obtained in advance.
  • step 410 may be performed between steps 420 and 430, for example, before detaching the thread from the Java virtual machine.
  • the computer device 200 may store a handle of a Java virtual machine that is passed through a function such as "JNI_OnLoad ()".
  • the handle of a virtual machine is an address pointer value for accessing an object of a currently running Java virtual machine, which is the function "JNI_OnLoad ()" described earlier when the Java virtual machine loads a native library.
  • the handle passed at the time of calling "JNI_OnLoad ()" pointer value to the Java virtual machine instance itself of the currently running processor, usually the first parameter 'JavaVM * vm' passed to "JNI_OnLoad ()" You can save it.
  • the stored handle can be used to call the function "DetachCurrentThread ()" for detaching the thread later when detaching the thread.
  • the method of getting the handle of the Java virtual machine running on the computer can be used without being limited to the function "JNI_OnLoad ()" described above.
  • the computer device 200 may identify a thread that operates according to a debugging protocol predefined in Java among threads that are currently being executed.
  • the debugging convention may include a JDWP that defines the communication between the Java application and the debugger process, as described above. Since the name of a thread operating according to the debugging convention generally uses the JDWP as it is, the computer device 200 may identify the thread operating according to the debugging convention by checking an identifier of a thread whose name is JDWP. In another embodiment, the computer device 200 may identify a thread operating according to a debugging protocol by checking an identifier of a thread that performs a JDWP function among the threads.
  • the computer device 200 obtains task information of each of the threads, and checks an identifier of a thread having task information corresponding to the JDWP based on the task information, thereby identifying a thread operating according to a debugging convention. You can also check.
  • the computer device 200 using Unix may access task information currently executed in the PROC file system and obtain task information. In this case, the computer device 200 may check the identifier of the thread through a task corresponding to the JDWP.
  • the computer device 200 may terminate the identified thread from the handle of the obtained Java virtual machine.
  • the Java debugger for example, the debugger 330 described with reference to FIG. 3
  • the Java debugger may not be able to communicate with the Java application to be debugged, thus blocking the Java debugger. .
  • the computer device 200 may terminate the thread safely by detaching the thread from the handle of the Java virtual machine.
  • FIG. 5 is a flowchart illustrating an example of a process of detaching a thread from a handle of a Java virtual machine, according to an exemplary embodiment. Steps 510 and 520 of FIG. 5 may be included in step 430 described with reference to FIG. 4 and may be performed by the computer device 200.
  • the computer device 200 may register a processing function that controls the first thread so that the first thread notifies the Java virtual machine that the first thread with the identified thread's identifier is to be terminated and terminates.
  • a processing function may include a computer program for controlling the computer device 200 to perform the steps of FIGS. 4 and 5, the computer device 200 according to a control command according to the code of such a computer program. You can register this containing processing function in the Java virtual machine.
  • This processing function causes the JDWP thread to terminate itself soon when the thread identified in step 420, i.e., a thread operating according to debugging conventions (e.g., a JDWP thread), executes the processing function. It can include code to notify the user, and this notification can create an environment in which the JDWP thread can terminate normally, and can separate the JDWP thread from the handle of the Java virtual machine.
  • the processing function may further include code for causing the JDWP thread to terminate itself, and the JDWP thread performing the processing function may terminate itself.
  • the computer device 200 may control the first thread to perform a processing function.
  • the first thread can notify the Java virtual machine that it will terminate itself, and then control to terminate itself.
  • the computer device 200 may further register a user-defined signal for controlling each of the threads to call the processing function in step 510, and step 520. ), You can call a custom signal to control threads to call processing functions. More specifically, in the case of a computer device 200 using a Unix-like operating system, a user-defined signal (signal number) and a handler (processing function) may be assigned to a system (operating system) using a function such as "sigaction ()". You can register at For example, the computer device 200 may call the "sigaction ()" function under the control of the computer program, and register the user-defined signals and handlers included in the computer program to the computer device 200.
  • a user-defined signal signal number
  • a handler processing function
  • each of the threads included in the Java virtual machine are registered handlers (processing functions). Will be called and executed.
  • the processing function may go through a process of checking whether the calling thread is a JDWP thread, and the checked JDWP thread (first thread) may proceed to terminate itself by using a function included in the processing function. have.
  • the computer device 200 may compare the identifier of the thread handling the called user-defined signal with the identifier of the JDWP thread identified in step 420 to determine whether the corresponding thread is the identified JDWP thread, and the thread. Is a JDWP thread, the JDWP thread can execute a processing function to tell the Java virtual machine that it will be terminated, detaching itself from the Java virtual machine, and controlling itself to terminate.
  • the Java debuggers may be blocked from the Java application because Java debuggers such as the debugger 330 described with reference to FIG. 3 may not communicate with the Java application to be debugged. Even if the Java debugger is already attached to a Java application, as the JDWP thread terminates, the Java debugger is detached from the Java application and blocked because the Java debugger can no longer communicate with the Java application.
  • the effect of the debugger on the Java application may be blocked by terminating a thread operating according to a debugging protocol defining communication between the Java application and the debugger.
  • the system or apparatus described above may be implemented as a hardware component, a software component or a combination of hardware components and software components.
  • the devices and components described in the embodiments are, for example, processors, controllers, arithmetic logic units (ALUs), digital signal processors, microcomputers, field programmable gate arrays (FPGAs). May be implemented using one or more general purpose or special purpose computers, such as a programmable logic unit (PLU), a microprocessor, or any other device 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 operating system.
  • the processing device may also access, store, manipulate, process, and generate data in response to the execution of the software.
  • OS operating system
  • the processing device may also access, store, manipulate, process, and generate data in response to the execution of the software.
  • processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include.
  • the processing device may include a plurality of processors or one processor and one controller.
  • other processing configurations are possible, such as parallel processors.
  • the software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device.
  • Software and / or data may be any type of machine, component, physical device, virtual equipment, computer storage medium or device in order to be interpreted by or to provide instructions or data to the processing device. It can be embodied in.
  • the software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner.
  • Software and data may be stored on one or more computer readable recording media.
  • the method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium.
  • the computer readable medium may include program instructions, data files, data structures, and the like, alone or in combination.
  • the program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts.
  • Examples of computer readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks such as floppy disks.
  • Examples of program instructions include machine code, such as produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like.

Abstract

프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템을 제공한다. 컴퓨터의 프로세서에 의해 실행되는 자바 디버거 차단 방법은, 컴퓨터상에서 현재 실행중인 자바 가상 머신의 핸들을 획득하는 단계, 상기 컴퓨터상에서 현재 실행중인 스레드들 중 자바에서 기 정의된 디버깅 규약에 따라 동작하는 스레드를 확인하는 단계 및 상기 획득한 자바 가상 머신의 핸들로부터 상기 확인된 스레드를 분리하여 종료시키는 단계를 포함할 수 있다.

Description

프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템
아래의 설명은 프로그램 보호를 위한 자바 디버거 차단 방법, 자바 디버거 차단 방법을 수행하는 자바 디버거 차단 시스템, 컴퓨터와 결합되어 자바 디버거 차단 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램 및 그 기록매체에 관한 것이다.
클라이언트 단말로 배포된 어플리케이션들은 역공학(리버싱)을 통해서 그 동작 방식을 파악할 수 있으며, 이러한 역공학을 통해 어플리케이션의 기능의 도용이 가능해진다. 또한, 어플리케이션의 원래의 기능을 수정하여 어플리케이션이 의도된 동작과 다르게 동작하도록 하여 어플리케이션을 통해 제공되는 서비스와 해당 서비스를 제공하는 시스템의 신뢰성에 좋지 않은 영향을 줄 수 있게 된다.
이러한 역공학을 통한 어플리케이션의 분석 과정에서는 디버깅(debugging)이 필수적으로 활용된다. 디버깅은 프로그램의 오류를 확인하고 수정하는 행위를 말하며, 이러한 행위를 위해 사용되는 프로그램을 디버거라고 한다. 이러한 디버깅은 오류가 없는 정상적인 프로그램에 대해서도 수행될 수 있으며, 이 경우 원래 프로그램의 의도된 동작을 변경할 수 있을 뿐만 아니라, 프로그램 내부의 동작 원리를 파악하기 위한 악의적인 목적으로 사용될 수 있다.
기존에는 빌드된 프로그램을 보호하기 위해 코드의 수정과 동작 형태의 이해를 어렵게 하고자 본래의 동작 방식을 변경하거나 일부분을 암호화 하는 방식의 난독화 기법을 사용하였다. 예를 들어, 한국등록특허 제10-1328012호는 애플리케이션 코드 난독화 장치 및 그 방법에 관한 것으로, 애플리케이션에 사용되는 코드 중 중요 코드 및 중요 코드를 호출하기 위한 호출 코드를 네이티브 코드 형태로 변환하는 기술을 개시하고 있다.
그러나 이러한 종래기술은 난독화된 코드를 실행하기 위해 추가적인 실행 시간이 필요하게 되며, 원래의 동작을 수행하기 위해서 특정 시점에서는 메모리상에 원래의 코드가 로딩되어야 한다는 문제점이 있다.
자바 어플리케이션과 디버거간의 통신을 정의하는 디버깅 규약에 따라 동작하는 스레드를 종료시킴에 따라 자바 어플리케이션에 대한 디버거의 영향을 차단할 수 있는 자바 디버거 차단 방법, 자바 디버거 차단 방법을 수행하는 자바 디버거 차단 시스템, 컴퓨터와 결합되어 자바 디버거 차단 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램 및 그 기록매체를 제공한다.
컴퓨터의 프로세서에 의해 실행되는 자바 디버거 차단 방법에 있어서, 상기 컴퓨터상에서 현재 실행중인 자바 가상 머신의 핸들을 획득하는 단계; 상기 컴퓨터상에서 현재 실행중인 스레드들 중 자바에서 기 정의된 디버깅 규약에 따라 동작하는 스레드를 확인하는 단계; 및 상기 획득한 자바 가상 머신의 핸들로부터 상기 확인된 스레드를 분리하여 종료시키는 단계를 포함하는 자바 디버거 차단 방법을 제공한다.
컴퓨터와 결합되어 상기 자바 디버거 차단 방법을 컴퓨터 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.
상기 자바 디버거 차단 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체를 제공한다.
컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 상기 컴퓨터상에서 현재 실행중인 자바 가상 머신의 핸들을 획득하고, 상기 컴퓨터상에서 현재 실행중인 스레드들 중 자바에서 기 정의된 디버깅 규약에 따라 동작하는 스레드를 확인하고, 상기 획득한 자바 가상 머신의 핸들로부터 상기 확인된 스레드를 분리하여 종료시키는, 컴퓨터 장치를 제공한다.
자바 어플리케이션과 디버거간의 통신을 정의하는 디버깅 규약에 따라 동작하는 스레드를 종료시킴에 따라 자바 어플리케이션에 대한 디버거의 영향을 차단할 수 있다.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.
도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다.
도 3은 본 발명의 일실시예에 있어서, 자바 디버거를 차단하는 과정의 예를 도시한 도면이다.
도 4는 본 발명의 일실시예에 따른 자바 디버거 차단 방법의 예를 도시한 흐름도이다.
도 5는 본 발명의 일실시예에 있어서, 스레드를 자바 가상 머신의 핸들로부터 분리시키는 과정의 예를 도시한 흐름도이다.
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.
본 발명의 실시예들에 따른 자바 디버거 차단 시스템은 일례로, 도 2에서 설명하는 컴퓨터 장치(200)와 같은 컴퓨터를 통해 구현될 수 있으며, 본 발명의 실시예들에 따른 자바 디버거 차단 방법은 컴퓨터를 통해 수행될 수 있다. 예를 들어, 컴퓨터에는 본 발명의 일실시예에 따른 컴퓨터 프로그램(일례로, 특정 서비스를 제공받기 위해 컴퓨터 장치에 설치된 어플리케이션)이 구동될 수 있고, 컴퓨터는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 일실시예에 따른 자바 디버거 차단 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터와 결합되어 자바 디버거 차단 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다.
복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 네비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC 등이 있다. 일례로 도 1에서는 전자 기기 1(110)의 예로 스마트폰의 형상을 나타내고 있으나, 본 발명의 실시예들에서 전자 기기 1(110)은 실질적으로 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있는 다양한 물리적인 장치들 중 하나를 의미할 수 있다.
통신 방식은 제한되지 않으며, 네트워크(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), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.
서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 예를 들어, 서버(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 서비스로서 제공할 수 있다.
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 앞서 설명한 복수의 전자 디바이스들(110, 120, 130, 140) 각각이나 서버들(150, 160) 각각은 도 2를 통해 도시된 컴퓨터 장치(200)에 의해 구현될 수 있다. 예를 들어, 컴퓨터 장치(200)에는 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치(200)는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 자바 디버거 차단 방법을 수행할 수 있다.
이러한 컴퓨터 장치(200)는 도 2에 도시된 바와 같이, 메모리(210), 프로세서(220), 통신 인터페이스(230) 그리고 입출력 인터페이스(240)를 포함할 수 있다. 메모리(210)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(210)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 장치(200)에 포함될 수도 있다. 또한, 메모리(210)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(210)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 메모리(210)로 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 인터페이스(230)를 통해 메모리(210)에 로딩될 수도 있다. 예를 들어, 소프트웨어 구성요소들은 네트워크(170)를 통해 수신되는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 컴퓨터 장치(200)의 메모리(210)에 로딩될 수 있다.
프로세서(220)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(210) 또는 통신 인터페이스(230)에 의해 프로세서(220)로 제공될 수 있다. 예를 들어 프로세서(220)는 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.
통신 인터페이스(230)은 네트워크(170)를 통해 컴퓨터 장치(200)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)가 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(230)의 제어에 따라 네트워크(170)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(170)를 거쳐 컴퓨터 장치(200)의 통신 인터페이스(230)를 통해 컴퓨터 장치(200)로 수신될 수 있다. 통신 인터페이스(230)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(220)나 메모리(210)로 전달될 수 있고, 파일 등은 컴퓨터 장치(200)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.
입출력 인터페이스(240)는 입출력 장치(250)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(240)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(250)는 컴퓨터 장치(200)와 하나의 장치로 구성될 수도 있다.
또한, 다른 실시예들에서 컴퓨터 장치(200)는 도 2의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(200)는 상술한 입출력 장치(250) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.
도 3은 본 발명의 일실시예에 있어서, 자바 디버거를 차단하는 과정의 예를 도시한 도면이다. 컴퓨터 장치(200)는 자바 가상 머신(Java Virtual Machine, 300)을 포함할 수 있다. 자바 가상 머신(300)은 자바 언어로 작성된 프로그램을 해석하여 실행하는 가상의 컴퓨터이다. 자바 언어로 기술된 프로그램은 자바 컴파일러에 의해 바이트 코드와 같은 중간 코드로 변환되며, 이때 자바 가상 머신(300)은 이러한 바이트 코드를 해석해서 실행하는 소프트웨어 모듈일 수 있다. 자바는 객체지향프로그래밍 언어로서, 자바 어플리케이션의 디버깅을 위해 JDWP(Java™ Debug Wire Protocol)와 같이 자바 어플리케이션과 디버거 프로세스간의 통신을 정의하는 디버깅 규약을 제공한다. 이때, 이러한 디버깅 규약에 따라 동작하는 스레드가 존재할 수 있다. 도 3은 자바 가상 머신(300)에 어태치(attach)된 n개의 스레드들(310)을 나타내고 있으며, n개의 스레드들(310) 중 스레드 n(320)을 디버깅 규약에 따라 동작하는 스레드로서 나타내고 있다. 이때, 스레드 n(320)은 일반적으로 JDWP를 이름으로 사용하며, JDWP와 같은 디버깅 규약에 따른 기능을 수행하여 컴퓨터 장치(200)에 설치된 다른 소프트웨어인 디버거(330)가 자바 어플리케이션과 통신 가능하도록 동작할 수 있다. 예를 들어, 스레드 n(320)은 디버거(330)가 n개의 스레드들(310) 중 자바 어플리케이션에 따른 다른 스레드와 통신 가능하도록 기능을 제공할 수 있다.
디버거(330)는 스레드 n(320)과 연결되지 못하는 경우에는 자바 어플리케이션에 따른 다른 스레드와 통신할 수 없기 때문에 본 실시예에서는 스레드 n(320)을 종료시킴으로써 자바 어플리케이션을 디버깅하고자 하는 디버거(330)를 차단할 수 있다. 도 3에서는 "pthread_exit()"(340)와 같은 처리 함수를 통해 자바 가상 머신(300)에 어태치된 JDWP 스레드인 스레드 n(320)을 종료시켜 무력화함으로써, 디버거(330)를 차단하는 예를 나타내고 있다.
도 4는 본 발명의 일실시예에 따른 자바 디버거 차단 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 자바 디버거 차단 방법은 앞서 설명한 컴퓨터 장치(200)에 의해 수행될 수 있다. 예를 들어, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드 및/또는 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 예를 들어, 상술한 프로그램 코드는 디버깅의 대상이 되는 자바 어플리케이션의 코드일 수 있다. 다시 말해, 자바 어플리케이션은 자바 디버거를 차단하기 위한 코드를 포함할 수 있으며, 프로세서(220)는 컴퓨터 장치(200)에 저장된 자바 어플리케이션의 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 3의 제어 방법이 포함하는 단계들(410 내지 430)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다. 실시예에 따라 프로그램의 코드는 디버깅의 대상이 되는 자바 어플리케이션과는 별도의 프로그램을 통해 제공될 수도 있다.
단계(410)에서 컴퓨터 장치(200)는 현재 실행중인 자바 가상 머신의 핸들을 획득할 수 있다. 자바 코드를 수행하는 모든 스레드들은 자바 가상 머신에 연결(attach)되어 있기 때문에 이러한 스레드들을 "pthread_exit()"와 같은 함수를 사용하여 바로 종료할 경우 자바 가상 머신에서 충돌이 발생할 수 있다. 따라서 컴퓨터 장치(200)는 추후 스레드를 종료하고자 할 때, "DetachCurrentThread()"와 같은 함수를 이용하여 종료하고자 하는 함수를 자바 가상 머신으로부터 미리 분리(detach)시켜 놓고 스레드를 종료시킬 수 있으며, 이를 위해 자바 가상 머신의 핸들을 미리 획득할 수 있다. 따라서 실시예에 따라 단계(410)는 스레드를 자바 가상 머신으로부터 분리시키기 이전, 일례로 단계(420)과 단계(430) 사이에 수행될 수도 있다.
컴퓨터 장치(200)는 "JNI_OnLoad()"와 같은 함수를 통해서 넘어오는 자바 가상 머신의 핸들을 저장할 수 있다. 예를 들어, 가상 머신의 핸들은 현재 실행중인 자바 가상 머신의 객체에 접근하기 위한 주소 포인터 값으로, 자바 가상 머신이 네이티브 라이브러리를 로드하는 시점에 앞서 설명한 함수 "JNI_OnLoad()"를 하게 되고, 함수 "JNI_OnLoad()"를 호출하는 시점에 넘어오는 핸들(현재 실행중인 프로세서의 자바 가상 머신 인스턴스 자신에 대한 포인터 값으로서 일반적으로 "JNI_OnLoad()"로 전달되는 첫 번째 파라미터 'JavaVM* vm'을 의미)을 저장해놓을 수 있다. 저장된 핸들은 추후 스레드를 분리하는 경우 스레들의 분리를 위한 함수 "DetachCurrentThread()"를 호출하는데 활용될 수 있다. 다만, 컴퓨터상에서 실행중인 자바 가상 머신의 핸들을 가져올 수 있는 방법이라면 앞서 설명한 함수 "JNI_OnLoad()"에 한정되지 않고 사용될 수 있다.
단계(420)에서 컴퓨터 장치(200)는 현재 실행중인 스레드들 중 자바에서 기 정의된 디버깅 규약에 따라 동작하는 스레드를 확인할 수 있다. 디버깅 규약은 앞서 설명한 바와 같이 자바 어플리케이션과 디버거 프로세스간의 통신을 정의하는 JDWP를 포함할 수 있다. 이러한 디버깅 규약에 따라 동작하는 스레드의 이름은 일반적으로 JDWP를 그대로 사용하기 때문에 컴퓨터 장치(200)는 스레드들 중 이름이 JDWP인 스레드의 식별자를 확인함으로써 디버깅 규약에 따라 동작하는 스레드를 확인할 수 있다. 다른 실시예로, 컴퓨터 장치(200)는 스레드들 중 JDWP 기능을 수행하는 스레드의 식별자를 확인함으로써, 디버깅 규약에 따라 동작하는 스레드를 확인할 수 있다. 또 다른 실시예로, 컴퓨터 장치(200)는 스레드들 각각의 태스크 정보를 획득하고, 태스크 정보에 기초하여 JDWP에 대응하는 태스크 정보를 가진 스레드의 식별자를 확인함으로써, 디버깅 규약에 따라 동작하는 스레드를 확인할 수도 있다. 일례로, 유닉스(Unix)를 사용하는 컴퓨터 장치(200)는 PROC 파일 시스템에서 현재 실행중인 프로세스 정보에 접근하여 태스크 정보를 가져올 수 있다. 이때, 컴퓨터 장치(200)는 JDWP에 해당하는 태스크를 통해 스레드의 식별자를 확인할 수 있다.
단계(430)에서 컴퓨터 장치(200)는 획득한 자바 가상 머신의 핸들로부터 확인된 스레드를 분리하여 종료시킬 수 있다. 이처럼 디버깅 규약에 따라 동작하는 스레드를 종료시킴에 따라 자바 디버거(일례로, 도 3을 통해 설명한 디버거(330)는 디버깅하고자 하는 자바 어플리케이션과 통신할 수 없게 되며, 따라서 자바 디버거를 차단시킬 수 있게 된다.
한편, 스레드를 단순히 종료시키는 경우에는 충돌이 발생할 수 있기 때문에 컴퓨터 장치(200)는 스레드를 자바 가상 머신의 핸들로부터 분리시켜 안전하게 스레드를 종료시킬 수 있다.
도 5는 본 발명의 일실시예에 있어서, 스레드를 자바 가상 머신의 핸들로부터 분리시키는 과정의 예를 도시한 흐름도이다. 도 5의 단계들(510 및 520)은 도 4를 통해 설명한 단계(430)에 포함되어 컴퓨터 장치(200)에 의해 수행될 수 있다.
단계(510)에서 컴퓨터 장치(200)는 확인된 스레드의 식별자를 가진 제1 스레드가 종료할 것이라는 것을 제1 스레드가 자바 가상 머신으로 알리고 종료하도록 제1 스레드를 제어하는 처리 함수를 등록할 수 있다. 이러한 처리 함수는 도 4 및 도 5의 단계들을 수행하도록 컴퓨터 장치(200)를 제어하기 위한 컴퓨터 프로그램이 포함할 수 있으며, 컴퓨터 장치(200)는 이러한 컴퓨터 프로그램의 코드에 따른 제어 명령에 따라 컴퓨터 프로그램이 포함하는 처리 함수를 자바 가상 머신에 등록시킬 수 있다.
이러한 처리 함수는 단계(420)에서 확인된 스레드, 다시 말해 디버깅 규약에 따라 동작하는 스레드(일례로, JDWP 스레드)가 처리 함수를 실행할 때, JDWP 스레드로 하여금 자신이 곧 종료할 것이라는 것을 자바 가상 머신으로 알리도록 하는 코드를 포함할 수 있으며, 이러한 알림을 통해 JDWP 스레드가 정상적으로 종료할 수 있는 환경이 조성될 수 있으며, 자바 가상 머신의 핸들로부터 JDWP 스레드가 분리될 수 있다. 또한, 처리 함수는 JDWP 스레드가 스스로를 종료시키도록 하기 위한 코드를 더 포함할 수 있으며, 처리 함수를 수행하는 JDWP 스레드는 자체적으로 종료될 수 있다.
단계(520)에서 컴퓨터 장치(200)는 제1 스레드가 처리 함수를 수행하도록 제어할 수 있다. 앞서 설명한 바와 같이 제1 스레드가 처리 함수를 수행함에 따라 제1 스레드가 자체적으로 자신이 종료할 것임을 자바 가상 머신으로 알린 후 스스로 종료하도록 제어할 수 있게 된다.
이때, 제1 스레드가 처리 함수를 수행하도록 하기 위해, 컴퓨터 장치(200)는 단계(510)에서 스레드들 각각으로 하여금 처리 함수를 호출하도록 제어하는 사용자 정의 시그널을 더 등록할 수 있으며, 단계(520)에서 사용자 정의 시그널을 호출하여 스레드들이 처리 함수를 호출하도록 제어할 수 있다. 보다 구체적인 예로, 유닉스 계열의 운영체제를 사용하는 컴퓨터 장치(200)의 경우, "sigaction()"과 같은 함수를 이용하여 사용자 정의 시그널(시그널의 번호)과 핸들러(처리 함수)를 시스템(운영체제)상에 등록할 수 있다. 예를 들어, 컴퓨터 장치(200)는 컴퓨터 프로그램의 제어에 따라 "sigaction()" 함수를 호출할 수 있으며, 컴퓨터 프로그램이 포함하는 사용자 정의 시그널과 핸들러를 컴퓨터 장치(200)에 등록할 수 있다. 이후, 컴퓨터 프로그램의 제어에 따라 컴퓨터 장치(200)가 "kill()" 함수를 통해 시스템에 등록된 사용자 정의 시그널을 호출함에 따라 자바 가상 머신이 포함하는 스레드들 각각이 등록된 핸들러(처리 함수)를 호출 및 실행하게 된다. 이때, 처리 함수는 자신을 호출한 스레드가 JDWP 스레드인지 확인하는 과정을 거칠 수 있으며, 확인된 JDWP 스레드(제1 스레드)는 처리 함수가 포함하는 기능을 이용하여 스스로를 종료하기 위한 과정을 진행할 수 있다. 다시 말해, 컴퓨터 장치(200)는 호출된 사용자 정의 시그널을 처리하는 스레드의 식별자를 단계(420)에서 확인된 JDWP 스레드의 식별자와 비교하여 해당 스레드가 확인된 JDWP 스레드가 맞는지 확인할 수 있으며, 해당 스레드가 JDWP 스레드인 경우, JDWP 스레드가 처리 함수를 실행하여 자신이 종료될 것임을 자바 가상 머신으로 알려 자신을 자바 가상 머신으로부터 분리하고 스스로 종료하도록 제어할 수 있다.
이미 설명한 바와 같이, JDWP 스레드가 종료되는 경우, 도 3을 통해 설명한 디버거(330)와 같은 자바 디버거들이 디버깅하고자 하는 자바 어플리케이션과 통신할 수 없기 때문에 자바 디버거들은 자바 어플리케이션으로부터 차단될 수 있다. 이미 자바 어플리케이션과 어태치된 자바 디버거라 하더라도 JDWP 스레드가 종료됨에 따라, 자바 디버거가 더 이상 자바 어플리케이션과 통신할 수 없게 되기 때문에 자바 디버거는 자바 어플리케이션과 디태치(detach)되어 차단된다.
이상에서와 같이, 본 발명의 실시예들에 따르면, 자바 어플리케이션과 디버거간의 통신을 정의하는 디버깅 규약에 따라 동작하는 스레드를 종료시킴에 따라 자바 어플리케이션에 대한 디버거의 영향을 차단할 수 있다.
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 소프트웨어 구성요소 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.

Claims (15)

  1. 컴퓨터와 결합되어 자바 디버거 차단 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램에 있어서,
    상기 자바 디버거 차단 방법은,
    상기 컴퓨터상에서 현재 실행중인 자바 가상 머신의 핸들을 획득하는 단계;
    상기 컴퓨터상에서 현재 실행중인 스레드들 중 자바에서 기 정의된 디버깅 규약에 따라 동작하는 스레드를 확인하는 단계; 및
    상기 획득한 자바 가상 머신의 핸들로부터 상기 확인된 스레드를 분리하여 종료시키는 단계
    를 포함하는, 컴퓨터 프로그램.
  2. 제1항에 있어서,
    상기 디버깅 규약은 자바 어플리케이션과 디버거 프로세스간의 통신을 정의하는 JDWP(Java Debug Wire Protocol)를 포함하는, 컴퓨터 프로그램.
  3. 제1항에 있어서,
    상기 스레드를 확인하는 단계는,
    상기 스레드들 중 이름이 JDWP인 스레드의 식별자를 확인하는 단계
    를 포함하는, 컴퓨터 프로그램.
  4. 제1항에 있어서,
    상기 스레드를 확인하는 단계는,
    상기 스레드들 중 JDWP 기능을 수행하는 스레드의 식별자를 확인하는 단계
    를 포함하는, 컴퓨터 프로그램.
  5. 제1항에 있어서,
    상기 스레드를 확인하는 단계는,
    상기 스레드들 각각의 태스크 정보에 기초하여 JDWP에 대응하는 태스크 정보를 가진 스레드의 식별자를 확인하는 단계
    를 포함하는, 컴퓨터 프로그램.
  6. 제1항에 있어서,
    상기 확인된 스레드를 분리하여 종료시키는 단계는,
    상기 확인된 스레드의 식별자를 가진 제1 스레드가 종료할 것이라는 것을 상기 제1 스레드가 상기 자바 가상 머신으로 알리고 종료하도록 상기 제1 스레드를 제어하는 처리 함수를 등록하는 단계; 및
    상기 제1 스레드가 상기 처리 함수를 수행하도록 제어하는 단계
    를 포함하고,
    상기 제1 스레드가 상기 등록된 처리 함수를 수행함에 따라 상기 제1 스레드가 상기 자바 가상 머신으로부터 분리되고 종료되는, 컴퓨터 프로그램.
  7. 제6항에 있어서,
    상기 등록하는 단계는,
    상기 스레드들 각각으로 하여금 상기 처리 함수를 호출하도록 제어하는 사용자 정의 시그널을 더 등록하고,
    상기 제어하는 단계는,
    상기 사용자 정의 시그널을 호출하여 상기 스레드들이 상기 처리 함수를 호출하도록 제어하는, 컴퓨터 프로그램.
  8. 컴퓨터의 프로세서에 의해 실행되는 자바 디버거 차단 방법에 있어서,
    컴퓨터상에서 현재 실행중인 자바 가상 머신의 핸들을 획득하는 단계;
    상기 컴퓨터상에서 현재 실행중인 스레드들 중 자바에서 기 정의된 디버깅 규약에 따라 동작하는 스레드를 확인하는 단계; 및
    상기 획득한 자바 가상 머신의 핸들로부터 상기 확인된 스레드를 분리하여 종료시키는 단계
    를 포함하는 자바 디버거 차단 방법.
  9. 제8항에 있어서,
    상기 디버깅 규약은 자바 어플리케이션과 디버거 프로세스간의 통신을 정의하는 JDWP(Java Debug Wire Protocol)를 포함하는, 자바 디버거 차단 방법.
  10. 제8항에 있어서,
    상기 스레드를 확인하는 단계는,
    상기 스레드들 중 이름이 JDWP인 스레드의 식별자를 확인하는 단계
    를 포함하는, 자바 디버거 차단 방법.
  11. 제8항에 있어서,
    상기 스레드를 확인하는 단계는,
    상기 스레드들 중 JDWP 기능을 수행하는 스레드의 식별자를 확인하는 단계
    를 포함하는, 자바 디버거 차단 방법.
  12. 제8항에 있어서,
    상기 스레드를 확인하는 단계는,
    상기 스레드들 각각의 태스크 정보에 기초하여 JDWP에 대응하는 태스크 정보를 가진 스레드의 식별자를 확인하는 단계
    를 포함하는, 자바 디버거 차단 방법.
  13. 제8항에 있어서,
    상기 확인된 스레드를 분리하여 종료시키는 단계는,
    상기 확인된 스레드의 식별자를 가진 제1 스레드가 종료할 것이라는 것을 상기 제1 스레드가 상기 자바 가상 머신으로 알리고 종료하도록 상기 제1 스레드를 제어하는 처리 함수를 등록하는 단계; 및
    상기 제1 스레드가 상기 처리 함수를 수행하도록 제어하는 단계
    를 포함하고,
    상기 제1 스레드가 상기 등록된 처리 함수를 수행함에 따라 상기 제1 스레드가 상기 자바 가상 머신으로부터 분리되고 종료되는, 자바 디버거 차단 방법.
  14. 제13항에 있어서,
    상기 등록하는 단계는,
    상기 스레드들 각각으로 하여금 상기 처리 함수를 호출하도록 제어하는 사용자 정의 시그널을 더 등록하고,
    상기 제어하는 단계는,
    상기 사용자 정의 시그널을 호출하여 상기 스레드들이 상기 처리 함수를 호출하도록 제어하는, 자바 디버거 차단 방법.
  15. 제8항 내지 제14항 중 어느 한 항의 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체.
PCT/KR2018/006069 2018-05-29 2018-05-29 프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템 WO2019231000A1 (ko)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2020566950A JP7076014B2 (ja) 2018-05-29 2018-05-29 プログラム保護のためのJavaデバッガ遮断方法およびシステム
PCT/KR2018/006069 WO2019231000A1 (ko) 2018-05-29 2018-05-29 프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2018/006069 WO2019231000A1 (ko) 2018-05-29 2018-05-29 프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템

Publications (1)

Publication Number Publication Date
WO2019231000A1 true WO2019231000A1 (ko) 2019-12-05

Family

ID=68697575

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2018/006069 WO2019231000A1 (ko) 2018-05-29 2018-05-29 프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템

Country Status (2)

Country Link
JP (1) JP7076014B2 (ko)
WO (1) WO2019231000A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060059792A (ko) * 2004-11-29 2006-06-02 주식회사 안철수연구소 실시간 컴퓨터 프로그램의 디버깅 방지 방법 및 그 기록매체
KR20140005978A (ko) * 2011-01-28 2014-01-15 에이알엠 리미티드 디버그 예외 생성 제어
KR101519845B1 (ko) * 2013-11-14 2015-05-13 (주)잉카엔트웍스 안티디버깅 방법
KR101583545B1 (ko) * 2015-07-22 2016-01-08 주식회사 엔에스에이치씨 상호 디버깅 감시를 이용한 모바일 단말기의 어플리케이션의 보안을 향상시키는 보안 제공 방법
KR101632152B1 (ko) * 2015-08-11 2016-06-21 숭실대학교산학협력단 모바일 플랫폼 동적 분석 방지 장치 및 그 방법

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6237137B1 (en) * 1997-10-15 2001-05-22 Dell Usa, L.P. Method and system for preventing unauthorized access to a computer program
US6742123B1 (en) 1999-09-10 2004-05-25 Sun Microsystems, Inc. Apparatus and methods for preventing denial of service attacks
WO2014153680A1 (en) 2013-03-27 2014-10-02 Irdeto B.V. Protecting software application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060059792A (ko) * 2004-11-29 2006-06-02 주식회사 안철수연구소 실시간 컴퓨터 프로그램의 디버깅 방지 방법 및 그 기록매체
KR20140005978A (ko) * 2011-01-28 2014-01-15 에이알엠 리미티드 디버그 예외 생성 제어
KR101519845B1 (ko) * 2013-11-14 2015-05-13 (주)잉카엔트웍스 안티디버깅 방법
KR101583545B1 (ko) * 2015-07-22 2016-01-08 주식회사 엔에스에이치씨 상호 디버깅 감시를 이용한 모바일 단말기의 어플리케이션의 보안을 향상시키는 보안 제공 방법
KR101632152B1 (ko) * 2015-08-11 2016-06-21 숭실대학교산학협력단 모바일 플랫폼 동적 분석 방지 장치 및 그 방법

Also Published As

Publication number Publication date
JP2021530014A (ja) 2021-11-04
JP7076014B2 (ja) 2022-05-26

Similar Documents

Publication Publication Date Title
RU2691187C1 (ru) Система и способы аудита виртуальной машины
US11687645B2 (en) Security control method and computer system
RU2679175C1 (ru) Способ поведенческого обнаружения вредоносных программ с использованием виртуальной машины-интерпретатора
US11720367B2 (en) Securing conditional speculative instruction execution
US9934380B2 (en) Execution profiling detection of malicious objects
US20200401698A1 (en) Analysis system, analysis method, analysis device, and storage medium
WO2015072689A1 (ko) 안티디버깅 방법
US10013553B2 (en) Protecting software application
EP3171275B1 (en) Transparent process interception
EP3436947B1 (en) Secure driver platform
Padaryan et al. Automated exploit generation for stack buffer overflow vulnerabilities
CN112541178A (zh) 控制流完整性实施的设备和方法
WO2023123850A1 (zh) 一种固件可信根的实现方法、装置、设备和可读存储介质
CN112231198B (zh) 一种恶意进程调试方法、装置、电子设备及介质
WO2018194196A1 (ko) Elf 파일의 난독화 적용 여부의 탐지 및 보안성 평가를 위한 방법 및 시스템
WO2018199366A1 (ko) 덱스 파일의 난독화 적용 여부의 탐지 및 보안성 평가를 위한 방법 및 시스템
WO2020111482A1 (ko) 프로그램 실행 컨텍스트 기반의 빅데이터를 활용한 역공학 방법 및 시스템
Zeng et al. Tailored application-specific system call tables
Malenko et al. Device driver and system call isolation in embedded devices
WO2019235664A1 (ko) 프로그램 보호를 위한 디버거 차단 방법 및 시스템
WO2019231000A1 (ko) 프로그램 보호를 위한 자바 디버거 차단 방법 및 시스템
WO2019235663A1 (ko) 네이티브 라이브러리를 보호하는 방법 및 시스템
CN112948241B (zh) 应用程序的反调试方法、装置、电子设备及存储介质
CN111740876B (zh) 一种应用装置、测试方法、存储介质及电子设备
CN109190383B (zh) 访问指令的处理方法、装置及设备

Legal Events

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

Ref document number: 18921111

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020566950

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18921111

Country of ref document: EP

Kind code of ref document: A1