KR102005107B1 - Method and Apparatus for Analyzing Malicious Code Using API Call Sequence - Google Patents

Method and Apparatus for Analyzing Malicious Code Using API Call Sequence Download PDF

Info

Publication number
KR102005107B1
KR102005107B1 KR1020190011060A KR20190011060A KR102005107B1 KR 102005107 B1 KR102005107 B1 KR 102005107B1 KR 1020190011060 A KR1020190011060 A KR 1020190011060A KR 20190011060 A KR20190011060 A KR 20190011060A KR 102005107 B1 KR102005107 B1 KR 102005107B1
Authority
KR
South Korea
Prior art keywords
action
information
function
malicious code
level
Prior art date
Application number
KR1020190011060A
Other languages
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 KR1020190011060A priority Critical patent/KR102005107B1/en
Application granted granted Critical
Publication of KR102005107B1 publication Critical patent/KR102005107B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/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/56Computer malware detection or handling, e.g. anti-virus arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

According to embodiments of the present invention, provided is an apparatus for analyzing a function of a malicious code, which abstracts lower level first behavior information into higher level second behavior information based on an action rule defined in consideration of parameters used in the API call and is capable of predicting the main purpose or core functions of a malicious code by estimating function information from the higher level second behavior information based on a function rule in accordance with the sequence.

Description

API 호출 시퀀스를 이용한 악성코드의 기능 분석 방법 및 장치 {Method and Apparatus for Analyzing Malicious Code Using API Call Sequence}TECHNICAL FIELD The present invention relates to a method and apparatus for analyzing malicious code using an API call sequence,

본 발명이 속하는 기술 분야는 악성코드의 목적 또는 핵심 기능을 예측하는 방법 및 장치에 관한 것이다.The technical field to which the present invention pertains is a method and apparatus for predicting the purpose or core function of malicious code.

이 부분에 기술된 내용은 단순히 본 실시예에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The contents described in this section merely provide background information on the present embodiment and do not constitute the prior art.

정보화 기술이 발달함에 따라 네트워크 및 시스템에 대한 의존도가 증가하고 있으며 그에 따른 보안의 중요성도 커지고 있다. 사이버 공격자는 자신의 특정 목적을 달성하기 위하여 공격 대상 네트워크 및 시스템에 내재된 취약점을 이용하여 교묘하고 지능화된 해킹기술로 공격을 행하고 있다. 이에 따라 네트워크 및 시스템에 내재된 취약성의 탐지를 위한 취약성 분석도구나 위험 분석도구와 같은 자동화 도구들이 개발되고 있으며, 사이버 공격의 특징, 패턴, 유형 등에 대한 연구와 이에 따른 대응기술에 관한 연구가 활발히 진행되고 있다.As information technology is developed, reliance on networks and systems is increasing and security is becoming more important. Cyber attackers are attacking with clever and intelligent hacking techniques using vulnerabilities inherent in the targeted network and system to achieve their specific purpose. Therefore, automation tools such as vulnerability analysis tools and risk analysis tools are being developed to detect vulnerabilities inherent in networks and systems, and studies on the features, patterns, and types of cyber attacks and their countermeasures are actively pursued. It is progressing.

사이버 인프라를 이용하는 국방 등의 산업 분야에서 사이버 위협 인텔리전스(Cyber Threat Intelligence) 시스템을 구축할 필요가 있고, 기존 악성코드로부터 위협뿐만 아니라 알려지지 않은 악성코드에 신속하게 대응하기 위해서는 악성코드가 어떤 목적을 가지고 동작하는지 파악할 필요가 있다.In order to respond to not only threats but also unknown malicious codes from existing malicious codes, it is necessary to establish a cyber threat intelligence system in industrial fields such as defense using cyber infrastructure. You need to know if it works.

한국등록특허공보 제10-1589656호 (2016.01.28.)Korean Patent Registration No. 10-1589656 (Jan. 28, 2016) 한국등록특허공보 제10-1537088호 (2015.07.15.)Korean Registered Patent No. 10-1537088 (July 15, 2015)

본 발명의 실시예들은 API 호출에 사용되는 매개변수를 고려하여 정의된 액션 룰을 기준으로 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화하고, 시퀀스에 따른 기능 룰을 기준으로 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정함으로써, 악성코드의 주요 목적 또는 핵심 기능을 예측하는 데 발명의 주된 목적이 있다.The embodiments of the present invention abstract the first action information of the lower level on the basis of the action rule defined in consideration of the parameter used in the API call as the second action information of the upper level, There is a main purpose of the invention in predicting the main purpose or core function of the malicious code by estimating the function information from the second level of action information of the upper level.

본 발명의 명시되지 않은 또 다른 목적들은 하기의 상세한 설명 및 그 효과로부터 용이하게 추론할 수 있는 범위 내에서 추가적으로 고려될 수 있다.Other and further objects, which are not to be described, may be further considered within the scope of the following detailed description and easily deduced from the effects thereof.

본 실시예의 일 측면에 의하면, 하나 이상의 프로세서, 및 상기 하나 이상의 프로세서에 의해 실행되는 하나 이상의 프로그램을 저장하는 메모리를 포함하며, 상기 프로세서는 악성코드를 분석하여 하위 레벨의 제1 행위 정보를 추출하고, 기 설정된 액션 룰을 기준으로 상기 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화하고, 기 설정된 기능 룰을 기준으로 상기 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정하는 것을 특징으로 하는 악성코드의 기능 추정 장치를 제공한다.According to an aspect of this embodiment, there is provided a computer program product comprising at least one processor and a memory for storing one or more programs executed by the one or more processors, the processor analyzing the malicious code to extract first- , Abstracting the first action information of the lower level with the second action information of the higher level on the basis of the predetermined action rule and estimating the function information from the second action information of the higher level on the basis of the predetermined function rule A malicious code function estimating device is provided.

본 실시예의 다른 측면에 의하면, 프로세서에 의해 실행 가능한 컴퓨터 프로그램 명령어들을 포함하는 컴퓨터 판독 가능한 저장매체에 기록된 컴퓨터 프로그램으로서, 상기 컴퓨터 프로그램 명령어들이 컴퓨팅 디바이스의 적어도 하나의 프로세서에 의해 실행되는 경우에, 악성코드를 분석하여 하위 레벨의 제1 행위 정보를 추출하는 단계, 기 설정된 액션 룰을 기준으로 상기 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화하는 단계, 및 기 설정된 기능 룰을 기준으로 상기 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정하는 단계를 포함한 동작들을 수행하는 컴퓨터 프로그램을 제공한다.According to another aspect of this embodiment, there is provided a computer program recorded on a computer-readable storage medium including computer program instructions executable by a processor, wherein, when the computer program instructions are executed by at least one processor of the computing device, Analyzing the malicious code to extract first action information of a lower level, abstracting the first action information of the lower level into second action information of a higher level based on a predetermined action rule, And estimating function information from the second-level second action information on the basis of the second action information.

이상에서 설명한 바와 같이 본 발명의 실시예들에 의하면, API 호출에 사용되는 매개변수를 고려하여 정의된 액션 룰을 기준으로 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화하고, 시퀀스에 따른 기능 룰을 기준으로 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정함으로써, 악성코드의 주요 목적 또는 핵심 기능을 예측할 수 있고, 다른 API를 호출한 변종 악성코드에 대하여 동일 기능을 수행하는지 여부를 판단할 수 있다.As described above, according to the embodiments of the present invention, the first action information of the lower level is abstracted as the second action information of the upper level based on the action rule defined by considering the parameters used in the API call, It is possible to predict the main purpose or core function of the malicious code by estimating the function information from the second level of action information based on the function rule according to the sequence and to perform the same function with respect to the variant malicious code calling another API Can be determined.

여기에서 명시적으로 언급되지 않은 효과라 하더라도, 본 발명의 기술적 특징에 의해 기대되는 이하의 명세서에서 기재된 효과 및 그 잠정적인 효과는 본 발명의 명세서에 기재된 것과 같이 취급된다.Even if the effects are not expressly mentioned here, the effects described in the following specification which are expected by the technical characteristics of the present invention and their potential effects are handled as described in the specification of the present invention.

도 1 및 도 2는 본 발명의 일 실시예에 따른 악성코드의 기능 분석 장치의 동작을 예시한 도면이다.
도 3은 본 발명의 일 실시예에 따른 악성코드의 기능 분석 장치의 악성코드분석 모듈이 악성코드데이터베이스에 저장한 데이터를 예시한 도면이다.
도 4는 발명의 일 실시예에 따른 악성코드의 기능 분석 장치의 행위 추상화 모듈을 예시한 도면이다.
도 5는 발명의 일 실시예에 따른 악성코드의 기능 분석 장치의 기능 추정 모듈을 예시한 도면이다.
도 6은 발명의 일 실시예에 따른 악성코드의 기능 분석 장치가 정의한 악성코드기능을 예시한 도면이다.
도 7 내지 도 11은 발명의 일 실시예에 따른 악성코드의 기능 분석 장치가 각각의 악성코드의 기본 행위에 관하여 정의한 제2 시퀀스를 예시한 도면이다.
도 12는 발명의 일 실시예에 따른 악성코드의 기능 분석 장치가 제1 시퀀스를 이용하여 행위의 유사도를 측정하는 것을 예시한 도면이다.
도 13은 예시적인 실시예들에서 사용되기에 적합한 컴퓨팅 디바이스를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다.
FIG. 1 and FIG. 2 are views illustrating operations of a malicious code function analyzing apparatus according to an embodiment of the present invention.
3 is a diagram illustrating data stored in a malicious code database by a malicious code analysis module of a malicious code function analyzing apparatus according to an embodiment of the present invention.
4 is a diagram illustrating an action abstraction module of a malicious code function analyzing apparatus according to an embodiment of the present invention.
5 is a diagram illustrating a function estimation module of a malicious code function analysis apparatus according to an embodiment of the present invention.
6 is a diagram illustrating a malicious code function defined by a malicious code function analyzing apparatus according to an embodiment of the present invention.
FIGS. 7 to 11 are diagrams illustrating a second sequence defined by a malicious code function analyzing apparatus according to an embodiment of the present invention with respect to a basic behavior of each malicious code. FIG.
FIG. 12 is a diagram illustrating a malicious code function analyzing apparatus according to an embodiment of the present invention for measuring the similarity of an action using a first sequence; FIG.
13 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in the exemplary embodiments.

이하, 본 발명을 설명함에 있어서 관련된 공지기능에 대하여 이 분야의 기술자에게 자명한 사항으로서 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하고, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. Will be described in detail with reference to exemplary drawings.

기존의 악성코드분석 방법은 개별 API(Application Programming Interface) 호출 여부만을 확인하여 악성코드의 단편적인 행위 정보만을 이용한다. API 호출 정보만을 이용하는 경우 해당 API를 호출하는 정상 프로그램에 대해서 오탐을 발생시킬 위험이 높고, 동일한 행위를 수행하지만 다른 API를 호출하는 경우에 동일한 행위 정보로 판단하기 어려운 문제가 있다.The existing malicious code analysis method uses only piecemeal behavior information of malicious code by checking only whether individual API (Application Programming Interface) is called. When using only API call information, there is a high risk of generating a false positive for a normal program calling the API, and there is a problem that it is difficult to determine the same behavior information when performing the same action but calling another API.

본 실시예들은 악성코드의 행위 정보를 기반으로 악성코드의 최종 목적인 핵심 기능을 파악하여 악성코드의 동작을 파악하고 효과적으로 악성코드에 대응할 수 있도록 정보를 제공한다.The embodiments of the present invention are based on the malicious code's behavior information, and grasp the malicious code's core function as the final purpose of the malicious code to grasp the operation of the malicious code and provide information to effectively respond to the malicious code.

