KR20100100488A - Method for scanning a fabrication or memory and device thereof - Google Patents

Method for scanning a fabrication or memory and device thereof Download PDF

Info

Publication number
KR20100100488A
KR20100100488A KR1020090019406A KR20090019406A KR20100100488A KR 20100100488 A KR20100100488 A KR 20100100488A KR 1020090019406 A KR1020090019406 A KR 1020090019406A KR 20090019406 A KR20090019406 A KR 20090019406A KR 20100100488 A KR20100100488 A KR 20100100488A
Authority
KR
South Korea
Prior art keywords
memory
code
original
crc
data
Prior art date
Application number
KR1020090019406A
Other languages
Korean (ko)
Other versions
KR101052735B1 (en
Inventor
김태훈
박근영
Original Assignee
주식회사 안철수연구소
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 안철수연구소 filed Critical 주식회사 안철수연구소
Priority to KR1020090019406A priority Critical patent/KR101052735B1/en
Publication of KR20100100488A publication Critical patent/KR20100100488A/en
Application granted granted Critical
Publication of KR101052735B1 publication Critical patent/KR101052735B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/554Detecting local intrusion or implementing counter-measures involving event detection and direct action

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Storage Device Security (AREA)

Abstract

PURPOSE: A method for sensing whether a memory is manipulated and a device using the same are provided to determine whether a code of an execution file loaded in a memory is manipulated during execution of a file to be protected. CONSTITUTION: An original CRC(Cyclic Redundancy Check) reading module(112) extracts an original confirmation code which is inserted into a file to be protected. A memory CRC generating module(114) stores data of a memory as the second processing target data. The memory CRC generating module processes the second processing target data by a preset period. The memory CRC generating module generates a memory confirmation code. A CRC comparing module(116) compares the generated memory confirmation code with the extracted original confirmation code.

Description

메모리 조작유무를 감지하는 방법 및 이를 이용한 장치{Method for scanning a fabrication or memory and device thereof}Method for detecting presence of memory operation and device using the same {Method for scanning a fabrication or memory and device about}

본 발명은 CRC코드를 통한 메모리의 보안 방법에 관한 것으로, 보다 상세하게는 실행파일이 실행되어 메모리에 로드된 이후, 상기 로드된 메모리상 내용이 조작되었는지 여부를 판단하기 위한 메모리 조작유무를 감지하는 방법에 관한 발명이다.The present invention relates to a security method of a memory through a CRC code, and more particularly, after the execution file is executed and loaded into the memory, detecting the presence or absence of a memory operation for determining whether the loaded memory has been manipulated. The invention relates to a method.

근래에 게임등의 프로그램을 해킹하기 위한 툴(Tool)로써, 실행 프로그램이 실행될 때, 상기 실행 파일이 동작되는 클라이언트의 메모리 상에 위치한 코드를 수정하여 게임의 원래 동작방식과 다르게 동작하도록 하는 해킹 툴들이 많이 유포되고 있다. 이러한 방식의 해킹은 실행 파일 자체의 크랙(Crack)과 동일한 효과를 낼 뿐만 아니라 게임 중간에 동적으로 계속해서 바꿀 수 있으므로 실행 프로그램 자체의 크랙보다 실질적으로는 더 큰 피해를 주고 있다는 문제점이 있다.Recently, as a tool for hacking a program such as a game, when the executable program is executed, a hacking tool for modifying the code located in the memory of the client where the executable file is operated to operate differently from the original operation of the game. A lot is spreading. This type of hack not only has the same effect as the crack of the executable file itself, but also can be changed dynamically in the middle of the game, thereby causing substantially more damage than the crack of the executable program itself.

본 발명은 상기한 사정을 감안하여 창출된 것으로서, 본 발명의 목적은 보호대상 파일이 실행되는 동안, 메모리에 로딩된 실행파일의 코드가 조작되었는지 여부를 판단하기 위한 메모리 조작유무를 감지하는 방법에 있다.The present invention has been made in view of the above circumstances, and an object of the present invention is to detect a memory operation for determining whether a code of an executable file loaded in a memory has been manipulated while a file to be protected is executed. have.

상기 목적을 달성하기 위한 본 발명에 따른 메모리 조작유무를 감지하는 방법은 보호대상 파일에 대해서, CRC알고리즘을 이용해서 원본확인코드를 생성하는 단계; 상기 생성된 원본확인코드를 상기 보호대상 파일에 저장하는 단계; 상기 원본확인코드가 삽입된 보호대상 파일이 메모리상에 로드되는 단계; 상기 메모리상에 로드된 메모리상코드에 대해서, 기정해진 주기에 따라 상기 CRC 알고리즘을 이용해서 메모리확인코드를 생성하는 단계; 및 상기 원본확인코드와 상기 메모리확인코드를 비교하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method of detecting an operation of a memory, the method including generating a source identification code using a CRC algorithm on a file to be protected; Storing the generated original identification code in the file to be protected; Loading the protected file into which the original identification code is inserted, into a memory; Generating a memory check code for the code on the memory loaded on the memory using the CRC algorithm according to a predetermined period; And comparing the original identification code with the memory identification code.

또한 상기 보호대상 파일은 실행파일이고, 상기 메모리상코드는 프로세스인 것이 바람직하다.It is also preferable that the file to be protected is an executable file, and the code in memory is a process.

그리고 상기 원본확인코드를 생성하는 단계는 상기 보호대상 파일중에서 코드섹션에 대해서만 원본확인코드를 생성하는 것을 특징으로 하며,And generating the original identification code only by generating the original identification code for the code section of the protected file.

상기 메모리확인코드를 생성하는 단계는 상기 메모리에 로드된 메모리상코드중에서 코드섹션에 대해서만 메모리확인코드를 생성하는 것이 바람직하다.In the generating of the memory check code, it is preferable to generate the memory check code only for the code section among the codes on the memory loaded in the memory.

또한 상기 원본확인코드를 생성하는 단계는 상기 보호대상 파일중에서 기정해진 데이터 블록단위로 원본확인코드를 생성하는 것을 특징으로 하며,The generating of the original verification code may include generating the original verification code by a predetermined data block unit among the protected files.

상기 메모리확인코드를 생성하는 단계는 상기 메모리에 로드된 메모리상코드중에서 상기 데이터 블록단위로 메모리확인코드를 생성하는 것이 바람직하다.In the generating of the memory check code, it is preferable to generate the memory check code in units of the data block among the code on the memory loaded in the memory.

그리고 상기 데이터 블록단위는 운영체제에서 관리하는 페이지단위인 것이 바람직하다.The data block unit is preferably a page unit managed by an operating system.

또한 커널레벨에서 더티비트(Dirty-bit) 정보를 실시간으로 감시하는 단계를 더 포함하며, 특정 더티비트(Dirty-bit) 정보가 변경된 경우 상기 변경된 Dirty-bit이 가리키는 페이지에 대해서 메모리확인코드를 생성하고, 원본확인코드와 상기 메모리확인코드를 비교하는 것이 바람직하다.The method may further include monitoring dirty bit information in real time at a kernel level, and generating a memory check code for the page indicated by the changed dirty bit when specific dirty bit information is changed. Preferably, the original confirmation code is compared with the memory confirmation code.

그리고 메모리속성을 변경하는 API함수인 속성변경API함수를 후킹하는 단계; 및 상기 속성변경API함수를 이용하여 메모리의 속성이 변경된 것이 감지된 경우, 상기 속성변경API함수의 인수를 참조하여 속성이 변경된 페이지를 검색하는 단계를 더 포함하고 상기 속성이 변경된 페이지에 대해서 메모리확인코드를 생성하고, 원본확인코드와 상기 메모리확인코드를 비교하는 것이 바람직하다.Hooking an attribute change API function, which is an API function that changes a memory attribute; And if it is detected that the property of the memory is changed by using the property change API function, searching for a page whose property is changed by referring to an argument of the property change API function. It is preferable to generate a code and compare the original confirmation code with the memory confirmation code.

또한 상기 속성변경API함수는 Kernel32.dll의 VirtualProtect함수인 것이 바람직하다.In addition, the property change API function is preferably a VirtualProtect function of Kernel32.dll.

그리고 상기 생성된 원본CRC를 상기 보호대상 파일에 저장하는 단계는And storing the generated original CRC in the protected file.

상기 보호대상파일의 모든 섹션에 대해서 남은 영역을 검사하는 단계;를 더 포함하고, 최초로 남은 영역이 발견된 섹션의 상기 남은 영역에 원본확인코드를 저 장하고는 것이 바람직하다.And checking the remaining area of all sections of the protected file. The original check code may be stored in the remaining area of the section where the first remaining area is found.

한편 본 발명의 다른 일 실시예에 따른 메모리 조작유무 감지장치는 보호대상파일이 메모리에 로드된 이후 조작이 되었는지 여부를 감지하는 기능을 수행하는 메모리 조작유무 감지장치에 있어서, 상기 보호대상파일에 기저장된 원본확인코드를 읽어들이는 원본CRC리딩모듈; 상기 보호대상파일이 메모리상에 로드된 이후, 메모리상코드에 대해서 기정해진 주기에 따라 기정해진 CRC 알고리즘을 이용해서 메모리확인코드를 생성하는 메모리CRC생성모듈; 및 상기 메모리확인코드와 원본확인코드를 비교하는 CRC비교모듈을 포함한다.On the other hand, the memory operation presence detection device according to another embodiment of the present invention is a memory operation presence detection device for performing a function to detect whether the operation has been performed after the protection target file is loaded into the memory, Original CRC reading module for reading the stored original confirmation code; A memory CRC generation module for generating a memory verification code by using a CRC algorithm predetermined according to a predetermined period for the code on memory after the file to be protected is loaded on the memory; And a CRC comparison module for comparing the memory check code with the original check code.

그리고 상기 보호대상 파일에 대해서, CRC알고리즘을 이용해서 원본확인코드를 생성하고, 상기 생성된 원본CRC를 상기 보호대상 파일에 저장하는 원본CRC삽입모듈;을 더 포함하는 것이 바람직하다.And an original CRC insertion module for generating the original verification code using the CRC algorithm for the protected file and storing the generated original CRC in the protected file.

또한 상기 원본CRC리딩모듈, 상기 메모리CRC생성모듈 및 상기 CRC비교모듈은 상기 보호대상 파일이 메모리상에 로드시와 동기에 메모리에 로딩되는 것이 바람직하다.In addition, the original CRC reading module, the memory CRC generating module and the CRC comparison module are preferably loaded into the memory at the same time as the protected file is loaded on the memory.

그리고 상기 원본CRC삽입모듈은 상기 보호대상 파일중에서 코드섹션에 대해서만 원본확인코드를 생성하는 것을 특징으로 하며,The original CRC insertion module generates an original verification code only for a code section of the protected file.

상기 메모리CRC생성모듈은 상기 메모리에 로드된 메모리상코드중에서 코드섹션에 대해서만 메모리확인코드를 생성하는 것이 바람직하다.The memory CRC generation module preferably generates a memory confirmation code for only a code section among the codes on the memory loaded in the memory.

또한 상기 원본CRC삽입모듈은 상기 보호대상 파일중에서 기정해진 데이터 블록단위로 원본확인코드를 생성하는 것을 특징으로 하며,In addition, the original CRC insertion module is characterized in that for generating the original confirmation code in the unit of the predetermined data block of the protected file,

상기 메모리CRC생성모듈은 상기 메모리에 로드된 메모리상코드중에서 상기 데이터 블록단위로 메모리확인코드를 생성하는 것이 바람직하다.The memory CRC generation module preferably generates a memory confirmation code in units of the data block among codes on the memory loaded in the memory.

그리고 상기 데이터 블록단위는 운영체제에서 관리하는 페이지단위인 것이 바람직하다.The data block unit is preferably a page unit managed by an operating system.

또한 커널레벨에서 더티비트(Dirty-bit) 정보를 실시간으로 감시하는 더티비트(Dirty-bit)감지모듈을 더 포함하며,It also includes a dirty bit detection module that monitors dirty bit information in real time at the kernel level.

상기 메모리CRC생성모듈은 상기 더티비트(Dirty-bit)가 변경된 경우 상기 변경된 Dirty-bit이 가리키는 페이지에 대해서 메모리확인코드를 생성하는 것이 바람직하다.The memory CRC generation module preferably generates a memory confirmation code for the page indicated by the changed dirty bit when the dirty bit is changed.

그리고 메모리속성을 변경하는 API함수인 속성변경API함수를 후킹한 후, 상기 속성변경API함수를 이용하여 메모리의 속성이 변경된 것이 감지된 경우, 상기 속성변경API함수의 인수를 참조하여 속성이 변경된 페이지를 검색하는 변경페이지검색모듈을 더 포함하고,After hooking the property change API function, which is an API function for changing the memory property, and detecting that the property of the memory is changed using the property change API function, the page whose property is changed by referring to the argument of the property change API function Further includes a change page search module to search for,

상기 메모리CRC생성모듈은 상기 속성이 변경된 페이지에 대해서 메모리확인코드를 생성하는 것이 바람직하다.The memory CRC generation module preferably generates a memory confirmation code for the page whose attribute is changed.

한편 본 발명의 다른 일 실시예에 따른 저장매체에는 보호대상 파일이 메모리상에 로드된 경우, 상기 메모리상에 로드된 메모리상코드에 대해서, 기정해진 주기에 따라 상기 CRC 알고리즘을 이용해서 메모리확인코드를 생성하는 단계; 상기 보호대상 파일에 기저장된 원본확인코드를 읽어들이는 단계; 및 상기 원본확인코드와 상기 메모리확인코드를 비교하는 단계를 수행할 수 있는 프로그램이 저장된다.On the other hand, in a storage medium according to another embodiment of the present invention, when a file to be protected is loaded on a memory, a memory check code is generated by using the CRC algorithm according to a predetermined period with respect to the code on the memory loaded on the memory. Generating a; Reading the original identification code pre-stored in the protected file; And a program capable of performing the step of comparing the original identification code with the memory identification code.

한편 본 발명의 다른 일 실시예에 따른 저장매체에는 상기 보호대상 파일에 대해서, CRC알고리즘을 이용해서 원본확인코드를 생성하는 단계 및On the other hand, the storage medium according to another embodiment of the present invention includes the steps of generating an original verification code for the protected file, using a CRC algorithm;

상기 생성된 원본CRC를 상기 보호대상 파일에 저장하는 단계를 수행할 수 있는 프로그램이 저장된다.A program capable of performing the step of storing the generated original CRC in the protected file is stored.

이상에서 상세히 설명한 바와 같이, 본 발명에 따른 메모리 조작유무를 감지하는 방법을 사용하면, 메모리상에서 보호하고자 하는 파일이 로드된 이후 메모리상에서의 조작유무를 바로 알 수 있으므로, 제3자로부터 메모리조작시도 시 보호가 가능하다는 효과가 있다.As described in detail above, using the method for detecting the presence or absence of a memory operation according to the present invention, since the operation to be immediately known in the memory after the file to be protected on the memory is loaded, the memory operation attempt from a third party The effect is that protection is possible.

또한 해당파일에서 필요한 부분에 대해서만 체크하므로 시스템의 퍼포먼스에 큰 영향이 없으며, 또한 커널 및 응용프로그램단계에서 주소가 의심되는 페이지를 검색하여 해당 페이지를 우선적으로 검사하므로 진단속도가 빠르고 효율적이다.In addition, it checks only the necessary part of the file, so there is no big impact on the performance of the system. Also, the page is searched first and the page is suspected at the kernel and application level.

CRC(cyclic redundancy check)는 네트워크 등을 통하여 데이터를 전송할 때 전송된 데이터에 오류가 있는지를 확인하기 위한 체크값을 결정하는 방식을 말한다. Cyclic redundancy check (CRC) refers to a method of determining a check value for checking whether there is an error in transmitted data when transmitting data through a network.

데이터를 전송하기 전에 주어진 데이터의 값에 따라 CRC 값을 계산하여 데이터에 붙여 전송하고, 데이터 전송이 끝난 후 받은 데이터의 값으로 다시 CRC 값을 계산하게 된다. 이어서 두 값을 비교하고, 이 두 값이 다르면 데이터 전송 과정에서 잡음 등에 의해 오류가 덧붙여 전송된 것 임을 알 수 있다.Before transmitting data, CRC value is calculated and attached to the data according to the value of the given data, and after the data transmission is over, the CRC value is calculated again with the received data value. Then, the two values are compared, and if the two values are different, it can be seen that an error is transmitted due to noise or the like during the data transmission process.

본 발명에서는 이러한 CRC알로리즘 개념을 좀더 개량 및 응용하여, 실제 하드디스크에 저장되어 있는 파일과, 해당 파일이 실행되어 메모리에 로딩된 후에 해커등에 의해서 위변조되었는지를 검사하는데 활용한다.The present invention further improves and applies the concept of CRC algorithm, and utilizes the file stored in the actual hard disk and whether the file is forged by a hacker or the like after the file is executed and loaded into the memory.

도1은 본 발명의 일 실시예에 따른 메모리 조작유무 감지장치의 블록도이다.1 is a block diagram of a memory operation presence detection device according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 메모리 조작유무 감지장치는 크게 감지기능수행모듈(110)과 원본CRC삽입모듈(120)로 구성된다.Memory operation detection device according to an embodiment of the present invention is largely composed of a detection function performing module 110 and the original CRC insertion module 120.

우선 원본CRC삽입모듈(120)은 특정 보호대상 파일에 대해서, CRC알고리즘을 이용해서 원본CRC코드를 생성하고, 상기 생성된 원본CRC코드를 상기 보호대상 파일에 저장하는 기능을 수행한다.First, the original CRC insertion module 120 generates an original CRC code for a specific protected target file using a CRC algorithm, and stores the generated original CRC code in the protected target file.

그리고 감지기능수행모듈(110)은 다시 원본CRC리딩모듈(112), 메모리CRC생성모듈(114) 및 CRC비교모듈(116)로 이루어진다.In addition, the sensing function performing module 110 is composed of an original CRC reading module 112, a memory CRC generating module 114, and a CRC comparison module 116.

원본CRC리딩모듈(112)은 상기 원본CRC삽입모듈(120)에 의해서 생성되어 원본파일에 삽입된 원본CRC코드를 읽어들이는 기능을 수행한다.The original CRC reading module 112 reads the original CRC code generated by the original CRC insertion module 120 and inserted into the original file.

메모리CRC생성모듈(114)은 상기 보호대상파일이 메모리상에 로드된 이후, 메모리상코드에 대해서 기정해진 주기에 따라 기정해진 CRC 알고리즘을 이용해서 메모리CRC코드를 생성하는 기능을 수행한다. 여기서는 상기 원본CRC삽입모듈(120)이 원본CRC코드를 생성할 때 사용한 CRC알고리즘과 동일한 알고리즘을 사용한다.The memory CRC generation module 114 performs a function of generating a memory CRC code by using a CRC algorithm specified according to a predetermined period for the code on memory after the protected file is loaded on the memory. Here, the original CRC insertion module 120 uses the same algorithm as the CRC algorithm used when generating the original CRC code.

CRC비교모듈(116)은 보호대상파일이 메모리에 로드되기 전에 원본CRC삽입모 듈(120)에 의해서 생성되어 저장된 원본CRC코드와, 보호대상파일이 메모리에 로드된 이후에 메모리CRC생성모듈(114)에 의해서 기정해진 주기에 생성된 메모리CRC코드를 서로 비교한다. The CRC comparison module 116 generates and stores the original CRC code generated and stored by the original CRC insertion module 120 before the protected file is loaded into the memory, and the memory CRC generation module 114 after the protected file is loaded into the memory. Compare the memory CRC codes generated in the cycle specified by

만약에 원본CRC코드와 메모리CRC코드가 일치하지 않는다면, 이는 곧 상기 보호대상파일이 메모리에 로드된 이후 변경이 생겼다는 의미이다.If the original CRC code and the memory CRC code do not match, it means that a change has occurred since the protected file has been loaded into the memory.

도2는 본 발명의 설명을 위해 파일영역의 일 예를 도시한 도면이다. 2 is a diagram illustrating an example of a file area for explaining the present invention.

예를 들어 보호대상파일이 GAME.EXE라는 실행파일이라고 하자. 이러한 실행파일은 크게 세가지 영역이 존재한다. 실제 프로그램의 소스코드가 들어가는 코드영역(210)과 프로그램의 구동에 필요한 데이터와 관련된 영역인 데이터영역(220) 및 리소스와 관련된 리소스영역(230)이 있다.For example, suppose the protected file is an executable called GAME.EXE. There are three main areas for these executables. There is a code area 210 that contains the source code of the actual program, a data area 220 that is an area related to data required for driving the program, and a resource area 230 that is related to a resource.

상기 실행파일이 실행되면 이 파일은 메모리에 매핑되어 로드된다. 이후 상기 실행파일이 구동되면서 메모리에 매핑된 데이터영역이나 리소스영역의 값들은 수시로 변경될 수 있다. 그러나 코드영역은 실제 프로그래머가 작성한 코드가 그대로 매핑되어 메모리에 올라가므로, 정상적인 상황이라면 파일내에 존재하는 코드영역내의 코드들과, 메모리에 로드된 코드영역의 코드들을 일치하여야 한다. 만약 파일(즉 메모리에 로드되기 전)내의 코드영역에 있는 코드들과 메모리로 로드된 이후 코드영역에 있는 코드들이 서로 불일치한다면 이는 해커등에 의해서 메모리가 조작된 것이다. 따라서 본 발명에서는 특히 코드영역에 있는 코드들에 대해서 적용한다.When the executable file is executed, the file is mapped into memory and loaded. Thereafter, as the executable file is driven, values of a data region or a resource region mapped to a memory may be changed at any time. However, since the code area written by the actual programmer is mapped to the memory as it is, the code area in the file area and the code area loaded in the memory must match. If the code in the code area in the file (ie before it is loaded into memory) and the code in the code area after being loaded into memory are inconsistent with each other, then the memory has been manipulated by a hacker or the like. Therefore, the present invention applies particularly to codes in the code domain.

한편 코드영역전부에 대해서 메모리CRC코드를 생성하고 비교하는 것이 아니 고, 일정 크기별로 예를 들어 페이지별로 나눠서 메모리CRC코드를 생성하고 비교하는 과정을 수행한다. 최근들어 프로그램이 대용량화 되어가면서, 실행파일 역시도 몇메가바이트를 초과하는 경우가 종종 발생하며, 이에 따라서 상기 실행파일의 전체에 대해서 메모리CRC코드를 생성하고, 이를 기저장된 원본CRC코드와 비교한다면 시스템의 성능에도 영향을 미친다. 이에 코드영역을 다시 페이지단위(운영체제가 윈도우인 경우 약 4킬로바이트)로 나눈뒤에, 페이지별로 메모리CRC코드 생성 및 비교를 수행한다. Instead of generating and comparing the memory CRC codes for the entire code area, the memory CRC codes are generated and compared by dividing by page, for example, by a predetermined size. Recently, as the program has become larger, the execution file also often exceeds several megabytes. Therefore, if the memory CRC code is generated for the entire execution file and compared with the original stored CRC code, It also affects performance. After dividing the code area into page units (approximately 4 kilobytes when the operating system is Windows), memory CRC codes are generated and compared for each page.

이러한 과정에 대해서는 이하 도3에서 보다 더 자세히 후술한다.This process will be described later in more detail with reference to FIG. 3.

도3은 본 발명의 일 실시예에 따른 메모리 조작유무를 감지하는 방법의 설명에 사용되는 흐름도이다.3 is a flowchart used to explain a method of detecting the presence or absence of a memory operation according to an exemplary embodiment of the present invention.

이하에서는 보호대상 파일로 EXE파일과 같은 실행파일을 예로 든다. 물론 본 발명은 실행파일에만 적용되는 것은 아니며, DLL과 같은 파일에도 적용가능하다.The following is an example of an executable file such as an EXE file as a file to be protected. Of course, the present invention is not only applicable to the executable file, but also to a file such as a DLL.

우선 보호대상 파일로 선택된 실행파일에 대해서 원본CRC코드를 생성한다(S310). 이때는 실행파일에서 코드영역에 대해서 CRC알고리즘을 적용해서 원본CRC코드를 작성한다. First, the original CRC code is generated for the executable file selected as the protection target file (S310). In this case, the original CRC code is created by applying the CRC algorithm to the code area in the executable file.

이 때 코드영역 전체에 대해서 하나의 원본CRC코드를 작성하는 것도 가능하나, 보통은 기정해진 블록단위 즉 페이지단위별로 각각 원본CRC코드를 작성한다.At this time, it is possible to create one original CRC code for the entire code area, but usually one original CRC code is created for each predetermined block unit or page unit.

이후 작성된 원본CRC코드를 실행파일에 삽입한다(S320). 삽입시에는 파일의 맨뒤에 추가적으로 삽입하는 것도 가능하고, 또는 코드영역, 데이터영역 및 리소트 영역들을 차례로 검사하여 각 영역에 빈공간이 있는지 확인한 후 빈 공간에 삽입하 는 방법도 가능하다.Then, the original CRC code created is inserted into the executable file (S320). When inserting, it is possible to insert additionally at the end of the file, or it is possible to check the code area, the data area, and the report area in order to check whether there is an empty space in each area, and then insert into the empty space.

이렇게 원본CRC코드가 삽입된 실행파일은 메모리에 로드된다(S330). 일반적으로는 해당 실행파일이 실제 시스템상에서 실행될 때 해당 파일이 메모리에 로드된다.The executable file into which the original CRC code is inserted is loaded into the memory (S330). Typically, when the executable is run on a real system, the file is loaded into memory.

이 때 감지기능수행모듈 역시 메모리상에 로드한다(S340). 원본CRC리딩모듈(112), 메모리CRC생성모듈(114) 및 CRC비교모듈(116)로 이루어진 감지기능수행모듈(110)은 일반적으로 DLL형태로 배포되는데, 이하에서는 이를 감지기능수행DLL이라고 간략히 호칭한다. 상기 감지기능수행DLL은 상기 보호대상 실행파일이 실행시에 동시에 실행되도록 설정하는 것이 바람직하다. 즉 상기 감지기능수행DLL은 상기 실행되는 실행파일로부터 Static Loading 즉, 상기 보호대상 실행파일이 실행과 동시에 상기 감지기능수행DLL 역시도 같이 실행되어 메모리에 로드되는 것이 바람직하다.At this time, the sensing function performing module is also loaded into the memory (S340). The detection function execution module 110, which consists of the original CRC reading module 112, the memory CRC generation module 114, and the CRC comparison module 116, is generally distributed in the form of a DLL. Hereinafter, this is briefly referred to as a detection function execution DLL. do. Preferably, the sensing function execution DLL is set to execute the protected executable file at the same time. That is, the detection function execution DLL is preferably statically loaded from the executed executable file, that is, the protection function execution DLL is executed at the same time as the execution of the detection function execution DLL.

그 이유는 대부분의 해킹툴이 대상 실행파일 실행시 컴파일러에 의해 작성되는 스텁-코드 함수군을 후킹하여, 패킹 이후 시점을 판단한 후 보호대상 프로세스에 악성 코드를 주입하는 기법을 사용하기 때문이다. 이에 해당 함수의 실행 시점 이전에 호출되는 DLL_PROCESS_ATTACH 시점에 Kernel32.dll의 해당 함수의 코드정보CRC를 미리 생성하여 관리한다. This is because most hacking tools use a technique of injecting malicious code into the protected process after hooking the stub-code function group created by the compiler when executing the target executable file to determine the time after packing. Accordingly, code information CRC of the corresponding function of Kernel32.dll is generated and managed in advance at the DLL_PROCESS_ATTACH point which is called before the execution time of the corresponding function.

만약, 상기 보호대상 실행파일에서 감지기능수행DLL을 Dynamic-Loading 한다면, 즉 상기 보호대상 실행파일을 실행한 이후에 상기 감지기능수행모듈을 로드한다며, 그 사이에 해킹툴에 의해 메모리가 조작된 경우에는 감지할 수 없게 되는 상 황이 발생될 수 있게 된다.If, in the protected executable, the detection function execution DLL is dynamically loaded, that is, the detection function execution module is loaded after executing the execution of the protection target executable, and a memory is manipulated by a hacking tool in between. In this case, an undetectable situation may occur.

감지기능수행DLL이 시작되면, 별도의 쓰레드(Thread)에서 주기적으로 메모리상코드(상기 실행파일이 실행되어 메모리에 매핑된 코드들을 이하 메모리상코드라고 호칭)의 코드영역에 해당하는 메모리CRC코드를 생성한다(S350). 물론 이때의 메모리CRC코드를 생성하는 알고리즘은 S310단계에서의 원본CRC코드를 생성하는 알고리즘과 동일한 알고리즘을 사용해야 한다. When the detection function execution DLL starts, the memory CRC code corresponding to the code area of the memory code (codes executed in the execution file and mapped to the memory, hereinafter referred to as memory code) is periodically stored in a separate thread. It generates (S350). Of course, the algorithm for generating the memory CRC code at this time should use the same algorithm as the algorithm for generating the original CRC code in step S310.

하드디스크와 같은 저장매체에 저장되어 있는 실행파일이 실행되어서 메모리에 로드되어 메모리상에 존재하는 메모리상코드는 서로 매핑되어 동일하다. 물론 데이터영역은 실행에 따라 달라질 수 있으나, 코드영역 즉 실행파일의 코드영역의 데이터와 메모리상코드의 코드영역의 데이터는 동일하여야 하며 다르다면 조작이 발생한 것이다. 따라서 실행파일의 코드영역의 데이터로 생성한 원본CRC코드와 이후 메모리상코드로 생성한 메모리CRC코드는 동일해야 한다.Executable files stored in a storage medium such as a hard disk are executed and loaded into the memory so that the codes on the memory are mapped to each other and are identical. Of course, the data area may vary depending on the execution. However, the data in the code area, that is, the data in the code area of the executable file and the code area in the code in memory, must be the same. Therefore, the original CRC code generated from the data in the code area of the executable file and the memory CRC code generated from the later memory code must be identical.

이후 미리 저장해둔 보호 대상 프로세스의 원본CRC코드와, 상기 메모리CRC코드를 비교한다(S360).Thereafter, the original CRC code of the protected process stored in advance and the memory CRC code are compared (S360).

만약 일치한다면(S360-Y), 해당 메모리CRC코드가 생성된 부분의 내용은 조작이 되지 않았으므로, 그 다음 페이지에 대해서 다시 S350단계 및 S360단계를 수행한다. If it matches (S360-Y), since the contents of the portion where the memory CRC code is generated are not manipulated, steps S350 and S360 are performed again for the next page.

앞서도 상술한바와 같이, 해당 프로스세스의 코드영역 전체에 대해서 S350단계 및 S360단계를 수행할 경우 시스템상의 퍼포먼스에 악영향을 미칠 수 있다. 따 라서 페이지별로 메모리CRC코드를 생성하고, 해당 메모리CRC코드를 기저장된 원본CRC코드와 비교해서 해당 페이지부분의 조작여부를 판단하고, 이상이 없으면 다시 다음 페이지 영역으로 넘어가서 반복수행하는 것이다.As described above, performing steps S350 and S360 for the entire code region of the process may adversely affect performance on the system. Therefore, the memory CRC code is generated for each page, and the memory CRC code is compared with the original stored CRC code to determine whether the corresponding page part is manipulated.

반대로 일치하지 않는다면(S360-N), 해당 부분에 조작이 있는 것이므로 상기 메모리 조작내용을 통지한다(S380).On the contrary, if there is no coincidence (S360-N), since there is an operation in the corresponding part, the memory operation contents are notified (S380).

한편 시스템 퍼포먼스를 위해서 코드영역을 다시 페이지단위로 나눈후에, 해당 페이지별로 S350단계 및 S360단계를 수행한다. On the other hand, after dividing the code area into page units for system performance, steps S350 and S360 are performed for each page.

이에 따라 페이지수가 큰 경우, 예를 들어 100개의 페이지가 존재하는 경우에 약 100번 동안 상기 S350단계 및 S360단계를 거쳐야 100번째 페이지를 검사할 수 있게 된다. 이에 이를 보완하기 위해서 아래와 같은 두가지 알고리즘이 더 활용될 수 있다.Accordingly, when the number of pages is large, for example, when 100 pages exist, the 100th page can be inspected only after the steps S350 and S360 are performed for about 100 times. To compensate for this, the following two algorithms can be further utilized.

우선 첫째로는 운영체제에서 지원하는 더티 비트(dirty bit) 정보를 참조하는 방법이다. 즉 운영체제의 커널 레벨에서는 메모리가 변경이 일어날때마다 해당 변경된 부분을 페이지단위로 발생하는 더티비트정보가 있다. 따라서 상기 더티비트를 참조하다가 더티비트 변경이 있고, 상기 변경된 더티비트가 가리키는 페이지가 본 발명에서 감시하는 영역내의 페이지라면 상기 S370단계에서 다시 S350단계로 돌아가면서 다음 페이지로 이동하지 않고, 상기 더티비트가 가리키는 페이지로 바로 넘어가서 S350단계 및 S360단계를 수행하면 된다.First of all, you can refer to the dirty bit information supported by the operating system. In other words, at the kernel level of the operating system, whenever a memory change occurs, there is dirty bit information that generates the changed part in units of pages. Therefore, if there is a dirty bit change while referring to the dirty bit, and if the page indicated by the changed dirty bit is a page in the area monitored by the present invention, the dirty bit does not move to the next page from step S370 to step S350 again, Go directly to the page pointed to by performing steps S350 and S360.

그 다음 방법으로는 운영체제의 응용레벨에서 메모리속성을 변경하는 API를 이용하는 방법이다. 일반적으로 메모리상의 코드영역은 읽기전용(Read Only)의 속 성을 가진다. 따라서 해커가 상기 메모리상의 코드영역의 내용을 조작하기 위해서 상기 코드영역의 쓰기속성으로 변경이 필요하다. 따라서 상기 메모리속성을 변경하는 API함수를 후킹하여, 해커가 상기 API함수를 사용시 해당 함수의 인수등을 참조하여 어떤 페이지의 속성을 변경했는지를 알아낼 수 있다. The next method is to use APIs to change memory attributes at the application level of the operating system. In general, the code area in memory has the property of Read Only. Therefore, in order for a hacker to manipulate the contents of the code area on the memory, it is necessary to change the write property of the code area. Therefore, by hooking an API function that changes the memory property, a hacker can find out which page property is changed by referring to the argument of the function when using the API function.

상기 속성이 변경된 페이지가 본 발명에서 감시하는 영역내의 페이지라면, 상기 S370단계에서 다시 S350단계로 돌아가면서 다음 페이지로 이동하지 않고, 상기 속성이 변경된 페이지로 바로 넘어가서 S350단계 및 S360단계를 수행하면 된다.If the page whose property is changed is a page within the area monitored by the present invention, if the property is changed to the page where the property is changed and the steps S350 and S360 are performed without returning to step S350, the process returns to step S350. do.

한편 본 실시예에서 S360단계에서 원본CRC코드와 메모리CRC코드를 비교하는데, 이 때 원본CRC코드는 메모리상에 존재하는 원본CRC코드도 가능하고, 때에 따라서는 파일에서 원본CRC코드를 읽어와서 비교하는 것 역시도 가능하다. 즉 원본CRC코드는 S320단계에서 실행파일자체에 저장되어 있으며, 이후 S330단계를 거쳐서 해당 실행파일이 메모리에 로드된 메모리상코드에도 존재한다. 메모리상로드될 때, 상기 원본CRC코드는 그대로 매핑되므로 어느것을 사용해도 무방하다.Meanwhile, in the present embodiment, the original CRC code and the memory CRC code are compared in step S360. In this case, the original CRC code may be an original CRC code existing in the memory. It is also possible. That is, the original CRC code is stored in the executable file itself in step S320, and then exists in the memory code loaded in the memory in step S330. When loaded into memory, the original CRC code is mapped as it is, so any one may be used.

다만 최근들어 실행파일들에 경우에는 배포단계에서 패킹되는 경우가 많은 바, 만약 실행파일이 S320단계 이후에 패킹된 경우라면, 메모리상코드에 있는 원본CRC코드를 사용한다.Recently, however, the executable files are often packed at the distribution stage. If the executable files are packed after the S320 step, the original CRC code in the memory code is used.

지금까지 바람직한 실시예에 따른 메모리 조작유무를 감지하는 방법에 대해서 설명하였다.So far, the method of detecting the presence or absence of a memory operation according to an exemplary embodiment has been described.

본 실시예에서는 실행파일을 예로 들었으나, 이는 일 실시예에 불과하다. 따라서 실행파일 이외에도 DLL과 같은 파일도 보호대상 파일로서 적용될 수 있음은 물론이다.In the present embodiment, an executable file is taken as an example, but this is only an example. Therefore, besides the executable file, a file such as a DLL can be applied as a file to be protected.

또한 본 실시예에서는 상기 확인을 위한 코드값의 일 예로서 CRC값을 들었으나, 이에 한정되는 것은 아니다.In addition, in the present embodiment, a CRC value is cited as an example of the code value for the check, but is not limited thereto.

따라서 이외에도 체크섬(Check Sum)데이터, 해시(Hash) 값, 각종 명령어, 그리고 인스트럭션(Instruction) 및 오퍼랜드(Operand)를 포함한 고유 값 등 그 어느것이라도 해당데이터블럭의 변경여부를 알아낼 수 있는 알고리즘이면 본 발명의 적용이 가능함은 물론이다.Therefore, in addition to the checksum data, hash value, various instructions, and unique values including instructions and operands, the present invention is an algorithm that can determine whether the corresponding data block has been changed. Of course, it is possible to apply.

또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.In addition, although the preferred embodiment of the present invention has been shown and described above, the present invention is not limited to the specific embodiments described above, but the technical field to which the invention belongs without departing from the spirit of the invention claimed in the claims. Of course, various modifications can be made by those skilled in the art, and these modifications should not be individually understood from the technical spirit or the prospect of the present invention.

도1은 본 발명의 일 실시예에 따른 메모리 조작유무 감지장치의 블록도,1 is a block diagram of a memory operation presence detection device according to an embodiment of the present invention;

도2는 본 발명의 설명을 위해 파일영역의 일 예를 도시한 도면, 및2 is a view showing an example of a file area for explaining the present invention; and

도3은 본 발명의 일 실시예에 따른 메모리 조작유무를 감지하는 방법의 설명에 사용되는 흐름도이다.3 is a flowchart used to explain a method of detecting the presence or absence of a memory operation according to an exemplary embodiment of the present invention.

* 도면의 주요 부분에 대한 부호의 설명 *Explanation of symbols on the main parts of the drawings

100 : 조작유무 감지장치 110 : 감지기능수행모듈100: operation presence detection device 110: detection function performance module

112 : 원본CRC리딩모듈 114 : 메모리CRC생성모듈112: original CRC reading module 114: memory CRC generation module

116 : CRC비교모듈 120 : 원본CRC삽입모듈116: CRC comparison module 120: original CRC insertion module

Claims (19)

보호대상 파일에 포함되는 데이터를 제1처리대상데이터로 하여, 상기 제1처리대상데이터를 처리하여 원본확인코드를 생성하는 원본확인코드 생성단계;An original identification code generation step of generating the original identification code by processing the first processing target data using the data included in the file to be protected as the first processing target data; 상기 생성된 원본확인코드를 상기 보호대상 파일에 삽입하는 원본확인코드 삽입단계;An original identification code insertion step of inserting the generated original identification code into the protected file; 상기 원본확인코드가 삽입된 보호대상 파일이 메모리상에 로드되는 보호대상파일 로드단계;A protected file loading step in which the protected file to which the original confirmation code is inserted is loaded onto a memory; 상기 보호대상 파일이 메모리에 로드된 메모리상의 데이터를 제2처리대상데이터로 하여, 기정해진 주기별로 상기 제2처리대상데이터를 처리하여 메모리확인코드를 생성하는 메모리확인코드 생성단계; 및A memory confirmation code generating step of generating a memory confirmation code by processing the second processing target data at predetermined intervals using the data on the memory loaded with the protection target file as a second processing target data; And 상기 원본확인코드와 상기 메모리확인코드를 비교하는 확인코드 비교단계;를 포함하는 메모리 조작유무를 감지하는 방법.And a verification code comparing step of comparing the original identification code with the memory identification code. 제1항에 있어서The method of claim 1 상기 보호대상 파일은 실행파일이고,The protected file is an executable file, 상기 원본확인코드 생성단계는The original verification code generation step CRC알고리즘을 이용하여 상기 제1처리대상데이터를 처리하여 원본확인코드를 생성하는 것을 특징으로 하며,Characterized in that to generate the original verification code by processing the first processing target data using a CRC algorithm, 상기 메모리확인코드 생성단계는 The memory verification code generation step 상기 원본확인코드 생성단계에서 사용된 CRC알고리즘과 동일한 알고리즘을 이용하여, 상기 제2처리대상데이터를 처리하여 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무를 감지하는 방법.And generating a memory confirmation code by processing the second processing target data using the same algorithm as the CRC algorithm used in the original confirmation code generation step. 제1항에 있어서The method of claim 1 상기 원본확인코드 생성단계는The original verification code generation step 상기 보호대상파일에서 코드섹션을 추출하고, 상기 추출된 코드섹션에 포함되는 데이터를 제1처리대상데이터로 하여, 상기 제1처리대상데이터를 처리하여 원본확인코드를 생성하는 것을 특징으로 하며,Extracting a code section from the protected file, and using the data included in the extracted code section as first processing data, processing the first processing data to generate an original identification code; 상기 메모리확인코드 생성단계는The memory verification code generation step 상기 메모리상의 데이터에서 코드섹션을 추출하고, 상기 추출된 코드섹션에 포함되는 데이터를 제2처리대상데이터로 하여, 기 정해진 주기별로 상기 제2처리대상데이터를 처리하여 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무를 감지하는 방법.Extracting a code section from the data on the memory, and using the data included in the extracted code section as second processing target data, processing the second processing target data at predetermined intervals to generate a memory verification code; To detect the presence of memory operations. 제1항에 있어서 The method of claim 1 상기 원본확인코드 생성단계는The original verification code generation step 상기 제1처리대상데이터를 기정해진 블록단위로 처리하여 원본확인코드를 생성하는 것을 특징으로 하며,Characterizing the first processing target data in a predetermined block unit to generate an original confirmation code, 상기 메모리확인코드 생성단계는The memory verification code generation step 상기 원본확인코드 생성단계의 상기 기정해진 블록단위와 동일한 단위로, 상기 제2처리대상데이터를 처리하여 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무를 감지하는 방법.And processing the second processing target data in the same unit as the predetermined block unit of the original confirmation code generation step to generate a memory confirmation code. 제4항에 있어서The method of claim 4 상기 기정해진 블록단위는 The predetermined block unit is 운영체제에서 관리하는 페이지단위인 것을 특징으로 하는 메모리 조작유무를 감지하는 방법.Method for detecting the presence of memory operation, characterized in that the page unit managed by the operating system. 제5항에 있어서The method of claim 5 커널레벨에서 더티비트(Dirty-bit) 정보를 실시간으로 감시하는 더티비트감시단계;A dirty bit monitoring step of monitoring dirty bit information in real time at a kernel level; 특정 더티비트(Dirty-bit)정보가 변경된 경우, 상기 변경된 더티비트(Dirty-bit)와 대응되는 페이지를 추출하는 변경페이지추출단계; 및A change page extraction step of extracting a page corresponding to the changed dirty bit when specific dirty bit information is changed; And 상기 추출된 페이지가 상기 제2처리대상데이터를 포함하고 있는지 여부를 검 사하는 단계;를 더 포함하고,And checking whether the extracted page includes the second processing target data. 상기 메모리확인코드 생성단계는,The memory verification code generation step, 상기 추출된 페이지가 상기 제2처리대상데이터를 포함하고 있는 경우, 상기 추출된 페이지에 포함된 데이터에 대해서 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무를 감지하는 방법.And if the extracted page includes the second processing target data, generating a memory check code for the data included in the extracted page. 제5항에 있어서The method of claim 5 메모리속성을 변경하는 API함수인 속성변경API함수를 후킹하는 후킹단계; 및 Hooking a hooking property change API function which is an API function to change a memory property; And 상기 속성변경API함수를 이용하여 메모리의 속성이 변경된 것이 감지된 경우, 상기 속성변경API함수의 인수를 참조하여 속성이 변경된 페이지를 추출하는 변경페이지추출단계;를 더 포함하고And a change page extraction step of extracting a page whose property is changed by referring to an argument of the property change API function when it is detected that the property of the memory is changed by using the property change API function. 상기 메모리확인코드 생성단계는The memory verification code generation step 상기 추출된 페이지가 상기 제2처리대상데이터를 포함하고 있는 경우, 상기 추출된 페이지에 포함된 데이터에 대해서 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무를 감지하는 방법.And if the extracted page includes the second processing target data, generating a memory check code for the data included in the extracted page. 제7항에 있어서The method of claim 7, 상기 속성변경API함수는 The attribute change API function is Kernel32.dll의 VirtualProtect함수인 것을 특징으로 하는 메모리 조작유무를 감지하는 방법.Kernel32.dll is a VirtualProtect function that detects the presence of memory manipulations. 제1항에 있어서The method of claim 1 상기 원본확인코드 삽입단계는Inserting the original confirmation code is 상기 보호대상 파일에 포함된 다수의 섹션 각각의 영역 중 데이터에 의하여 점유되지 않은 비점유 영역을 검출하는 비점유영역 검출단계; 및A non-occupied area detecting step of detecting a non-occupied area not occupied by data among the areas of each of the plurality of sections included in the protected file; And 상기 검출된 비점유영역에 상기 원본확인코드를 삽입하는 단계를 포함하는 것을 특징으로 하는 메모리 조작유무를 감지하는 방법.And inserting the original identification code into the detected non-occupied area. 보호대상파일이 메모리에 로드된 이후 조작이 되었는지 여부를 감지하는 기능을 수행하는 메모리 조작유무 감지장치에 있어서,In the memory operation detection device that detects whether the operation has been performed after the protected file is loaded in the memory, 상기 보호대상파일에 기삽입된 원본확인코드를 추출하는 원본CRC리딩모듈;An original CRC reading module for extracting an original confirmation code previously inserted into the protected file; 상기 보호대상파일이 메모리상에 로드된 이후, 상기 보호대상 파일이 메모리에 로드된 메모리상의 데이터를 제2처리대상데이터로 하여, 기정해진 주기별로 상기 제2처리대상데이터를 처리하여 메모리확인코드를 생성하는 메모리CRC생성모듈; 및After the file to be protected is loaded on the memory, the second object to be processed is processed at predetermined intervals using the data on the memory to which the file to be protected is loaded into the memory. A memory CRC generation module for generating; And 상기 생성된 메모리확인코드와 상기 추출된 원본확인코드를 비교하는 CRC비 교모듈을 포함하는 것을 특징으로 하는 메모리 조작유무 감지장치.And a CRC comparison module for comparing the generated memory check code with the extracted original check code. 제 10항에 있어서The method of claim 10 상기 보호대상 파일에 포함되는 데이터를 제1처리대상데이터로 하여, 상기 제1처리대상데이터를 처리하여 원본확인코드를 생성하고, By using the data included in the protected object file as the first processing target data, the first processing target data is processed to generate an original confirmation code, 상기 생성된 원본확인코드를 상기 보호대상 파일에 삽입하는 원본CRC삽입모듈;을 더 포함하는 것을 특징으로 하는 메모리 조작유무 감지장치.And an original CRC insertion module for inserting the generated original identification code into the protection target file. 제10항에 있어서The method of claim 10 상기 원본CRC리딩모듈, 상기 메모리CRC생성모듈 및 상기 CRC비교모듈은 상기 보호대상 파일이 메모리상에 로드시와 동시에 메모리에 로딩되는 것을 특징으로 하는 메모리 조작유무 감지장치.And the original CRC reading module, the memory CRC generating module, and the CRC comparing module are loaded into the memory at the same time when the protected file is loaded into the memory. 제11항에 있어서The method of claim 11, 상기 원본CRC삽입모듈은The original CRC insertion module 상기 보호대상파일에서 코드섹션을 추출하고, 상기 추출된 코드섹션에 포함되는 데이터를 제1처리대상데이터로 하여, 상기 제1처리대상데이터를 처리하여 원 본확인코드를 생성하는 것을 특징으로 하며,Extracting a code section from the file to be protected, and using the data included in the extracted code section as first processing target data, processing the first processing target data to generate an original verification code, 상기 메모리CRC생성모듈은The memory CRC generation module 상기 메모리상의 데이터에서 코드섹션을 추출하고, 상기 추출된 코드섹션에 포함되는 데이터를 제2처리대상데이터로 하여, 기 정해진 주기별로 상기 제2처리대상데이터를 처리하여 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무 감지장치.Extracting a code section from the data on the memory, and using the data included in the extracted code section as second processing target data, processing the second processing target data at predetermined intervals to generate a memory verification code; Memory operation presence sensing device. 제11항에 있어서The method of claim 11, 상기 원본CRC삽입모듈은The original CRC insertion module 상기 제1처리대상데이터를 기정해진 블록단위로 처리하여 원본확인코드를 생성하는 것을 특징으로 하며,Characterizing the first processing target data in a predetermined block unit to generate an original confirmation code, 상기 메모리CRC생성모듈은The memory CRC generation module 상기 원본확인코드 생성단계의 상기 기정해진 블록단위와 동일한 단위로, 상기 제2처리대상데이터를 처리하여 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무 감지장치.And a memory operation code generating unit for generating a memory confirmation code by processing the second processing target data in the same unit as the predetermined block unit of the original confirmation code generation step. 제14항에 있어서The method of claim 14, 상기 데이터 블록단위는 The data block unit is 운영체제에서 관리하는 페이지단위인 것을 특징으로 하는 메모리 조작유무 감지장치.Memory operation presence detection device, characterized in that the page unit managed by the operating system. 제15항에 있어서The method of claim 15 커널레벨에서 더티비트(Dirty-bit) 정보를 실시간으로 감시하는 더티비트(Dirty-bit)감지모듈을 더 포함하며,It further includes a dirty bit detection module for monitoring dirty bit information in real time at the kernel level. 상기 메모리CRC생성모듈은 The memory CRC generation module 특정 더티비트(Dirty-bit)정보가 변경된 경우, 상기 변경된 더티비트(Dirty-bit)와 대응되는 페이지를 추출하고, 상기 추출된 페이지가 상기 제2처리대상데이터를 포함하고 있는 경우, 상기 추출된 페이지에 포함된 데이터에 대해서 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무 감지장치.When specific dirty-bit information is changed, the page corresponding to the changed dirty-bit is extracted, and when the extracted page includes the second processing target data, the extracted And a memory operation code detecting device for generating a memory check code for the data contained in the page. 제15항에 있어서The method of claim 15 메모리속성을 변경하는 API함수인 속성변경API함수를 후킹한 후, 상기 속성변경API함수를 이용하여 메모리의 속성이 변경된 것이 감지된 경우, 상기 속성변경API함수의 인수를 참조하여 속성이 변경된 페이지를 추출하는 변경페이지검색모듈을 더 포함하고,After hooking an attribute change API function, which is an API function for changing a memory attribute, and detecting that an attribute of a memory is changed using the attribute change API function, the page whose attribute is changed is referred to by referring to the argument of the attribute change API function. It further includes a change page search module to extract, 상기 메모리CRC생성모듈은 The memory CRC generation module 상기 속성이 변경된 페이지에 포함된 데이터에 대해서 메모리확인코드를 생성하는 것을 특징으로 하는 메모리 조작유무 감지장치.And a memory check code for generating data included in the page whose attribute is changed. 보호대상 파일이 메모리상에 로드된 경우, 상기 보호대상 파일이 메모리에 로드된 메모리상의 데이터를 처리대상데이터로 하여, 기정해진 주기별로 상기 처리대상데이터를 기 정해진 블록단위로 처리하여 메모리확인코드를 생성하는 메모리확인코드 생성 단계;When the file to be protected is loaded on the memory, the data on the memory loaded into the memory as the data to be processed is processed, and the memory verification code is processed by processing the data to be processed in predetermined block units at predetermined intervals. Generating a memory check code; 상기 보호대상 파일에 기삽입된 원본확인코드를 추출하는 단계; 및Extracting an original confirmation code pre-inserted into the protected file; And 상기 추출된 원본확인코드와 상기 생성된 메모리확인코드를 비교하는 단계를 수행하는 프로그램이 저장된 저장매체.A storage medium storing a program for performing the step of comparing the extracted original identification code with the generated memory identification code. 각각 저장 영역을 구비하는 다수의 섹션을 포함하는 보호대상 파일을 선택하는 보호대상 파일 선택 단계;A protected file selecting step of selecting a protected file including a plurality of sections each having a storage area; 상기 다수의 섹션 중 코드 섹션을 추출하는 코드 섹션 추출 단계;A code section extracting step of extracting a code section among the plurality of sections; 상기 코드 섹션 추출 단계에서 추출된 상기 코드 섹션에 구비된 상기 저장 영역을 점유하는 데이터를 처리 대상 데이터로 하여 기 정해진 블록단위로 처리하여 원본확인코드를 생성하는 원본확인코드 생성 단계;An original identification code generation step of generating an original identification code by processing the data occupying the storage area included in the code section extracted in the code section extraction step as a processing target data in a predetermined block unit; 상기 보호대상 파일에 포함된 상기 다수의 섹션 각각의 상기 저장 영역 중 데이터에 의하여 점유되지 않은 비점유 저장 영역을 검출하는 비점유 저장 영역 검출 단계; 및A non-occupied storage area detecting step of detecting an unoccupied storage area not occupied by data among the storage areas of each of the plurality of sections included in the protected file; And 상기 검출된 비점유 저장 영역에 상기 원본확인코드를 삽입하는 단계를 수행하는 프로그램이 저장된 기록매체.And a program storing a program for inserting the original confirmation code into the detected non-occupied storage area.
KR1020090019406A 2009-03-06 2009-03-06 Method for detecting presence of memory operation and device using same KR101052735B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090019406A KR101052735B1 (en) 2009-03-06 2009-03-06 Method for detecting presence of memory operation and device using same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090019406A KR101052735B1 (en) 2009-03-06 2009-03-06 Method for detecting presence of memory operation and device using same

Publications (2)

Publication Number Publication Date
KR20100100488A true KR20100100488A (en) 2010-09-15
KR101052735B1 KR101052735B1 (en) 2011-07-29

Family

ID=43006560

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090019406A KR101052735B1 (en) 2009-03-06 2009-03-06 Method for detecting presence of memory operation and device using same

Country Status (1)

Country Link
KR (1) KR101052735B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013100476A1 (en) * 2011-12-30 2013-07-04 (주)네오위즈게임즈 Client terminal, monitoring server, and method of preventing monitored area from becoming altered
WO2014185627A1 (en) * 2013-05-15 2014-11-20 소프트캠프(주) Data processing system security device and security method
WO2022235069A1 (en) * 2021-05-07 2022-11-10 윤여을 Server and method for accounting fraud detection, and recording medium on which command is recorded

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100681696B1 (en) * 2004-11-29 2007-02-15 주식회사 안철수연구소 Method for preventing from inventing data of memory in a computer application program
KR20060067584A (en) * 2004-12-15 2006-06-20 삼성전자주식회사 Smart card having hacking prevention function
KR100663034B1 (en) * 2005-12-26 2007-01-02 주식회사 안철수연구소 Method and system for detecting change of code in memory
KR101197556B1 (en) * 2006-01-09 2012-11-09 삼성전자주식회사 Device and method capable of verifying program operation of non-volatile memory and memory card including the same

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013100476A1 (en) * 2011-12-30 2013-07-04 (주)네오위즈게임즈 Client terminal, monitoring server, and method of preventing monitored area from becoming altered
WO2014185627A1 (en) * 2013-05-15 2014-11-20 소프트캠프(주) Data processing system security device and security method
KR101500512B1 (en) * 2013-05-15 2015-03-18 소프트캠프(주) Device and method for securing computer
CN105229658A (en) * 2013-05-15 2016-01-06 软件营地株式会社 The safety feature of data handling system and safety method
US9990493B2 (en) 2013-05-15 2018-06-05 Softcamp Co., Ltd. Data processing system security device and security method
WO2022235069A1 (en) * 2021-05-07 2022-11-10 윤여을 Server and method for accounting fraud detection, and recording medium on which command is recorded
KR20220152120A (en) * 2021-05-07 2022-11-15 윤여을 Server, method and recording medium storing instructions for accounting fraud detection

Also Published As

Publication number Publication date
KR101052735B1 (en) 2011-07-29

Similar Documents

Publication Publication Date Title
Jeong et al. Generic unpacking using entropy analysis
JP6494744B2 (en) Transparent detection and extraction of return-oriented programming attacks
JP5458184B2 (en) System and method for aggressive automatic correction in a dynamic function call system
US8176559B2 (en) Obfuscated malware detection
CN109583200B (en) Program abnormity analysis method based on dynamic taint propagation
KR102415971B1 (en) Apparatus and Method for Recognizing Vicious Mobile App
US20160275019A1 (en) Method and apparatus for protecting dynamic libraries
EP3779745A1 (en) Code pointer authentication for hardware flow control
US20160196427A1 (en) System and Method for Detecting Branch Oriented Programming Anomalies
CN109271789B (en) Malicious process detection method and device, electronic equipment and storage medium
US20160171213A1 (en) Apparatus and method for controlling instruction execution to prevent illegal accesses to a computer
CN109388946A (en) Malicious process detection method, device, electronic equipment and storage medium
CN110717181B (en) Non-control data attack detection method and device based on novel program dependency graph
US11176060B2 (en) Dynamic memory protection
US11868465B2 (en) Binary image stack cookie protection
KR101052735B1 (en) Method for detecting presence of memory operation and device using same
CN109472135B (en) Method, device and storage medium for detecting process injection
JP5549810B2 (en) Program obfuscation device, program control device, program obfuscation method, and program
KR101842263B1 (en) Method and apparatus for preventing reverse engineering
CN104680043A (en) Method and device for protecting executable file
Jurn et al. A survey of automated root cause analysis of software vulnerability
CN114637988A (en) Binary-oriented function level software randomization method
KR101421630B1 (en) system and method for detecting code-injected malicious code
JP5177206B2 (en) Software falsification detection device and falsification detection method
CN107239703B (en) Dynamic analysis method for executable program with dynamic link library missing

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20140725

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20150727

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20160725

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20170725

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20180725

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20190725

Year of fee payment: 9