WO2018159881A1 - Debugging detection method and system using inter-thread message processing - Google Patents

Debugging detection method and system using inter-thread message processing Download PDF

Info

Publication number
WO2018159881A1
WO2018159881A1 PCT/KR2017/002295 KR2017002295W WO2018159881A1 WO 2018159881 A1 WO2018159881 A1 WO 2018159881A1 KR 2017002295 W KR2017002295 W KR 2017002295W WO 2018159881 A1 WO2018159881 A1 WO 2018159881A1
Authority
WO
WIPO (PCT)
Prior art keywords
message event
thread
time
request
debugging
Prior art date
Application number
PCT/KR2017/002295
Other languages
French (fr)
Korean (ko)
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 PCT/KR2017/002295 priority Critical patent/WO2018159881A1/en
Publication of WO2018159881A1 publication Critical patent/WO2018159881A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Definitions

  • the following description relates to a debugging detection method using inter-thread message processing, a debugging detection system, and a computer program coupled to a computer and stored on a computer readable recording medium for executing the debugging detection method on a computer.
  • Debugging is essential in the analysis process of the application through reverse engineering, and thus, there are conventional techniques for detecting whether such debugging occurs.
  • the client terminal on which the application is installed and run may check a flag value indicating whether to debug using an API provided by the operating system, and determine whether to debug based on the checked flag value.
  • the flag value of the API provided by the operating system can be simply changed through reverse engineering, and the code for performing debugging detection can be easily bypassed through such reverse engineering.
  • Korean Patent No. 10-1054318 discloses a program to prevent the interpreting behavior of a program by a debugger.
  • this conventional technology has a problem that it is assumed that a separate monitoring program should be installed and run on the client terminal.
  • a computer program stored in a computer readable recording medium for execution by a computer is provided.
  • a computer program coupled to a computer and stored on a computer-readable recording medium for executing a debugging detection method on a computer comprising: creating a request thread requesting a message event; Creating a receiving thread to receive the message event; Generating a message event in the request thread to identify a request time of the message event; Delivering the generated message event to the receiving thread; Confirming, as a reception time, a first time point at which the message event is received by the receiving thread through a storage, or a second time point at which the request thread receives an acknowledgment message event of the receiving thread for the message event; Calculating a time difference from the request time to the reception time; And determining whether or not to debug based on the parallax.
  • a debugging detection method for a computer program comprising: creating a request thread requesting a message event; Creating a receiving thread to receive the message event; Generating a message event in the request thread to identify a request time of the message event; Delivering the generated message event to the receiving thread; Confirming, as a reception time, a first time point at which the message event is received by the receiving thread through a storage, or a second time point at which the request thread receives an acknowledgment message event of the receiving thread for the message event; Calculating a time difference from the request time to the reception time; And it provides a debugging detection method comprising the step of determining whether to debug based on the time difference.
  • a computer program for recording a computer program for executing the debugging detection method is provided.
  • 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.
  • 3 is a diagram for describing message event processing between threads according to an embodiment of the present invention.
  • FIG. 4 is a diagram for one example of detecting a debugging behavior through time difference for a message event according to one embodiment of the present invention.
  • FIG. 5 is a diagram illustrating another example in which a debugging behavior is detected through a time difference for a message event according to one embodiment of the present invention.
  • FIG. 6 is a block diagram illustrating an example of components that may be included in a processor of an electronic device according to an embodiment of the present invention.
  • FIG. 7 is a flowchart illustrating an example of a debugging detection method that may be performed by an electronic device according to an embodiment of the present invention.
  • FIG. 8 is a flowchart illustrating an example of a process of calculating parallax according to an embodiment of the present invention.
  • FIG. 9 is a flowchart illustrating another example of a process of calculating parallax according to an embodiment of the present invention.
  • the debugging detection system may be implemented through an electronic device to be described later, and the debugging detection method according to the embodiments of the present invention may be performed through the electronic device described above.
  • a computer program for example, an application installed in the electronic device to receive a specific service
  • the electronic device may control the driven computer program.
  • a debugging detection method may be performed.
  • the computer program described above may be combined with an electronic device implemented as a computer and stored in a computer-readable recording medium for executing a debugging detection method on a computer.
  • 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.
  • 2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention. 2 illustrates an internal configuration of the electronic device 1 110 and the server 150 as an example of the electronic device. In addition, the other electronic devices 120, 130, 140, or the server 160 may also have the same or similar internal configuration as the aforementioned electronic device 1 110 or the server 150.
  • the electronic device 1 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input / output interfaces 214 and 224.
  • the memories 211 and 221 are computer-readable recording media, and may include non-volatile permanent storage devices such as random access memory (RAM), read only memory (ROM), and disk drives.
  • non-volatile mass storage device such as a ROM and a disk drive may be included in the electronic device 1 110 or the server 150 as a separate permanent storage device that is separated from the memories 211 and 221.
  • the memory 211, 221 includes an operating system and at least one program code (for example, a browser installed and driven in the electronic device 1 110 or an application installed in the electronic device 1 110 to provide a specific service). Code) can be stored.
  • These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221.
  • Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, a memory card, and the like.
  • software components may be loaded into the memory 211, 221 through the communication module 213, 223 rather than a computer readable recording medium.
  • At least one program is a computer program that is installed by files provided by a file distribution system (for example, the server 160 described above) through the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
  • a file distribution system for example, the server 160 described above
  • the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
  • Processors 212 and 222 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 processors 212, 222 by the memory 211, 221 or the communication modules 213, 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memory 211 and 221.
  • the communication modules 213 and 223 may provide a function for the electronic device 1 110 and the server 150 to communicate with each other through the network 170, and the electronic device 1 110 and / or the server 150 may communicate with each other. May provide a function for communicating with another electronic device (eg, electronic device 2 120) or another server (eg, server 160). For example, a request generated by the processor 212 of the electronic device 1 110 according to a program code stored in a recording device such as the memory 211 may be controlled by the server 170 through the network 170 under the control of the communication module 213. 150).
  • control signals, commands, contents, files, and the like provided according to the control of the processor 222 of the server 150 are transmitted to the communication module of the electronic device 1 110 via the communication module 223 and the network 170 ( It may be received by the electronic device 1110 through 213.
  • the control signal, command, content, file, etc. of the server 150 received through the communication module 213 may be transmitted to the processor 212 or the memory 211, and the content, file, etc. may be transferred to the electronic device 1.
  • 110 may be stored as a storage medium (permanent storage described above) that may further include.
  • the input / output interface 214 may be a means for interfacing with the input / output device 215.
  • the input device may include a device such as a keyboard or a mouse, and the output device may include a device such as a display or a speaker.
  • the input / output interface 214 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 215 may be configured as one device with the electronic device 1110.
  • the input / output interface 224 of the server 150 may be a means for interfacing with an apparatus (not shown) for input or output that may be connected to or included in the server 150.
  • the processor 212 of the electronic device 1110 uses data provided by the server 150 or the electronic device 2 120 in processing a command of a computer program loaded in the memory 211.
  • the service screen or the content may be displayed on the display through the input / output interface 214.
  • the electronic device 1 110 and the server 150 may include more components than those of FIG. 2. However, it is not necessary to clearly show most of the prior art components.
  • the electronic device 1 110 may be implemented to include at least some of the above-described input / output devices 215 or other components such as a transceiver, a global positioning system (GPS) module, a camera, various sensors, a database, and the like. It may further include elements.
  • GPS global positioning system
  • an acceleration sensor when the electronic device 1 110 is a smartphone, an acceleration sensor, a gyro sensor, a camera module, various physical buttons, a button using a touch panel, an input / output port, and vibration for a smartphone generally include Various components such as a vibrator may be implemented to be further included in the electronic device 1 110.
  • FIG. 3 is a diagram for describing message event processing between threads according to an embodiment of the present invention.
  • FIG. 3 discloses a plurality of threads 310 to 340 generated to process functions of an application (computer program) installed and driven in an electronic device (for example, the electronic device 1 110 described above).
  • FIG. 3 discloses four threads 310 to 340, the number is not limited to that of FIG. 3, and the number of threads created and running at one time may vary according to the application (or the current state of the application). It is self-evident. 3 illustrates an example in which a request thread for processing a debugging detection method according to an embodiment of the present invention is implemented as a sub thread 3 330 and a receiving thread as a main thread 340.
  • both the request thread and the receive thread may be implemented as sub-threads through the description according to the present embodiment will be easily understood.
  • the processing of message events between the requesting thread and the receiving thread may be utilized by utilizing a general message routine of the main thread or by creating a thread that requests or processes a message event.
  • the sub-threads 310 to 330 may request the main thread 340 to process a message event.
  • Message events for which the sub-threads 310-330 request processing may be stored in storage 350, which may be implemented as a message queue, for example, and sequentially (eg, First In Through a first-in, first-out process such as First Out)) to the main thread 340 for processing.
  • debugging is indispensable, and when debugging is in progress, one or more threads are essentially stopped.
  • debugging requires physical time that can be perceived by humans. Therefore, the time required for debugging is compared to the time spent by the thread to process the message event or the time that the message event is stored in the storage 350 (the time the next message event waits to process the previous message event). It requires a relatively large amount of time.
  • a time difference between a time point at which a message event is requested (hereinafter, referred to as a request time point) and a time point at which the main thread 340 receives a corresponding message event through the storage 350 (hereinafter, referred to as a 'first time point') or Debugging proceeds by using a time difference between the request time and a time point at which the sub thread 3 330, which is a request thread, receives the acknowledgment message event for the message event from the main thread 340 (hereinafter, referred to as 'second time'). Whether it can be detected.
  • the first time point or the second time point may be a reception time
  • the time difference may be a time difference value obtained by subtracting the request time from the reception time.
  • the subthread 3 330 which is a request thread, may periodically transmit a message event to the main thread 340.
  • the threshold can be determined in various ways. For example, in a test environment for a specific application, the request thread may periodically send a message event to the receiving thread n times, and calculate the n time difference values to set a maximum value among the calculated time difference values as a threshold value. .
  • the threshold value may be set by adding an average value of n parallax values to a predetermined value.
  • the time set in the operating system may be set as a threshold to generate an error message when the operating system has no answer from the main thread. The time set in the operating system will be easily understood by those skilled in the art through the related art related to the operating system.
  • the calculated time difference exceeds a threshold value in a special case such as an error.
  • the request thread 410 may generate a message event 1 430 for requesting processing by the receiving thread 420.
  • the request thread 410 adds the request time a of the message event 1 430 and the integrity check information b of the message event 1 430 to the message event 1 430, thereby receiving the receiving thread ( 420).
  • the requested message event 1 430 may be stored in the storage 440 and delivered to the receiving thread 420 when the processing order thereof is reached.
  • the request time a may be added to the message event 1 430 in the form of a time stamp.
  • the reception thread 420 may first check the reception time c when the message event 1 430 is received through the storage 440. For example, the reception thread 420 may generate a timestamp of when the message event 1 430 is received as the reception time c.
  • the reception thread 420 may check the integrity of the message event 1 430 by using the integrity check information b added to the message event 1 430.
  • the integrity check information b For example, a hash value that is a result of inputting a message event 1 430 to which a request time a is added as a parameter of a preset hash function may be calculated as integrity verification information b.
  • a hash value that is a result of inputting a message event 1 430 to which a request time a is added as a parameter of a preset hash function may be calculated as integrity verification information b.
  • the receiving thread 420 may check the request time a in the integrity confirmation message event 1 (430). Thereafter, the reception thread 420 may calculate the time difference d between the reception time c and the request time a.
  • the reception thread 420 may detect the debugging according to the comparison result by comparing the calculated time difference d with a preset threshold value e associated with the corresponding application. For example, the reception thread 420 may determine that debugging is in progress when the parallax d exceeds the threshold value e. According to an embodiment, the reception thread 420 calculates a time difference for a plurality of message events and compares it with a threshold value. When the number of times that the calculated time difference exceeds the threshold exceeds a predetermined number (for example, ten times), You can also decide that debugging is in progress.
  • a predetermined number for example, ten times
  • FIG. 5 is a diagram illustrating another example in which a debugging behavior is detected through a time difference for a message event according to one embodiment of the present invention. If the embodiment of FIG. 4 detects debugging in the receiving thread 420, FIG. 5 describes an embodiment of detecting debugging in the request thread 510.
  • the request thread 510 may generate the message event 1 530 and add the request time a and the integrity check information b of the message event 1 530 to the message event 1 530 and deliver the message event 1 530 to the receiving thread 520.
  • This message event 1 530 may first be stored in the storage 540 for the receiving thread 520 and delivered to the receiving thread 520 in its processing order.
  • the receiving thread 520 may check the integrity of the message event 1 530 by using the integrity check information b included in the message event 1 530, and the acknowledgment message event 1 550 for the message event 1 530. ) May be generated and delivered to the request thread 510.
  • the reception thread 520 may add the request time a and the integrity confirmation information c to the acknowledgment message event 1 550 and transmit it to the request thread 510.
  • the integrity acknowledgment information c is information for confirming the integrity of the acknowledgment message event 1 550 (for example, the above-described hash value).
  • the acknowledgment message event 1 550 to which the request time a is added is a parameter of the hash function. It may be a result value entered as.
  • the acknowledgment message event 1 550 may also be delivered to the request thread 510 via the storage of the request thread 510 (for example, the message queue), but a description of the stationary of the request thread 510 is omitted. .
  • the request thread 510 may confirm a reception time d at which the acknowledgment message event 1 550 was received, and may verify the integrity of the acknowledgment message event 1 550 using the integrity confirmation information c. In addition, the request thread 510 may check the request time a added to the acknowledgment message event 1 550, and calculate a time difference e between the reception time d and the request time a. In this case, the request thread 510 may compare the parallax e with the threshold value f and determine that debugging is in progress when the parallax e exceeds the threshold value f.
  • the request thread 510 may calculate a plurality of parallaxes using a plurality of message events and a plurality of acknowledgment message events, compare the parallaxes with a threshold, and calculate the parallax exceeding a threshold. If the number exceeds a certain number (for example, ten times), you may decide that debugging is in progress.
  • a certain number for example, ten times
  • FIG. 6 is a block diagram illustrating an example of a component that may be included in a processor of an electronic device according to an embodiment of the present invention
  • FIG. 7 illustrates debugging that may be performed by the electronic device according to an embodiment of the present invention.
  • the debugging detection system may be implemented in the form of a computer device such as the electronic device 1 110 in which a specific application is installed and driven.
  • the processor 212 of the electronic device 1 110 is a component for implementing a debugging detection system, and includes a request thread generator 610, a receiver thread generator 620, and a request timing check.
  • the unit 630 may include a message event transmitter 640, a reception time checker 650, a disparity calculator 660, and a debugging decision determiner 670.
  • the processor 212 and the components of the processor 212 may control the electronic device 1110 to perform steps 710 to 770 included in the debugging detection method of FIG. 7.
  • the processor 212 and the components of the processor 212 may be implemented to execute instructions according to code of an operating system included in the memory 211 or code of at least one program.
  • the components of the processor 212 may be representations of different functions of the processor 212 performed by the processor 212 according to a control command provided by a code stored in the electronic device 1110. Can be.
  • the request thread generator 610 may be used as a functional representation of the processor 212 in which the processor 212 generates a request thread according to the above-described control command.
  • the request thread generator 610 may generate a request thread for requesting a message event. How the processor 212 creates a thread, how to deliver a message event between threads, a general method of handling the delivered message event, and the like will be readily understood by those skilled in the art through well known techniques.
  • the request thread may be a general sub thread that communicates with the main thread of an application (computer program) that is subject to debugging detection, or may be a separate thread that is generated for the present embodiment and generates a special message event to request processing. .
  • the reception thread generator 620 may generate a reception thread that receives a message event.
  • the reception thread may be a main thread of an application (computer program) that is a target of debugging detection, but is not limited thereto and may be a thread that is separately created for processing a message event requested by the requesting thread.
  • the request point checking unit 630 may check the request point of the message event generated by the request thread. This confirmation of the request time point may be substantially processed in the request thread, and the confirmed request time point may be added to the requested message event as described above.
  • the message event transmitter 640 may deliver the message event to the receiving thread.
  • the message event may be delivered to the receiving thread through a storage such as a message queue storing messages requested by the receiving thread.
  • message events stored in the message queue may be sequentially delivered to the receiving thread through a first-in, first-out processing method such as FIFO. If debugging is in progress, the message event stored in the repository will take a relatively large amount of time compared to the case where debugging is not progressed until the steps are taken in debugging and the order for processing the message event comes.
  • the reception point confirming unit 650 receives a first point in time at which a message event is received by the reception thread through a store or a second point in time when the request thread receives an acknowledgment message event of the reception thread for the message event. It can confirm as a viewpoint.
  • Embodiments of the present invention relate to a technique for detecting debugging by using a time difference between a request time of a message event and a reception time of a message event, and the request time and the reception time may be determined in various ways. An embodiment in which the first view is used as a reception point has been described with reference to FIG. 4, and an embodiment in which the second view is used as the reception point has been described with reference to FIG. 5.
  • the disparity calculator 660 may calculate the disparity from the request time to the reception time.
  • the parallax calculation unit 660 may calculate the parallax by subtracting the value of the request time from the value of the reception time.
  • the debugging decision unit 770 may determine whether to debug based on the calculated parallax. For example, the debugging decision unit 770 may determine that debugging is detected when the calculated parallax exceeds a predetermined threshold. As another example, the debugging decision unit 770 may count when the calculated parallax exceeds a preset threshold value, and may determine that debugging is detected when the counted count exceeds the preset number.
  • step 740 may include steps 810 through 830 as shown in FIG. 8
  • step 750 may include steps 840 through 860 as shown in FIG. 8.
  • the message event transmitter 640 may add a first timestamp indicating the confirmed request time to the message event.
  • the message event delivered to the receiving thread may include a first timestamp as information on a request time.
  • the message event transmitter 640 may generate integrity confirmation information of the message event to which the first time stamp is added.
  • the message event to which the first time stamp is added is input as a parameter of a preset hash function, and the result value can be calculated as integrity confirmation information.
  • the message event transmitter 640 may add integrity confirmation information to the message event to which the first timestamp is added and transmit the integrity confirmation information to the receiving thread.
  • the reception point checker 650 may generate a second timestamp indicating a first point in time at which a message event is received.
  • the receiving thread may generate a second timestamp indicating when the message event was received when the message event is received from the repository.
  • the reception point confirming unit 650 may confirm the integrity of the message event using the integrity confirmation information added to the message event.
  • the receiving thread may extract the integrity check information from the message event, and input the message event to which the first time stamp is added as a parameter of a preset hash function to calculate a result value. In this case, when the integrity check information and the calculated result value are the same, the receiving thread may check the integrity of the message event to which the first time stamp is added.
  • the reception point acknowledgment unit 650 may transmit an acknowledgment message event for the message event to the request thread.
  • step 760 the time difference calculator 660 may calculate the time difference using the first time stamp and the generated second time stamp included in the message event.
  • FIG. 8 illustrates an embodiment in which the receiving thread calculates parallax.
  • step 770 may also be processed in the receiving thread.
  • step 740 may include steps 810 through 830 as shown in FIG. 8
  • step 750 may include steps 910 through 930 as shown in FIG. 9.
  • the receiving thread may process steps 910 through 930 of FIG. 9 instead of steps 840 through 860 of FIG. 8 in processing step 750.
  • Steps 810 to 830 are the same as in FIG. 8, and are thus omitted repeatedly.
  • the reception point confirming unit 650 may verify the integrity of the message event by using the integrity confirmation information added to the message event by the reception thread.
  • the process of integrity extracts the integrity check information from the message event, inputs the message event with the first timestamp as a parameter of a preset hash function, calculates the result value, and then checks the integrity. This can be done by comparing the information with the calculated results.
  • the reception point checking unit 650 may check the first time stamp in the message event.
  • the reception point confirming unit 650 may generate an acknowledgment message event including the first timestamp and deliver the received acknowledgment event to the request thread.
  • step 760 the time difference calculator 660 may calculate the time difference using the second time when the reception confirmation message event is received and the first time stamp included in the reception confirmation message event.
  • steps 760 and 770 may be processed by the request thread.
  • the processor 212 interrupts the execution of the application (computer program) or sends relevant information (information about the occurrence of debugging) to the network.
  • the electronic device 1 110 may be controlled to transmit to the server (for example, the server 150 or the server 160) through the controller.
  • debugging may be detected even in a stopped state of a single thread or an entire thread by using a speed difference of message event processing that is always performed to execute an application.
  • 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).
  • ALUs arithmetic logic units
  • FPGAs field programmable gate arrays
  • PLU programmable logic unit
  • 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.
  • 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, etc. 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 not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.

Abstract

Provided is a debugging detection method and system using inter-thread message processing. A debugging detection method for a computer program may comprise the steps of: generating a request thread for requesting a message event; generating a reception thread for receiving the message event; generating the message event in the request thread, and checking a request time point of the message event; transferring the generated message event to the reception thread; confirming, as a reception time point, a first time point at which the message event has been received in the reception thread via a storage or a second time point at which the request thread has received a reception confirmation message event of the reception thread in response to the message event; calculating a time difference from the request time point to the reception time point; and determining whether debugging has been performed, on the basis of the time difference.

Description

스레드간 메시지 처리를 이용한 디버깅 탐지 방법 및 시스템Debugging detection method and system using message processing between threads
아래의 설명은 스레드간 메시지 처리를 이용한 디버깅 탐지 방법, 디버깅 탐지 시스템 및 컴퓨터와 결합되어 상기 디버깅 탐지 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램에 관한 것이다.The following description relates to a debugging detection method using inter-thread message processing, a debugging detection system, and a computer program coupled to a computer and stored on a computer readable recording medium for executing the debugging detection method on a computer.
클라이언트 단말로 배포된 어플리케이션들은 역공학(리버싱)을 통해서 그 동작 방식을 파악할 수 있으며, 이러한 역공학을 통해 어플리케이션의 기능의 도용이 가능해진다. 또한, 어플리케이션의 원래의 기능을 수정하여 어플리케이션이 의도된 동작과 다르게 동작하도록 하여 어플리케이션을 통해 제공되는 서비스와 해당 서비스를 제공하는 시스템의 신뢰성에 좋지 않은 영향을 줄 수 있게 된다.Applications distributed to client terminals can understand its operation through reverse engineering (reversing), and this reverse engineering enables the theft of application functions. In addition, by modifying the original function of the application to allow the application to operate differently from the intended operation, it may adversely affect the service provided through the application and the reliability of the system providing the service.
이러한 역공학을 통한 어플리케이션의 분석 과정에서는 디버깅(debugging)이 필수적으로 활용되며, 따라서 이러한 디버깅의 발생 여부를 탐지하기 위한 종래기술들이 존재한다. 예를 들어, 어플리케이션이 설치 및 구동되는 클라이언트 단말은 운영체제가 제공하는 API를 이용하여 디버깅 여부를 나타내는 플래그 값을 확인할 수 있고, 확인되는 플래그 값에 기반하여 디버깅 여부를 판단할 수 있다. 그러나, 이러한 종래기술은 운영체제가 제공하는 API의 플래그 값 자체를 역공학을 통해 간단히 변경할 수 있으며, 이러한 역공학을 통해 디버깅 탐지를 수행하는 코드를 쉽게 우회할 수 있다는 문제점이 있다.Debugging is essential in the analysis process of the application through reverse engineering, and thus, there are conventional techniques for detecting whether such debugging occurs. For example, the client terminal on which the application is installed and run may check a flag value indicating whether to debug using an API provided by the operating system, and determine whether to debug based on the checked flag value. However, such a prior art has a problem in that the flag value of the API provided by the operating system can be simply changed through reverse engineering, and the code for performing debugging detection can be easily bypassed through such reverse engineering.
또한, 별도의 감시 어플리케이션을 이용하여 보호 대상이 되는 어플리케이션에 대한 디버깅을 방지하는 종래기술이 존재한다. 예를 들어, 한국등록특허 제10-1054318호는 디버거(debugger)에 의한 프로그램의 해석 행위를 방지할 수 있도록 한 프로그램을 개시하고 있다. 그러나 이러한 종래기술은 별도의 감시 프로그램이 클라이언트 단말에 설치 및 구동되어야 함을 전제로 하고 있다는 문제점이 있다.In addition, there is a conventional technology that prevents debugging of the application to be protected by using a separate monitoring application. For example, Korean Patent No. 10-1054318 discloses a program to prevent the interpreting behavior of a program by a debugger. However, this conventional technology has a problem that it is assumed that a separate monitoring program should be installed and run on the client terminal.
참고자료: <PCT/KR/2014/010167, US20140019540A1, US20130332543A1, US20130260893>Reference: <PCT / KR / 2014/010167, US20140019540A1, US20130332543A1, US20130260893>
어플리케이션이 실행되기 위해 상시로 수행되는 메시지 이벤트 처리의 속도차를 이용하여 단일 스레드 또는 전체 스레드의 정지 상태에서도 디버깅을 탐지할 수 있는 디버깅 탐지 방법, 디버깅 탐지 시스템 및 컴퓨터와 결합되어 상기 디버깅 탐지 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.It is combined with a debugging detection method, a debugging detection system, and a computer that detects debugging even when a single thread or an entire thread is stopped by using the speed difference of the message event processing that is always performed for the application to execute the debugging detection method. A computer program stored in a computer readable recording medium for execution by a computer is provided.
컴퓨터와 결합되어 디버깅 탐지 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램에 있어서, 상기 디버깅 탐지 방법은, 메시지 이벤트를 요청하는 요청 스레드를 생성하는 단계; 상기 메시지 이벤트를 수신하는 수신 스레드를 생성하는 단계; 상기 요청 스레드에서 메시지 이벤트를 생성하여 상기 메시지 이벤트의 요청 시점을 확인하는 단계; 상기 생성된 메시지 이벤트를 상기 수신 스레드로 전달하는 단계; 상기 메시지 이벤트가 저장소를 거쳐 상기 수신 스레드로 수신된 제1 시점 또는 상기 메시지 이벤트에 대한 상기 수신 스레드의 수신 확인 메시지 이벤트를 상기 요청 스레드가 수신한 제2 시점을 수신 시점으로서 확인하는 단계; 상기 요청 시점부터 상기 수신 시점까지의 시차를 계산하는 단계; 및 상기 시차에 기반하여 디버깅 여부를 결정하는 단계를 포함하는 것을 특징으로 하는 컴퓨터 프로그램을 제공한다.A computer program coupled to a computer and stored on a computer-readable recording medium for executing a debugging detection method on a computer, the method comprising: creating a request thread requesting a message event; Creating a receiving thread to receive the message event; Generating a message event in the request thread to identify a request time of the message event; Delivering the generated message event to the receiving thread; Confirming, as a reception time, a first time point at which the message event is received by the receiving thread through a storage, or a second time point at which the request thread receives an acknowledgment message event of the receiving thread for the message event; Calculating a time difference from the request time to the reception time; And determining whether or not to debug based on the parallax.
컴퓨터 프로그램에 대한 디버깅 탐지 방법에 있어서, 메시지 이벤트를 요청하는 요청 스레드를 생성하는 단계; 상기 메시지 이벤트를 수신하는 수신 스레드를 생성하는 단계; 상기 요청 스레드에서 메시지 이벤트를 생성하여 상기 메시지 이벤트의 요청 시점을 확인하는 단계; 상기 생성된 메시지 이벤트를 상기 수신 스레드로 전달하는 단계; 상기 메시지 이벤트가 저장소를 거쳐 상기 수신 스레드로 수신된 제1 시점 또는 상기 메시지 이벤트에 대한 상기 수신 스레드의 수신 확인 메시지 이벤트를 상기 요청 스레드가 수신한 제2 시점을 수신 시점으로서 확인하는 단계; 상기 요청 시점부터 상기 수신 시점까지의 시차를 계산하는 단계; 및 상기 시차에 기반하여 디버깅 여부를 결정하는 단계를 포함하는 것을 특징으로 하는 디버깅 탐지 방법을 제공한다.A debugging detection method for a computer program, comprising: creating a request thread requesting a message event; Creating a receiving thread to receive the message event; Generating a message event in the request thread to identify a request time of the message event; Delivering the generated message event to the receiving thread; Confirming, as a reception time, a first time point at which the message event is received by the receiving thread through a storage, or a second time point at which the request thread receives an acknowledgment message event of the receiving thread for the message event; Calculating a time difference from the request time to the reception time; And it provides a debugging detection method comprising the step of determining whether to debug based on the time difference.
상기 디버깅 탐지 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체를 제공한다.A computer program for recording a computer program for executing the debugging detection method is provided.
어플리케이션이 실행되기 위해 상시로 수행되는 메시지 이벤트 처리의 속도차를 이용하여 단일 스레드 또는 전체 스레드의 정지 상태에서도 디버깅을 탐지할 수 있다.You can detect debugging even when a single thread or all threads are stopped by taking advantage of the rate difference in message event processing that is normally performed for an application to run.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다.2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention.
도 3은 본 발명의 일실시예에 있어서, 스레드들간의 메시지 이벤트 처리를 설명하기 위한 도면이다.3 is a diagram for describing message event processing between threads according to an embodiment of the present invention.
도 4는 본 발명의 일실시예에 있어서, 메시지 이벤트에 대한 시차를 통해 디버깅 행위가 탐지되는 예를 도시한 도면이다.4 is a diagram for one example of detecting a debugging behavior through time difference for a message event according to one embodiment of the present invention.
도 5는 본 발명의 일실시예에 있어서, 메시지 이벤트에 대한 시차를 통해 디버깅 행위가 탐지되는 다른 예를 도시한 도면이다.5 is a diagram illustrating another example in which a debugging behavior is detected through a time difference for a message event according to one embodiment of the present invention.
도 6은 본 발명의 일실시예에 따른 전자 기기의 프로세서가 포함할 수 있는 구성요소의 예를 도시한 블록도이다.6 is a block diagram illustrating an example of components that may be included in a processor of an electronic device according to an embodiment of the present invention.
도 7은 본 발명의 일실시예에 따른 전자 기기가 수행할 수 있는 디버깅 탐지 방법의 예를 도시한 흐름도이다.7 is a flowchart illustrating an example of a debugging detection method that may be performed by an electronic device according to an embodiment of the present invention.
도 8은 본 발명의 일실시예에 있어서, 시차를 계산하는 과정의 예를 도시한 흐름도이다.8 is a flowchart illustrating an example of a process of calculating parallax according to an embodiment of the present invention.
도 9는 본 발명의 일실시예에 있어서, 시차를 계산하는 과정의 다른 예를 도시한 흐름도이다.9 is a flowchart illustrating another example of a process of calculating parallax according to an embodiment of the present invention.
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings.
본 발명의 실시예들에 따른 디버깅 탐지 시스템은 이후 설명될 전자 기기를 통해 구현될 수 있으며, 본 발명의 실시예들에 따른 디버깅 탐지 방법은 상술한 전자 기기를 통해 수행될 수 있다. 예를 들어, 전자 기기에는 본 발명의 일실시예에 따른 컴퓨터 프로그램(일례로, 특정 서비스를 제공받기 위해 전자 기기에 설치된 어플리케이션)이 설치 및 구동될 수 있고, 전자 기기는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 일실시예에 따른 디버깅 탐지 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터로 구현되는 전자 기기와 결합되어 디버깅 탐지 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The debugging detection system according to the embodiments of the present invention may be implemented through an electronic device to be described later, and the debugging detection method according to the embodiments of the present invention may be performed through the electronic device described above. For example, a computer program (for example, an application installed in the electronic device to receive a specific service) may be installed and driven in the electronic device, and the electronic device may control the driven computer program. In accordance with the present invention, a debugging detection method may be performed. The computer program described above may be combined with an electronic device implemented as a computer and stored in a computer-readable recording medium for executing a debugging detection method on a 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 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.
복수의 전자 기기들(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 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). For example, although 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.
통신 방식은 제한되지 않으며, 네트워크(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 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. 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). 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.
서버(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 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. 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 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. As a more specific example, 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. As another example, 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.
도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다. 도 2에서는 전자 기기에 대한 예로서 전자 기기 1(110), 그리고 서버(150)의 내부 구성을 설명한다. 또한, 다른 전자 기기들(120, 130, 140)이나 서버(160) 역시 상술한 전자 기기 1(110) 또는 서버(150)와 동일한 또는 유사한 내부 구성을 가질 수 있다.2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention. 2 illustrates an internal configuration of the electronic device 1 110 and the server 150 as an example of the electronic device. In addition, the other electronic devices 120, 130, 140, or the server 160 may also have the same or similar internal configuration as the aforementioned electronic device 1 110 or the server 150.
전자 기기 1(110)과 서버(150)는 메모리(211, 221), 프로세서(212, 222), 통신 모듈(213, 223) 그리고 입출력 인터페이스(214, 224)를 포함할 수 있다. 메모리(211, 221)는 컴퓨터에서 판독 가능한 기록 매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(211, 221)와는 구분되는 별도의 영구 저장 장치로서 전자 기기 1(110)나 서버(150)에 포함될 수도 있다. 또한, 메모리(211, 221)에는 운영체제와 적어도 하나의 프로그램 코드(일례로 전자 기기 1(110)에 설치되어 구동되는 브라우저나 특정 서비스의 제공을 위해 전자 기기 1(110)에 설치된 어플리케이션 등을 위한 코드)가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(211, 221)와는 별도의 컴퓨터에서 판독 가능한 기록 매체로부터 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록 매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록 매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록 매체가 아닌 통신 모듈(213, 223)을 통해 메모리(211, 221)에 로딩될 수도 있다. 예를 들어, 적어도 하나의 프로그램은 개발자들 또는 어플리케이션의 설치 파일을 배포하는 파일 배포 시스템(일례로, 상술한 서버(160))이 네트워크(170)를 통해 제공하는 파일들에 의해 설치되는 컴퓨터 프로그램(일례로 상술한 어플리케이션)에 기반하여 메모리(211, 221)에 로딩될 수 있다.The electronic device 1 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input / output interfaces 214 and 224. The memories 211 and 221 are computer-readable recording media, and may include non-volatile permanent storage devices such as random access memory (RAM), read only memory (ROM), and disk drives. In this case, the non-volatile mass storage device such as a ROM and a disk drive may be included in the electronic device 1 110 or the server 150 as a separate permanent storage device that is separated from the memories 211 and 221. In addition, the memory 211, 221 includes an operating system and at least one program code (for example, a browser installed and driven in the electronic device 1 110 or an application installed in the electronic device 1 110 to provide a specific service). Code) can be stored. These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221. Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, a memory card, and the like. In other embodiments, software components may be loaded into the memory 211, 221 through the communication module 213, 223 rather than a computer readable recording medium. For example, at least one program is a computer program that is installed by files provided by a file distribution system (for example, the server 160 described above) through the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
프로세서(212, 222)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(211, 221) 또는 통신 모듈(213, 223)에 의해 프로세서(212, 222)로 제공될 수 있다. 예를 들어 프로세서(212, 222)는 메모리(211, 221)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다. Processors 212 and 222 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 processors 212, 222 by the memory 211, 221 or the communication modules 213, 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memory 211 and 221.
통신 모듈(213, 223)은 네트워크(170)를 통해 전자 기기 1(110)과 서버(150)가 서로 통신하기 위한 기능을 제공할 수 있으며, 전자 기기 1(110) 및/또는 서버(150)가 다른 전자 기기(일례로 전자 기기 2(120)) 또는 다른 서버(일례로 서버(160))와 통신하기 위한 기능을 제공할 수 있다. 일례로, 전자 기기 1(110)의 프로세서(212)가 메모리(211)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이 통신 모듈(213)의 제어에 따라 네트워크(170)를 통해 서버(150)로 전달될 수 있다. 역으로, 서버(150)의 프로세서(222)의 제어에 따라 제공되는 제어 신호나 명령, 컨텐츠, 파일 등이 통신 모듈(223)과 네트워크(170)를 거쳐 전자 기기 1(110)의 통신 모듈(213)을 통해 전자 기기 1(110)로 수신될 수 있다. 예를 들어 통신 모듈(213)을 통해 수신된 서버(150)의 제어 신호나 명령, 컨텐츠, 파일 등은 프로세서(212)나 메모리(211)로 전달될 수 있고, 컨텐츠나 파일 등은 전자 기기 1(110)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication modules 213 and 223 may provide a function for the electronic device 1 110 and the server 150 to communicate with each other through the network 170, and the electronic device 1 110 and / or the server 150 may communicate with each other. May provide a function for communicating with another electronic device (eg, electronic device 2 120) or another server (eg, server 160). For example, a request generated by the processor 212 of the electronic device 1 110 according to a program code stored in a recording device such as the memory 211 may be controlled by the server 170 through the network 170 under the control of the communication module 213. 150). Conversely, control signals, commands, contents, files, and the like provided according to the control of the processor 222 of the server 150 are transmitted to the communication module of the electronic device 1 110 via the communication module 223 and the network 170 ( It may be received by the electronic device 1110 through 213. For example, the control signal, command, content, file, etc. of the server 150 received through the communication module 213 may be transmitted to the processor 212 or the memory 211, and the content, file, etc. may be transferred to the electronic device 1. 110 may be stored as a storage medium (permanent storage described above) that may further include.
입출력 인터페이스(214)는 입출력 장치(215)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(214)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(215)는 전자 기기 1(110)과 하나의 장치로 구성될 수도 있다. 또한, 서버(150)의 입출력 인터페이스(224)는 서버(150)와 연결되거나 서버(150)가 포함할 수 있는 입력 또는 출력을 위한 장치(미도시)와의 인터페이스를 위한 수단일 수 있다. 보다 구체적인 예로, 전자 기기 1(110)의 프로세서(212)가 메모리(211)에 로딩된 컴퓨터 프로그램의 명령을 처리함에 있어서 서버(150)나 전자 기기 2(120)가 제공하는 데이터를 이용하여 구성되는 서비스 화면이나 컨텐츠가 입출력 인터페이스(214)를 통해 디스플레이에 표시될 수 있다.The input / output interface 214 may be a means for interfacing with the input / output device 215. For example, the input device may include a device such as a keyboard or a mouse, and the output device may include a device such as a display or a speaker. As another example, the input / output interface 214 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 215 may be configured as one device with the electronic device 1110. In addition, the input / output interface 224 of the server 150 may be a means for interfacing with an apparatus (not shown) for input or output that may be connected to or included in the server 150. As a more specific example, the processor 212 of the electronic device 1110 uses data provided by the server 150 or the electronic device 2 120 in processing a command of a computer program loaded in the memory 211. The service screen or the content may be displayed on the display through the input / output interface 214.
또한, 다른 실시예들에서 전자 기기 1(110) 및 서버(150)는 도 2의 구성요소들보다 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 전자 기기 1(110)은 상술한 입출력 장치(215) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), GPS(Global Positioning System) 모듈, 카메라, 각종 센서, 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다. 보다 구체적인 예로, 전자 기기 1(110)이 스마트폰인 경우, 일반적으로 스마트폰이 포함하고 있는 가속도 센서나 자이로 센서, 카메라 모듈, 각종 물리적인 버튼, 터치패널을 이용한 버튼, 입출력 포트, 진동을 위한 진동기 등의 다양한 구성요소들이 전자 기기 1(110)에 더 포함되도록 구현될 수 있다.Also, in other embodiments, the electronic device 1 110 and the server 150 may include more components than those of FIG. 2. However, it is not necessary to clearly show most of the prior art components. For example, the electronic device 1 110 may be implemented to include at least some of the above-described input / output devices 215 or other components such as a transceiver, a global positioning system (GPS) module, a camera, various sensors, a database, and the like. It may further include elements. More specifically, when the electronic device 1 110 is a smartphone, an acceleration sensor, a gyro sensor, a camera module, various physical buttons, a button using a touch panel, an input / output port, and vibration for a smartphone generally include Various components such as a vibrator may be implemented to be further included in the electronic device 1 110.
도 3은 본 발명의 일실시예에 있어서, 스레드들간의 메시지 이벤트 처리를 설명하기 위한 도면이다. 도 3은 전자 기기(일례로, 상술한 전자 기기 1(110))에 설치 및 구동되는 어플리케이션(컴퓨터 프로그램)의 기능들을 처리하기 위해 생성되는 복수의 스레드들(310 내지 340)을 개시하고 있다. 비록 도 3은 네 개의 스레드들(310 내지 340)을 개시하고 있으나, 그 수가 도 3과 같이 한정되는 것은 아니며, 어플리케이션(또는 어플리케이션의 현재 상태)에 따라 한번에 생성되어 동작 중인 스레드의 수가 다양할 수 있음은 자명하다. 이때, 도 3의 실시예에서는 본 발명의 일실시예에 따른 디버깅 탐지 방법을 처리하기 위한 요청 스레드가 서브 스레드 3(330)으로, 수신 스레드가 메인 스레드(340)로 구현된 예를 나타내고 있다. 본 실시예에 따른 설명을 통해 요청 스레드와 수신 스레드가 모두 서브 스레드들로 구현될 수 있는 다른 실시예 역시 쉽게 이해될 수 있을 것이다. 다시 말해, 요청 스레드와 수신 스레드간의 메시지 이벤트의 처리는 메인 스레드의 일반적인 메시지 루틴을 활용하거나 메시지 이벤트를 요청 또는 처리하는 스레드를 생성하여 이용할 수도 있다.3 is a diagram for describing message event processing between threads according to an embodiment of the present invention. FIG. 3 discloses a plurality of threads 310 to 340 generated to process functions of an application (computer program) installed and driven in an electronic device (for example, the electronic device 1 110 described above). Although FIG. 3 discloses four threads 310 to 340, the number is not limited to that of FIG. 3, and the number of threads created and running at one time may vary according to the application (or the current state of the application). It is self-evident. 3 illustrates an example in which a request thread for processing a debugging detection method according to an embodiment of the present invention is implemented as a sub thread 3 330 and a receiving thread as a main thread 340. Other embodiments in which both the request thread and the receive thread may be implemented as sub-threads through the description according to the present embodiment will be easily understood. In other words, the processing of message events between the requesting thread and the receiving thread may be utilized by utilizing a general message routine of the main thread or by creating a thread that requests or processes a message event.
도 3의 실시예에서 서브 스레드들(310 내지 330)은 메시지 이벤트의 처리를 메인 스레드(340)로 요청할 수 있다. 서브 스레드들(310 내지 330)이 처리를 요청하는 메시지 이벤트들은, 일례로 메시지 큐(message queue)로 구현될 수 있는 저장소(350)에 저장될 수 있고, 순차적으로(일례로, FIFO(First In First Out)와 같은 선입선처리 제어방식을 통해) 메인 스레드(340)로 전달되어 처리될 수 있다.In the embodiment of FIG. 3, the sub-threads 310 to 330 may request the main thread 340 to process a message event. Message events for which the sub-threads 310-330 request processing may be stored in storage 350, which may be implemented as a message queue, for example, and sequentially (eg, First In Through a first-in, first-out process such as First Out)) to the main thread 340 for processing.
한편, 어플리케이션(컴퓨터 프로그램)에 대한 역공학을 위해서는 디버깅이 필수적으로 요구되고, 디버깅이 진행되는 경우 필수적으로 하나 이상의 스레드가 동작을 정지하게 된다. 이때, 디버거는 단계적으로 어플리케이션의 동작진행을 분석하기 때문에, 디버깅을 위해서는 사람이 지각할 수 있는 물리적인 시간이 요구된다. 따라서, 디버깅을 위해 요구되는 시간은 스레드가 메시지 이벤트를 처리하기 위해 소요되는 시간이나 메시지 이벤트를 저장소(350)에 저장해놓는 시간(앞선 메시지 이벤트를 처리하기 위해 다음 메시지 이벤트가 대기하는 시간)에 비해 상대적으로 매우 큰 시간을 요구한다. 이러한 특징에 따라 메시지 이벤트가 요청된 시점(이하, '요청 시점')과 메인 스레드(340)가 저장소(350)를 거쳐 해당 메시지 이벤트를 수신한 시점(이하, '제1 시점')간의 시차 또는 상기 요청 시점과 요청 스레드인 서브 스레드 3(330)이 메인 스레드(340)로부터 상기 메시지 이벤트에 대한 수신 확인 메시지 이벤트를 수신하는 시점(이하, '제 2 시점')간의 시차를 이용하여 디버깅의 진행 여부를 탐지할 수 있다. 이때, 제1 시점 또는 제2 시점이 수신 시점이 될 수 있으며, 시차는 수신 시점에서 요청 시점을 뺀 시간 차이값이 될 수 있다.On the other hand, for reverse engineering of an application (computer program), debugging is indispensable, and when debugging is in progress, one or more threads are essentially stopped. In this case, since the debugger analyzes the progress of the application step by step, debugging requires physical time that can be perceived by humans. Therefore, the time required for debugging is compared to the time spent by the thread to process the message event or the time that the message event is stored in the storage 350 (the time the next message event waits to process the previous message event). It requires a relatively large amount of time. According to this characteristic, a time difference between a time point at which a message event is requested (hereinafter, referred to as a request time point) and a time point at which the main thread 340 receives a corresponding message event through the storage 350 (hereinafter, referred to as a 'first time point') or Debugging proceeds by using a time difference between the request time and a time point at which the sub thread 3 330, which is a request thread, receives the acknowledgment message event for the message event from the main thread 340 (hereinafter, referred to as 'second time'). Whether it can be detected. In this case, the first time point or the second time point may be a reception time, and the time difference may be a time difference value obtained by subtracting the request time from the reception time.
예를 들어, 요청 스레드인 서브 스레드 3(330)은 주기적으로 메시지 이벤트를 메인 스레드(340)로 전달할 수 있다. 이때, 상술한 시차가 임계값을 초과하는 경우, 디버깅이 발생한 것으로 결정될 수 있다. 임계값은 다양한 방식으로 결정될 수 있다. 예를 들어, 특정 어플리케이션을 위한 테스트 환경에서 요청 스레드가 수신 스레드에게 메시지 이벤트를 주기적으로 n회 전달하도록 하고, n 개의 시차값들을 계산하여 계산된 시차값들 중 최대값을 임계값으로 설정할 수 있다. 또는 n개의 시차값들의 평균값에 기설정된 값을 더한 값을 임계값으로 설정할 수도 있다. 또 다른 예로, 운영체제가 메인 스레드로부터 답변이 없는 경우에 오류 메시지를 발생시키고자 운영체제에 설정된 시간이 임계값으로 설정될 수도 있다. 운영체제에 설정된 시간은 운영체제와 관련된 종래기술을 통해 당업자가 쉽게 이해할 수 있을 것이다.For example, the subthread 3 330, which is a request thread, may periodically transmit a message event to the main thread 340. At this time, when the above-described parallax exceeds a threshold value, it may be determined that debugging has occurred. The threshold can be determined in various ways. For example, in a test environment for a specific application, the request thread may periodically send a message event to the receiving thread n times, and calculate the n time difference values to set a maximum value among the calculated time difference values as a threshold value. . Alternatively, the threshold value may be set by adding an average value of n parallax values to a predetermined value. As another example, the time set in the operating system may be set as a threshold to generate an error message when the operating system has no answer from the main thread. The time set in the operating system will be easily understood by those skilled in the art through the related art related to the operating system.
한편, 디버깅이 진행되고 있지 않는 경우에도 오류와 같은 특수한 경우로 계산된 시차가 임계값을 초과할 가능성도 존재한다. 이를 위해, 본 발명의 실시예들에서는 시차가 임계값을 초과하는 횟수가 일정 횟수(일례로, 10회)를 초과하는 경우에 디버깅이 진행 중인 것으로 결정할 수도 있다.On the other hand, even when debugging is not in progress, there is a possibility that the calculated time difference exceeds a threshold value in a special case such as an error. To this end, in embodiments of the present invention, it may be determined that debugging is in progress when the number of times when the parallax exceeds the threshold exceeds a predetermined number (for example, ten times).
이처럼, 역공학의 분석 과정에 필수적인 디버깅의 진행 여부를 어플리케이션이 실행되기 위해 상시로 수행되는 메시지 이벤트 처리의 속도차를 이용하여 판단함으로써 단일 스레드나 전체 스레드가 정지된 상태에서도 디비깅 행위를 탐지할 수 있다.In this way, whether debugging is necessary for the analysis process of reverse engineering is judged by using the speed difference of the message event processing that is always performed to execute an application, so that the debugging operation can be detected even when a single thread or the entire thread is stopped. Can be.
도 4는 본 발명의 일실시예에 있어서, 메시지 이벤트에 대한 시차를 통해 디버깅 행위가 탐지되는 예를 도시한 도면이다. 본 실시예에서, 요청 스레드(410)는 수신 스레드(420)로 처리를 요청하기 위한 메시지 이벤트 1(430)을 생성할 수 있다. 이 경우, 요청 스레드(410)는 메시지 이벤트 1(430)의 요청 시점 a와 메시지 이벤트 1(430)의 무결성 확인 정보 b를 메시지 이벤트 1(430)에 추가하여 저장소(440)를 통해 수신 스레드(420)로 전달할 수 있다. 요청된 메시지 이벤트 1(430)은 저장소(440)에 저장되고, 자신의 처리 순서가 되면 수신 스레드(420)로 전달될 수 있다. 요청 시점 a는 타임스탬프의 형태로 메시지 이벤트 1(430)에 추가될 수 있다.4 is a diagram for one example of detecting a debugging behavior through time difference for a message event according to one embodiment of the present invention. In this embodiment, the request thread 410 may generate a message event 1 430 for requesting processing by the receiving thread 420. In this case, the request thread 410 adds the request time a of the message event 1 430 and the integrity check information b of the message event 1 430 to the message event 1 430, thereby receiving the receiving thread ( 420). The requested message event 1 430 may be stored in the storage 440 and delivered to the receiving thread 420 when the processing order thereof is reached. The request time a may be added to the message event 1 430 in the form of a time stamp.
이때, 수신 스레드(420)는 우선 메시지 이벤트 1(430)을 저장소(440)를 통해 수신한 수신 시점 c를 확인할 수 있다. 예를 들어, 수신 스레드(420)는 메시지 이벤트 1(430)을 수신한 시점의 타임스탬프를 수신 시점 c로서 생성할 수 있다.In this case, the reception thread 420 may first check the reception time c when the message event 1 430 is received through the storage 440. For example, the reception thread 420 may generate a timestamp of when the message event 1 430 is received as the reception time c.
또한, 수신 스레드(420)는 메시지 이벤트 1(430)에 추가된 무결성 확인 정보 b를 이용하여 메시지 이벤트 1(430)의 무결성을 확인할 수 있다. 예를 들어, 요청 시점 a가 추가된 메시지 이벤트 1(430)를 기설정된 해시 함수의 파라미터로 입력한 결과값인 해시값이 무결성 확인 정보 b로서 계산될 수 있다. 이처럼, 데이터의 무결성을 확인하기 위한 다양한 종래기술들 중 하나가 이용될 수 있음을 당업자가 쉽게 이해할 수 있을 것이다.In addition, the reception thread 420 may check the integrity of the message event 1 430 by using the integrity check information b added to the message event 1 430. For example, a hash value that is a result of inputting a message event 1 430 to which a request time a is added as a parameter of a preset hash function may be calculated as integrity verification information b. As such, those skilled in the art will readily appreciate that one of a variety of prior art techniques for verifying the integrity of data may be used.
또한, 수신 스레드(420)는 무결성이 확인 메시지 이벤트 1(430)에서 요청 시점 a를 확인할 수 있다. 이후, 수신 스레드(420)는 수신 시점 c와 요청 시점 a간의 시차 d를 계산할 수 있다.In addition, the receiving thread 420 may check the request time a in the integrity confirmation message event 1 (430). Thereafter, the reception thread 420 may calculate the time difference d between the reception time c and the request time a.
이 경우, 수신 스레드(420)는 계산된 시차 d와 해당 어플리케이션과 연관하여 미리 설정된 임계값 e를 비교하여 비교 결과에 따라 디버깅을 탐지할 수 있다. 예를 들어, 수신 스레드(420)는 시차 d가 임계값 e를 초과하는 경우 디버깅이 진행 중인 것으로 결정할 수 있다. 실시예에 따라 수신 스레드(420)는 복수의 메시지 이벤트들에 대해 시차를 계산하여 임계값과 비교하고, 계산된 시차가 임계값을 초과하는 횟수가 일정 횟수(일례로 10회)를 넘어서는 경우에 디버깅이 진행 중인 것으로 결정할 수도 있다.In this case, the reception thread 420 may detect the debugging according to the comparison result by comparing the calculated time difference d with a preset threshold value e associated with the corresponding application. For example, the reception thread 420 may determine that debugging is in progress when the parallax d exceeds the threshold value e. According to an embodiment, the reception thread 420 calculates a time difference for a plurality of message events and compares it with a threshold value. When the number of times that the calculated time difference exceeds the threshold exceeds a predetermined number (for example, ten times), You can also decide that debugging is in progress.
도 5는 본 발명의 일실시예에 있어서, 메시지 이벤트에 대한 시차를 통해 디버깅 행위가 탐지되는 다른 예를 도시한 도면이다. 도 4의 실시예가 수신 스레드(420)에서 디버깅을 탐지하였다면, 도 5에서는 요청 스레드(510)에서 디버깅을 탐지하는 실시예를 설명한다.5 is a diagram illustrating another example in which a debugging behavior is detected through a time difference for a message event according to one embodiment of the present invention. If the embodiment of FIG. 4 detects debugging in the receiving thread 420, FIG. 5 describes an embodiment of detecting debugging in the request thread 510.
요청 스레드(510)는 메시지 이벤트 1(530)를 생성하고, 메시지 이벤트 1(530)의 요청 시점 a와 무결성 확인 정보 b를 메시지 이벤트 1(530)에 추가하여 수신 스레드(520)로 전달할 수 있다. 이러한 메시지 이벤트 1(530)은 우선 수신 스레드(520)를 위한 저장소(540)에 저장될 수 있으며, 자신의 처리 순서에 수신 스레드(520)로 전달될 수 있다.The request thread 510 may generate the message event 1 530 and add the request time a and the integrity check information b of the message event 1 530 to the message event 1 530 and deliver the message event 1 530 to the receiving thread 520. . This message event 1 530 may first be stored in the storage 540 for the receiving thread 520 and delivered to the receiving thread 520 in its processing order.
수신 스레드(520)는 메시지 이벤트 1(530)이 포함하는 무결성 확인 정보 b를 이용하여 메시지 이벤트 1(530)의 무결성을 확인할 수 있으며, 메시지 이벤트 1(530)을 위한 수신 확인 메시지 이벤트 1(550)을 생성하여 요청 스레드(510)로 전달할 수 있다. 이때, 수신 스레드(520)는 수신 확인 메시지 이벤트 1(550)에 요청 시점 a와 무결성 확인 정보 c를 추가하여 요청 스레드(510)로 전달할 수 있다. 여기서 무결성 확인 정보 c는 수신 확인 메시지 이벤트 1(550)의 무결성을 확인하기 위한 정보(일례로, 상술한 해시값)로서 요청 시점 a가 추가된 수신 확인 메시지 이벤트 1(550)를 해시 함수의 파라미터로 입력한 결과값일 수 있다.The receiving thread 520 may check the integrity of the message event 1 530 by using the integrity check information b included in the message event 1 530, and the acknowledgment message event 1 550 for the message event 1 530. ) May be generated and delivered to the request thread 510. In this case, the reception thread 520 may add the request time a and the integrity confirmation information c to the acknowledgment message event 1 550 and transmit it to the request thread 510. In this case, the integrity acknowledgment information c is information for confirming the integrity of the acknowledgment message event 1 550 (for example, the above-described hash value). The acknowledgment message event 1 550 to which the request time a is added is a parameter of the hash function. It may be a result value entered as.
수신 확인 메시지 이벤트 1(550) 역시 요청 스레드(510)의 저장소(일례로, 메시지 큐)를 거쳐서 요청 스레드(510)로 전달될 수 있으나, 요청 스레드(510)의 저정소에 대한 설명은 생략한다.The acknowledgment message event 1 550 may also be delivered to the request thread 510 via the storage of the request thread 510 (for example, the message queue), but a description of the stationary of the request thread 510 is omitted. .
요청 스레드(510)는 수신 확인 메시지 이벤트 1(550)이 수신된 수신 시점 d를 확인할 수 있으며, 무결성 확인 정보 c를 이용하여 수신 확인 메시지 이벤트 1(550) 무결성을 확인할 수 있다. 또한, 요청 스레드(510)는 수신 확인 메시지 이벤트 1(550)에 추가된 요청 시점 a를 확인할 수 있으며, 수신 시점 d와 요청 시점 a간의 시차 e를 계산할 수 있다. 이때, 요청 스레드(510)는 시차 e와 임계값 f를 비교하여 시차 e가 임계값 f를 초과하는 경우 디버깅이 진행 중인 것으로 결정할 수 있다. 실시예에 따라 요청 스레드(510)는 복수의 메시지 이벤트들과 복수의 수신 확인 메시지 이벤트들을 이용하여 복수의 시차들을 계산할 수 있으며, 시차들을 임계값과 비교하고, 계산된 시차가 임계값을 초과하는 횟수가 일정 횟수(일례로 10회)를 넘어서는 경우에 디버깅이 진행 중인 것으로 결정할 수도 있다.The request thread 510 may confirm a reception time d at which the acknowledgment message event 1 550 was received, and may verify the integrity of the acknowledgment message event 1 550 using the integrity confirmation information c. In addition, the request thread 510 may check the request time a added to the acknowledgment message event 1 550, and calculate a time difference e between the reception time d and the request time a. In this case, the request thread 510 may compare the parallax e with the threshold value f and determine that debugging is in progress when the parallax e exceeds the threshold value f. According to an embodiment, the request thread 510 may calculate a plurality of parallaxes using a plurality of message events and a plurality of acknowledgment message events, compare the parallaxes with a threshold, and calculate the parallax exceeding a threshold. If the number exceeds a certain number (for example, ten times), you may decide that debugging is in progress.
도 6은 본 발명의 일실시예에 따른 전자 기기의 프로세서가 포함할 수 있는 구성요소의 예를 도시한 블록도이고, 도 7은 본 발명의 일실시예에 따른 전자 기기가 수행할 수 있는 디버깅 탐지 방법의 예를 도시한 흐름도이다.6 is a block diagram illustrating an example of a component that may be included in a processor of an electronic device according to an embodiment of the present invention, and FIG. 7 illustrates debugging that may be performed by the electronic device according to an embodiment of the present invention. A flowchart illustrating an example of a detection method.
본 발명의 실시예들에 따른 디버깅 탐지 시스템은 앞서 설명한 바와 같이 특정 어플리케이션이 설치 및 구동되는 전자 기기 1(110)과 같은 컴퓨터 장치의 형태로 구현될 수 있다. 또한, 도 6에 도시된 바와 같이 전자 기기 1(110)의 프로세서(212)는 디버깅 탐지 시스템을 구현하기 위한 구성요소들로서 요청 스레드 생성부(610), 수신 스레드 생성부(620), 요청 시점 확인부(630), 메시지 이벤트 전달부(640), 수신 시점 확인부(650), 시차 계산부(660) 및 디버깅 여부 결정부(670)를 포함할 수 있다. 이러한 프로세서(212) 및 프로세서(212)의 구성요소들은 도 7의 디버깅 탐지 방법이 포함하는 단계들(710 내지 770)을 수행하도록 전자 기기 1(110)을 제어할 수 있다. 이때, 프로세서(212) 및 프로세서(212)의 구성요소들은 메모리(211)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(212)의 구성요소들은 전자 기기 1(110)에 저장된 코드가 제공하는 제어 명령에 따라 프로세서(212)에 의해 수행되는 프로세서(212)의 서로 다른 기능들(different functions)의 표현들일 수 있다. 예를 들어, 프로세서(212)가 상술한 제어 명령에 따라 요청 스레드를 생성하는 프로세서(212)의 기능적 표현으로 요청 스레드 생성부(610)가 사용될 수 있다.As described above, the debugging detection system according to the exemplary embodiments of the present invention may be implemented in the form of a computer device such as the electronic device 1 110 in which a specific application is installed and driven. In addition, as shown in FIG. 6, the processor 212 of the electronic device 1 110 is a component for implementing a debugging detection system, and includes a request thread generator 610, a receiver thread generator 620, and a request timing check. The unit 630 may include a message event transmitter 640, a reception time checker 650, a disparity calculator 660, and a debugging decision determiner 670. The processor 212 and the components of the processor 212 may control the electronic device 1110 to perform steps 710 to 770 included in the debugging detection method of FIG. 7. In this case, the processor 212 and the components of the processor 212 may be implemented to execute instructions according to code of an operating system included in the memory 211 or code of at least one program. Here, the components of the processor 212 may be representations of different functions of the processor 212 performed by the processor 212 according to a control command provided by a code stored in the electronic device 1110. Can be. For example, the request thread generator 610 may be used as a functional representation of the processor 212 in which the processor 212 generates a request thread according to the above-described control command.
단계(710)에서 요청 스레드 생성부(610)는 메시지 이벤트를 요청하는 요청 스레드를 생성할 수 있다. 프로세서(212)가 스레드를 생성하는 방법이나, 스레드간의 메시지 이벤트를 전달하는 방법, 전달된 메시지 이벤트를 처리하는 일반적인 방법 등은 이미 잘 알려진 종래기술들을 통해 당업자가 쉽게 이해할 수 있을 것이다. 요청 스레드는 디버깅 탐지의 대상이 되는 어플리케이션(컴퓨터 프로그램)의 메인 스레드와 통신하는 일반적인 서브 스레드일 수도 있고, 본 실시예를 위해 생성되어 특별한 메시지 이벤트를 생성하여 처리를 요청하는 별도의 스레드일 수도 있다.In operation 710, the request thread generator 610 may generate a request thread for requesting a message event. How the processor 212 creates a thread, how to deliver a message event between threads, a general method of handling the delivered message event, and the like will be readily understood by those skilled in the art through well known techniques. The request thread may be a general sub thread that communicates with the main thread of an application (computer program) that is subject to debugging detection, or may be a separate thread that is generated for the present embodiment and generates a special message event to request processing. .
단계(720)에서 수신 스레드 생성부(620)는 메시지 이벤트를 수신하는 수신 스레드를 생성할 수 있다. 이미 설명한 바와 같이, 수신 스레드는 디버깅 탐지의 대상이 되는 어플리케이션(컴퓨터 프로그램)의 메인 스레드일 수 있으나, 이에 한정되지 않고 요청 스레드가 요청하는 메시지 이벤트의 처리를 위해 별도로 생성되는 스레드일 수도 있다.In operation 720, the reception thread generator 620 may generate a reception thread that receives a message event. As described above, the reception thread may be a main thread of an application (computer program) that is a target of debugging detection, but is not limited thereto and may be a thread that is separately created for processing a message event requested by the requesting thread.
단계(730)에서 요청 시점 확인부(630)는 요청 스레드가 생성하는 메시지 이벤트의 요청 시점을 확인할 수 있다. 이러한 요청 시점의 확인은 실질적으로는 요청 스레드에서 처리될 수 있으며, 확인된 요청 시점은 앞서 설명한 바와 같이 요청되는 메시지 이벤트에 추가될 수 있다.In operation 730, the request point checking unit 630 may check the request point of the message event generated by the request thread. This confirmation of the request time point may be substantially processed in the request thread, and the confirmed request time point may be added to the requested message event as described above.
단계(740)에서 메시지 이벤트 전달부(640)는 메시지 이벤트를 수신 스레드로 전달할 수 있다. 이때, 메시지 이벤트는 수신 스레드로 요청된 메시지들을 저장하는 메시지 큐와 같은 저장소를 거쳐 수신 스레드로 전달될 수 있다. 이미 설명한 바와 같이 메시지 큐에 저장되는 메시지 이벤트들은 FIFO와 같은 선입선처리 제어방식을 통해 순차적으로 수신 스레드로 전달될 수 있다. 만약, 디버깅이 진행되고 있다면, 저장소에 저장된 메시지 이벤트는 디버깅에서 단계들이 진행되어 해당 메시지 이벤트의 처리를 위한 순서가 오기까지 디버깅이 진행되지 않는 경우와 비교하여 상대적으로 매우 큰 시간이 소요될 것이다.In operation 740, the message event transmitter 640 may deliver the message event to the receiving thread. In this case, the message event may be delivered to the receiving thread through a storage such as a message queue storing messages requested by the receiving thread. As described above, message events stored in the message queue may be sequentially delivered to the receiving thread through a first-in, first-out processing method such as FIFO. If debugging is in progress, the message event stored in the repository will take a relatively large amount of time compared to the case where debugging is not progressed until the steps are taken in debugging and the order for processing the message event comes.
단계(750)에서 수신 시점 확인부(650)는 메시지 이벤트가 저장소를 거쳐 수신 스레드로 수신된 제1 시점 또는 메시지 이벤트에 대한 수신 스레드의 수신 확인 메시지 이벤트를 요청 스레드가 수신한 제2 시점을 수신 시점으로서 확인할 수 있다. 본 발명의 실시예들에서는 메시지 이벤트의 요청 시점과 메시지 이벤트의 수신 시점간의 시차를 이용하여 디버깅을 탐지하는 기술에 관한 것으로, 요청 시점과 수신 시점은 다양한 방식으로 결정될 수 있다. 이미 도 4를 통해서는 제1 시점을 수신 시점으로 활용하는 실시예를, 도 5를 통해서는 제2 시점을 수신 시점으로 활용하는 실시예를 각각 설명한 바 있다.In operation 750, the reception point confirming unit 650 receives a first point in time at which a message event is received by the reception thread through a store or a second point in time when the request thread receives an acknowledgment message event of the reception thread for the message event. It can confirm as a viewpoint. Embodiments of the present invention relate to a technique for detecting debugging by using a time difference between a request time of a message event and a reception time of a message event, and the request time and the reception time may be determined in various ways. An embodiment in which the first view is used as a reception point has been described with reference to FIG. 4, and an embodiment in which the second view is used as the reception point has been described with reference to FIG. 5.
단계(760)에서 시차 계산부(660)는 요청 시점부터 수신 시점까지의 시차를 계산할 수 있다. 예를 들어, 시차 계산부(660)는 수신 시점의 값에서 요청 시점의 값을 빼는 방식으로 시차를 계산할 수 있다.In operation 760, the disparity calculator 660 may calculate the disparity from the request time to the reception time. For example, the parallax calculation unit 660 may calculate the parallax by subtracting the value of the request time from the value of the reception time.
단계(770)에서 디버깅 여부 결정부(770)는 계산된 시차에 기반하여 디버깅 여부를 결정할 수 있다. 예를 들어, 디버깅 여부 결정부(770)는 계산된 시차가 기설정된 임계값을 초과하는 경우에 디버깅이 탐지된 것으로 결정할 수 있다. 다른 예로, 디버깅 여부 결정부(770)는 계산된 시차가 기설정된 임계값을 초과하는 경우를 카운팅하고, 카운팅된 횟수가 기설정된 횟수를 넘어서는 경우에 디버깅이 탐지된 것으로 결정할 수도 있다.In operation 770, the debugging decision unit 770 may determine whether to debug based on the calculated parallax. For example, the debugging decision unit 770 may determine that debugging is detected when the calculated parallax exceeds a predetermined threshold. As another example, the debugging decision unit 770 may count when the calculated parallax exceeds a preset threshold value, and may determine that debugging is detected when the counted count exceeds the preset number.
도 8은 본 발명의 일실시예에 있어서, 시차를 계산하는 과정의 예를 도시한 흐름도이다. 본 실시예에서 단계(740)는 도 8과 같이 단계들(810 내지 830)을 포함할 수 있고, 단계(750)는 도 8과 같이 단계들(840 내지 860)을 포함할 수 있다.8 is a flowchart illustrating an example of a process of calculating parallax according to an embodiment of the present invention. In the present embodiment, step 740 may include steps 810 through 830 as shown in FIG. 8, and step 750 may include steps 840 through 860 as shown in FIG. 8.
단계(810)에서 메시지 이벤트 전달부(640)는 확인된 요청 시점을 나타내는 제1 타임스탬프를 메시지 이벤트에 추가할 수 있다. 다시 말해, 수신 스레드로 전달되는 메시지 이벤트는 요청 시점에 대한 정보로서 제1 타임스탬프를 포함할 수 있다.In operation 810, the message event transmitter 640 may add a first timestamp indicating the confirmed request time to the message event. In other words, the message event delivered to the receiving thread may include a first timestamp as information on a request time.
단계(820)에서 메시지 이벤트 전달부(640)는 제1 타임스탬프가 추가된 메시지 이벤트의 무결성 확인 정보를 생성할 수 있다. 이미 설명한 바와 같이, 제1 타임스탬프가 추가된 메시지 이벤트가 미리 설정된 해시함수의 파라미터로서 입력되고, 그 결과값이 무결성 확인 정보로서 계산될 수 있다.In operation 820, the message event transmitter 640 may generate integrity confirmation information of the message event to which the first time stamp is added. As described above, the message event to which the first time stamp is added is input as a parameter of a preset hash function, and the result value can be calculated as integrity confirmation information.
단계(830)에서 메시지 이벤트 전달부(640)는 제1 타임스탬프가 추가된 메시지 이벤트에 무결성 확인 정보를 더 추가하여 수신 스레드로 전달할 수 있다. In operation 830, the message event transmitter 640 may add integrity confirmation information to the message event to which the first timestamp is added and transmit the integrity confirmation information to the receiving thread.
단계(840)에서 수신 시점 확인부(650)는 메시지 이벤트를 수신하는 시점인 제1 시점을 나타내는 제2 타임스탬프를 생성할 수 있다. 예를 들어, 수신 스레드는 저장소로부터 메시지 이벤트가 수신되면, 메시지 이벤트의 수신 시점을 나타내는 제2 타임스탬프를 생성할 수 있다.In operation 840, the reception point checker 650 may generate a second timestamp indicating a first point in time at which a message event is received. For example, the receiving thread may generate a second timestamp indicating when the message event was received when the message event is received from the repository.
단계(850)에서 수신 시점 확인부(650)는 메시지 이벤트에 추가된 무결성 확인 정보를 이용하여 메시지 이벤트의 무결성을 확인할 수 있다. 예를 들어, 수신 스레드는 메시지 이벤트에서 무결성 확인 정보를 추출하고, 제1 타임스탬프가 추가된 메시지 이벤트를 미리 설정된 해시함수의 파라미터로 입력하여 그 결과값을 계산할 수 있다. 이때 수신 스레드는 무결성 확인 정보와 계산한 결과값이 서로 동일한 경우 제1 타임스탬프가 추가된 메시지 이벤트의 무결성을 확인할 수 있다.In operation 850, the reception point confirming unit 650 may confirm the integrity of the message event using the integrity confirmation information added to the message event. For example, the receiving thread may extract the integrity check information from the message event, and input the message event to which the first time stamp is added as a parameter of a preset hash function to calculate a result value. In this case, when the integrity check information and the calculated result value are the same, the receiving thread may check the integrity of the message event to which the first time stamp is added.
단계(860)에서 수신 시점 확인부(650)는 메시지 이벤트에 대한 수신 확인 메시지 이벤트를 요청 스레드로 전달할 수 있다.In operation 860, the reception point acknowledgment unit 650 may transmit an acknowledgment message event for the message event to the request thread.
이때, 단계(760)에서 시차 계산부(660)는 메시지 이벤트가 포함하는 제1 타임스탬프 및 생성된 제2 타임스탬프를 이용하여 시차를 계산할 수 있다. 다시 말해, 도 8은 수신 스레드가 시차를 계산하는 실시예를 설명하고 있다. 이 경우 단계(770) 역시 수신 스레드에서 처리될 수 있다.At this time, in step 760, the time difference calculator 660 may calculate the time difference using the first time stamp and the generated second time stamp included in the message event. In other words, FIG. 8 illustrates an embodiment in which the receiving thread calculates parallax. In this case, step 770 may also be processed in the receiving thread.
도 9는 본 발명의 일실시예에 있어서, 시차를 계산하는 과정의 다른 예를 도시한 흐름도이다. 본 실시예에서 단계(740)는 도 8과 같이 단계들(810 내지 830)을 포함할 수 있고, 단계(750)는 도 9와 같이 단계들(910 내지 930)을 포함할 수 있다. 예를 들어 수신 스레드는 단계(750)을 처리함에 있어 도 8의 단계들(840 내지 860) 대신 도 9의 단계들(910 내지 930)을 처리할 수도 있다. 단계(810 내지 830)은 도 8에서와 동일하기 때문에 반복적인 생략한다.9 is a flowchart illustrating another example of a process of calculating parallax according to an embodiment of the present invention. In the present embodiment, step 740 may include steps 810 through 830 as shown in FIG. 8, and step 750 may include steps 910 through 930 as shown in FIG. 9. For example, the receiving thread may process steps 910 through 930 of FIG. 9 instead of steps 840 through 860 of FIG. 8 in processing step 750. Steps 810 to 830 are the same as in FIG. 8, and are thus omitted repeatedly.
단계(910)에서 수신 시점 확인부(650)는 수신 스레드가 메시지 이벤트에 추가된 무결성 확인 정보를 이용하여 메시지 이벤트의 무결성을 확인할 수 있다. 이미 설명한 바와 같이 무결성의 과정은 수신 스레드가 메시지 이벤트에서 무결성 확인 정보를 추출하고, 제1 타임스탬프가 추가된 메시지 이벤트를 미리 설정된 해시함수의 파라미터로 입력하여 그 결과값을 계산한 후, 무결성 확인 정보와 계산한 결과값을 서로 비교함으로써 처리될 수 있다.In operation 910, the reception point confirming unit 650 may verify the integrity of the message event by using the integrity confirmation information added to the message event by the reception thread. As described above, the process of integrity extracts the integrity check information from the message event, inputs the message event with the first timestamp as a parameter of a preset hash function, calculates the result value, and then checks the integrity. This can be done by comparing the information with the calculated results.
단계(920)에서 수신 시점 확인부(650)는 메시지 이벤트에서 제1 타임스탬프를 확인할 수 있다.In operation 920, the reception point checking unit 650 may check the first time stamp in the message event.
단계(930)에서 수신 시점 확인부(650)는 제1 타임스탬프를 포함하는 수신 확인 메시지 이벤트를 생성하여 요청 스레드로 전달할 수 있다.In operation 930, the reception point confirming unit 650 may generate an acknowledgment message event including the first timestamp and deliver the received acknowledgment event to the request thread.
이 경우, 단계(760)에서 시차 계산부(660)는 수신 확인 메시지 이벤트를 수신한 제2 시각 및 수신 확인 메시지 이벤트가 포함하는 제1 타임스탬프를 이용하여 시차를 계산할 수 있다. 다시 말해 본 실시예에서 단계(760) 및 단계(770)은 요청 스레드에 의해 처리될 수 있다.In this case, in step 760, the time difference calculator 660 may calculate the time difference using the second time when the reception confirmation message event is received and the first time stamp included in the reception confirmation message event. In other words, in the present embodiment, steps 760 and 770 may be processed by the request thread.
상술한 실시예들에서와 요청 스레드 또는 수신 스레드를 통해 디버깅 여부가 결정되고 나면, 프로세서(212)는 어플리케이션(컴퓨터 프로그램)의 실행을 중단시키거나 또는 관련 정보(디버깅의 발생에 대한 정보)를 네트워크를 통해 서버(일례로, 서버(150) 또는 서버(160))로 전송하도록 전자 기기 1(110)을 제어할 수 있다.In the above-described embodiments and once it is determined whether to debug via the request thread or the receiving thread, the processor 212 interrupts the execution of the application (computer program) or sends relevant information (information about the occurrence of debugging) to the network. The electronic device 1 110 may be controlled to transmit to the server (for example, the server 150 or the server 160) through the controller.
이상에서와 같이, 본 발명의 실시예들에 따르면, 어플리케이션이 실행되기 위해 상시로 수행되는 메시지 이벤트 처리의 속도차를 이용하여 단일 스레드 또는 전체 스레드의 정지 상태에서도 디버깅을 탐지할 수 있다.As described above, according to the embodiments of the present invention, debugging may be detected even in a stopped state of a single thread or an entire thread by using a speed difference of message event processing that is always performed to execute an application.
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 소프트웨어 구성요소 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, 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 apparatus described above may be implemented as a hardware component, a software component or a combination of hardware components and software components. For example, 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). Can 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. For convenience of explanation, one processing device may be described as being used, but one of ordinary skill in the art will appreciate that the 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. For example, the processing device may include a plurality of processors or one processor and one controller. In addition, other processing configurations are possible, such as parallel processors.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.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.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.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, etc. 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. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and the drawings as described above, various modifications and variations are possible to those skilled in the art from the above description. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different form than the described method, or other components. Or even if replaced or substituted by equivalents, an appropriate result can be achieved.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are within the scope of the claims that follow.

Claims (15)

  1. 컴퓨터와 결합되어 디버깅 탐지 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램에 있어서,A computer program coupled to a computer stored on a computer readable recording medium for executing a debugging detection method on a computer,
    상기 디버깅 탐지 방법은,The debugging detection method,
    메시지 이벤트를 요청하는 요청 스레드를 생성하는 단계;Creating a request thread requesting a message event;
    상기 메시지 이벤트를 수신하는 수신 스레드를 생성하는 단계;Creating a receiving thread to receive the message event;
    상기 요청 스레드에서 메시지 이벤트를 생성하여 상기 메시지 이벤트의 요청 시점을 확인하는 단계;Generating a message event in the request thread to identify a request time of the message event;
    상기 생성된 메시지 이벤트를 상기 수신 스레드로 전달하는 단계;Delivering the generated message event to the receiving thread;
    상기 메시지 이벤트가 저장소를 거쳐 상기 수신 스레드로 수신된 제1 시점 또는 상기 메시지 이벤트에 대한 상기 수신 스레드의 수신 확인 메시지 이벤트를 상기 요청 스레드가 수신한 제2 시점을 수신 시점으로서 확인하는 단계;Confirming, as a reception time, a first time point at which the message event is received by the receiving thread through a storage, or a second time point at which the request thread receives an acknowledgment message event of the receiving thread for the message event;
    상기 요청 시점부터 상기 수신 시점까지의 시차를 계산하는 단계; 및Calculating a time difference from the request time to the reception time; And
    상기 시차에 기반하여 디버깅 여부를 결정하는 단계Determining whether to debug based on the time difference
    를 포함하는 것을 특징으로 하는 컴퓨터 프로그램.Computer program comprising a.
  2. 제1항에 있어서,The method of claim 1,
    상기 디버깅 여부를 결정하는 단계는,Determining whether or not to debug,
    상기 시차가 기설정된 임계값을 초과하는 경우에 디버깅이 탐지된 것으로 결정하는 것을 특징으로 하는 컴퓨터 프로그램.And determine that debugging is detected when the parallax exceeds a preset threshold.
  3. 제1항에 있어서,The method of claim 1,
    상기 디버깅 여부를 결정하는 단계는,Determining whether or not to debug,
    상기 시차가 기설정된 임계값을 초과하는 경우를 카운팅하고, 상기 카운팅된 횟수가 기설정된 횟수를 넘어서는 경우 디버깅이 탐지된 것으로 결정하는 것을 특징으로 하는 컴퓨터 프로그램.And counting a case where the time difference exceeds a preset threshold value, and determining that debugging is detected when the counted number exceeds a preset number.
  4. 제1항에 있어서,The method of claim 1,
    상기 수신 스레드는 상기 컴퓨터 프로그램의 메인 스레드를 포함하고,The receiving thread comprises a main thread of the computer program,
    상기 저장소는 상기 메인 스레드로 요청된 메시지들을 저장하는 메시지 큐를 포함하는 것을 특징으로 하는 컴퓨터 프로그램.And said storage comprises a message queue for storing messages requested to said main thread.
  5. 제1항에 있어서,The method of claim 1,
    상기 생성된 메시지 이벤트를 상기 수신 스레드로 전달하는 단계는,Delivering the generated message event to the receiving thread,
    상기 확인된 요청 시점을 나타내는 제1 타임스탬프를 상기 메시지 이벤트에 추가하는 단계;Adding a first timestamp indicative of the confirmed request time to the message event;
    상기 제1 타임스탬프가 추가된 메시지 이벤트의 무결성 확인 정보를 생성하는 단계; 및Generating integrity confirmation information of the message event to which the first time stamp is added; And
    상기 제1 타임스탬프가 추가된 메시지 이벤트에 상기 무결성 확인 정보를 더 추가하여 상기 수신 스레드로 전달하는 단계Adding the integrity confirmation information to the message event to which the first timestamp is added and delivering it to the receiving thread.
    를 포함하는 것을 특징으로 하는 컴퓨터 프로그램.Computer program comprising a.
  6. 제5항에 있어서,The method of claim 5,
    상기 제1 시점을 상기 수신 시점으로서 확인하는 단계는,Confirming the first time point as the reception time point,
    상기 메시지 이벤트를 수신하는 시점인 상기 제1 시점을 나타내는 제2 타임스탬프를 생성하는 단계;Generating a second timestamp indicating the first point in time at which the message event is received;
    상기 메시지 이벤트에 추가된 상기 무결성 확인 정보를 이용하여 상기 메시지 이벤트의 무결성을 확인하는 단계; 및Confirming the integrity of the message event using the integrity confirmation information added to the message event; And
    상기 메시지 이벤트에 대한 수신 확인 메시지 이벤트를 상기 요청 스레드로 전달하는 단계Forwarding an acknowledgment message event for the message event to the requesting thread;
    를 포함하고,Including,
    상기 요청 시점부터 상기 수신 시점까지의 시차를 계산하는 단계는,Calculating the time difference from the request time to the reception time,
    상기 수신 스레드가 상기 메시지 이벤트가 포함하는 제1 타임스탬프 및 상기 생성된 제2 타임스탬프를 이용하여 상기 시차를 계산하는 것을 특징으로 하는 컴퓨터 프로그램.And the receiving thread calculates the time difference using a first timestamp included in the message event and the generated second timestamp.
  7. 제5항에 있어서,The method of claim 5,
    상기 제2 시점을 상기 수신 시점으로서 확인하는 단계는,Confirming the second time point as the reception time point,
    상기 수신 스레드가 상기 메시지 이벤트에 추가된 상기 무결성 확인 정보를 이용하여 상기 메시지 이벤트의 무결성을 확인하는 단계;Checking, by the receiving thread, the integrity of the message event using the integrity confirmation information added to the message event;
    상기 수신 스레드가 상기 메시지 이벤트에서 상기 제1 타임스탬프를 확인하는 단계; 및Checking, by the receiving thread, the first timestamp in the message event; And
    상기 수신 스레드가 상기 제1 타임스탬프를 포함하는 상기 수신 확인 메시지 이벤트를 생성하여 상기 요청 스레드로 전달하는 단계Generating, by the receiving thread, the acknowledgment message event including the first timestamp and forwarding to the requesting thread.
    를 포함하고,Including,
    상기 요청 시점부터 상기 수신 시점까지의 시차를 계산하는 단계는,Calculating the time difference from the request time to the reception time,
    상기 요청 스레드가 상기 수신 확인 메시지 이벤트를 수신한 상기 제2 시각 및 상기 수신 확인 메시지 이벤트가 포함하는 상기 제1 타임스탬프를 이용하여 상기 시차를 계산하는 것을 특징으로 하는 컴퓨터 프로그램.And calculating the time difference by using the second time when the request thread receives the acknowledgment message event and the first timestamp included in the acknowledgment message event.
  8. 컴퓨터 프로그램에 대한 디버깅 탐지 방법에 있어서,In the debugging detection method for a computer program,
    메시지 이벤트를 요청하는 요청 스레드를 생성하는 단계;Creating a request thread requesting a message event;
    상기 메시지 이벤트를 수신하는 수신 스레드를 생성하는 단계;Creating a receiving thread to receive the message event;
    상기 요청 스레드에서 메시지 이벤트를 생성하여 상기 메시지 이벤트의 요청 시점을 확인하는 단계;Generating a message event in the request thread to identify a request time of the message event;
    상기 생성된 메시지 이벤트를 상기 수신 스레드로 전달하는 단계;Delivering the generated message event to the receiving thread;
    상기 메시지 이벤트가 저장소를 거쳐 상기 수신 스레드로 수신된 제1 시점 또는 상기 메시지 이벤트에 대한 상기 수신 스레드의 수신 확인 메시지 이벤트를 상기 요청 스레드가 수신한 제2 시점을 수신 시점으로서 확인하는 단계;Confirming, as a reception time, a first time point at which the message event is received by the receiving thread through a storage, or a second time point at which the request thread receives an acknowledgment message event of the receiving thread for the message event;
    상기 요청 시점부터 상기 수신 시점까지의 시차를 계산하는 단계; 및Calculating a time difference from the request time to the reception time; And
    상기 시차에 기반하여 디버깅 여부를 결정하는 단계Determining whether to debug based on the time difference
    를 포함하는 것을 특징으로 하는 디버깅 탐지 방법.Debugging detection method comprising a.
  9. 제8항에 있어서,The method of claim 8,
    상기 디버깅 여부를 결정하는 단계는,Determining whether or not to debug,
    상기 시차가 기설정된 임계값을 초과하는 경우에 디버깅이 탐지된 것으로 결정하는 것을 특징으로 하는 디버깅 탐지 방법.And when the time difference exceeds a preset threshold, determining that debugging is detected.
  10. 제8항에 있어서,The method of claim 8,
    상기 디버깅 여부를 결정하는 단계는,Determining whether or not to debug,
    상기 시차가 기설정된 임계값을 초과하는 경우를 카운팅하고, 상기 카운팅된 횟수가 기설정된 횟수를 넘어서는 경우 디버깅이 탐지된 것으로 결정하는 것을 특징으로 하는 디버깅 탐지 방법.And counting a case where the time difference exceeds a preset threshold value and determining that debugging is detected when the counted number exceeds a preset number.
  11. 제8항에 있어서,The method of claim 8,
    상기 수신 스레드는 상기 컴퓨터 프로그램의 메인 스레드를 포함하고,The receiving thread comprises a main thread of the computer program,
    상기 저장소는 상기 메인 스레드로 요청된 메시지들을 저장하는 메시지 큐를 포함하는 것을 특징으로 하는 디버깅 탐지 방법.And said store comprises a message queue for storing messages requested to said main thread.
  12. 제8항에 있어서,The method of claim 8,
    상기 생성된 메시지 이벤트를 상기 수신 스레드로 전달하는 단계는,Delivering the generated message event to the receiving thread,
    상기 확인된 요청 시점을 나타내는 제1 타임스탬프를 상기 메시지 이벤트에 추가하는 단계;Adding a first timestamp indicative of the confirmed request time to the message event;
    상기 제1 타임스탬프가 추가된 메시지 이벤트의 무결성 확인 정보를 생성하는 단계; 및Generating integrity confirmation information of the message event to which the first time stamp is added; And
    상기 제1 타임스탬프가 추가된 메시지 이벤트에 상기 무결성 확인 정보를 더 추가하여 상기 수신 스레드로 전달하는 단계Adding the integrity confirmation information to the message event to which the first timestamp is added and delivering it to the receiving thread.
    를 포함하는 것을 특징으로 하는 디버깅 탐지 방법.Debugging detection method comprising a.
  13. 제12항에 있어서,The method of claim 12,
    상기 제1 시점을 상기 수신 시점으로서 확인하는 단계는,Confirming the first time point as the reception time point,
    상기 메시지 이벤트를 수신하는 시점인 상기 제1 시점을 나타내는 제2 타임스탬프를 생성하는 단계;Generating a second timestamp indicating the first point in time at which the message event is received;
    상기 메시지 이벤트에 추가된 상기 무결성 확인 정보를 이용하여 상기 메시지 이벤트의 무결성을 확인하는 단계; 및Confirming the integrity of the message event using the integrity confirmation information added to the message event; And
    상기 메시지 이벤트에 대한 수신 확인 메시지 이벤트를 상기 요청 스레드로 전달하는 단계Forwarding an acknowledgment message event for the message event to the requesting thread;
    를 포함하고,Including,
    상기 요청 시점부터 상기 수신 시점까지의 시차를 계산하는 단계는,Calculating the time difference from the request time to the reception time,
    상기 수신 스레드가 상기 메시지 이벤트가 포함하는 제1 타임스탬프 및 상기 생성된 제2 타임스탬프를 이용하여 상기 시차를 계산하는 것을 특징으로 하는 디버깅 탐지 방법.And the receiving thread calculates the time difference using a first timestamp included in the message event and the generated second timestamp.
  14. 제12항에 있어서,The method of claim 12,
    상기 제2 시점을 상기 수신 시점으로서 확인하는 단계는,Confirming the second time point as the reception time point,
    상기 수신 스레드가 상기 메시지 이벤트에 추가된 상기 무결성 확인 정보를 이용하여 상기 메시지 이벤트의 무결성을 확인하는 단계;Checking, by the receiving thread, the integrity of the message event using the integrity confirmation information added to the message event;
    상기 수신 스레드가 상기 메시지 이벤트에서 상기 제1 타임스탬프를 확인하는 단계; 및Checking, by the receiving thread, the first timestamp in the message event; And
    상기 수신 스레드가 상기 제1 타임스탬프를 포함하는 상기 수신 확인 메시지 이벤트를 생성하여 상기 요청 스레드로 전달하는 단계Generating, by the receiving thread, the acknowledgment message event including the first timestamp and forwarding to the requesting thread.
    를 포함하고,Including,
    상기 요청 시점부터 상기 수신 시점까지의 시차를 계산하는 단계는,Calculating the time difference from the request time to the reception time,
    상기 요청 스레드가 상기 수신 확인 메시지 이벤트를 수신한 상기 제2 시각 및 상기 수신 확인 메시지 이벤트가 포함하는 상기 제1 타임스탬프를 이용하여 상기 시차를 계산하는 것을 특징으로 하는 디버깅 탐지 방법.And the request time is calculated by the request thread using the second time when the acknowledgment message event is received and the first timestamp included in the acknowledgment message event.
  15. 제8항 내지 제14항 중 어느 한 항의 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체.A computer-readable recording medium having recorded thereon a computer program for causing a computer to execute the method of any one of claims 8-14.
PCT/KR2017/002295 2017-03-03 2017-03-03 Debugging detection method and system using inter-thread message processing WO2018159881A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/KR2017/002295 WO2018159881A1 (en) 2017-03-03 2017-03-03 Debugging detection method and system using inter-thread message processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2017/002295 WO2018159881A1 (en) 2017-03-03 2017-03-03 Debugging detection method and system using inter-thread message processing

Publications (1)

Publication Number Publication Date
WO2018159881A1 true WO2018159881A1 (en) 2018-09-07

Family

ID=63370072

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/002295 WO2018159881A1 (en) 2017-03-03 2017-03-03 Debugging detection method and system using inter-thread message processing

Country Status (1)

Country Link
WO (1) WO2018159881A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050034841A (en) * 2003-10-10 2005-04-15 한국전자통신연구원 Method for creating and verifying simple object access protocol message on web service security using signature encryption
US20060029016A1 (en) * 2004-06-29 2006-02-09 Radware Limited Debugging application performance over a network
KR20090017264A (en) * 2007-08-14 2009-02-18 주식회사 안철수연구소 Method for detecting a debugging of client in server
US20140047274A1 (en) * 2012-01-24 2014-02-13 Nec Laboratories America, Inc. Network Debugging
KR101626967B1 (en) * 2015-01-21 2016-06-02 넷마블게임즈 주식회사 Method and apparatus for operating application to prevent hacking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050034841A (en) * 2003-10-10 2005-04-15 한국전자통신연구원 Method for creating and verifying simple object access protocol message on web service security using signature encryption
US20060029016A1 (en) * 2004-06-29 2006-02-09 Radware Limited Debugging application performance over a network
KR20090017264A (en) * 2007-08-14 2009-02-18 주식회사 안철수연구소 Method for detecting a debugging of client in server
US20140047274A1 (en) * 2012-01-24 2014-02-13 Nec Laboratories America, Inc. Network Debugging
KR101626967B1 (en) * 2015-01-21 2016-06-02 넷마블게임즈 주식회사 Method and apparatus for operating application to prevent hacking

Similar Documents

Publication Publication Date Title
WO2018030554A1 (en) Method and system for providing message-based notification
US11956264B2 (en) Method and system for verifying validity of detection result
CN109387217B (en) Navigation method, computer readable storage medium, and navigation server
WO2014027859A1 (en) Device and method for processing transaction request in processing environment of trust zone
WO2018160039A1 (en) Automatic authentication processing method and system using dividing function
CN110688428B (en) Method and device for issuing intelligent contracts
JP7212491B2 (en) Network service persistence management
WO2018194196A1 (en) Method and system for detecting application of obfuscation to and evaluating security of elf file
KR101814897B1 (en) Method and system for protecting file
WO2019147101A1 (en) Electronic device for classifying malicious code and operation method thereof
WO2018128413A1 (en) Methods and systems for managing application installation
WO2018159881A1 (en) Debugging detection method and system using inter-thread message processing
CN104094558A (en) Multi-threaded packet processing
WO2020111482A1 (en) Reverse engineering method and system utilizing big data based on program execution context
WO2019156263A1 (en) Method, system, and non-transitory computer-readable recording medium for providing chat room in three-dimensional form
JP6930862B2 (en) Client tampering judgment system and method
WO2018110723A1 (en) Payment method and system
WO2018088680A1 (en) Security system and method for processing request for access to blocked site
JP2018113031A (en) Method and system for detecting automated input
WO2018012685A1 (en) Apparatus for verifying performance of intelligent electronic device, system for verifying performance of intelligent electronic device, and computer-readable recording medium
WO2019235664A1 (en) Debugger blocking method and system for program protection
WO2017115976A1 (en) Method and device for blocking harmful site by using accessibility event
CN113656286A (en) Software testing method and device, electronic equipment and readable storage medium
CN112910995A (en) Resource allocation method and device based on multi-cloud environment, electronic equipment and medium
WO2019151548A1 (en) Method, system, and non-transitory computer-readable recording medium for providing information on basis of face recognition

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: 17898407

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17898407

Country of ref document: EP

Kind code of ref document: A1