본 실시예들은 1차적으로 API 호출시 사용되는 매개변수 정보를 고려해 악성코드의 API 호출 데이터(제1 행위 정보)를 기본 행위 정보로 추상화하고, 추상화된 기본 행위 정보(제2 행위 정보)의 시퀀스를 이용하여 악성코드의 주요 기능을 최종 판단한다.In the present embodiments, the API call data (first behavior information) of the malicious code is abstracted as the basic behavior information in consideration of the parameter information used at the time of the API call, and the sequence of the abstracted basic action information To determine the main function of the malicious code.

본 실시예들은 악성코드의 주요 행위들에 대해 행위 별로 기본 행위를 정의하여, 다른 API를 호출하더라도 그 목적과 의미를 분석하여 동일한 기본 행위로 추상화할 수 있으며, 이를 통해 유사한 API 호출을 이용하는 변종 악성코드에 대해서도 동일 기능을 수행하는 것으로 판단할 수 있다These embodiments can define a basic action for each malicious code and define a basic action for each malicious code. Even if another API is called, the purpose and meaning of the malicious code can be analyzed and abstracted into the same basic action. It can be judged that the code performs the same function

본 실시예들은 API의 호출 여부뿐만 아니라 API 호출에 쓰인 매개변수 정보를 이용해 해당 호출의 목적 및 의미를 담은 기본 행위 정보로 추상화한다. 예컨대, 동일한 파일 생성(create file) 행위라도 인터넷 관련 레지스트리키 파일 생성과 exe 실행 파일 등을 구분한다. 기본 행위 정보 사이의 유기적 관계(시퀀스)를 이용하여 악성코드의 기능을 분석한다.These embodiments abstract not only whether an API is called, but also basic action information that contains the purpose and meaning of the call using parameter information used in the API call. For example, even if the same file creation (create file) action is performed, an Internet related registry key file creation and an exe executable file are distinguished. The function of malicious code is analyzed by using organic relation (sequence) between basic action information.

본 명세서에서 사용된 용어를 정의하면 다음과 같다.The terms used in this specification are defined as follows.

API 호출 명령은 악성코드가 실행 중 호출하는 Windows API의 함수명과 호출시 사용되는 매개변수, 예컨대, 디렉토리 또는 파일의 경로, 레지스트리, 프로세스명 등의 연관 정보를 포함한다.The API call command includes the function name of the Windows API that the malicious code calls during execution and the parameters used in the call, such as the path of the directory or file, the registry, and the process name.

API 호출 시퀀스는 악성코드가 호출한 API들을 호출된 순서로 나열한 데이터이다. 순서는 시간의 흐름에 따르며 동시 또는 이시에 호출될 수 있고, 순차적 처리 또는 병렬적 처리를 포함할 수 있다.The API call sequence is data in which the APIs called by the malicious code are listed in the order in which they are called. The sequence follows the flow of time and can be called at the same time or at any time, and can include sequential processing or parallel processing.

기본 행위 정보는 API 호출 명령을 분석하여 특정 악성 행위를 나타내는 행위를 추상화한 정보이다. The basic action information is information obtained by abstracting an action indicating a specific malicious action by analyzing an API call command.

액션 룰은 API 호출 명령을 악성 행위로 추상화시키기 위해 정의한 룰로, 악성코드의 API 호출 정보가 정의된 룰과 일치하면 해당하는 행위를 수행하는 것으로 판단 기준을 제공한다.An action rule is a rule defined to abstract an API call command as a malicious action. If an API call information of the malicious code is consistent with a defined rule, the action rule provides a criterion for performing the corresponding action.

기본 행위 시퀀스는 액션 룰에 의해 추출된 기본 행위들을 시간 순으로 나열한 데이터, 이때 시간은 액션이 탐지된 API 호출 정보의 시간을 의미할 수 있다.The basic action sequence is data in which the basic actions extracted by the action rule are listed in chronological order, and the time may be the time of the API call information in which the action is detected.

기능 룰은 악성코드가 특정 기능을 포함하고 있는 경우 나타나는 기본 행위 시퀀스를 정의한 룰로, 액션 룰을 통해 추출된 기본 행위 시퀀스가 정의된 룰과 일치하면 해당하는 기능을 포함하는 것으로 판단 기준을 제공한다.A functional rule is a rule that defines a basic action sequence that appears when a malicious code includes a specific function. If the basic action sequence extracted through an action rule matches a defined rule, the functional rule includes a corresponding function and provides a judgment criterion.

도 1 및 도 2는 본 발명의 일 실시예에 따른 악성코드의 기능 분석 장치의 동작을 예시한 도면이다.FIG. 1 and FIG. 2 are views illustrating operations of a malicious code function analyzing apparatus according to an embodiment of the present invention.

악성코드의 기능 분석 장치는 하나 이상의 프로세서 및 하나 이상의 프로세서에 의해 실행되는 하나 이상의 프로그램을 저장하는 메모리를 포함할 수 있다. 프로세서는 악성코드분석 모듈(210), 행위 추상화 모듈(220), 기능 추정 모듈(230)의 동작을 제어할 수 있다.The malicious code's functional analysis apparatus may include one or more processors and a memory for storing one or more programs executed by the one or more processors. The processor may control operations of the malicious code analysis module 210, the behavior abstraction module 220, and the function estimation module 230.

도 1을 참조하면, 단계 S110에서 프로세서는 악성코드를 분석하여 하위 레벨의 제1 행위 정보를 추출한다. 단계 S120에서 프로세서는 기 설정된 액션 룰을 기준으로 상기 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화한다. 단계 S130에서 프로세서는 기 설정된 기능 룰을 기준으로 상기 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정한다.Referring to FIG. 1, in step S110, the processor analyzes malicious code and extracts first-level action information at a lower level. In step S120, the processor abstracts the first behavior information of the lower level based on the predetermined action rule as the second behavior information of the higher level. In step S130, the processor estimates the function information from the second-level second action information based on the predetermined function rule.

하위 레벨의 제1 행위 정보는 애플리케이션 프로그래밍 인터페이스(Application Programming Interface, API) 호출 명령에 관한 제1 시퀀스 및 매개변수를 포함한다.The lower level first behavior information includes a first sequence and parameters for an Application Programming Interface (API) call instruction.

상위 레벨의 제2 행위 정보는 하위 레벨의 제2 행위 정보를 추상화한 악성코드의 기본 행위를 순서에 따라 배치한 제2 시퀀스를 포함한다. 상위 레벨의 제2 행위 정보는 동일한 애플리케이션 프로그래밍 인터페이스 호출 명령을 판독하더라도 매개변수에 따라 다른 기본 행위로 해석될 수 있다.The second level of action information includes a second sequence in which the basic actions of the malicious code that abstracts the second action information of the lower level are arranged in order. The second level of action information of the upper level may be interpreted as another basic action according to the parameter even if the same application programming interface call instruction is read.

악성코드분석 모듈(210)은 입력 받은 악성코드샘플에 대하여 정적 분석 및/또는 동적 분석을 수행하여 행위 정보(윈도우 API 호출정보 및 매개변수)를 포함한 다양한 악성코드 정보를 추출한다.The malicious code analysis module 210 performs a static analysis and / or a dynamic analysis on the inputted malicious code samples to extract various types of malicious code information including behavior information (window API call information and parameters).

행위 추상화 모듈(220)은 API 함수 레벨의 행위 정보(윈도우 API 및 매개변수)를 악성코드의 기본 동작 단위인 기본 행위 정보로 추상화한다. 행위 추상화 모듈(220)은 악성코드의 행위 정보(윈도우 API 및 매개변수)를 이용하여 데이터베이스에 저장된 액션 룰을 통해 악성코드가 어떤 동작을 수행하는지를 나타내는 기본 행위 정보로 추상화한다. 추출된 행위(디버거 탐지, 크립토 키 생성, 파일 이동, 네트워크 연결, 시스템 정보 수집 등) 정보와 알려진 악성코드의 기능 정보를 이용하여 각 기능을 탐지할 수 있는 기본 행위 시퀀스(제2 시퀀스)를 정의하여 악성코드데이터베이스에 저장한다.The behavior abstraction module 220 abstracts the behavior information (API and parameters) of the API function level into basic action information, which is a basic operation unit of the malicious code. The behavior abstraction module 220 abstracts the malicious code into basic action information indicating an action of the malicious code through an action rule stored in the database using action information (window API and parameters) of the malicious code. Defines a basic action sequence (second sequence) that can detect each function using extracted information (debugger detection, crypto key generation, file movement, network connection, system information collection, etc.) And stores it in the malicious code database.

기능 추정 모듈(230)은 기본 행위 정보를 이용하여 악성코드의 주요 목표인 기능을 탐지한다. 기능 추정 모듈(230)은 추출된 기본 행위 정보를 이용하여 데이터베이스에 기능 별로 저장된 기본 행위 시퀀스와 비교를 통해 기본 행위 시퀀스가 일치하는 기능이 있는지 확인한다. The function estimation module 230 detects basic functions of the malicious code using the basic action information. The function estimation module 230 compares the basic action sequence stored in the database with the basic action sequence using the extracted basic action information to check whether the basic action sequence matches the basic action sequence.

도 3은 본 발명의 일 실시예에 따른 악성코드의 기능 분석 장치의 악성코드분석 모듈이 악성코드데이터베이스에 저장한 데이터를 예시한 도면이다.3 is a diagram illustrating data stored in a malicious code database by a malicious code analysis module of a malicious code function analyzing apparatus according to an embodiment of the present invention.

프로세서 또는 악성코드분석 모듈(210)은 악성코드를 실행하지 않고 테스트하는 정적 분석 또는 악성코드를 실행하여 테스트하는 동적 분석을 수행하여 하위 레벨의 행위 정보를 추출한다. 악성코드의 API 호출 정보(API 이름, 매개변수, 디렉토리, 파일, 레지스트리)를 추출하여 악성코드데이터베이스에 저장한다. The processor or malicious code analysis module 210 performs static analysis for testing without executing malicious code or dynamic analysis for testing by executing malicious code to extract lower level behavior information. Extracts API call information (API name, parameters, directory, file, registry) of malicious code and stores it in malicious code database.

도 3은 API 정보를 추출한 예시이다. 하나의 API당 하나의 행으로 도 3과 같이 저장된다. API 외에 파일과 레지스트리 등의 정보도 각각 하나의 행으로 함께 저장된다.3 is an example of extracting the API information. 3 as one row per API. In addition to the API, file and registry information is also stored together as a single line.

도 4는 발명의 일 실시예에 따른 악성코드의 기능 분석 장치의 행위 추상화 모듈을 예시한 도면이다.4 is a diagram illustrating an action abstraction module of a malicious code function analyzing apparatus according to an embodiment of the present invention.

프로세서 또는 행위 추상화 모듈(220)은 액션 룰을 기준으로 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화한다. 액션 룰은 하위 레벨의 제1 행위 정보 및 상위 레벨의 제2 행위 정보 간의 관계를 정한 것이다.The processor or behavior abstraction module 220 abstracts first behavior information of a lower level based on an action rule into second behavior information of a higher level. The action rule defines the relationship between the first action information of a lower level and the second action information of a higher level.

프로세서 또는 행위 추상화 모듈(220)은 악성코드분석 모듈(210)에서 추출한 악성코드의 하위 레벨 행위 정보인 API 호출 정보를 데이터베이스에 저장된 액션 룰(220)과 매칭시켜 상위 레벨인 제2 행위 정보로 추상화한다. The processor or behavior abstraction module 220 matches the API call information, which is lower-level behavior information of the malicious code extracted by the malicious code analysis module 210, with the action rules 220 stored in the database, do.

제2 행위 정보 또는 기본 행위 정보는 '파일 이동', '프로세스 탐색', 'MBR영역에 접근' 등의 악성코드의 기본적인 행위를 의미한다. 이 때, 악성코드의 행위는 악성코드가 동일한 API를 호출하더라도 매개변수에 따라 다른 액션으로 해석되어야 한다. 예를 들어, CreateFile API 함수는 일반적으로 매개변수로 파일의 경로가 같이 입력되어 특정 경로에 파일을 생성하는데 사용된다. 반면, MBR(Master Boot Record) 영역의 경로를 입력하게 되면 파일을 여는 행위가 아니라 MBR 영역에 접근을 하는 행위로 해석되어야 한다.The second action information or basic action information refers to basic actions of malicious code such as 'file move', 'process search', 'approach to MBR area'. At this time, the malicious code's behavior should be interpreted as another action depending on the parameter, even if the malicious code calls the same API. For example, the CreateFile API function is typically used to create a file in a specific path, with the path of the file as a parameter. On the other hand, entering the path of the MBR (Master Boot Record) area should be interpreted as an act of accessing the MBR area, not opening the file.

액션 룰은 악성코드가 호출한 API와 그 매개변수를 함께 고려하여 악성코드가 어떤 행위를 수행하는 것인지 추상화하기 위한 룰을 정의한 것이다. 악성코드의 특정 오브젝트에 대한 접근, 변경, 호출 여부를 바탕으로 생성하며, Windows API, 매개변수, 디렉토리, 파일, 레지스트리 등이 포함될 수 있다. The action rule defines a rule for abstracting what malicious code is doing by taking into account the API called by the malicious code and its parameters. It is created based on whether malicious code accesses, changes, or calls specific objects, and can include Windows APIs, parameters, directories, files, and registries.

예컨대, 어떤 악성코드가 Windows API인 CreateFile을 호출하면서 해당 API의 매개변수로 '\\.\PhysicalDrive0'을 사용한다면 'MBR 영역에 접근' 행위로 정의한다. For example, if malicious code uses '\\. \ PhysicalDrive0' as a parameter of the API while calling CreateFile, which is a Windows API, it is defined as 'access to MBR area'.

도 3을 도시된 바와 같이, 두 번째 행의 CreateFile은 MBR 영역을 나타내는 경로('\\.\PhysicalDrive0')를 매개변수로 사용하므로 'MBR 영역에 접근' 행위로 추상화할 수 있다.As shown in FIG. 3, CreateFile of the second row can be abstracted as 'access to MBR area' because it uses the path ('\\. \ PhysicalDrive0') indicating the MBR area as a parameter.

하위 레벨 행위 정보인 API 시퀀스(제1 시퀀스)를 상위 레벨 행위 정보인 기본 행위 정보로 추상화하면 기본 행위 정보로 구성된 시퀀스(제2 시퀀스)가 만들어진다. 모든 API호출이 각각의 행위로 매칭되는 것은 아니므로, API 시퀀스의 길이와 액션 룰에 따라서 악성코드에서 발견되는 액션 시퀀스의 길이는 달라지게 된다. API 호출 순서에 따라 매칭되는 액션 정보를 시퀀스로 나타내고, 이를 기본 행위 시퀀스라 정의한다.When the API sequence (first sequence), which is low-level behavior information, is abstracted as basic action information, which is high-level action information, a sequence (second sequence) composed of basic action information is created. Since not all API calls match each action, the length of the action sequence found in the malicious code varies according to the length of the API sequence and the action rules. The action information matched according to the API call sequence is represented as a sequence, and this is defined as a basic action sequence.

도 5는 발명의 일 실시예에 따른 악성코드의 기능 분석 장치의 기능 추정 모듈을 예시한 도면이다.5 is a diagram illustrating a function estimation module of a malicious code function analysis apparatus according to an embodiment of the present invention.

프로세서 또는 기능 추정 모듈(230)은 기 설정된 기능 룰을 기준으로 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정한다. 기능 룰은 상위 레벨의 제2 행위 정보 및 기능 정보 간의 관계를 정한 것이다. 프로세서는 추정한 제2 행위 정보 및 기 저장된 제2 행위 정보를 비교하여 기능 정보를 추정한다. The processor or the function estimation module 230 estimates the function information from the second level of action information based on the predetermined function rule. The function rule defines the relationship between the second action information and the function information at the upper level. The processor compares the estimated second behavior information and the previously stored second behavior information to estimate the function information.

기능 추정 모듈(230)은 기본 행위 시퀀스와 기능 룰을 매칭한다. 기능 룰은 '기본 행위 1->기본 행위 2->기본 행위 3' 차례로 이어지면 기능 1을 가짐과 같은 형태로 정의되어 있다. 기본 룰에 관하여는 도 7 내지 도 11에 상세히 도시되어 있다.The function estimation module 230 matches the basic action sequence with the function rule. The functional rule is defined in the same way as 'basic action 1 -> basic action 2 - basic action 3', followed by function 1. The basic rules are shown in detail in Figs. 7 to 11. Fig.

도 6은 발명의 일 실시예에 따른 악성코드의 기능 분석 장치가 정의한 악성코드기능을 예시한 도면이다.6 is a diagram illustrating a malicious code function defined by a malicious code function analyzing apparatus according to an embodiment of the present invention.

기능 정보는 (i) 광고, (ii) 백신 탐지, (iii) 디버깅 방해, (iv) 샌드박스 확인, (v) 권한 획득, (vi) 원격 제어, (vii) 코드 주입, (viii) 다운로드, (ix) 파일 설치, (x) 정보 탈취, (xi) 키 후킹, (xii) 마스터 부트 영역 변경, (xiii) 암호화, (xiv) 은폐, (xv) 복제, 또는 이들의 조합으로 구분될 수 있다. The functional information may include (i) an advertisement, (ii) a vaccine detection, (iii) a debugging interrupt, (iv) a sandbox check, (v) a privilege acquisition, (vi) a remote control, (vii) (ix) file installation, (x) information takeover, (xi) key hooking, (xii) master boot area change, (xiii) encryption, (xiv) concealment, (xv) .

(i) 광고(Adware)는 이용자의 동의 없이 광고를 띄우는 기능이고, (ii) 백신 탐지(Anti-av)는 백신 프로그램을 탐지하여 우회, 종료시키는 기능이고, (iii) 디버깅 방해(Anti-dbg)는 디버깅을 방해하는 기능이고, (iv) 샌드박스 확인(Anti-sandbox)은 실행 환경이 샌드박스인지 확인하는 기능이고, (v) 권한 획득(Backdoor)은 일반적인 인증 과정을 거치지 않고 권한을 획득하는 기능이고, (vi) 원격 제어(Botnet)는 감염 대상을 봇(Bot)으로 만들어 네트워크를 통해 원격 접근이나 통제가 가능하게 만드는 기능이고, (vii) 코드 주입(Code-injection)은 프로세스에 악의적 코드를 주입하는 기능이고, (viii) 다운로드(Downloader)는 외부로부터 악성코드를 다운로드하여 대상을 감염시키는 기능이고, (ix) 파일 설치(Dropper)는 파일을 설치 및 실행하는 기능이고, (x) 정보 탈취(Infostealer)는 인터넷 브라우저, ftp 클라이언트, 메일 등에 저장된 개인 정보를 탈취하는 기능이고, (xi) 키 후킹(Keylogger)은 키보드 입력 이벤트를 후킹하여 기록하는 기능이고, (xii) 마스터 부트 영역 변경(MBR-destroyer)은 하드디스크의 Master Boot Record 영역을 비정상적인 값으로 변경하는 기능이고, (xiii) 암호화(Ransomware)는 사용자의 파일을 암호화하는 기능이고, (xiv) 은폐(Stealth)는 스스로를 은폐시키는 기능이고, (xv) 복제(Worm)는 스스로를 복제하여 네트워크 상에 전파시켜 다른 기기를 감염시키는 기능을 의미한다. (i) Adware is a function of displaying advertisements without user's consent, (ii) Anti-av is a function of detecting and bypassing and terminating a vaccine program, (iii) Anti-dbg ) Is a function that interferes with debugging, (iv) Anti-sandbox is a function that checks whether the execution environment is a sandbox, (v) Backdoor obtains permission (Vi) remote control (Botnet) is a function that makes the target of infection become a bot, making it possible to remotely access or control through the network, (vii) Code-injection is a malicious process (Viii) a downloader is a function of downloading malicious code from an external source to infect a target; (ix) a file dropper is a function of installing and executing a file; (x) Infostealer is the Internet (Xi) a key hooking function is a function of hooking and recording a keyboard input event, and (xii) a master boot area change (MBR-destroyer) (Xiii) Encryption (Ransomware) is a function of encrypting a user's file, (xiv) Stealth is a function of concealing itself, (xv) Worm refers to the ability to copy itself and spread it on the network to infect other devices.

도 7 내지 도 11은 발명의 일 실시예에 따른 악성코드의 기능 분석 장치가 각각의 악성코드의 기본 행위에 관하여 정의한 제2 시퀀스를 예시한 도면이다.FIGS. 7 to 11 are diagrams illustrating a second sequence defined by a malicious code function analyzing apparatus according to an embodiment of the present invention with respect to a basic behavior of each malicious code. FIG.

도 7의 (a)에 도시된 광고(Adware) 기능을 참조하면, 광고(Adware) 기능의 기본 행위 시퀀스는 설치 이후 웹 브라우저를 열기 위한 행위 수행 후 정보 탈취나 브라우저 설정 변경을 진행한다. 먼저 현재 '실행 중인 프로세스 탐색' 행위를 수행한다. 그 이후에는 '프로세스에 접근 시도' 행위를 수행한다. 이후 '브라우저 실행' 액션으로 브라우저를 성공적으로 실행하고, '정보 탈취'나 '브라우저 설정 변경' 행위를 수행한다.Referring to the advertisement function shown in (a) of FIG. 7, the basic action sequence of the adware function proceeds after the execution of an action for opening a web browser after the installation, and information change or browser setting change. First, it conducts 'current process search' action. After that, 'Attempt to access process' is performed. After that, the 'Launch Browser' action successfully launches the browser and performs 'Take Information' or 'Change Browser Settings'.

광고(Adware) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the adware function are as follows.

- 실행 중인 프로세스 탐색 행위는 Process32FirstW와 Process32NextW API 콜이 존재한다.- There are Process32FirstW and Process32NextW API calls in the process of searching for a running process.

- 프로세스에 접근 시도 행위는 RegOpenKeyExA나 NtOpenProcess API 콜이 존재한다.- There is a RegOpenKeyExA or NtOpenProcess API call to access the process.

- 브라우저 실행 행위는 레지스트리를 읽어서 웹브라우저(예컨대, FireFox, Chrome 웹 브라우저)를 실행했는지 확인한다.- The browser execution behavior reads the registry and verifies that the web browser (eg, FireFox, Chrome web browser) has been executed.

- 브라우저 설정 변경 행위는 NtWriteFile로 브라우저의 프로필 관련 파일을 직접 새로 생성하거나 브라우저 내 통신관련 설정 (예컨대, SPDY 통신, HTTP2.0 통신과 관련된 설정)을 작성한다.- The browser setting change action is to create a new browser profile file directly with NtWriteFile or create a communication related setting (for example, SPDY communication, HTTP2.0 communication setting) in the browser.

도 7의 (b)에 도시된 백신 탐지(Anti-av) 기능을 참조하면, 백신 탐지(Anti-av) 기능의 기본 행위 시퀀스는 '백신 프로그램 탐지' 행위를 수행한 후 크게 두 가지의 행위를 수행하는데, 백신 프로그램을 우회하는 시도를 하거나 백신 프로그램을 종료시키는 '탐지 우회 시도' 행위와 '백신 프로그램 종료' 행위를 수행한다.Referring to the anti-av function shown in (b) of FIG. 7, the basic action sequence of the anti-virus function performs two actions after performing the 'vaccine program detection' And performs a 'detection bypass attempt' and an 'end of vaccination program' in which an attempt is made to bypass the vaccine program or to terminate the vaccine program.

백신 탐지(Anti-av) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the anti-av (anti-av) function are as follows.

- 백신 프로그램 탐지 행위는 레지스트리키나 설치된 파일 정보를 이용하여 알려진 AV의 설치 여부를 확인한다.- Detection of vaccine program uses registry key or installed file information to check whether AV is installed.

- 탐지 우회 시도 행위는 CreateProcessInternalW나 ShellExecuteExW를 이용해 자신의 프로세스 명을 널리 알려진 프로세스명으로 변경한다.- Detection bypass attempt changes its process name to a widely known process name using CreateProcessInternalW or ShellExecuteExW.

- 백신 프로그램 종료 행위는 ControlService나 NtTerminateProcess로 AV 프로세스 및 서비스를 종료 시킨다.- The termination of the anti-virus program terminates the AV process and service with ControlService or NtTerminateProcess.

도 7의 (c)에 도시된 디버깅 방해(Anti-dbg) 기능을 참조하면, 디버깅 방해(Anti-dbg) 기능의 기본 행위 시퀀스는 먼저 디버깅 확인을 하기 위해 '디버거 체크' 행위를 수행한다. 만약 실행 중인 디버거가 탐지되면 디버깅을 방해하기 위해 디버거를 종료 시키거나 디버거 관련 파일을 삭제하는 '디버깅 방해' 행위를 수행한다.Referring to the anti-dbg function shown in (c) of FIG. 7, the basic action sequence of the anti-dbg function first performs a 'debugger check' operation to confirm the debugging. If a running debugger is detected, it performs a 'debugging interrupt' action to terminate the debugger or to delete the debugger related file to prevent debugging.

디버깅 방해(Anti-dbg) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the debugging interruption (anti-dbg) function are as follows.

- 디버거 체크 행위는 CheckRemoteDebuggerPresent와 IsDebuggerPresent, SystemKernelDebuggerInformation API 콜이 존재한다.- There are CheckRemoteDebuggerPresent, IsDebuggerPresent, and SystemKernelDebuggerInformation API calls for the debugger check.

- 디버깅 방해 행위는 NtTerminateProcess와 DeleteService, DeleteFileW API 콜이 존재한다.- NtTerminateProcess, DeleteService and DeleteFileW API calls exist for debugging interrupts.

도 8의 (a)는 도시된 샌드박스 확인(Anti-sandbox) 기능을 참조하면, 샌드박스 확인(Anti-sandbox) 기능의 기본 행위 시퀀스는 특정한 순서가 존재하지 않으며, 다음 네 가지의 행위가 있다. Referring to FIG. 8 (a), there is no specific sequence of basic action sequences of the anti-sandbox function, and there are four actions as follows .

(i) 특정 샌드박스 환경에만 존재하는 디렉토리를 검색하는 경우 '샌드박스 관련 파일 검색' 행위를 수행한다. (ii) 사용자가 직접 창을 사용하는지 탐지하기 위해 '포그라운드 창 검사' 행위를 주기적으로 수행한다. (iii) 샌드박스 환경에서 발생할 수 있는 약간의 idle 시간을 탐지하기 위해 'idle 시간 검사' 행위를 주기적으로 수행한다. (iv) 샌드박스는 정해진 시간 동안 실행된다는 것을 이용하여 분석을 방해하기 위해 '프로세스 지연' 행위를 수행한다.(i) When searching a directory that exists only in a specific sandbox environment, it performs a 'search for a file related to a sandbox'. (ii) periodically perform a 'foreground window inspection' operation to detect whether the user is using the window directly. (iii) periodically perform an 'idle time check' operation to detect some idle time that may occur in a sandbox environment. (iv) The sandbox performs a 'process delay' action to interfere with the analysis using the fact that it runs for a set period of time.

샌드박스 확인(Anti-sandbox) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the anti-sandbox function are as follows.

- 샌드박스 관련 파일 검색 행위는 샌드박스 환경에만 존재하는 파일의 유무를 검색한다.- The search of sandbox related files searches for the presence of files that exist only in the sandbox environment.

- 포그라운드 창 검사 행위는 GetForegroundWindow와 NtDelayExecution API 콜이 존재한다.- There is a GetForegroundWindow and NtDelayExecution API call for foreground window inspection.

- Idle 시간 검사 행위는 NtQuerySystemInformation API 콜이 존재하며 이 함수의 첫 번째 인자로 SystemProcessofPerformanceInformation을 전달한다.- Idle time checking behavior exists when the NtQuerySystemInformation API call exists and passes SystemProcessofPerformanceInformation as the first argument of this function.

- 프로세스 지연 행위는 NtDelayExecution API 콜이 존재한다.- There is an NtDelayExecution API call for process delay behavior.

도 8의 (b)에 도시된 권한 획득(Backdoor) 기능을 참조하면, 권한 획득(Backdoor) 기능의 기본 행위 시퀀스는 먼저 '네트워크 활동' 행위를 수행한다. 네트워크 활동은 네트워크 패킷이 교환되는 것을 통해 알 수 있다. 이후 '악성 프로세스 작동' 행위를 수행한다.Referring to the backdoor function shown in (b) of FIG. 8, the basic action sequence of the backdoor function first performs a 'network activity' action. Network activity can be identified through the exchange of network packets. Then, the malicious process operation is performed.

권한 획득(Backdoor) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the backdoor function are as follows.

- 네트워크 활동 개시 행위는 네트워크 활동이 탐지된다(네트워크 패킷 송수신 행동, ICMP 서버와의 네트워크 연결 등).- Network activity initiation is detected network activity (network packet sending / receiving behavior, network connection with ICMP server, etc.).

- 악성 프로세스 작동 행위는 NtAllocateVirtualMemory나 NtProtectVirtualMemory, WriteProcessMemory, NtMapViewOfSection, NtUnmapViewOfSection, VirtualProtectEx, Process32NextW, Process32FirstW API 콜이 존재한다.- Malicious process operation behavior includes NtAllocateVirtualMemory, NtProtectVirtualMemory, WriteProcessMemory, NtMapViewOfSection, NtUnmapViewOfSection, VirtualProtectEx, Process32NextW, and Process32FirstW API calls.

도 8의 (c)에 도시된 원격 제어(Botnet) 기능을 참조하면, 원격 제어(Botnet) 기능의 기본 행위 시퀀스는 '시스템 정보 수집' 행위를 수행한다. 이후 시스템 정보를 CNC(Command & Control) 서버로 전송하기 위해서 CNC 서버와 네트워크 연결을 수행하는데, 이는 'CNC 네트워크 연결' 행위로 확인할 수 있다. 이후 멀티 프로세스를 이용하기 위해 새로운 프로세스를 생성하는 '프로세스 생성' 행위를 수행하고, 생성된 프로세스를 통해 '파일 드롭' 행위를 수행한다. 이후 자동 실행을 등록하기 위해서 레지스트리에 자동 실행 프로그램 키를 생성하거나 자동 실행 프로세스를 생성하기도 한다. 이 경우에는 '자동 실행'행위가 기록되기도 한다.Referring to the remote control (Botnet) function shown in (c) of FIG. 8, the basic action sequence of the remote control (botnet) function performs the 'system information collection' action. In order to transfer the system information to the CNC (Command & Control) server, the CNC server is connected to the network, which can be confirmed by 'CNC network connection'. Then, a 'process creation' operation is performed to create a new process to use a multi-process, and a 'file drop' operation is performed through the generated process. In order to register the automatic execution, it creates an auto run program key in the registry or creates an auto run process. In this case, an 'automatic execution' action is also recorded.

원격 제어(Botnet) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the remote control (botnet) function are as follows.

- 시스템 정보 수집 행위는 GetSystemInfo나 RegQueryValueEx API 콜이 존재한다.- GetSystemInfo or RegQueryValueEx API call exists for collecting system information.

- CNC 네트워크 연결 행위는 IRC(Internet Relay Chat) 서버나 ICMP(Internet Control Message Protocol) 서버에 네트워크 연결을 확인한다.- The CNC network connection action verifies the network connection to an IRC (Internet Relay Chat) server or an ICMP (Internet Control Message Protocol) server.

- 프로세스 생성 행위는 CreateThread API 콜이 존재함 또는 wbemServices_ExecMethod 또는 IWbemServices_ExecMethodSync API 콜이 존재하며 Win32_Process 프로세스에 접근한다. - Process creation behavior exists when CreateThread API call exists or wbemServices_ExecMethod or IWbemServices_ExecMethodSync API call exists and access Win32_Process process.

- 파일 드롭 행위는 응용프로그램 관련 폴더에 확장자가 exe인 파일 또는 실행 가능한 바이너리 파일을 드롭한다.- The file drop action drops a file with an exe extension or an executable binary file in the application-specific folder.

- 자동 실행 행위는 레지스트리에 자동 실행 프로그램 키를 생성한다.- Autorun creates an autorun program key in the registry.

도 9의 (a)에 도시된 코드 주입(Code-injection) 기능을 참조하면, 코드 주입(Code-injection) 기능의 기본 행위 시퀀스는 '파일에 악성코드 주입' 행위를 수행하거나 '프로세스에 악성코드 주입' 행위를 수행한다. 실행 중인 파일이나 기존 파일에 악성코드를 주입하여 공격자가 원하는 행동을 취할 수 있도록 '파일에 악성코드 주입' 행위를 수행한다. 이와 동일하게 실행 중인 프로세스에 악성코드를 주입하여 곧바로 악성 행위를 실행하고 Non-child 프로세스를 생성하여 원격접근 권한을 얻기 위해 '프로세스에 악성코드 주입' 행위를 수행한다. 혹은 프로세스의 메모리를 수정하거나 변경하는 과정을 통해 악성코드를 주입한다. 이 경우에는 '메모리 변경' 액션이 기록되기도 한다.Referring to the code-injection function shown in FIG. 9 (a), the basic action sequence of the code-injection function is to perform a malicious code injection operation to a file, Injection 'action. It injects malicious code into a running file or an existing file and performs an 'injection malicious code' action so that an attacker can take an action. Likewise, malicious code is injected into a running process immediately, malicious behavior is immediately executed, a non-child process is created, and a malicious code injection process is performed to obtain a remote access right. Or injects malicious code through the process of modifying or changing the process's memory. In this case, a 'change memory' action is also recorded.

코드 주입(Code-injection) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the code-injection function are as follows.

- 파일에 악성코드 주입 행위는 파일의 메모리와 가상메모리 공간을 수정하는 행위가 나타날 경우 액션이 탐지된다.- Malicious code injection into a file is detected when an action is taken to modify the file's memory and virtual memory space.

- 프로세스에 악성코드 주입 행위는 NtSetContextThread API 콜을 이용하여 프로세스에 대해 원격 접근 권한을 얻는다.- Malicious code injection into a process gains remote access to the process using the NtSetContextThread API call.

- 메모리 변경 행위는 가상메모리 공간에 다른 프로세스의 메모리를 덮어쓰는 행위이다.- The memory change behavior is to overwrite the memory of another process in the virtual memory space.

도 9의 (b)에 도시된 다운로드(Downloader) 기능을 참조하면, 다운로드(Downloader) 기능의 기본 행위 시퀀스는 먼저 '네트워크 활동 개시' 행위로 네트워크 활동을 시작한다. 송수신한 패킷을 확인하는 등으로 네트워크 활동을 탐지할 수 있다. 다음으로 다른 장치로부터 악성코드를 다운로드하는 '다운로드' 행위를 수행한다. 다른 장치로부터 네트워크로 패킷을 수신하는 행위이다. 마지막으로 악성코드 실행 API를 이용하여 '악성코드 실행' 행위를 수행한다.Referring to the downloader function shown in (b) of FIG. 9, the basic action sequence of the downloader function first starts a network activity with the 'network activity start' action. Network activity can be detected by checking the packets sent and received. Next, the malicious code is downloaded from another device. And receiving packets from another device to the network. Finally, 'malicious code execution' is performed by using malicious code execution API.

다운로드(Downloader) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the downloader function are as follows.

- 네트워크 활동 개시 행위는 네트워크 활동이 탐지된다(네트워크 패킷 송수신 행동, ICMP 서버와의 네트워크 연결 등).- Network activity initiation is detected network activity (network packet sending / receiving behavior, network connection with ICMP server, etc.).

- 다운로드 행위는 Recv, RecvFrom, recv, recvFrom 등 패킷을 수신하는 API 콜이 존재한다.- There is an API call that receives packets such as Recv, RecvFrom, recv, recvFrom and so on.

- 악성코드 실행 행위는 ShellExecuteExW API 콜이 존재한다.- There is ShellExecuteExW API call for malicious code execution.

도 9의 (c)에 도시된 파일 설치(Dropper) 기능을 참조하면, 파일 설치(Dropper) 기능의 기본 행위 시퀀스는 '바이너리 파일 생성' 행위를 수행하여 실행될 수 있는 바이너리 파일을 생성한다. 이 후 '실행 파일 설치' 행위를 수행하여 exe 파일을 설치 및 실행한다.Referring to the file drop function shown in FIG. 9C, the basic action sequence of the file drop function creates a binary file that can be executed by performing a 'binary file creation' operation. After that, execute the 'install executable' action to install and run the exe file.

파일 설치(Dropper) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the file installation (dropper) function are as follows.

- 바이너리 파일 생성 행위는 CreateProcessInternalW와 ShellExecuteExW를 이용해 바이너리 파일을 생성한 후 실행한다.- Binary file creation behavior is to create binary file using CreateProcessInternalW and ShellExecuteExW and execute it.

- 실행 파일 설치 행위는 응용프로그램 관련 폴더(예컨대, MyApp)에 확장자가 exe인 파일 또는 실행 가능한 바이너리 파일을 드롭한다.- The executable file installation action drops a file with the extension exe or an executable binary file in the application-related folder (for example, MyApp).

도 10의 (a)에 도시된 정보 탈취(Infostealer) 기능을 참조하면, 정보 탈취(Infostealer) 기능의 기본 행위 시퀀스는 정보 탈취 이전에 '인터넷 브라우저 저장 경로 검색' 행위를 수행하거나 '권한 체크' 액션, '브라우저 보안 설정 변경' 행위를 수행한다.Referring to the infostealer function shown in FIG. 10 (a), the basic action sequence of the infostealer function performs an 'internet browser storage path search' action or an 'authority check' action , And 'change browser security settings'.

정보 탈취(Infostealer) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the infostealer function are as follows.

- 인터넷 브라우저 저장 경로 검색 행위는 인터넷 브라우저(예: Chrome, FireFox 웹브라우저)의 레지스트리와 디렉토리를 검색하여 브라우저의 위치를 파악한다.- Internet Browser The search path of the storage path searches the registry and directory of the Internet browser (eg, Chrome, FireFox web browser) to determine the browser's location.

- 권한 체크 행위는 LookupPrivilegeValue API 콜이 존재한다.- The privilege checking action is a LookupPrivilegeValue API call.

- 브라우저 보안 설정 변경 행위는 브라우저 관련 레지스트리 값을 변경한다.- Changing the browser security settings changes browser-related registry values.

- 개인정보 탈취 행위는 인터넷 브라우저(예컨대, Chrome, FireFox), FTP 클라이언트(예컨대, FTP Explorer), 메일 클라이언트(예컨대, Outlook Express)가 사용하는 레지스트리와 파일에 접근한다.- Personal information hijacking accesses the registry and files used by Internet browsers (eg, Chrome, FireFox), FTP clients (eg FTP Explorer), and mail clients (eg Outlook Express).

도 10의 (b)에 키 후킹(Keylogger) 기능을 참조하면, 광고(Adware) 기능의 기본 행위 시퀀스는 '키보드/마우스 후킹' 행위를 수행한다. 키보드 입력값뿐만 아니라 마우스 이벤트 모니터링을 위한 후킹으로 순서 상관 없이 두 가지 행위를 진행한다. 이후 후킹한 정보를 바로 C&C 서버에 송신하기도 하는데 이 경우에는 '정보 송신' 행위를 기록하기도 한다.Referring to FIG. 10 (b), the basic action sequence of the adware function performs a 'keyboard / mouse hooking' action. It performs two actions regardless of order, as well as keyboard input value and hooking for mouse event monitoring. Then, the hooked information is directly transmitted to the C & C server. In this case, the 'information transmission' action is also recorded.

키 후킹(Keylogger) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the key hook function are as follows.

- 키보드 후킹 행위는 SetWindowsHookExA, SetWindowsHookExW 콜에서 WH_KEYBOARD_LL 파라미터를 사용하여 키보드 입력값을 후킹한다.- The keyboard hooking behavior hooks keyboard input values using the WH_KEYBOARD_LL parameter in the SetWindowsHookExA, SetWindowsHookExW call.

- 마우스 후킹 행위는 SetWindowsHookExA, SetWindowsHookExW 콜에서 WH_MOUSE_LL 파라미터를 사용하여 마우스 입력값을 후킹한다.- Mouse hooking behavior hooks mouse input values using the WH_MOUSE_LL parameter in SetWindowsHookExA, SetWindowsHookExW call.

- 정보 송신 행위는 C&C 서버로 의심되는 IP 주소나 불특정 다수의 IP 주소와 네트워크 트래픽을 발생시킨다.- The information transmission action generates suspicious IP address or unspecified number of IP address and network traffic to the C & C server.

도 10의 (c)에 도시된 마스터 부트 영역 변경(MBR-destroyer) 기능을 참조하면, 마스터 부트 영역 변경(MBR-destroyer) 기능의 기본 행위 시퀀스는 먼저 MBR 영역을 여는 'MBR 영역 열기' 행위를 수행한 후 'MBR 영역 변경' 행위를 수행하여 MBR 영역을 파괴한다.Referring to the master boot area change (MBR-destroyer) function shown in FIG. 10C, the basic action sequence of the MBR-destroyer function starts with the 'open MBR area' And performs an 'MBR area change' operation to destroy the MBR area.

마스터 부트 영역 변경(MBR-destroyer) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the master boot area change (MBR-destroyer) function are as follows.

- MBR 영역 열기 행위는 CreateFile API 콜이 존재하며, CreateFile의 매개변수로 전달하는 파일명이 '\\.\PhysicalDrive0'에서 '\\.\PhysicalDrive25'까지에 해당한다.- Open MBR area has CreateFile API call, and the file name to be passed as CreateFile parameter is '\\. \ PhysicalDrive0' to '\\. \ PhysicalDrive25'.

- MBR 영역 변경 행위는 WriteFile API 콜이 존재하며, CreateFile의 파일 핸들값을 매개변수로 가진다.- There is WriteFile API call in MBR area change action, and it has the file handle value of CreateFile as a parameter.

도 11의 (a)에 도시된 암호화(Ransomware) 기능을 참조하면, 암호화(Ransomware) 기능의 기본 행위 시퀀스는 '목표 파일 탐색' 행위를 수행하여 해당 디렉토리에 존재하는 타겟 파일을 모두 탐색한다. 이후 파일을 한 디렉토리에 이동하는 '파일 이동' 행위를 수행한다. 디렉토리에 모인 파일을 일괄적으로 암호화하기 위해서 '파일 암호화' 행위를 수행하며 기존의 파일은 삭제하고 암호화가 된 새로운 파일을 생성하는 '파일 생성' 행위를 수행한다.Referring to the encryption (Ransomware) function shown in FIG. 11A, the basic action sequence of encryption (Ransomware) performs a 'target file search' operation to search all the target files existing in the corresponding directory. Then, it moves the file to a directory and performs a 'move file' operation. In order to encrypt files collected in the directory in batch, 'file encryption' is performed, and existing files are deleted and a 'file creation' action is performed to generate a new encrypted file.

암호화(Ransomware) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the encryption (Ransomware) function are as follows.

- 목표 파일 탐색 행위는 FindNextFile, FindFirstFileEx API 콜이 존재한다.- There is a FindNextFile and FindFirstFileEx API calls for the target file search behavior.

- 파일 이동 행위는 MoveFileWithProgress API 콜을 통해 목표 파일을 이동시킨다.The move file action moves the target file via the MoveFileWithProgress API call.

- 파일 암호화 행위는 SetFileAttributes API 콜을 통해 파일 속성을 ENCRYPTED로 변경한다.- The file encryption behavior changes the file attribute to ENCRYPTED through the SetFileAttributes API call.

- 파일 생성 행위는 CreateFile, CopyFile API 콜을 통해 새로운 확장자명을 가진 파일을 생성한다.- The file creation action creates a file with a new extension name through the CreateFile and CopyFile API calls.

도 11의 (b)에 도시된 은폐(Stealth) 기능을 참조하면, 은폐(Stealth) 기능의 기본 행위 시퀀스는 '백그라운드 프로세스 실행' 행위를 수행하거나 '프로세스 위장' 행위를 수행한다. 정상 사용자의 눈에 보이지 않는 프로세스를 생성하기 위해서 '백그라운드 프로세스 실행' 행위를 수행하여 악성 행위 실행을 숨긴다. 악성 행위를 수행하는 프로세스를 정상 프로세스로 위장하여 정상 사용자나 안티바이러스 프로그램으로부터 악성 행위가 실행됨을 인지하지 못하게 '프로세스 위장' 행위를 수행한다.Referring to the stealth function shown in FIG. 11 (b), the basic action sequence of the stealth function performs a 'background process execution' action or a 'process spoofing' action. In order to create a process invisible to the normal user, the execution of the 'background process' is performed to hide the execution of the malicious action. It masquerades as a normal process and executes 'process disguising' action so as not to recognize that malicious action is executed from normal user or anti-virus program.

은폐(Stealth) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the stealth function are as follows.

- 백그라운드 프로세스 행위 ShellExecuteExW API 콜의 인자 값을 hidden으로 바꾸는 경우와 CreateProcessInternalW API 콜의 인자 값 CREATE_NO_WINDOW로 바꾸는 경우가 존재한다.- Behavior of background process There is a case of changing the argument value of ShellExecuteExW API call to hidden and the argument value of CREATE_NO_WINDOW of CreateProcessInternalW API call.

- 프로세스 위장 행위는 CreateProcessInternalW API 콜과 ShellExecuteExW API 콜을 통하여 흔한 프로세스의 이름으로 자신의 프로세스 이름을 변경한다.- Process spoofing changes its process name to the name of a common process through CreateProcessInternalW API call and ShellExecuteExW API call.

도 11의 (c)에 도시된 복제(Worm) 기능을 참조하면, 복제(Worm) 기능의 기본 행위 시퀀스는 먼저 윈도우가 부팅되면 '자동 시작' 행위를 수행한다. 이후 악성 행위를 담은 파일을 다른 장치로 전송하기 전에 알려진 패커를 사용해 '패킹' 행위를 수행한다. 이후 일부 악성코드에서는 패킷 전송 이전에 추가적인 감염 대상을 찾기 위해 ICMP 서버에 연결하여 '주변 장치 탐색' 행위를 수행한다. 마지막으로 포트를 열어 네트워크 패킷을 전송하는 '패킷 전송' 행위를 수행한다. 이 때 주로 445번 포트가 사용된다.Referring to the worm function shown in (c) of FIG. 11, the basic action sequence of the worm function first performs an 'automatic start' operation when the window is booted. Afterwards, a "packing" action is performed using a known packer before transferring the malicious file to another device. Some malicious code then connects to the ICMP server to detect additional infections prior to sending the packet and performs a 'peripherals discovery' action. Finally, a port is opened to perform a 'packet transmission' operation of transmitting a network packet. In this case, port 445 is mainly used.

복제(Worm) 기능에 해당하는 행위의 액션 룰은 다음과 같다.The action rules of the action corresponding to the worm function are as follows.

- 자동 시작 행위는 CreateServiceA, CreateServiceW가 존재하고 레지스트리에 자동 실행 프로그램 키를 생성한다.- The automatic startup behavior is CreateServiceA, CreateServiceW, and generates an autorun program key in the registry.

- 패킹 행위는 알려진 패커를 수행한다.- The packing act performs a known packer.

- 주변 장치 탐색 행위는 ICMP 서버에 네트워크 연결을 확인한다.- Peripheral device probe verifies the network connection to the ICMP server.

- 패킷 전송 행위는 네트워크 패킷을 전송한다(445번 포트가 자주 사용됨).- The packet transmission behavior transmits network packets (port 445 is often used).

도 12는 발명의 일 실시예에 따른 악성코드의 기능 분석 장치가 제1 시퀀스를 이용하여 행위의 유사도를 측정하는 것을 예시한 도면이다.FIG. 12 is a diagram illustrating a malicious code function analyzing apparatus according to an embodiment of the present invention for measuring the similarity of an action using a first sequence; FIG.

악성코드의 윈도우 API 호출 정보는 악성코드의 행위 정보를 담고 있으며, 유사한 행위를 하는 악성코드는 유사한 API 호출 시퀀스를 생성한다. The Windows API call information of the malicious code contains malicious code behavior information, and malicious code that performs similar actions generates a similar API call sequence.

API 호출 시퀀스 유사도를 측정하기 위해서는 비슷한 시퀀스 사이의 유사도가 높게 나와야 한다는 기본 조건 외에 두 가지 조건을 만족하는 알고리즘을 사용해야 한다. In order to measure the similarity of the API call sequence, it is necessary to use an algorithm that satisfies both conditions in addition to the basic condition that similarity between similar sequences should be high.

첫 번째 조건은 서로 길이가 다른 시퀀스의 유사도도 길이의 차이와 관계없이 측정할 수 있어야 한다. 두 번째 조건은 길이가 긴 시퀀스에 대한 유사도 계산이 빠르게 진행되어야 한다. 시퀀스 유사도 알고리즘은 다양하지만 대부분 비교 대상 시퀀스 사이의 길이 차이가 유사도 측정 결과에 많은 영향을 끼친다. 두 가지 조건을 만족하는 시퀀스 유사도 측정 알고리즘으로 지역적 센시티브 해시(Locality Sensitive Hashing, LSH) 알고리즘을 적용할 수 있다.The first condition is that the similarity of sequences of different lengths should be measurable regardless of the difference in length. The second condition is that the similarity calculation for a long sequence should be fast. Although the sequence similarity algorithms vary, most differences in length between sequences subject to comparison greatly affect the results of similarity measurement. A locality sensitive hashing (LSH) algorithm can be applied to a sequence similarity measurement algorithm that satisfies two conditions.

LSH 알고리즘은 일반적인 암호학적 해시와 달리 충돌 확률을 최대화하여 유사한 입력 값에 대해 유사한 해시를 생성하도록 설계되었다. 서로 길이가 다른 시퀀스를 일정한 길이의 해시값으로 만들어주기 때문에 생성된 해시값 사이의 유사도를 측정하면 입력 시퀀스의 길이에 영향 받지 않고 시퀀스 사이의 유사도를 측정할 수 있다. LSH 알고리즘 중 Nilsimsa 알고리즘이 있으나Nilsimsa 알고리즘을 API 호출 시퀀스 유사도 측정에 곧바로 적용할 수 없다. LSH algorithm is designed to generate a similar hash for similar input values by maximizing collision probability unlike general cryptographic hash. Since the sequence having a different length is made into a hash value of a certain length, the similarity between the generated hash values can be measured, and the similarity between the sequences can be measured without being influenced by the length of the input sequence. There is a Nilsimsa algorithm among the LSH algorithms, but the Nilsimsa algorithm can not be directly applied to the API call sequence similarity measure.

첫째, API 호출 시퀀스는 character 단위가 아닌 문자열(API) 단위로 의미를 가지는데, 기존의 알고리즘은 문자열을 character 단위로 나누어 연산을 수행한다. 즉, CreateFileA라는 API는 C, r, e, a, t, e, F, i, l, e, A 라는 11개의 서로 다른 문자로 나누어져 처리된다. 따라서 문자열에서 character 단위로 처리하지 않고 문자열 리스트에서 문자열 단위로(ex - ["CreateFileA", "WriteFileA", ...]) 처리하도록 알고리즘을 수정할 필요가 있다.First, the API call sequence is not a character unit, but a string (API) unit. The existing algorithm divides a character string into character units. That is, an API called CreateFileA is divided into 11 different characters, C, r, e, a, t, e, F, i, Therefore, it is necessary to modify the algorithm to treat strings as strings (ex - ["CreateFileA", "WriteFileA", ...]) in a string list, rather than in character units.

둘째, 기존에는 ASCII 문자에 대해서 utf-8 인코딩을 적용하였기 때문에 utf-8에서 표현할 수 있는 256가지의 서로 다른 입력값만을 처리할 수 있었다. 본 실시예는 utf-8 인코딩 방식 대신 새로운 API 매핑 테이블을 적용하여 512가지의 서로 다른 입력값을 처리한다.Secondly, since we applied utf-8 encoding to ASCII characters, we were able to process only 256 different input values that can be expressed in utf-8. In this embodiment, a new API mapping table is applied instead of the utf-8 encoding method to process 512 different input values.

프로세서는 액션 룰에 등록된 제1 행위 정보와 추출된 제1 행위 정보 간의 유사도를 측정하고, 측정한 유사도를 기준으로 상기 제2 행위 정보를 추출한다. The processor measures the similarity between the first behavior information registered in the action rule and the extracted first behavior information, and extracts the second behavior information based on the measured similarity.

프로세서는 추출된 제1 행위 정보로부터 애플리케이션 프로그래밍 인터페이스 호출 명령에 관한 문자열을 추출하고, 추출한 문자열을 배열한 문자열 리스트를 생성하고, 애플리케이션 프로그래밍 인터페이스 호출 명령과 숫자가 매칭된 매핑 테이블을 이용하여 문자열 리스트에 속한 각 문자열에 대응하는 숫자로 변환한다. 프로세서는 변환된 숫자에 지역적 센시티브 해시 연산을 수행하여 유사도를 측정한다.The processor extracts a string related to the application programming interface call instruction from the extracted first behavior information, generates a string list in which the extracted strings are arranged, and uses the mapping table in which the application programming interface calling instruction and the numbers are matched Converts to the number corresponding to each string to which it belongs. The processor measures the degree of similarity by performing a local sensitive hash operation on the transformed number.

프로세서는 API 호출 시퀀스 (문자열 리스트)를 LSH 함수를 이용하여 고정 길이의 해시 값으로 변환하고, 생성된 해시 값의 차이를 이용하여 유사도를 계산한다. 유사도를 측정하는 방식은 비교하고자 하는 두 개의 해시 값을 비트 단위(bit-wise) 비교를 수행한다. 예컨대, [동일한 비트의 수 / 전체 비트의 수 (해시 길이)] 로 계산하여 0부터 1사이의 값을 획득할 수 있다.The processor converts the API call sequence (string list) to a fixed length hash value using the LSH function, and calculates the similarity using the difference of the generated hash value. The method of measuring the degree of similarity is a bit-wise comparison of the two hash values to be compared. For example, a value between 0 and 1 can be obtained by calculating [number of identical bits / number of all bits (hash length)].

프로세서는 리스트를 입력값으로 하여 유사도를 연산한다. 이때 리스트에 포함된 각 문자열을 순서대로 맵핑 테이블에 넣어 숫자로 변환하여 사용한다. 맵핑 테이블은 새롭게 정의된 테이블로, 512개의 서로 다른 문자열을 각각 특정 숫자로 변환하는 테이블이며, 예컨대, 출력값은 0~511 사이의 정수가 될 수 있다.The processor computes the similarity using the list as an input value. In this case, each string included in the list is put into the mapping table in order and converted into numbers. The mapping table is a newly defined table that converts 512 different strings into specific numbers. For example, the output value may be an integer between 0 and 511.

실시예들에 의하면, API 호출에 사용되는 매개변수를 고려하여 정의된 액션 룰을 기준으로 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화하고, 시퀀스에 따른 기능 룰을 기준으로 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정함으로써, 악성 코드의 주요 목적 또는 핵심 기능을 예측할 수 있고, 다른 API를 호출한 변종 악성 코드에 대하여 동일 기능을 수행하는지 여부를 판단할 수 있다.According to the embodiments, the first action information of the lower level is abstracted as the second action information of the upper level based on the action rule defined by considering the parameters used in the API call, and the action rules of the lower level It is possible to predict the main purpose or the core function of the malicious code by estimating the function information from the second level of the action information of the upper level and judge whether or not the malicious code that calls another API performs the same function.

악성코드의 기능 분석 장치에 포함된 복수의 구성요소들은 상호 결합되어 적어도 하나의 모듈로 구현될 수 있다. 구성요소들은 장치 내부의 소프트웨어적인 모듈 또는 하드웨어적인 모듈을 연결하는 통신 경로에 연결되어 상호 간에 유기적으로 동작한다. 이러한 구성요소들은 하나 이상의 통신 버스 또는 신호선을 이용하여 통신한다.The plurality of components included in the function analysis device of the malicious code may be combined with each other and implemented as at least one module. The components are connected to a communication path connecting a software module or a hardware module inside the device and operate organically with each other. These components communicate using one or more communication buses or signal lines.

악성코드의 기능 분석 장치는 하드웨어, 펌웨어, 소프트웨어 또는 이들의 조합에 의해 로직회로 내에서 구현될 수 있고, 범용 또는 특정 목적 컴퓨터를 이용하여 구현될 수도 있다. 장치는 고정배선형(Hardwired) 기기, 필드 프로그램 가능한 게이트 어레이(Field Programmable Gate Array, FPGA), 주문형 반도체(Application Specific Integrated Circuit, ASIC) 등을 이용하여 구현될 수 있다. 또한, 장치는 하나 이상의 프로세서 및 컨트롤러를 포함한 시스템온칩(System on Chip, SoC)으로 구현될 수 있다.The function analysis device of the malicious code may be implemented in a logic circuit by hardware, firmware, software or a combination thereof, and may be implemented using a general purpose or special purpose computer. The device may be implemented using a hardwired device, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or the like. Further, the device may be implemented as a System on Chip (SoC) including one or more processors and controllers.

악성코드의 기능 분석 장치는 하드웨어적 요소가 마련된 컴퓨팅 디바이스에 소프트웨어, 하드웨어, 또는 이들의 조합하는 형태로 탑재될 수 있다. 컴퓨팅 디바이스는 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신장치, 프로그램을 실행하기 위한 데이터를 저장하는 메모리, 프로그램을 실행하여 연산 및 명령하기 위한 마이크로프로세서 등을 전부 또는 일부 포함한 다양한 장치를 의미할 수 있다.The malicious code function analysis device may be implemented as software, hardware, or a combination thereof in a computing device having hardware elements. The computing device includes a communication device such as a communication modem for performing communication with various devices or wired / wireless communication networks, a memory for storing data for executing a program, a microprocessor for executing and calculating a program, Device. ≪ / RTI >

도 1 및 도 2에서는 각각의 과정을 순차적으로 실행하는 것으로 기재하고 있으나 이는 예시적으로 설명한 것에 불과하고, 이 분야의 기술자라면 본 발명의 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 도면에 기재된 순서를 변경하여 실행하거나 또는 하나 이상의 과정을 병렬적으로 실행하거나 다른 과정을 추가하는 것으로 다양하게 수정 및 변형하여 적용 가능할 것이다.1 and 2, it is described that each process is sequentially executed, but it is only exemplarily described. It will be apparent to those skilled in the art that various changes and modifications may be made thereto without departing from the essential characteristics of the embodiments of the present invention Or to perform one or more processes in parallel, or to add other processes.

도 13은 예시적인 실시예들에서 사용되기에 적합한 컴퓨팅 디바이스를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다. 도시된 실시예에서, 각 컴포넌트들은 이하에 기술된 것 이외에 상이한 기능 및 능력을 가질 수 있고, 이하에 기술되지 것 이외에도 추가적인 컴포넌트를 포함할 수 있다.13 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in the exemplary embodiments. In the illustrated embodiment, each of the components may have different functions and capabilities than those described below, and may include additional components in addition to those described below.

도시된 컴퓨팅 환경은 컴퓨팅 디바이스(12)를 포함한다. 일 실시예에서, 컴퓨팅 디바이스(12)는 타 단말과 신호를 송수신하는 모든 형태의 컴퓨팅 디바이스일 수 있다. The illustrated computing environment includes a computing device 12. In one embodiment, the computing device 12 may be any type of computing device that communicates signals with other terminals.

컴퓨팅 디바이스(12)는 적어도 하나의 프로세서(14), 컴퓨터 판독 가능한 저장매체(16) 및 통신 버스(18)를 포함한다. 프로세서(14)는 컴퓨팅 디바이스(12)로 하여금 앞서 언급된 예시적인 실시예에 따라 동작하도록 할 수 있다. 예컨대, 프로세서(14)는 컴퓨터 판독 가능한 저장 매체(16)에 저장된 하나 이상의 프로그램들을 실행할 수 있다. 상기 하나 이상의 프로그램들은 하나 이상의 컴퓨터 실행 가능 명령어를 포함할 수 있으며, 상기 컴퓨터 실행 가능 명령어는 프로세서(14)에 의해 실행되는 경우 컴퓨팅 장치(12)로 하여금 예시적인 실시예에 따른 동작들을 수행하도록 구성될 수 있다.The computing device 12 includes at least one processor 14, a computer-readable storage medium 16, and a communication bus 18. The processor 14 may cause the computing device 12 to operate in accordance with the exemplary embodiment discussed above. For example, the processor 14 may execute one or more programs stored in a computer-readable storage medium 16. [ The one or more programs may include one or more computer-executable instructions, which when executed by the processor 14 cause the computing device 12 to perform operations in accordance with the illustrative embodiment .

컴퓨터 판독 가능한 저장 매체(16)는 컴퓨터 실행 가능 명령어 내지 프로그램 코드, 프로그램 데이터 및/또는 다른 적합한 형태의 정보를 저장하도록 구성된다. 컴퓨터 판독 가능한 저장 매체(16)에 저장된 프로그램(20)은 프로세서(14)에 의해 실행 가능한 명령어의 집합을 포함한다. 일 실시예에서, 컴퓨터 판독한 가능 저장 매체(16)는 메모리(랜덤 액세스 메모리와 같은 휘발성 메모리, 비휘발성 메모리, 또는 이들의 적절한 조합), 하나 이상의 자기 디스크 저장 디바이스들, 광학 디스크 저장 디바이스들, 플래시 메모리 디바이스들, 그 밖에 컴퓨팅 디바이스(12)에 의해 액세스되고 원하는 정보를 저장할 수 있는 다른 형태의 저장 매체, 또는 이들의 적합한 조합일 수 있다.The computer-readable storage medium 16 is configured to store computer-executable instructions or program code, program data, and / or other suitable forms of information. The program 20 stored in the computer-readable storage medium 16 includes a set of instructions executable by the processor 14. In one embodiment, the computer-readable storage medium 16 may include one or more of a memory (volatile memory such as random access memory, non-volatile memory, or any suitable combination thereof), one or more magnetic disk storage devices, Flash memory devices, or any other form of storage medium that can be accessed by the computing device 12 and store the desired information, or any suitable combination thereof.

통신 버스(18)는 프로세서(14), 컴퓨터 판독 가능한 저장 매체(16)를 포함하여 컴퓨팅 장치(12)의 다른 다양한 컴포넌트들을 상호 연결한다.The communication bus 18 interconnects various other components of the computing device 12, including a processor 14, a computer-readable storage medium 16, and the like.

컴퓨팅 디바이스(12)는 또한 하나 이상의 입출력 장치(24)를 위한 인터페이스를 제공하는 하나 이상의 입출력 인터페이스(22) 및 하나 이상의 통신 인터페이스(26)를 포함할 수 있다. 입출력 인터페이스(22) 및 통신 인터페이스(26)는 통신 버스(18)에 연결된다. 입출력 장치(미도시)는 입출력 인터페이스(22)를 통해 컴퓨팅 디바이스(12)의 다른 컴포넌트들에 연결될 수 있다. 예시적인 입출력 장치는 포인팅 장치(마우스 또는 트랙패드 등), 키보드, 터치 입력 장치(터치패드 또는 터치스크린 등), 음성 또는 소리 입력 장치, 다양한 종류의 센서 장치 및/또는 촬영 장치와 같은 입력 장치, 및/또는 디스플레이 장치, 프린터, 스피커 및/또는 네트워크 카드와 같은 출력 장치를 포함할 수 있다. 예시적인 입출력 장치(24)는 컴퓨팅 디바이스(12)를 구성하는 일 컴포넌트로서 컴퓨팅 디바이스(12)의 내부에 포함될 수도 있고, 컴퓨팅 디바이스(12)와는 구별되는 별개의 장치로 컴퓨팅 디바이스와 연결될 수도 있다.The computing device 12 may also include one or more input / output interfaces 22 and one or more communication interfaces 26 that provide an interface for one or more input / output devices 24. The input / output interface 22 and the communication interface 26 are connected to the communication bus 18. An input / output device (not shown) may be coupled to other components of the computing device 12 via the input / output interface 22. Exemplary input and output devices include input devices such as pointing devices (such as a mouse or trackpad), keyboards, touch input devices (such as touch pads or touch screens), voice or sound input devices, various types of sensor devices and / And / or an output device such as a display device, a printer, a speaker, and / or a network card. Exemplary input and output device 24 may be included within computing device 12 as a component of computing device 12 and may be coupled with a computing device as a separate device distinct from computing device 12.

본 실시예들에 따른 동작은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능한 매체에 기록될 수 있다. 컴퓨터 판독 가능한 매체는 실행을 위해 프로세서에 명령어를 제공하는 데 참여한 임의의 매체를 나타낸다. 컴퓨터 판독 가능한 매체는 프로그램 명령, 데이터 파일, 데이터 구조 또는 이들의 조합을 포함할 수 있다. 예를 들면, 자기 매체, 광기록 매체, 메모리 등이 있을 수 있다. 컴퓨터 프로그램은 네트워크로 연결된 컴퓨터 시스템 상에 분산되어 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수도 있다. 본 실시예를 구현하기 위한 기능적인(Functional) 프로그램, 코드, 및 코드 세그먼트들은 본 실시예가 속하는 기술분야의 프로그래머들에 의해 용이하게 추론될 수 있을 것이다.The operations according to the present embodiments may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. A computer-readable medium represents any medium that participates in providing instructions to a processor for execution. The computer readable medium may include program instructions, data files, data structures, or a combination thereof. For example, there may be a magnetic medium, an optical recording medium, a memory, and the like. The computer program may be distributed and distributed on a networked computer system so that computer readable code may be stored and executed in a distributed manner. Functional programs, codes, and code segments for implementing the present embodiment may be easily deduced by programmers of the technical field to which the present embodiment belongs.

본 실시예들은 본 실시예의 기술 사상을 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The present embodiments are for explaining the technical idea of the present embodiment, and the scope of the technical idea of the present embodiment is not limited by these embodiments. The scope of protection of the present embodiment should be construed according to the following claims, and all technical ideas within the scope of equivalents thereof should be construed as being included in the scope of the present invention.

Claims (13)

하나 이상의 프로세서; 및
상기 하나 이상의 프로세서에 의해 실행되는 하나 이상의 프로그램을 저장하는 메모리를 포함하며,
상기 프로세서는 악성코드를 분석하여 하위 레벨의 제1 행위 정보를 추출하고,
기 설정된 액션 룰을 기준으로 상기 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화하고,
기 설정된 기능 룰을 기준으로 상기 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정하며,
상기 하위 레벨의 제1 행위 정보는 애플리케이션 프로그래밍 인터페이스(Application Programming Interface, API) 호출 명령에 관한 제1 시퀀스 및 매개변수를 포함하고,
상기 상위 레벨의 제2 행위 정보는 상기 하위 레벨의 제1 행위 정보를 추상화한 악성코드의 기본 행위를 순서에 따라 배치한 제2 시퀀스를 포함하고,
상기 상위 레벨의 제2 행위 정보는 동일한 애플리케이션 프로그래밍 인터페이스 호출 명령을 판독하더라도 상기 매개변수에 따라 다른 기본 행위로 해석되며,
상기 프로세서가 상기 제1 행위 정보에 대해서 파일 생성(CreateFile) 함수를 호출하면서 상기 파일 생성 함수의 매개변수로 MBR(Master Boot Record) 영역의 경로를 입력하면, 상기 제2 행위 정보를 상기 MBR 영역에 접근하는 행위로 추상화하는 것을 특징으로 하는 악성코드의 기능 분석 장치.
One or more processors; And
A memory for storing one or more programs executed by the one or more processors,
The processor analyzes the malicious code to extract the first level of action information,
Abstracting the first action information of the lower level into second action information of a higher level based on a predetermined action rule,
Estimating function information from second higher-level action information based on a predetermined function rule,
Wherein the lower level first behavior information comprises a first sequence and parameters relating to an application programming interface (API) call instruction,
The second action information of the upper level includes a second sequence in which the basic actions of the malicious code that abstracts the first action information of the lower level are arranged in order,
The second level of action information of the higher level is interpreted as another basic action according to the parameter even if the same application programming interface call instruction is read,
When the processor calls the CreateFile function for the first action information and inputs the path of the MBR area as a parameter of the file creation function, the processor writes the second action information to the MBR area The malicious code is abstracted by an approaching action.
제1항에 있어서,
상기 프로세서는 상기 악성코드를 실행하지 않고 테스트하는 정적 분석 또는 상기 악성코드를 실행하여 테스트하는 동적 분석을 수행하여 상기 하위 레벨의 행위 정보를 추출하는 것을 특징으로 하는 악성코드의 기능 분석 장치.
The method according to claim 1,
Wherein the processor performs a static analysis for testing without executing the malicious code or a dynamic analysis for testing the malicious code by executing the malicious code to extract the lower level behavior information.
삭제delete 삭제delete 제1항에 있어서,
상기 기능 정보는 (i) 광고, (ii) 백신 탐지, (iii) 디버깅 방해, (iv) 샌드박스 확인, (v) 권한 획득, (vi) 원격 제어, (vii) 코드 주입, (viii) 다운로드, (ix) 파일 설치, (x) 정보 탈취, (xi) 키 후킹, (xii) 마스터 부트 영역 변경, (xiii) 암호화, (xiv) 은폐, (xv) 복제, 또는 이들의 조합으로 구분되는 것을 특징으로 하는 악성코드의 기능 분석 장치.
The method according to claim 1,
The function information may include at least one of (i) an advertisement, (ii) a vaccine detection, (iii) a debugging interrupt, (iv) a sandbox check, (v) a privilege acquisition, (vi) a remote control, (vii) , (ix) file installation, (x) information deed, (xi) key hooking, (xii) master boot area modification, (xiii) encryption, (xiv) concealment, (xv) Features malicious code function analysis device.
제1항에 있어서,
상기 액션 룰은 상기 하위 레벨의 제1 행위 정보 및 상기 상위 레벨의 제2 행위 정보 간의 관계를 정한 것이고,
상기 기능 룰은 상기 상위 레벨의 제2 행위 정보 및 상기 기능 정보 간의 관계를 정한 것을 특징으로 하는 악성코드의 기능 분석 장치.
The method according to claim 1,
Wherein the action rule defines a relationship between the first action information of the lower level and the second action information of the higher level,
Wherein the function rule defines a relationship between the second action information of the upper level and the function information.
제1항에 있어서,
상기 프로세서는
상기 액션 룰에 등록된 제1 행위 정보와 상기 추출된 제1 행위 정보 간의 유사도를 측정하고,
상기 측정한 유사도를 기준으로 상기 제2 행위 정보를 추출하는 것을 특징으로 하는 악성코드의 기능 분석 장치.
The method according to claim 1,
The processor
A degree of similarity between the first action information registered in the action rule and the extracted first action information is measured,
And extracts the second behavior information based on the measured degree of similarity.
제1항에 있어서,
상기 프로세서는
상기 추출된 제1 행위 정보로부터 애플리케이션 프로그래밍 인터페이스 호출 명령에 관한 문자열을 추출하고, 상기 추출한 문자열을 배열한 문자열 리스트를 생성하고, 상기 애플리케이션 프로그래밍 인터페이스 호출 명령과 숫자가 매칭된 매핑 테이블을 이용하여 상기 문자열 리스트에 속한 각 문자열에 대응하는 숫자로 변환하는 것을 특징으로 하는 악성코드의 기능 분석 장치.
The method according to claim 1,
The processor
Extracts a character string related to the application programming interface call instruction from the extracted first behavior information, generates a character string list in which the extracted character string is arranged, And converts the number into a number corresponding to each string belonging to the list.
제8항에 있어서,
상기 프로세서는
상기 변환된 숫자에 지역적 센시티브 해시 연산을 수행하여 유사도를 측정하는 것을 특징으로 하는 악성코드의 기능 분석 장치.
9. The method of claim 8,
The processor
And performing a local sensible hash operation on the converted number to measure the degree of similarity.
제8항에 있어서,
상기 프로세서는
상기 문자열 리스트에 대하여 해시 값으로 변환하고 두 개의 해시 값을 비트 단위(bit-wise)로 비교하여 유사도를 측정하는 것을 특징으로 하는 악성코드의 기능 분석 장치.
9. The method of claim 8,
The processor
Converting the string list into a hash value and comparing the two hash values in a bit-wise manner to measure the similarity.
제1항에 있어서,
상기 프로세서는
상기 추정한 제2 행위 정보 및 기 저장된 제2 행위 정보를 비교하여 상기 기능 정보를 추정하는 것을 특징으로 하는 악성코드의 기능 분석 장치.
The method according to claim 1,
The processor
And estimating the function information by comparing the estimated second behavior information and the previously stored second behavior information.
프로세서에 의해 실행 가능한 컴퓨터 프로그램 명령어들을 포함하는 컴퓨터 판독 가능한 저장 매체에 기록된 컴퓨터 프로그램으로서, 상기 컴퓨터 프로그램 명령어들이 컴퓨팅 디바이스의 적어도 하나의 프로세서에 의해 실행되는 경우에,
악성코드를 분석하여 하위 레벨의 제1 행위 정보를 추출하는 단계;
기 설정된 액션 룰을 기준으로 상기 하위 레벨의 제1 행위 정보를 상위 레벨의 제2 행위 정보로 추상화하는 단계; 및
기 설정된 기능 룰을 기준으로 상기 상위 레벨의 제2 행위 정보로부터 기능 정보를 추정하는 단계를 포함한 동작들을 수행하며,
상기 하위 레벨의 제1 행위 정보는 애플리케이션 프로그래밍 인터페이스(Application Programming Interface, API) 호출 명령에 관한 제1 시퀀스 및 매개변수를 포함하고,
상기 상위 레벨의 제2 행위 정보는 상기 하위 레벨의 제1 행위 정보를 추상화한 악성코드의 기본 행위를 순서에 따라 배치한 제2 시퀀스를 포함하고,
상기 상위 레벨의 제2 행위 정보는 동일한 애플리케이션 프로그래밍 인터페이스 호출 명령을 판독하더라도 상기 매개변수에 따라 다른 기본 행위로 해석되며,
상기 제2 행위 정보로 추상화하는 단계는, 상기 제1 행위 정보에 대해서 파일 생성(CreateFile) 함수를 호출하면서 상기 파일 생성 함수의 매개변수로 MBR(Master Boot Record) 영역의 경로를 입력하면, 상기 제2 행위 정보를 상기 MBR 영역에 접근하는 행위로 추상화하는 것을 특징으로 하는 컴퓨터 프로그램.
A computer program recorded in a computer-readable storage medium including computer program instructions executable by a processor, the computer program instructions being executable by at least one processor of a computing device,
Analyzing the malicious code to extract first behavior information at a lower level;
Abstracting the first action information of the lower level into second action information of a higher level based on a predetermined action rule; And
And estimating function information from the second level of action information on the basis of a predetermined function rule,
Wherein the lower level first behavior information comprises a first sequence and parameters relating to an application programming interface (API) call instruction,
The second action information of the upper level includes a second sequence in which the basic actions of the malicious code that abstracts the first action information of the lower level are arranged in order,
The second level of action information of the higher level is interpreted as another basic action according to the parameter even if the same application programming interface call instruction is read,
The step of abstracting with the second behavior information may include the steps of: when a CreateFile function is called for the first behavior information and a path of an MBR (Master Boot Record) area is input as a parameter of the file creation function, 2 behavior information is an action of accessing the MBR area.
삭제delete
KR1020190011060A 2019-01-29 2019-01-29 Method and Apparatus for Analyzing Malicious Code Using API Call Sequence KR102005107B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190011060A KR102005107B1 (en) 2019-01-29 2019-01-29 Method and Apparatus for Analyzing Malicious Code Using API Call Sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190011060A KR102005107B1 (en) 2019-01-29 2019-01-29 Method and Apparatus for Analyzing Malicious Code Using API Call Sequence

Publications (1)

Publication Number Publication Date
KR102005107B1 true KR102005107B1 (en) 2019-07-29

Family

ID=67480713

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190011060A KR102005107B1 (en) 2019-01-29 2019-01-29 Method and Apparatus for Analyzing Malicious Code Using API Call Sequence

Country Status (1)

Country Link
KR (1) KR102005107B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102283054B1 (en) 2020-11-20 2021-07-29 숭실대학교 산학협력단 Method for detecting mobile application misbehavior pattern based api call graph extraction, recording medium and device for performing the method
KR20220083214A (en) * 2020-12-11 2022-06-20 한화시스템 주식회사 Protocol message format reversing apparatus and method thereof
US11768938B2 (en) 2020-11-20 2023-09-26 Foundation Of Soongsil University-Industry Cooperation Mobile application malicious behavior pattern detection method based on API call graph extraction and recording medium and device for performing the same
WO2024005236A1 (en) * 2022-06-29 2024-01-04 쿠팡 주식회사 Method and device for providing information

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101537088B1 (en) 2014-09-02 2015-07-15 인포섹(주) System and method for detecting malicious code based on api calling flow
KR101589656B1 (en) 2015-01-19 2016-01-28 한국인터넷진흥원 System and method for detecting and inquiring metamorphic malignant code based on action
KR20170096451A (en) * 2016-02-16 2017-08-24 한국인터넷진흥원 Method and apparatus for analysing dynamic behavior of malicious application
KR20170108330A (en) * 2016-03-17 2017-09-27 한국전자통신연구원 Apparatus and method for detecting malware code
KR20180074221A (en) * 2016-12-23 2018-07-03 한국인터넷진흥원 System for sharing profiling information based on rapi and method thereof
KR20190020374A (en) * 2017-08-21 2019-03-04 주식회사 스패로우 Method and apparatus for providing api call information for dynamic analysis of web application

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101537088B1 (en) 2014-09-02 2015-07-15 인포섹(주) System and method for detecting malicious code based on api calling flow
KR101589656B1 (en) 2015-01-19 2016-01-28 한국인터넷진흥원 System and method for detecting and inquiring metamorphic malignant code based on action
KR20170096451A (en) * 2016-02-16 2017-08-24 한국인터넷진흥원 Method and apparatus for analysing dynamic behavior of malicious application
KR20170108330A (en) * 2016-03-17 2017-09-27 한국전자통신연구원 Apparatus and method for detecting malware code
KR20180074221A (en) * 2016-12-23 2018-07-03 한국인터넷진흥원 System for sharing profiling information based on rapi and method thereof
KR20190020374A (en) * 2017-08-21 2019-03-04 주식회사 스패로우 Method and apparatus for providing api call information for dynamic analysis of web application

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102283054B1 (en) 2020-11-20 2021-07-29 숭실대학교 산학협력단 Method for detecting mobile application misbehavior pattern based api call graph extraction, recording medium and device for performing the method
US11768938B2 (en) 2020-11-20 2023-09-26 Foundation Of Soongsil University-Industry Cooperation Mobile application malicious behavior pattern detection method based on API call graph extraction and recording medium and device for performing the same
KR20220083214A (en) * 2020-12-11 2022-06-20 한화시스템 주식회사 Protocol message format reversing apparatus and method thereof
KR102436522B1 (en) * 2020-12-11 2022-08-25 한화시스템(주) Protocol message format reversing apparatus and method thereof
WO2024005236A1 (en) * 2022-06-29 2024-01-04 쿠팡 주식회사 Method and device for providing information

Similar Documents

Publication Publication Date Title
JP7460696B2 (en) Real-time detection and protection from malware and steganography in kernel mode
KR102005107B1 (en) Method and Apparatus for Analyzing Malicious Code Using API Call Sequence
US11277423B2 (en) Anomaly-based malicious-behavior detection
EP3506139B1 (en) Malware detection in event loops
CN109684832B (en) System and method for detecting malicious files
US10581879B1 (en) Enhanced malware detection for generated objects
EP2774039B1 (en) Systems and methods for virtualized malware detection
KR102160659B1 (en) Detection of anomalous program execution using hardware-based micro-architectural data
Demme et al. On the feasibility of online malware detection with performance counters
US9792430B2 (en) Systems and methods for virtualized malware detection
US11252167B2 (en) System and method for detecting and classifying malware
EP3531329B1 (en) Anomaly-based-malicious-behavior detection
CN108345795B (en) System and method for detecting and classifying malware
Lysenko et al. Spyware detection technique based on reinforcement learning
Osorio et al. Segmented sandboxing-a novel approach to malware polymorphism detection
Yan CAS: A framework of online detecting advance malware families for cloud-based security
US11763004B1 (en) System and method for bootkit detection
Li et al. Agis: Towards automatic generation of infection signatures
Yoo et al. Multi-Modal Based Malware Similarity Estimation Method
Zakaria et al. CRYPTO-RANSOMWARE EARLY DETECTION FRAMEWORK USING MACHINE LEARNING APPROACH
Verner et al. MODERN INFORMATION SYSTEMS SECURITY MEANS
Zhang et al. Similarity and self-learning based anti-Trojan Mechanism
Klymenko Modern information systems security means
WO2017021706A1 (en) Probabilistic processor monitoring
Zhang et al. SafeBrowsingCloud: Detecting Drive-by-Downloads Attack Using Cloud Computing Environment

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant