KR102623022B1 - Debugger blocking method and system for program protection - Google Patents

Debugger blocking method and system for program protection Download PDF

Info

Publication number
KR102623022B1
KR102623022B1 KR1020207028367A KR20207028367A KR102623022B1 KR 102623022 B1 KR102623022 B1 KR 102623022B1 KR 1020207028367 A KR1020207028367 A KR 1020207028367A KR 20207028367 A KR20207028367 A KR 20207028367A KR 102623022 B1 KR102623022 B1 KR 102623022B1
Authority
KR
South Korea
Prior art keywords
preemption
debuggee
debugger
thread
computer program
Prior art date
Application number
KR1020207028367A
Other languages
Korean (ko)
Other versions
KR20210006882A (en
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 라인플러스 주식회사
Publication of KR20210006882A publication Critical patent/KR20210006882A/en
Application granted granted Critical
Publication of KR102623022B1 publication Critical patent/KR102623022B1/en

Links

Images

Classifications

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

Abstract

프로그램 보호를 위한 디버거 차단 방법 및 시스템을 제공한다. 컴퓨터의 프로세서에 의해 실행되는 디버거 차단 방법은, 컴퓨터 프로그램에 대한 디버깅 동작의 보호를 위해 상기 컴퓨터 프로그램과 연관된 디버기(debuggee) 프로세스가 실행됨에 응답하여 상기 디버기 프로세스를 선점하기 위한 선점 프로세스를 실행시키는 단계; 및 상기 실행된 선점 프로세스를 시스템 호출을 통해 상기 디버기 프로세스에 연결시켜 상기 디버기 프로세스에 대한 디버깅 동작을 선점하는 단계를 포함할 수 있다.Provides a debugger blocking method and system to protect programs. A debugger blocking method executed by a processor of a computer includes executing a preemption process to preempt the debuggee process in response to execution of a debuggee process associated with the computer program to protect debugging operations for the computer program. ordering step; and connecting the executed preemption process to the debuggee process through a system call to preempt a debugging operation for the debuggee process.

Description

프로그램 보호를 위한 디버거 차단 방법 및 시스템Debugger blocking method and system for program protection

아래의 설명은 프로그램 보호를 위한 디버거 차단 방법, 디버거 차단 방법을 수행하는 디버거 차단 시스템, 컴퓨터와 결합되어 디버거 차단 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램 및 그 기록매체에 관한 것이다.The description below relates to a debugger blocking method for program protection, a debugger blocking system that performs the debugger blocking method, a computer program stored on a computer-readable recording medium in combination with a computer to execute the debugger blocking method on the computer, and the recording medium. will be.

클라이언트 단말로 배포된 어플리케이션들은 역공학(리버싱)을 통해서 그 동작 방식을 파악할 수 있으며, 이러한 역공학을 통해 어플리케이션의 기능의 도용이 가능해진다. 또한, 어플리케이션의 원래의 기능을 수정하여 어플리케이션이 의도된 동작과 다르게 동작하도록 하여 어플리케이션을 통해 제공되는 서비스와 해당 서비스를 제공하는 시스템의 신뢰성에 좋지 않은 영향을 줄 수 있게 된다.The operation of applications distributed to client terminals can be identified through reverse engineering (reversing), and through reverse engineering, the theft of application functions becomes possible. Additionally, by modifying the original function of the application to cause the application to operate differently from its intended operation, this can have a negative impact on the services provided through the application and the reliability of the system that provides the service.

이러한 역공학을 통한 어플리케이션의 분석 과정에서는 디버깅(debugging)이 필수적으로 활용된다. 디버깅은 프로그램의 오류를 확인하고 수정하는 행위를 말하며, 이러한 행위를 위해 사용되는 프로그램을 디버거라고 한다. 이러한 디버깅은 오류가 없는 정상적인 프로그램에 대해서도 수행될 수 있으며, 이 경우 원래 프로그램의 의도된 동작을 변경할 수 있을 뿐만 아니라, 프로그램 내부의 동작 원리를 파악하기 위한 악의적인 목적으로 사용될 수 있다.Debugging is essential in this process of analyzing applications through reverse engineering. Debugging refers to the act of checking and correcting program errors, and the program used for this act is called a debugger. This debugging can also be performed on normal programs without errors, and in this case, not only can the intended operation of the original program be changed, but it can also be used for malicious purposes to understand the operating principles inside the program.

기존에는 빌드된 프로그램을 보호하기 위해 코드의 수정과 동작 형태의 이해를 어렵게 하고자 본래의 동작 방식을 변경하거나 일부분을 암호화 하는 방식의 난독화 기법을 사용하였다. 예를 들어, 한국등록특허 제10-1328012호는 애플리케이션 코드 난독화 장치 및 그 방법에 관한 것으로, 애플리케이션에 사용되는 코드 중 중요 코드 및 중요 코드를 호출하기 위한 호출 코드를 네이티브 코드 형태로 변환하는 기술을 개시하고 있다.Previously, in order to protect the built program, obfuscation techniques were used to change the original operation method or encrypt part of it to make it difficult to modify the code and understand the operation pattern. For example, Korean Patent No. 10-1328012 relates to an application code obfuscation device and method, and is a technology for converting important codes among codes used in an application and calling codes for calling important codes into native code form. is starting.

그러나 이러한 종래기술은 난독화된 코드를 실행하기 위해 추가적인 실행 시간이 필요하게 되며, 원래의 동작을 수행하기 위해서 특정 시점에서는 메모리상에 원래의 코드가 로딩되어야 한다는 문제점이 있다.However, this prior art requires additional execution time to execute the obfuscated code, and has the problem that the original code must be loaded into memory at a specific point in time to perform the original operation.

보호하고자 하는 프로그램의 프로세스를 선점하여 디버거(debugger) 프로세스가 디버기(debuggee) 프로세스에 접속(attach)하지 못하도록 함으로써, 디버거를 차단할 수 있는 디버거 차단 방법, 디버거 차단 방법을 수행하는 디버거 차단 시스템, 컴퓨터와 결합되어 디버거 차단 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램 및 그 기록매체를 제공한다.A debugger blocking method that can block the debugger by preempting the process of the program to be protected and preventing the debugger process from attaching to the debuggee process, a debugger blocking system, and a computer that perform the debugger blocking method It provides a computer program stored on a computer-readable recording medium and the recording medium for executing a debugger blocking method on a computer.

컴퓨터의 프로세서에 의해 실행되는 디버거 차단 방법에 있어서, 컴퓨터 프로그램에 대한 디버깅 동작의 보호를 위해 상기 컴퓨터 프로그램과 연관된 디버기(debuggee) 프로세스가 실행됨에 응답하여 상기 디버기 프로세스를 선점하기 위한 선점 프로세스를 실행시키는 단계; 및 상기 실행된 선점 프로세스를 시스템 호출을 통해 상기 디버기 프로세스에 연결시켜 상기 디버기 프로세스에 대한 디버깅 동작을 선점하는 단계를 포함하는 디버거 차단 방법을 제공한다.In the method of blocking a debugger executed by a processor of a computer, in order to protect a debugging operation for a computer program, a preemption process for preempting the debuggee process in response to execution of the debuggee process associated with the computer program is performed. execution step; and connecting the executed preemption process to the debuggee process through a system call to preempt a debugging operation for the debuggee process.

컴퓨터와 결합되어 상기 디버거 차단 방법을 컴퓨터 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.Provided is a computer program stored on a computer-readable recording medium that is coupled to a computer and allows the computer to execute the debugger blocking method.

상기 디버거 차단 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체를 제공한다.A computer-readable recording medium is provided, characterized in that a computer program for executing the debugger blocking method on a computer is recorded thereon.

컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 컴퓨터 프로그램에 대한 디버깅 동작의 보호를 위해 상기 컴퓨터 프로그램과 연관된 디버기(debuggee) 프로세스가 실행됨에 응답하여 상기 디버기 프로세스를 선점하기 위한 선점 프로세스를 실행시키고, 상기 실행된 선점 프로세스를 시스템 호출을 통해 상기 디버기 프로세스에 연결시켜 상기 디버기 프로세스에 대한 디버깅 동작을 선점하는, 컴퓨터 장치를 제공한다.At least one processor implemented to execute computer-readable instructions, wherein a debuggee process associated with the computer program is executed by the at least one processor to protect the debugging operation of the computer program. In response, a computer device is provided that executes a preemption process to preempt the debuggee process and connects the executed preemption process to the debuggee process through a system call to preempt a debugging operation for the debuggee process. .

보호하고자 하는 프로그램의 프로세스를 선점하여 디버거(debugger) 프로세스가 디버기(debuggee) 프로세스에 접속(attach)하지 못하도록 함으로써, 디버거를 차단할 수 있다.The debugger can be blocked by preempting the process of the program you want to protect and preventing the debugger process from attaching to the debuggee process.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.
도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다.
도 3은 본 발명의 일실시예에 있어서, 디버거를 차단하는 과정의 예를 도시한 도면이다.
도 4는 본 발명의 일실시예에 따른 디버거 차단 방법의 예를 도시한 흐름도이다.
도 5는 본 발명의 일실시예에 따른 선점 프로세스의 동작의 예를 도시한 흐름도이다.
도 6은 본 발명의 일실시예에 따른 디버기 프로세스의 동작의 예를 도시한 흐름도이다.
1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
Figure 2 is a block diagram for explaining the internal configuration of an electronic device and a server, according to an embodiment of the present invention.
Figure 3 is a diagram illustrating an example of a process for blocking a debugger in one embodiment of the present invention.
Figure 4 is a flowchart showing an example of a debugger blocking method according to an embodiment of the present invention.
Figure 5 is a flowchart showing an example of the operation of a preemption process according to an embodiment of the present invention.
Figure 6 is a flowchart showing an example of the operation of a debuggee process according to an embodiment of the present invention.

발명의 실시를 위한 최선의 형태Best mode for carrying out the invention

이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

본 발명의 실시예들에 따른 디버거 차단 시스템은 일례로, 도 2에서 설명하는 컴퓨터 장치(200)와 같은 컴퓨터를 통해 구현될 수 있으며, 본 발명의 실시예들에 따른 디버거 차단 방법은 이러한 컴퓨터를 통해 수행될 수 있다. 예를 들어, 컴퓨터에는 본 발명의 일실시예에 따른 컴퓨터 프로그램(일례로, 특정 서비스를 제공받기 위해 컴퓨터 장치에 설치된 어플리케이션)이 구동될 수 있고, 컴퓨터는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 일실시예에 따른 디버거 차단 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터와 결합되어 디버거 차단 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.For example, the debugger blocking system according to embodiments of the present invention may be implemented through a computer such as the computer device 200 illustrated in FIG. 2, and the debugger blocking method according to embodiments of the present invention may be implemented using such a computer. It can be performed through For example, a computer program according to an embodiment of the present invention (for example, an application installed on a computer device to provide a specific service) may be run on the computer, and the computer may run the present invention under the control of the driven computer program. The debugger blocking method according to one embodiment can be performed. The above-described computer program can be combined with a computer and stored in a computer-readable recording medium to execute the debugger blocking method on the computer.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment in FIG. 1 shows an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170. Figure 1 is an example for explaining the invention, and the number of electronic devices or servers is not limited as in Figure 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)와 통신할 수 있는 다양한 물리적인 장치들 중 하나를 의미할 수 있다.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 smart phones, mobile phones, navigation devices, computers, laptops, digital broadcasting terminals, PDAs (Personal Digital Assistants), and PMPs (Portable Multimedia Players). ), tablet PC, etc. For example, in Figure 1, the shape of a smartphone is shown as an example of electronic device 1 (110). However, in embodiments of the present invention, electronic device 1 (110) actually connects the network 170 using a wireless or wired communication method. It may refer to one of various physical devices capable of communicating with other electronic devices 120, 130, 140 and/or servers 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) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and may include not only a communication method utilizing a communication network that the network 170 may include (for example, a mobile communication network, wired Internet, wireless Internet, and a broadcast network), but also short-range wireless communication between devices. For example, 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). , may include one or more arbitrary networks such as the Internet. Additionally, the network 170 may include any one or more of network topologies including a bus network, star network, ring network, mesh network, star-bus network, tree or hierarchical network, etc. Not limited.

서버(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 서비스로서 제공할 수 있다.Each of the servers 150 and 160 is a computer device or a plurality of computers that communicate with a plurality of electronic devices 110, 120, 130, 140 and a network 170 to provide commands, codes, files, content, services, etc. It can be implemented with devices. For example, 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 also provides a network ( It may be a system that provides a second service to a plurality of electronic devices 110, 120, 130, and 140 connected through 170). As a more specific example, the server 150 may provide a service associated with an application (computer program) installed on a plurality of electronic devices 110, 120, 130, and 140 as the first service. As another example, the server 160 may provide a service of 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.

도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 앞서 설명한 복수의 전자 디바이스들(110, 120, 130, 140) 각각이나 서버들(150, 160) 각각은 도 2를 통해 도시된 컴퓨터 장치(200)에 의해 구현될 수 있다. 예를 들어, 컴퓨터 장치(200)에는 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치(200)는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 자바 디버거 차단 방법을 수행할 수 있다.Figure 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 electronic devices 110, 120, 130, and 140 described above or each of the servers 150 and 160 may be implemented by the computer device 200 shown in FIG. 2. For example, a computer program according to an embodiment may be installed and driven in the computer device 200, and the computer device 200 blocks a Java debugger according to embodiments of the present invention according to control of the driven computer program. method can be performed.

이러한 컴퓨터 장치(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)에 로딩될 수 있다.As shown in FIG. 2, this computer device 200 may include a memory 210, a processor 220, a communication interface 230, and an input/output interface 240. The memory 210 is a computer-readable recording medium and may include a non-permanent mass storage device such as random access memory (RAM), read only memory (ROM), and a disk drive. Here, non-perishable large-capacity recording devices such as ROM and disk drives may be included in the computer device 200 as a separate permanent storage device that is distinct from the memory 210. Additionally, an operating system and at least one program code may be stored in the memory 210. These software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210. Such separate computer-readable recording media may include computer-readable recording media such as floppy drives, disks, tapes, DVD/CD-ROM drives, and memory cards. In another embodiment, software components may be loaded into the memory 210 through the communication interface 230 rather than a computer-readable recording medium. For example, software components may be loaded into memory 210 of computer device 200 based on computer programs installed by files received over network 170.

프로세서(220)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(210) 또는 통신 인터페이스(230)에 의해 프로세서(220)로 제공될 수 있다. 예를 들어 프로세서(220)는 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The processor 220 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input/output operations. Commands may be provided to the processor 220 by the memory 210 or the communication interface 230. For example, processor 220 may be configured to execute received instructions according to program code stored in a recording device such as memory 210.

통신 인터페이스(230)은 네트워크(170)를 통해 컴퓨터 장치(200)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)가 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(230)의 제어에 따라 네트워크(170)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(170)를 거쳐 컴퓨터 장치(200)의 통신 인터페이스(230)를 통해 컴퓨터 장치(200)로 수신될 수 있다. 통신 인터페이스(230)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(220)나 메모리(210)로 전달될 수 있고, 파일 등은 컴퓨터 장치(200)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication interface 230 may provide a function for the computer device 200 to communicate with other devices (eg, the storage devices described above) through the network 170. For example, a request, command, data, file, etc. generated by the processor 220 of the computer device 200 according to a program code stored in a recording device such as memory 210 is transmitted to the network ( 170) and can be transmitted to other devices. Conversely, signals, commands, data, files, etc. from other devices may be received by the computer device 200 through the communication interface 230 of the computer device 200 via the network 170. Signals, commands, data, etc. received through the communication interface 230 may be transmitted to the processor 220 or memory 210, and files, etc. may be stored in a storage medium (as described above) that the computer device 200 may further include. It can be stored as a permanent storage device).

입출력 인터페이스(240)는 입출력 장치(250)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(240)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(250)는 컴퓨터 장치(200)와 하나의 장치로 구성될 수도 있다.The input/output interface 240 may be a means for interfacing with the input/output device 250. For example, input devices may include devices such as a microphone, keyboard, or mouse, and output devices may include devices such as displays and speakers. As another example, the input/output interface 240 may be a means for interfacing with a device that integrates input and output functions, such as a touch screen. The input/output device 250 may be configured as a single device with the computer device 200.

또한, 다른 실시예들에서 컴퓨터 장치(200)는 도 2의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(200)는 상술한 입출력 장치(250) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Additionally, in other embodiments, computer device 200 may include fewer or more components than those of FIG. 2 . However, there is no need to clearly show most prior art components. For example, the computer device 200 may be implemented to include at least some of the input/output devices 250 described above, or may further include other components such as a transceiver, a database, etc.

도 3은 본 발명의 일실시예에 있어서, 디버거를 차단하는 과정의 예를 도시한 도면이다. 컴퓨터 장치(200)는 컴퓨터 장치(200)에 설치 및 구동되는 컴퓨터 프로그램에 대한 디버깅 동작의 보호를 위해, 컴퓨터 프로그램과 연관된 디버기(debuggee) 프로세스(310)를 선점 프로세스(320)를 통해 미리 선점할 수 있다. 이 경우, 디버기 프로세스(310)를 디버깅하고자 하는 디버거(debugger) 프로세스(330)는 디버기 프로세스(310)가 선점 프로세스(320)에 의해 이미 선점되어 있기 때문에, 디버기 프로세스(310)에 연결될 수 없으며, 따라서 디버거가 차단되는 효과를 얻을 수 있게 된다.Figure 3 is a diagram illustrating an example of a process for blocking a debugger in one embodiment of the present invention. In order to protect debugging operations for computer programs installed and running on the computer device 200, the computer device 200 preempts the debuggee process 310 associated with the computer program through the preemption process 320. can do. In this case, the debugger process 330 that wants to debug the debugger process 310 will be connected to the debugger process 310 because the debugger process 310 is already preempted by the preemptive process 320. cannot be used, and thus the effect of blocking the debugger can be obtained.

이를 위해, 컴퓨터 장치(200)는 디버기 프로세스(310)가 실행됨에 응답하여 바로 선점 프로세스(320)를 바로 실행시킴으로써 디버거 프로세스(330)가 디버기 프로세스(310)에 먼저 연결될 가능성을 없앨 수 있다. 예를 들어, 선점 프로세스(320)를 실행시키기 위한 코드는 디버깅 동작으로부터 보호하고자 하는 컴퓨터 프로그램이 포함할 수 있다. 이 경우, 컴퓨터 장치(200)에서 컴퓨터 프로그램이 실행되고, 이에 따라 디버기 프로세스(310)가 실행될 때, 컴퓨터 장치(200)는 컴퓨터 프로그램이 포함하는 코드에 따라 바로 선점 프로세스(320)를 실행시켜 디버기 프로세스(310)를 선점하도록 제어할 수 있다. 보다 구체적인 예로, 컴퓨터 장치(200)는 디버기 프로세스(310)의 실행 시 디버기 프로세스(310)에 대한 포크(fork)를 통해 디버기 프로세스(310)와 동일한 권한을 갖는 선점 프로세스(320)를 실행시킬 수 있다. 프로세스에 대한 포크는 프로세스를 복제하여 자식 프로세스를 생성하는 과정일 수 있다. 일반적으로 디버거 프로세스(330)는 디버기 프로세스(310)와 연결되기 위해 권한을 상승시키기 위한 과정이 요구되나 포크를 통해 선점 프로세스(320)를 생성하는 경우에는 디버기 프로세스(310)와 동일한 권한을 갖는 프로세스를 선점 프로세스(320)로 생성하기 때문에 권한 상승을 위한 과정이 생략될 수 있다. 이러한 포크를 이용하여 선점 프로세스(320)를 생성하는 방법은 하나의 실시예일뿐, 디버기 프로세스(310)에 대한 디버깅 동작을 선점할 수 있는 프로세스를 생성하기 위한 프로세스 생성 방법이라면 이에 제한되지 않는다. 예를 들어, 디버기 프로세스(310)를 복제하지 않고 별도의 프로세스를 선점 프로세스(320)로서 생성하고, 권한을 상승시켜서 디버기 프로세스(310)와 연결할 수도 있다.To this end, the computer device 200 immediately executes the preemption process 320 in response to the execution of the debuggee process 310, thereby eliminating the possibility that the debugger process 330 is connected to the debuggee process 310 first. . For example, the code for executing the preemption process 320 may be included in a computer program to be protected from debugging operations. In this case, when the computer program is executed in the computer device 200 and the debuggee process 310 is executed accordingly, the computer device 200 immediately executes the preemption process 320 according to the code included in the computer program. The debuggee process 310 can be controlled to be preempted. As a more specific example, when the debuggee process 310 is executed, the computer device 200 forks the debuggee process 310 to preempt the process 320 with the same permissions as the debuggee process 310. It can be run. Forking a process may be the process of duplicating a process and creating a child process. In general, the debugger process 330 requires a process to elevate privileges in order to connect to the debuggee process 310, but when the preemption process 320 is created through fork, it has the same privileges as the debuggee process 310. Since the existing process is created as a preemptive process 320, the process for elevating privileges can be omitted. This method of creating a preemptive process 320 using a fork is only an example, and is not limited to this as long as it is a process creation method for creating a process that can preempt a debugging operation for the debuggee process 310. For example, instead of duplicating the debuggee process 310, a separate process may be created as the preemption process 320 and its privileges may be elevated to connect to the debuggee process 310.

선점 프로세스(320)는 일례로 유닉스 계열의 운영체제에서 발견되는 시스템 호출 API(Application Programming Interface)인 프로세스 트레이스(process trace, 이하 'ptrace')를 통해 디버기 프로세스(310)에 연결될 수 있다. 예를 들어, 선점 프로세스(320)는 ptrace와 같은 시스템 호출을 통해 디버기 프로세스(310)의 프로세스 식별자(PID)를 운영체제로 전달할 수 있으며, 이 경우 운영체제는 ptrace를 호출한 선점 프로세스(320)와 프로세스 식별자를 통해 식별되는 디버기 프로세스(310)를 연결할 수 있으며, 선점 프로세스(320)를 디버거로서 인식할 수 있다. 따라서, 디버거 프로세스(330)가 디버기 프로세스(310)에 디버거로서 연결하고자 요청한다 하더라도, 운영체제에서 디버기 프로세스(310)를 선점하고 있는 선점 프로세스(320)가 존재하기 때문에 디버거 프로세스(330)의 시스템 호출은 실패(fail)될 수 있으며, 이는 디버거가 차단되는 효과를 발생시킨다.For example, the preemption process 320 may be connected to the debuggee process 310 through a process trace (hereinafter 'ptrace'), which is a system call API (Application Programming Interface) found in Unix-based operating systems. For example, the preempting process 320 may pass the process identifier (PID) of the debuggee process 310 to the operating system through a system call such as ptrace. In this case, the operating system may communicate with the preempting process 320 that called ptrace. The debuggee process 310 identified through the process identifier can be connected, and the preemption process 320 can be recognized as a debugger. Therefore, even if the debugger process 330 requests to connect to the debuggee process 310 as a debugger, the debugger process 330 cannot System calls can fail, which has the effect of blocking the debugger.

이때, 선점 프로세스(320)는 디버기 프로세스(310)에서 생성되는 스레드마다 연결될 수 있다. 예를 들어, 도 3은 디버기 프로세스(310)에서 생성되는 n 개의 스레드들을 나타내고 있다. 이때, 선점 프로세스(320)는 n 개의 스레드들 각각과 연결될 수 있다. 선점 프로세스(320)가 디버기 프로세스(310)를 선점하기 위해 생성되는 프로세스이기 때문에 디버기 프로세스(310)로부터의 시그널을 수신 및 처리할 수 있는 기능이 선점 프로세스(320)에 포함될 수 있다. 반면, 디버기 프로세스(310)는 컴퓨터 프로그램을 위한 프로세스이기 때문에 디버기 프로세스(310)는 선점 프로세스(320)로부터의 시그널을 처리하기 위한 별도의 스레드(이하, '모니터 스레드')를 생성할 수 있다. 도 3에서는 스레드 n이 모니터 스레드로서 선점 프로세스(320)로부터의 시그널을 처리하는 예를 나타내고 있다.At this time, the preemption process 320 may be connected to each thread created in the debuggee process 310. For example, Figure 3 shows n threads created in the debuggee process 310. At this time, the preemption process 320 may be connected to each of n threads. Since the preemption process 320 is a process created to preempt the debuggee process 310, a function for receiving and processing a signal from the debuggee process 310 may be included in the preemption process 320. On the other hand, since the debuggee process 310 is a process for a computer program, the debuggee process 310 can create a separate thread (hereinafter, 'monitor thread') to process signals from the preemption process 320. there is. Figure 3 shows an example in which thread n processes a signal from the preemption process 320 as a monitor thread.

디버기 프로세스(310)와 선점 프로세스(320) 각각의 동작은 이후 더욱 자세히 설명한다.The operations of each of the debuggee process 310 and the preemption process 320 will be described in more detail later.

도 4는 본 발명의 일실시예에 따른 디버거 차단 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 디버거 차단 방법은 앞서 설명한 컴퓨터 장치(200)에 의해 수행될 수 있다. 예를 들어, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드 및/또는 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 예를 들어, 상술한 프로그램 코드는 디버깅의 대상이 되는 어플리케이션의 코드일 수 있다. 다시 말해, 어플리케이션은 디버거를 차단하기 위한 코드를 포함할 수 있으며, 프로세서(220)는 컴퓨터 장치(200)에 저장된 어플리케이션의 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 4의 디버거 차단 방법이 포함하는 단계들(410 및 420)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다. 실시예에 따라 프로그램의 코드는 디버깅의 대상이 되는 어플리케이션과는 별도의 프로그램을 통해 제공될 수도 있다. 예를 들어, 디버기 프로세스는 디버깅의 대상이 되는 어플리케이션과 연관된 프로세스이고, 별도의 프로그램에 의해 생성된 선점 프로세스가 디버기 프로세스를 선점할 수도 있다. 이 경우, 디버깅의 대상이 되는 어플리케이션과는 별도의 프로그램이 컴퓨터 장치(200)에서 더 생성될 수 있다.Figure 4 is a flowchart showing an example of a debugger blocking method according to an embodiment of the present invention. The debugger blocking method according to this embodiment can be performed by the computer device 200 described above. For example, the processor 220 of the computer device 200 may be implemented to execute control instructions according to the code of an operating system and/or the code of at least one program included in the memory 210. For example, the above-mentioned program code may be the code of an application that is the target of debugging. In other words, the application may include code for blocking the debugger, and the processor 220 allows the computer device 200 to block the debugger in FIG. 4 according to control instructions provided by the code of the application stored in the computer device 200. The computer device 200 can be controlled to perform steps 410 and 420 included in the method. Depending on the embodiment, the program code may be provided through a separate program from the application that is the target of debugging. For example, the debuggee process is a process related to the application that is the target of debugging, and a preemption process created by a separate program may preempt the debuggee process. In this case, a separate program from the application that is the target of debugging may be further created in the computer device 200.

단계(410)에서 컴퓨터 장치(200)는 컴퓨터 프로그램에 대한 디버깅 동작의 보호를 위해 컴퓨터 프로그램과 연관된 디버기(debuggee) 프로세스가 실행됨에 응답하여 디버기 프로세스를 선점하기 위한 선점 프로세스를 실행시킬 수 있다. 일례로, 컴퓨터 장치(200)는 디버기 프로세스의 실행 시 디버기 프로세스에 대한 포크(fork)를 통해 디버기 프로세스와 동일한 권한의 선점 프로세스를 생성하여 실행시킬 수 있다. 이미 설명한 바와 같이, 포크 이외에 프로세스를 생성하여 실행시킬 수 있는 방법이라면 선점 프로세스를 실행시키기 위한 방법이 제한되지 않는다.In step 410, the computer device 200 may execute a preemption process to preempt the debuggee process in response to execution of the debuggee process associated with the computer program to protect the debugging operation for the computer program. . For example, when executing a debuggee process, the computer device 200 may fork the debuggee process to create and execute a preemption process with the same permissions as the debuggee process. As already explained, there are no limitations to the methods for executing a preemptive process as long as it is possible to create and execute a process other than fork.

단계(420)에서 컴퓨터 장치(200)는 실행된 선점 프로세스를 시스템 호출을 통해 디버기 프로세스에 연결(attach)시켜 디버기 프로세스에 대한 디버깅 동작을 선점할 수 있다. 예를 들어, 컴퓨터 장치(200)가 유닉스 계열의 운영체제를 이용하는 경우, 시스템 호출 API인 ptrace를 통해 선점 프로세스가 디버기 프로세스에 연결될 수 있음을 앞서 설명하였다. 이처럼 컴퓨터 장치(200)는 운영체제에 따라 기 정의된 호출 방법에 기초하여 실행된 선점 프로세스가 디버기 프로세스에 연결되도록 할 수 있다. 선점 프로세스는 보호하고자 하는 컴퓨터 프로그램과 연관하여 생성된 프로세스를 디버기 프로세스로서 인식할 수 있으며, 인식된 디버기 프로세스의 프로세스 식별자(PID)를 통한 시스템 호출을 통해 운영체제로 하여금 선점 프로세스를 목적된 디버기 프로세스에 연결하도록 제어할 수 있다. 이미 설명한 바와 같이 선점 프로세스가 디버기 프로세스를 디버깅 동작에 대해 선점하였기 때문에 다른 디버거 프로세스는 디버기 프로세스에 연결될 수 없으며, 따라서 디버거가 차단된다.In step 420, the computer device 200 may preempt a debugging operation for the debuggee process by attaching the executed preemption process to the debuggee process through a system call. For example, it was previously explained that when the computer device 200 uses a Unix-based operating system, the preemption process can be connected to the debuggee process through ptrace, a system call API. In this way, the computer device 200 may allow the preemption process executed based on a predefined calling method according to the operating system to be connected to the debuggee process. The preemptive process can recognize the process created in association with the computer program to be protected as a debuggee process, and makes the operating system call the preempted process as the intended debuggee process through a system call using the process identifier (PID) of the recognized debuggee process. You can control it to connect to the buggy process. As already explained, because the preempting process has preempted the debuggee process for debugging operations, other debugger processes cannot connect to the debuggee process, and thus the debugger is blocked.

도 5는 본 발명의 일실시예에 따른 선점 프로세스의 동작의 예를 도시한 흐름도이다. 도 5의 단계들(510 내지 560)은 선점 프로세스의 논리적인 동작을 설명하고 있으며, 실질적으로는 컴퓨터 장치(200)의 프로세서에 의해 컴퓨터 장치(200)가 수행하도록 야기되는 동작들일 수 있다. 도 5에서는 이러한 단계들(510 내지 560)이 도 4의 단계(420)에 포함되어 컴퓨터 장치(200)에 의해 수행되는 과정의 예를 설명한다.Figure 5 is a flowchart showing an example of the operation of a preemption process according to an embodiment of the present invention. Steps 510 to 560 of FIG. 5 describe the logical operation of the preemption process, and may actually be operations caused by the processor of the computer device 200 to perform the computer device 200. FIG. 5 illustrates an example of a process in which these steps 510 to 560 are included in step 420 of FIG. 4 and are performed by the computer device 200.

단계(510)에서 컴퓨터 장치(200)는 디버기 프로세스와 연관하여 선점 프로세스의 실행 이전에 생성된 스레드를 찾아 시스템 호출을 통해 선점 프로세스와 연결시킬 수 있다. 앞서 설명한 바와 같이, 선점 프로세스는 디버기 프로세스에 의해 생성되는 스레드들 각각과 연결될 수 있으며, 선점 프로세스의 실행 이전에 디버기 프로세스에 의해 생성된 스레드가 존재할 수 있다. 이러한 스레드와의 연결을 위해 선점 프로세스는 선점 프로세스의 실행 이전에 생성된 스레드들을 찾아서 시스템 호출을 통해 해당 스레드들과 연결될 수 있다. 이때, 실시예에 따라 단계(510)는 생략될 수도 있다. In step 510, the computer device 200 may find a thread created before execution of the preemption process in association with the debuggee process and connect it to the preemption process through a system call. As described above, the preemption process may be connected to each of the threads created by the debuggee process, and a thread created by the debuggee process may exist before execution of the preemption process. To connect to these threads, the preempting process can find threads created before the execution of the preempting process and connect to those threads through a system call. At this time, step 510 may be omitted depending on the embodiment.

단계(520)에서 컴퓨터 장치(200)는 선점 프로세스가 디버기 프로세스로부터 전달받을 시그널을 대기하도록 선점 프로세스를 제어할 수 있다. 이는 논리적으로 선점 프로세스가 디버기 프로세스로부터 전달받을 시그널을 대기하는 과정일 수 있다.In step 520, the computer device 200 may control the preemption process so that the preemption process waits for a signal to be received from the debuggee process. Logically, this may be a process in which the preemptive process waits for a signal to be received from the debuggee process.

단계(530)에서 컴퓨터 장치(200)는 디버기 프로세스로부터 선점 프로세스가 스레드 생성 시그널을 수신하는지 여부를 확인할 수 있다. 컴퓨터 장치(200)는 선점 프로세스가 디버기 프로세스로부터 스레드 생성 시그널을 수신하는 경우에 단계(540)를, 수신하지 않는 경우 단계(550)를 수행할 수 있다.In step 530, the computer device 200 may check whether the preemption process receives a thread creation signal from the debuggee process. The computer device 200 may perform step 540 when the preemption process receives a thread creation signal from the debuggee process, and step 550 when it does not receive the thread creation signal.

단계(540)에서 컴퓨터 장치(200)는 시스템 호출을 통해 디버기 프로세스에서 생성된 스레드에 선점 프로세스를 연결시킬 수 있다. 이는 선점 프로세스가 해당 스레드의 태스크에 대한 ptrace와 같은 시스템 호출을 통해 생성된 스레드에 연결되는 과정일 수 있다. 컴퓨터 장치(200)는 단계(540)를 통해 선점 프로세스와 생성된 스레드를 연결시킨 후 다시 단계(520)를 수행하여 선점 프로세스가 디버기 프로세스로부터의 시그널 신호의 수신을 대기하도록 제어할 수 있다.In step 540, the computer device 200 may connect the preemption process to the thread created in the debuggee process through a system call. This may be a process in which a preemptive process attaches to a thread created through a system call, such as ptrace, for that thread's task. The computer device 200 may connect the preemption process and the created thread through step 540 and then perform step 520 again to control the preemption process to wait for reception of a signal from the debuggee process.

단계(550)에서 컴퓨터 장치(200)는 디버기 프로세스로부터 선점 프로세스가 종료 시그널을 수신하는지 여부를 확인할 수 있다. 컴퓨터 장치(200)는 선점 프로세스가 디버기 프로세스로부터 종료 시그널을 수신하는 경우에 단계(560)을, 수신하지 않는 경우에는 다시 단계(520)을 수행하여 선점 프로세스가 디버기 프로세스로부터의 시그널 신호의 수신을 대기하도록 제어할 수 있다.In step 550, the computer device 200 may check whether the preemption process receives an end signal from the debuggee process. The computer device 200 performs step 560 when the preemption process receives a termination signal from the debuggee process, and performs step 520 again when the preemption process does not receive the termination signal from the debuggee process. You can control it to wait for reception.

단계(560)에서 컴퓨터 장치(200)는 선점 프로세스에 연결된 스레드를 분리하고 선점 프로세스를 종료시킬 수 있다. 디버기 프로세스가 종료되는 경우, 디버기 프로세스를 선점하기 위한 선점 프로세스 역시 필요가 없어지기 때문에 선점 프로세스 역시 종료될 수 있다. 이때, 선점 프로세스는 디버기 프로세스의 종료 시그널을 수신함에 따라 디버기 프로세스의 스레드들과의 연결을 분리함으로써 안정적으로 종료될 수 있다.In step 560, the computer device 200 may disconnect the thread connected to the preemption process and terminate the preemption process. When the debuggee process is terminated, the preemption process for preempting the debuggee process is also no longer needed, so the preemption process may also be terminated. At this time, the preemption process can be terminated stably by disconnecting from the threads of the debuggee process upon receiving the end signal of the debuggee process.

이때, 도 5의 단계들을 통해 나타난 바와 같이 스레드 생성 시그널과 종료 시그널 이외의 디버깅 동작과 관련된 시그널들은 무시될 수 있다. 예를 들어, 선점 프로세스는 디버거 프로세스처럼 디버기 프로세스의 디버깅 동작을 선점하고 있으나, 실제로 디버거의 역할을 수행하는 것은 아니기 때문에 컴퓨터 장치(200)는 단계(520)에서 시그널 신호의 수신을 대기하면서 디버깅 동작과 관련된 다른 시그널들이 수신되는 경우, 다른 시그널들은 무시할 수 있다.At this time, as shown through the steps in FIG. 5, signals related to debugging operations other than the thread creation signal and termination signal may be ignored. For example, the preemption process preempts the debugging operation of the debugger process like a debugger process, but since it does not actually perform the role of a debugger, the computer device 200 performs debugging while waiting for reception of a signal signal in step 520. If other signals related to the operation are received, the other signals can be ignored.

도 6은 본 발명의 일실시예에 따른 디버기 프로세스의 동작의 예를 도시한 흐름도이다. 도 6의 단계들(610 내지 650)은 디버기 프로세스의 논리적인 동작을 설명하고 있으며, 실질적으로는 컴퓨터 장치(200)의 프로세서에 의해 컴퓨터 장치(200)가 수행하도록 야기되는 동작들일 수 있다. 도 6에서는 단계들(610 내지 650)이 도 4의 단계(420)에 포함되어 컴퓨터 장치(200)에 의해 수행되는 과정의 예를 설명한다.Figure 6 is a flowchart showing an example of the operation of a debuggee process according to an embodiment of the present invention. Steps 610 to 650 of FIG. 6 describe the logical operation of the debuggee process, and may actually be operations caused by the processor of the computer device 200 to perform the computer device 200. FIG. 6 illustrates an example of a process performed by the computer device 200 in which steps 610 to 650 are included in step 420 of FIG. 4 .

단계(610)에서 컴퓨터 장치(200)는 선점 프로세스로부터의 시그널을 처리하는 모니터 스레드를 생성할 수 있다. 모니터 스레드는 선점 프로세스로부터의 시그널을 처리할 수 있다.In step 610, the computer device 200 may create a monitor thread that processes signals from the preemption process. The monitor thread can handle signals from the preempting process.

단계(620)에서 컴퓨터 장치(200)는 디버기 프로세스가 선점 프로세스로부터 전달받을 시그널을 대기하도록 디버기 프로세스를 제어할 수 있다. 이는 논리적으로 모니터 스레드가 선점 프로세스로부터 전달받을 시그널을 대기하는 과정일 수 있다.In step 620, the computer device 200 may control the debuggee process so that the debuggee process waits for a signal to be received from the preemption process. Logically, this may be a process in which the monitor thread waits for a signal to be received from the preemption process.

단계(630)에서 컴퓨터 장치(200)는 디버기 프로세스와 연관된 스레드를 생성하는 경우, 선점 프로세스로 스레드 생성 시그널을 전송할 수 있다. 이는 디버기 프로세스(또는 모니터 스레드)가 선점 프로세스로 디버기 프로세스에서 스레드가 생성되었음을 알리기 위한 스레드 생성 시그널을 전송하는 과정일 수 있다. 예를 들어, 디버기 프로세스는 도 5의 단계(530)에서 이러한 스레드 생성 시그널의 수신 여부를 확인할 수 있다.In step 630, when the computer device 200 creates a thread associated with a debuggee process, it may transmit a thread creation signal to the preemption process. This may be a process in which the debuggee process (or monitor thread) transmits a thread creation signal to notify that a thread has been created in the debuggee process as a preemptive process. For example, the debuggee process can check whether this thread creation signal is received in step 530 of FIG. 5.

단계(640)에서 컴퓨터 장치(200)는 디버기 프로세스가 선점 프로세스로부터 종료 시그널을 수신하는지 여부를 확인할 수 있다. 컴퓨터 장치(200)는 디버기 프로세스가 선점 프로세스로부터 종료 시그널을 수신하는 경우에 단계(650)을 수행할 수 있고, 수신하지 않는 경우 다시 단계(620)을 수행하여 디버기 프로세스가 선점 프로세스로부터 전달받을 시그널을 대기하도록 디버기 프로세스를 제어할 수 있다. 다시 말해, 모니터 스레드는 선점 프로세스로부터의 종료 시그널을 이외의 시그널들은 무시할 수 있다.In step 640, the computer device 200 may check whether the debuggee process receives a termination signal from the preemption process. The computer device 200 may perform step 650 when the debuggee process receives a termination signal from the preempting process, and if it does not receive the termination signal, perform step 620 again to ensure that the debuggee process receives the termination signal from the preempting process. You can control the debuggee process to wait for a signal to be received. In other words, the monitor thread can ignore signals other than the termination signal from the preempting process.

단계(650)에서 컴퓨터 장치(200)는 디버기 프로세스에 연결된 스레드를 분리하고 상기 디버기 프로세스를 종료시킬 수 있다. 이는 디버기 프로세스가 종료되는 과정일 수 있다. 다시 말해, 디버기 프로세스는 선점 프로세스로부터의 종료 시그널을 수신함에 따라 디버기 프로세스에 연결된 모든 스레드들을 분리한 후 안전하게 종료할 수 있다. 이는 선점 프로세스만이 먼저 종료되고 디버기 프로세스가 남아 다른 디버거에 의해 디버깅되는 것을 방지하기 위해 선점 프로세스가 종료되는 경우 디버기 프로세스 역시 종료시키기 위한 과정일 수 있다.In step 650, the computer device 200 may disconnect a thread connected to the debuggee process and terminate the debuggee process. This may be the process in which the debuggee process ends. In other words, as the debuggee process receives a termination signal from the preempting process, it can safely terminate after disconnecting all threads connected to the debuggee process. This may be a process to terminate the debuggee process as well when the preemption process is terminated in order to prevent only the preemption process from being terminated first and the debuggee process remaining to be debugged by another debugger.

실시예에 따라 상호 디버깅 보호를 위해 디버기 프로세스도 역으로 선점 프로세스를 선점하여 디버기 프로세스와 선점 프로세스가 서로의 디버거 포트를 선점하는 상호 디버깅 보호의 경우를 고려할 수 있다. 이 경우, 디버기 프로세스 역시 선점 프로세스를 선점하기 위한 과정을 진행할 수 있으며, 선점 프로세스로부터 스레드 생성 시그널을 수신할 수 있다. 이때, 모니터 스레드는 선점 프로세스로부터의 스레드 생성 시그널 및 종료 시그널 이외의 시그널들을 무시할 수 있다. 예를 들어, 컴퓨터 장치(200)는 실행된 디버기 프로세스를 시스템 호출을 통해 선점 프로세스에 연결시켜 선점 프로세스에 대한 디버깅 동작을 선점함으로써, 선점 프로세스에 대한 디버거 프로세스의 접근을 막을 수 있다.Depending on the embodiment, for mutual debugging protection, a case of mutual debugging protection in which the debuggee process also preempts the preempting process and the debuggee process and the preempting process preempt each other's debugger ports may be considered. In this case, the debuggee process can also proceed with the process of preempting the preempting process and receive a thread creation signal from the preempting process. At this time, the monitor thread can ignore signals other than the thread creation signal and termination signal from the preemption process. For example, the computer device 200 connects the executed debugger process to the preempting process through a system call to preempt the debugging operation for the preempting process, thereby preventing the debugger process from accessing the preempting process.

또한, 상호 디버깅 보호를 처리하는 상태에서 선점 프로세스가 외부의 어떤 요인에 의해 종료되는 경우(일례로, 비정상적으로 종료되는 경우)에도, 디버기 프로세스는 선점 프로세스의 종료 시그널을 수신해서 선점 프로세스의 종료 여부를 알 수 있으며, 선점 프로세스를 다시 실행시켜 디버거 포트를 재선점함으로써 보호 상태를 유지할 수 있다. 예를 들어, 컴퓨터 장치(200)는 단계(420)에서 디버기 프로세스가 선점 프로세스로부터 종료 시그널을 수신하는 경우, 디버기 프로세스에 대한 포크(fork)를 통해 디버기 프로세스와 동일한 권한의 다른 선점 프로세스를 실행시키고, 실행된 다른 선점 프로세스를 시스템 호출을 통해 디버기 프로세스에 연결시켜 디버기 프로세스에 대한 디버깅 동작의 선점을 유지할 수 있다.In addition, even if the preempting process is terminated by some external factor while processing mutual debugging protection (for example, if it terminates abnormally), the debuggee process receives the termination signal of the preempting process and terminates the preempting process. You can check whether the debugger port is available, and you can maintain the protected state by re-running the preemption process and re-preempting the debugger port. For example, when the debuggee process receives a termination signal from the preempting process in step 420, the computer device 200 forks the debuggee process to another preempting process with the same permissions as the debuggee process. You can maintain preemption of debugging operations for the debuggee process by executing and connecting other executed preemption processes to the debuggee process through a system call.

역으로, 디버기 프로세스가 외부의 어떤 요인에 의해 종료되는 경우(즉, 비정상적으로 종료되는 경우)에도, 선점 프로세스는 디버기 프로세스의 종료 시그널을 수신해서 디버기 프로세스의 종료 여부 및/또는 비정상적 종료 여부를 판단할 수 있으며, 이 판단에 따라 디버기 프로세스가 재실행되도록 할 수 있다. 예를 들어, 컴퓨터 장치(200)는 단계(420)에서 선점 프로세스가 디버기 프로세스로부터 종료 시그널을 수신하여 디버기 프로세스가 비정상적으로 종료되었음을 판단하고, 디버기 프로세스를 재실행시킬 수 있다.Conversely, even when the debuggee process is terminated by some external factor (i.e., terminates abnormally), the preempting process receives the termination signal of the debuggee process to determine whether the debuggee process terminates and/or terminates abnormally. This can be determined, and the debuggee process can be re-executed based on this judgment. For example, in step 420, the computer device 200 may determine that the preemption process receives a termination signal from the debuggee process and the debuggee process terminates abnormally, and may re-execute the debuggee process.

이상에서와 같이, 본 발명의 실시예들에 따르면, 보호하고자 하는 프로그램의 프로세스를 선점하여 디버거(debugger) 프로세스가 디버기(debuggee) 프로세스에 접속(attach)하지 못하도록 함으로써, 디버거를 차단할 수 있다.As described above, according to embodiments of the present invention, the debugger can be blocked by preempting the process of the program to be protected and preventing the debugger process from attaching to the debuggee process.

이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 소프트웨어 구성요소 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The system or device described above may be implemented with hardware components, software components, or a combination of hardware components and software components. For example, devices and components described in embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), etc. , 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. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include. For example, a processing device may include a plurality of processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device. Software and/or data may be used on any type of machine, component, physical device, virtual equipment, computer storage medium or device to be interpreted by or to provide instructions or data to a processing device. It can be embodied in . Software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., singly or in combination. Program instructions recorded on the medium may be specially designed and configured for the embodiment or may be known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -Includes optical media (magneto-optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, etc. Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.

발명의 실시를 위한 형태Forms for practicing the invention

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited examples and drawings, various modifications and variations can be made by those skilled in the art from the above description. For example, the described techniques are performed in a different order than the described method, and/or components of the described system, structure, device, circuit, etc. are combined or combined in a different form than the described method, or other components are used. Alternatively, appropriate results may be achieved even if substituted or substituted by an equivalent.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents of the claims also fall within the scope of the claims described below.

Claims (18)

컴퓨터와 결합되어 디버거 차단 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램에 있어서,
상기 디버거 차단 방법은,
상기 컴퓨터 프로그램에 대한 디버깅 동작의 보호를 위해 상기 컴퓨터 프로그램과 연관된 디버기(debuggee) 프로세스가 실행됨에 응답하여 상기 디버기 프로세스를 선점하기 위한 선점 프로세스를 실행시키는 단계; 및
상기 실행된 선점 프로세스를 시스템 호출을 통해 상기 디버기 프로세스에 연결시켜 상기 디버기 프로세스에 대한 디버깅 동작을 선점하는 단계
를 포함하고,
상기 선점하는 단계는,
상기 선점 프로세스의 실행 이전에 상기 디버기 프로세스와 연관하여 생성된 스레드를 찾아 시스템 호출을 통해 상기 선점 프로세스와 연결시키는 단계;
상기 선점 프로세스에서 상기 디버기 프로세스로부터 전달받을 시그널을 대기하는 단계; 및
상기 디버기 프로세스로부터 상기 선점 프로세스가 스레드 생성 시그널을 수신하는 경우, 시스템 호출을 통해 상기 디버기 프로세스에서 생성된 스레드에 상기 선점 프로세스를 연결시키는 단계
를 포함하고,
상기 디버기 프로세스는 상기 선점 프로세스로부터의 종료 시그널 이외의 시그널을 무시하기 위한 모니터 스레드를 포함하는 것
을 특징으로 하는, 컴퓨터 프로그램.
In a computer program coupled to a computer and stored on a computer-readable recording medium for executing a debugger blocking method on the computer,
The debugger blocking method is:
executing a preemption process to preempt the debuggee process in response to execution of a debuggee process associated with the computer program to protect a debugging operation for the computer program; and
Connecting the executed preemption process to the debuggee process through a system call to preempt a debugging operation for the debuggee process
Including,
The preemption step is,
Finding a thread created in association with the debuggee process before execution of the preemption process and connecting it to the preemption process through a system call;
Waiting in the preemption process for a signal to be received from the debuggee process; and
When the preempting process receives a thread creation signal from the debuggee process, connecting the preempting process to the thread created in the debuggee process through a system call.
Including,
The debuggee process includes a monitor thread to ignore signals other than a termination signal from the preemptive process.
Characterized by a computer program.
제1항에 있어서,
상기 실행시키는 단계는,
상기 디버기 프로세스의 실행 시 상기 디버기 프로세스에 대한 포크(fork)를 통해 상기 디버기 프로세스와 동일한 권한의 상기 선점 프로세스를 실행시키는 단계
를 포함하는, 컴퓨터 프로그램.
According to paragraph 1,
The steps to execute the above are,
When executing the debuggee process, executing the preemption process with the same permissions as the debuggee process through forking the debuggee process.
A computer program, including.
제1항에 있어서,
상기 선점하는 단계는,
상기 디버기 프로세스로부터 상기 종료 시그널을 수신하는 경우, 상기 선점 프로세스에 연결된 스레드를 분리하고 상기 선점 프로세스를 종료시키는 단계
를 더 포함하는, 컴퓨터 프로그램.
According to paragraph 1,
The preemption step is,
When receiving the termination signal from the debuggee process, disconnecting a thread connected to the preemption process and terminating the preemption process
A computer program further comprising:
삭제delete 제3항에 있어서,
상기 대기하는 단계는,
상기 스레드 생성 시그널 및 상기 종료 시그널 이외의 상기 디버깅 동작과 관련된 시그널을 무시하는, 컴퓨터 프로그램.
According to paragraph 3,
The waiting step is,
A computer program that ignores signals associated with the debugging operation other than the thread creation signal and the termination signal.
제1항에 있어서,
상기 선점하는 단계는,
상기 디버기 프로세스에서 상기 선점 프로세스로부터 전달받을 시그널을 대기하는 단계;
상기 디버기 프로세스와 연관된 스레드를 생성하는 경우, 상기 선점 프로세스로 스레드 생성 시그널을 전송하는 단계; 및
상기 선점 프로세스로부터 상기 종료 시그널을 수신하는 경우, 상기 디버기 프로세스에 연결된 스레드를 분리하고 상기 디버기 프로세스를 종료시키는 단계
를 포함하는, 컴퓨터 프로그램.
According to paragraph 1,
The preemption step is,
Waiting in the debuggee process for a signal to be received from the preemption process;
When creating a thread associated with the debuggee process, transmitting a thread creation signal to the preemption process; and
When receiving the termination signal from the preemption process, disconnecting a thread connected to the debuggee process and terminating the debuggee process
A computer program, including.
제6항에 있어서,
상기 선점하는 단계는,
상기 선점 프로세스로부터의 상기 종료 시그널을 처리하는 상기 모니터 스레드를 생성하는 단계
를 더 포함하는, 컴퓨터 프로그램.
According to clause 6,
The preemption step is,
creating the monitor thread to process the termination signal from the preempting process
A computer program further comprising:
제6항에 있어서,
상기 대기하는 단계는,
상기 종료 시그널 이외에 상기 디버깅 동작과 관련된 시그널을 무시하는, 컴퓨터 프로그램.
According to clause 6,
The waiting step is,
A computer program that ignores signals associated with the debugging operation other than the termination signal.
제1항에 있어서,
상기 디버거 차단 방법은,
상기 디버기 프로세스를 시스템 호출을 통해 상기 선점 프로세스에 연결시켜 상기 선점 프로세스에 대한 디버깅 동작을 선점하는 단계
를 더 포함하는, 컴퓨터 프로그램.
According to paragraph 1,
The debugger blocking method is:
Connecting the debuggee process to the preemption process through a system call to preempt a debugging operation for the preemption process
A computer program further comprising:
제1항에 있어서,
상기 디버거 차단 방법은,
상기 선점 프로세스로부터 상기 종료 시그널을 수신하는 경우, 상기 디버기 프로세스를 선점하기 위한 다른 선점 프로세스를 실행시키고, 상기 실행된 다른 선점 프로세스를 시스템 호출을 통해 상기 디버기 프로세스에 연결시켜 상기 디버기 프로세스에 대한 디버깅 동작의 선점을 유지하는 단계
를 더 포함하는, 컴퓨터 프로그램.
According to paragraph 1,
The debugger blocking method is:
When receiving the termination signal from the preemption process, another preemption process to preempt the debuggee process is executed, and the executed other preemption process is connected to the debuggee process through a system call to connect to the debuggee process. Steps to maintain preemption of debugging operations for
A computer program further comprising:
제1항에 있어서,
상기 디버거 차단 방법은,
상기 선점 프로세스에서 상기 디버기 프로세스로부터 상기 종료 시그널을 수신하는 경우, 상기 종료 시그널에 기초하여 상기 디버기 프로세스를 재실행시키는 단계
를 더 포함하는, 컴퓨터 프로그램.
According to paragraph 1,
The debugger blocking method is:
When the preemption process receives the termination signal from the debuggee process, re-executing the debuggee process based on the termination signal.
A computer program further comprising:
컴퓨터의 프로세서에 의해 실행되는 디버거 차단 방법에 있어서,
컴퓨터 프로그램에 대한 디버깅 동작의 보호를 위해 상기 컴퓨터 프로그램과 연관된 디버기(debuggee) 프로세스가 실행됨에 응답하여 상기 디버기 프로세스를 선점하기 위한 선점 프로세스를 실행시키는 단계; 및
상기 실행된 선점 프로세스를 시스템 호출을 통해 상기 디버기 프로세스에 연결시켜 상기 디버기 프로세스에 대한 디버깅 동작을 선점하는 단계
를 포함하고,
상기 선점하는 단계는,
상기 선점 프로세스의 실행 이전에 상기 디버기 프로세스와 연관하여 생성된 스레드를 찾아 시스템 호출을 통해 상기 선점 프로세스와 연결시키는 단계;
상기 선점 프로세스에서 상기 디버기 프로세스로부터 전달받을 시그널을 대기하는 단계; 및
상기 디버기 프로세스로부터 상기 선점 프로세스가 스레드 생성 시그널을 수신하는 경우, 시스템 호출을 통해 상기 디버기 프로세스에서 생성된 스레드에 상기 선점 프로세스를 연결시키는 단계
를 포함하고,
상기 디버기 프로세스는 상기 선점 프로세스로부터의 종료 시그널 이외의 시그널을 무시하기 위한 모니터 스레드를 포함하는 것
을 특징으로 하는 디버거 차단 방법.
In a method of blocking a debugger executed by a processor of a computer,
executing a preemption process to preempt the debuggee process in response to execution of a debuggee process associated with the computer program to protect a debugging operation for the computer program; and
Connecting the executed preemption process to the debuggee process through a system call to preempt a debugging operation for the debuggee process
Including,
The preemption step is,
Finding a thread created in association with the debuggee process before execution of the preemption process and connecting it to the preemption process through a system call;
Waiting in the preemption process for a signal to be received from the debuggee process; and
When the preempting process receives a thread creation signal from the debuggee process, connecting the preemption process to the thread created in the debuggee process through a system call.
Including,
The debuggee process includes a monitor thread to ignore signals other than a termination signal from the preemptive process.
A debugger blocking method characterized by .
제12항에 있어서,
상기 실행시키는 단계는,
상기 디버기 프로세스의 실행 시 상기 디버기 프로세스에 대한 포크(fork)를 통해 상기 디버기 프로세스와 동일한 권한의 상기 선점 프로세스를 실행시키는 단계
를 포함하는, 디버거 차단 방법.
According to clause 12,
The steps to execute the above are,
When executing the debuggee process, executing the preemption process with the same permissions as the debuggee process through forking the debuggee process.
Debugger blocking methods, including:
제12항에 있어서,
상기 선점하는 단계는,
상기 디버기 프로세스로부터 상기 종료 시그널을 수신하는 경우, 상기 선점 프로세스에 연결된 스레드를 분리하고 상기 선점 프로세스를 종료시키는 단계; 및
상기 스레드 생성 시그널 및 상기 종료 시그널 이외의 시그널을 무시하는 단계
를 더 포함하는, 디버거 차단 방법.
According to clause 12,
The preemption step is,
When receiving the termination signal from the debuggee process, disconnecting a thread connected to the preemption process and terminating the preemption process; and
Ignoring signals other than the thread creation signal and the termination signal.
A debugger blocking method further comprising:
삭제delete 제12항에 있어서,
상기 선점하는 단계는,
상기 디버기 프로세스에서 상기 선점 프로세스로부터 전달받을 시그널을 대기하는 단계;
상기 디버기 프로세스와 연관된 스레드를 생성하는 경우, 상기 선점 프로세스로 스레드 생성 시그널을 전송하는 단계;
상기 선점 프로세스로부터 상기 종료 시그널을 수신하는 경우, 상기 디버기 프로세스에 연결된 스레드를 분리하고 상기 디버기 프로세스를 종료시키는 단계; 및
상기 종료 시그널 이외의 시그널을 무시하는 단계
를 포함하는 디버거 차단 방법.
According to clause 12,
The preemption step is,
Waiting in the debuggee process for a signal to be received from the preemption process;
When creating a thread associated with the debuggee process, transmitting a thread creation signal to the preemption process;
When receiving the termination signal from the preemption process, disconnecting a thread connected to the debuggee process and terminating the debuggee process; and
Ignoring signals other than the termination signal
Debugger blocking methods, including .
제16항에 있어서,
상기 선점하는 단계는,
상기 선점 프로세스로부터의 상기 종료 시그널을 처리하는 상기 모니터 스레드를 생성하는 단계
를 포함하는 디버거 차단 방법.
According to clause 16,
The preemption step is,
creating the monitor thread to process the termination signal from the preempting process
Debugger blocking methods, including .
제12항 내지 제14항, 제16항 또는 제17항 중 어느 한 항의 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체.A computer-readable recording medium recording a computer program for executing the method of any one of claims 12 to 14, 16, or 17 on a computer.
KR1020207028367A 2018-06-08 2018-06-08 Debugger blocking method and system for program protection KR102623022B1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2018/006499 WO2019235664A1 (en) 2018-06-08 2018-06-08 Debugger blocking method and system for program protection

Publications (2)

Publication Number Publication Date
KR20210006882A KR20210006882A (en) 2021-01-19
KR102623022B1 true KR102623022B1 (en) 2024-01-09

Family

ID=68769626

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020207028367A KR102623022B1 (en) 2018-06-08 2018-06-08 Debugger blocking method and system for program protection

Country Status (2)

Country Link
KR (1) KR102623022B1 (en)
WO (1) WO2019235664A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112948241B (en) * 2021-02-09 2024-02-06 北京奇艺世纪科技有限公司 Anti-debugging method and device for application program, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211310A (en) * 2009-03-06 2010-09-24 Toshiba Corp Debugging device and debugging method
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100939210B1 (en) * 2007-12-27 2010-01-28 주식회사 안철수연구소 Apparatus and method for prevention an debugging in a virtual environment
GB2487575B (en) * 2011-01-28 2017-04-12 Advanced Risc Mach Ltd Controlling generation of debug exceptions
KR101671336B1 (en) * 2014-02-27 2016-11-16 (주)스마일게이트엔터테인먼트 Method of unpacking protection with code separation and apparatus thereof
KR101626967B1 (en) * 2015-01-21 2016-06-02 넷마블게임즈 주식회사 Method and apparatus for operating application to prevent hacking

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211310A (en) * 2009-03-06 2010-09-24 Toshiba Corp Debugging device and debugging method
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

Also Published As

Publication number Publication date
WO2019235664A1 (en) 2019-12-12
KR20210006882A (en) 2021-01-19

Similar Documents

Publication Publication Date Title
US10528735B2 (en) Malicious code protection for computer systems based on process modification
JP5985631B2 (en) Activate trust level
US10078498B2 (en) Method, apparatus, system, and non-transitory computer readable medium for extending at least one function of a package file
US10176327B2 (en) Method and device for preventing application in an operating system from being uninstalled
EP3502944B1 (en) Detecting script-based malware cross reference to related applications
US9195809B1 (en) Automated vulnerability and error scanner for mobile applications
US20150128206A1 (en) Early Filtering of Events Using a Kernel-Based Filter
US9900324B1 (en) System to discover and analyze evasive malware
US9489182B1 (en) Transparent process interception
US8959491B2 (en) System, method, and computer program product for error code injection
CN104036019A (en) Method and device for opening webpage links
US20190310883A1 (en) Method and system for kernel routine callbacks
CN109684795B (en) Method and device for anti-debugging of application program and electronic equipment
WO2018090871A1 (en) Application service indication method and application service indication device
US10635816B2 (en) Restricting reprogramming of a redirected USB device
JP2021051745A (en) Computer device and memory management method
US7788724B2 (en) System and method for detecting malicious applications
CN112231198B (en) Malicious process debugging method and device, electronic equipment and medium
CN108121650B (en) Method and device for testing page user interface
JP2018152061A (en) Secure just-in-time (jit) code generation
KR102623022B1 (en) Debugger blocking method and system for program protection
US20200311259A1 (en) Cached file reputations
US20190121985A1 (en) Detecting vulnerabilities in applications during execution
US9164813B2 (en) Using a debug engine to identify threads that wait for a mutex
US20190102279A1 (en) Generating an instrumented software package and executing an instance thereof

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
X091 Application refused [patent]
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant