KR20200073822A - Method for classifying malware and apparatus thereof - Google Patents

Method for classifying malware and apparatus thereof Download PDF

Info

Publication number
KR20200073822A
KR20200073822A KR1020180162434A KR20180162434A KR20200073822A KR 20200073822 A KR20200073822 A KR 20200073822A KR 1020180162434 A KR1020180162434 A KR 1020180162434A KR 20180162434 A KR20180162434 A KR 20180162434A KR 20200073822 A KR20200073822 A KR 20200073822A
Authority
KR
South Korea
Prior art keywords
malware
api
malicious
malicious code
code
Prior art date
Application number
KR1020180162434A
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 KR1020180162434A priority Critical patent/KR20200073822A/en
Publication of KR20200073822A publication Critical patent/KR20200073822A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification

Abstract

Provided are a method for classifying a malicious code and an apparatus thereof. According to some embodiments of the present disclosure, the method for classifying a malicious code comprises the steps of: obtaining API call sequence information for a plurality of malicious codes; extracting call sequence information for a main API from the API call sequence information using a term frequency-inverse document frequency (TF-IDF) technique; generating an action vector for each of the plurality of malicious codes based on the extracted call sequence information; and building a malicious code cluster by clustering the generated action vector.

Description

악성코드 분류 방법 및 그 장치{METHOD FOR CLASSIFYING MALWARE AND APPARATUS THEREOF}METHOD FOR CLASSIFYING MALWARE AND APPARATUS THEREOF}

본 개시는 악성코드 분류 방법 및 그 장치에 관한 것이다. 보다 자세하게는, 악성코드의 행위 정보를 분석하여 악성코드를 행위 유형 별로 분류하기 위한 분류 모델을 구축하는 방법, 분류 모델을 이용하여 신규 악성코드를 분류하는 방법 및 그 방법들을 지원하는 컴퓨팅 장치에 관한 것이다.The present disclosure relates to a method and apparatus for classifying a malicious code. More specifically, a method of constructing a classification model for classifying malicious codes according to behavior types by analyzing behavior information of malicious codes, a method of classifying new malicious codes using a classification model, and a computing device supporting the methods will be.

악성코드(malware)란 악성 또는 악용 가능한 소프트웨어의 집합으로서, 바이러스, 웜, 스파이웨어, 악성 애드웨어 등 사용자와 컴퓨터에게 잠재적으로 위험이 되는 모든 소프트웨어를 총칭하는 용어이다. 현재 전 세계적으로 매일 20만개 이상의 신종변종 악성코드가 새롭게 발견되고 있으며, 악성코드 발생량은 해마다 증가하고 있는 추세이다.Malware (malware) is a set of malicious or exploitable software, and is a general term for all software potentially dangerous to users and computers, such as viruses, worms, spyware, and malicious adware. Currently, more than 200,000 new variants of malicious code are discovered every day worldwide, and the number of malicious codes is increasing every year.

보안 장비에서 악성코드가 탐지되는 것을 우회하기 위해, 공격자는 주로 기존 악성코드를 변형한 변종 악성코드를 이용하여 사이버 공격을 수행한다. 신종 악성코드를 개발하는 것보다 기존 악성코드를 변형하는 것이 상대적으로 용이하고 개발 비용도 저렴하기 때문이다. 최근에는 악성코드를 자동으로 제작하는 도구가 등장하면서 전문적인 공격자가 아니더라도 손쉽게 다양한 기능을 갖춘 악성코드를 대량으로 생성, 유포할 수 있는 환경이 형성되고 있다.In order to bypass the detection of malicious code in security equipment, attackers mainly conduct cyber attacks using variant malicious codes that modify existing malicious codes. This is because it is relatively easy to modify the existing malicious code and less expensive to develop than developing new malicious code. In recent years, with the advent of tools that automatically create malicious codes, an environment in which a malicious code with various functions can be generated and distributed in large quantities even without being a professional attacker has been formed.

각종 악성코드에 의해 발생되는 사이버 공격에 효과적으로 대응하기 위해서는 악성코드를 유형 별로 분류하는 것이 중요하다. 다양한 악성코드를 유형 별로 분류할 수 있다면, 사이버 공격에 이용된 악성코드의 유형에 따라 적절하고 신속한 대응이 가능하기 때문이다. 따라서, 현재 사이버 보안과 관련된 분야에서, 악성코드 분류는 가장 중요한 연구 주제 중 하나이며, 다양한 연구가 진행 중에 있다.In order to effectively respond to cyber attacks caused by various malicious codes, it is important to classify malicious codes by type. This is because, if various malicious codes can be classified by type, it is possible to respond appropriately and quickly according to the types of malicious codes used in cyber attacks. Therefore, in the field related to cyber security, the classification of malicious codes is one of the most important research topics, and various studies are under way.

한국공개특허 제10-2015-0124020호 (2015.11.05 공개)Korean Patent Publication No. 10-2015-0124020 (published on Nov. 2015)

본 개시의 몇몇 실시예들을 통해 해결하고자 하는 기술적 과제는, 대량의 악성코드 유형 별로 분류하는 방법 및 그 방법을 지원하는 장치를 제공하는 것이다.The technical problem to be solved through some embodiments of the present disclosure is to provide a method for classifying by mass type of malicious codes and an apparatus supporting the method.

본 개시의 몇몇 실시예들을 통해 해결하고자 하는 다른 기술적 과제는, 대량의 악성코드를 정확하게 분류할 수 있는 분류 모델을 구축하는 방법 및 그 방법을 수행하는 장치를 제공하는 것이다.Another technical problem to be solved through some embodiments of the present disclosure is to provide a method for constructing a classification model capable of accurately classifying a large amount of malicious codes and an apparatus for performing the method.

본 개시의 몇몇 실시예들을 통해 해결하고자 하는 또 다른 기술적 과제는, 대량의 악성코드에 대해 자동으로 클래스 레이블을 부여할 수 있는 방법 및 그 방법을 수행하는 장치를 제공하는 것이다.Another technical problem to be solved through some embodiments of the present disclosure is to provide a method for automatically assigning a class label to a large amount of malicious code and an apparatus to perform the method.

본 개시의 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 개시의 기술분야에서의 통상의 기술자에게 명확하게 이해될 수 있을 것이다.The technical problems of the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the description below.

상기 기술적 과제를 해결하기 위한, 본 개시의 몇몇 실시예들에 따른 악성코드 분류 방법은, 컴퓨팅 장치에 의하여 수행되는 악성코드 분류 방법에 있어서, 복수의 악성코드에 대한 API 콜 시퀀스(call sequence) 정보를 획득하는 단계, TF-IDF(Term Frequency-Inverse Document Frequency) 기법을 이용하여 상기 API 콜 시퀀스 정보로부터 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계, 상기 추출된 콜 시퀀스 정보에 기초하여 상기 복수의 악성코드 각각에 대한 행위 벡터를 생성하는 단계 및 상기 생성된 행위 벡터를 클러스터링하여, 악성코드 클러스터를 구축하는 단계를 포함할 수 있다.In order to solve the above technical problem, a malicious code classification method according to some embodiments of the present disclosure includes API call sequence information for a plurality of malicious codes in a malicious code classification method performed by a computing device. Acquiring, extracting call sequence information for the main API from the API call sequence information using a TF-IDF (Term Frequency-Inverse Document Frequency) technique, and based on the extracted call sequence information It may include generating an action vector for each malicious code, and clustering the generated action vector to construct a malicious code cluster.

몇몇 실시예에서, 상기 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계는, 제1 악성코드에 의해 호출된 API 중에서 TF-IDF 값이 기준치 미만인 API를 선정하는 단계, 상기 제1 악성코드의 API 콜 시퀀스에서 상기 선정된 API를 제거하여 상기 제1 악성코드에 대한 주요 API 콜 시퀀스를 구성하는 단계를 포함할 수 있다.In some embodiments, extracting call sequence information for the main API includes selecting an API whose TF-IDF value is less than a reference value among APIs called by the first malware, and calling the API of the first malware And removing the selected API from the sequence to construct a main API call sequence for the first malicious code.

몇몇 실시예에서, 상기 행위 벡터를 생성하는 단계는, 상기 추출된 콜 시퀀스 정보로부터 n-gram 단위의 행위 특징을 추출하는 단계 및 상기 추출된 행위 특징을 기초로 상기 행위 벡터를 생성하는 단계를 포함할 수 있다.In some embodiments, generating the action vector includes extracting an n-gram unit action feature from the extracted call sequence information and generating the action vector based on the extracted action feature. can do.

몇몇 실시예에서, 상기 악성코드 클러스터를 구축하는 단계는, 각 악성코드의 파일 타입을 식별하는 단계, 상기 식별된 파일 타입을 기준으로 상기 복수의 악성코드를 그룹핑하는 단계 및 상기 그룹핑을 통해 형성된 악성코드 그룹 별로 클러스터링을 수행하는 단계를 포함할 수 있다.In some embodiments, the step of constructing the malicious code cluster includes: identifying a file type of each malicious code, grouping the plurality of malicious codes based on the identified file type, and malicious formed through the grouping It may include performing clustering for each code group.

몇몇 실시예에서, 상기 악성코드 클러스터를 구축하는 단계는, 기 정의된 API 기능코드를 이용하여 악성코드 별로 행위 유형을 나타내는 분류 코드를 생성하는 단계, 상기 생성된 분류 코드를 기준으로 상기 복수의 악성코드를 그룹핑하는 단계 및 상기 그룹핑을 통해 형성된 악성코드 그룹 별로 클러스터링을 수행하는 단계를 포함할 수 있다.In some embodiments, the step of constructing the cluster of malicious codes includes generating a classification code indicating an action type for each malicious code using a predefined API function code, and based on the generated classification code The method may include grouping codes and clustering each malicious code group formed through the grouping.

몇몇 실시예에서, 상기 구축된 악성코드 클러스터 별로 동일한 클래스 레이블을 부여하는 단계 및 상기 부여된 클래스 레이블과 상기 악성코드 클러스터에 속한 행위 벡터를 학습하여 악성코드를 분류하기 위한 분류 모델을 구축하는 단계를 더 포함할 수 있다.In some embodiments, the step of assigning the same class label for each of the constructed malware clusters and constructing a classification model for classifying the malicious codes by learning the assigned class label and an action vector belonging to the malware clusters It may further include.

몇몇 실시예에서, 상기 클러스터링은, k-medoids 클러스터링 알고리즘에 의해 수행될 수 있다.In some embodiments, the clustering may be performed by a k-medoids clustering algorithm.

상술한 기술적 과제를 해결하기 위한 본 개시의 몇몇 실시예들에 따른 악성코드 분류 장치는, 프로세서 및 상기 프로세서에 의해 실행되는 하나 이상의 인스트럭션들(instructions)을 포함하는 메모리를 포함하되, 상기 프로세서는, 상기 하나 이상의 인스트럭션들을 실행함으로써, 복수의 악성코드에 대한 API 콜 시퀀스(call sequence) 정보를 획득하고, TF-IDF(Term Frequency-Inverse Document Frequency) 기법을 이용하여 상기 API 콜 시퀀스 정보로부터 주요 API에 대한 콜 시퀀스 정보를 추출하며, 상기 추출된 콜 시퀀스 정보에 기초하여 상기 복수의 악성코드 각각에 대한 행위 벡터를 생성하고, 상기 생성된 행위 벡터를 클러스터링하여, 악성코드 클러스터를 구축할 수 있다.A malware classification apparatus according to some embodiments of the present disclosure for solving the above-described technical problem includes a processor and a memory including one or more instructions executed by the processor, wherein the processor comprises: By executing the one or more instructions, acquiring API call sequence information for a plurality of malicious codes, and using the TF-IDF (Term Frequency-Inverse Document Frequency) technique from the API call sequence information to the main API It extracts call sequence information, generates an action vector for each of the plurality of malicious codes based on the extracted call sequence information, and clusters the generated action vector to construct a malware cluster.

상술한 기술적 과제를 해결하기 위한 본 개시의 몇몇 실시예들에 따른 컴퓨터 프로그램은, 컴퓨팅 장치와 결합되어, 복수의 악성코드에 대한 API 콜 시퀀스(call sequence) 정보를 획득하는 단계, TF-IDF(Term Frequency-Inverse Document Frequency) 기법을 이용하여 상기 API 콜 시퀀스 정보로부터 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계, 상기 추출된 콜 시퀀스 정보에 기초하여 상기 복수의 악성코드 각각에 대한 행위 벡터를 생성하는 단계 및 상기 생성된 행위 벡터를 클러스터링하여, 악성코드 클러스터를 구축하는 단계를 실행시키기 위하여 컴퓨터로 판독가능한 기록매체에 저장될 수 있다.A computer program according to some embodiments of the present disclosure for solving the above technical problem is coupled to a computing device to obtain API call sequence information for a plurality of malicious codes, TF-IDF ( Extracting call sequence information for the main API from the API call sequence information using a Term Frequency-Inverse Document Frequency) technique, and generating an action vector for each of the plurality of malicious codes based on the extracted call sequence information In order to execute the step of constructing the malicious code cluster by clustering the generated action vector and the generated action vector, it may be stored in a computer-readable recording medium.

상기 기술적 과제를 해결하기 위한, 본 개시의 다른 몇몇 실시예들에 따른 악성코드 분류 방법은, 컴퓨팅 장치에 의하여 수행되는 악성코드 분류 방법에 있어서, 기 정의된 API 기능코드를 이용하여 복수의 악성코드 각각의 행위 유형을 나타내는 분류 코드를 생성하는 단계, 상기 생성된 분류 코드를 기준으로 상기 복수의 악성코드를 그룹핑하는 단계 및 상기 그룹핑을 통해 형성된 악성코드 그룹 별로 클러스터링을 수행하여, 상기 악성코드 그룹 별로 악성코드 클러스터를 구축하는 단계를 포함할 수 있다.In order to solve the above technical problem, a malicious code classification method according to some other embodiments of the present disclosure includes a plurality of malicious codes using a predefined API function code in a malicious code classification method performed by a computing device. Generating a classification code indicating each type of action, grouping the plurality of malicious codes based on the generated classification code, and clustering for each malicious code group formed through the grouping, for each malicious code group And building a malware cluster.

도 1은 본 개시의 몇몇 실시예들에 따른 악성코드 분류 시스템을 나타내는 예시적인 구성도이다.
도 2는 본 개시의 몇몇 실시예들에 따른 행위 분석 시스템을 설명하기 위한 도면이다.
도 3은 도 1에 도시된 악성코드 분류 시스템의 활용예를 설명하기 위한 도면이다.
도 4 내지 도 6은 본 개시의 몇몇 실시예들에 따른 악성코드 분류 장치를 나타내는 예시적인 블록도이다.
도 7은 본 개시의 몇몇 실시예들에 따른 악성코드 분류 모델 구축 방법을 나타내는 예시적인 흐름도이다.
도 8은 본 개시의 몇몇 실시예들에 따른 전처리 방법을 나타내는 예시적인 흐름도이다.
도 9 및 도 10은 본 개시의 몇몇 실시예들에 따른 분류 코드 생성 방법을 설명하기 위한 예시도이다.
도 11 및 도 12는 본 개시의 몇몇 실시예들에 따른 주요 API 결정 방법을 설명하기 위한 도면이다.
도 13 및 도 14는 본 개시의 몇몇 실시예들에 따른 주요 API의 콜 시퀀스 추출 방법을 설명하기 위한 예시도이다.
도 15는 본 개시의 몇몇 실시예들에 따른 행위 벡터 생성 방법을 나타내는 예시적인 흐름도이다.
도 16 내지 도 18은 본 개시의 몇몇 실시예들에 따른 행위 벡터 생성 방법을 부연 설명하기 위한 예시도이다.
도 19 내지 도 21은 본 개시의 몇몇 실시예들에 따른 분류 코드 기반 클러스터링 방법을 설명하기 위한 도면이다.
도 22는 본 개시의 몇몇 실시예들에 따른 분류 모델의 학습 과정을 개략적으로 도시한다.
도 23은 본 개시의 몇몇 실시예들에 따른 학습 데이터 선별 방법을 설명하기 위한 예시도이다.
도 24는 본 개시의 몇몇 실시예들에 따른 가중치 기반 학습 방법을 설명하기 위한 예시도이다.
도 25는 본 개시의 몇몇 실시예들에 따른 신규 악성코드 분류 방법을 나타내는 예시적인 흐름도이다.
도 26은 본 개시의 다양한 실시예들에 따른 장치/시스템을 구현할 수 있는 예시적인 컴퓨팅 장치를 나타내는 예시적인 하드웨어 구성도이다.
1 is an exemplary configuration diagram illustrating a malicious code classification system according to some embodiments of the present disclosure.
2 is a diagram for describing a behavior analysis system according to some embodiments of the present disclosure.
FIG. 3 is a view for explaining an example of using the malicious code classification system illustrated in FIG. 1.
4 to 6 are exemplary block diagrams illustrating a malicious code classification device according to some embodiments of the present disclosure.
7 is an exemplary flowchart illustrating a method for constructing a malicious code classification model according to some embodiments of the present disclosure.
8 is an exemplary flow diagram illustrating a pre-processing method in accordance with some embodiments of the present disclosure.
9 and 10 are exemplary diagrams for describing a method for generating a classification code according to some embodiments of the present disclosure.
11 and 12 are diagrams for explaining a method of determining a major API according to some embodiments of the present disclosure.
13 and 14 are exemplary views for explaining a call sequence extraction method of a main API according to some embodiments of the present disclosure.
15 is an exemplary flowchart illustrating a method of generating a behavior vector according to some embodiments of the present disclosure.
16 to 18 are exemplary views for explaining a method of generating a motion vector according to some embodiments of the present disclosure.
19 to 21 are diagrams for describing a classification code based clustering method according to some embodiments of the present disclosure.
22 schematically illustrates a learning process of a classification model according to some embodiments of the present disclosure.
23 is an exemplary view for explaining a method for selecting learning data according to some embodiments of the present disclosure.
24 is an exemplary diagram for describing a weight-based learning method according to some embodiments of the present disclosure.
25 is an exemplary flowchart illustrating a method for classifying a new malicious code according to some embodiments of the present disclosure.
26 is an example hardware configuration diagram illustrating an example computing device capable of implementing a device/system in accordance with various embodiments of the present disclosure.

이하, 첨부된 도면을 참조하여 본 개시의 바람직한 실시예들을 상세히 설명한다. 본 개시의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 개시의 기술적 사상은 이하의 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 개시가 완전하도록 하고, 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 본 개시의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 개시의 기술적 사상은 청구항의 범주에 의해 정의될 뿐이다.Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Advantages and features of the present disclosure, and a method of achieving them will be apparent by referring to embodiments described below in detail together with the accompanying drawings. However, the technical spirit of the present disclosure is not limited to the following embodiments, but may be implemented in various different forms, and only the present embodiments allow the present disclosure to be complete, and common knowledge in the technical field to which the present disclosure pertains. It is provided to fully inform the holder of the scope of the present disclosure, and the technical spirit of the present disclosure is only defined by the scope of the claims.

각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 개시를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 개시의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.It should be noted that in adding reference numerals to the components of each drawing, the same components have the same reference numerals as possible even though they are displayed on different drawings. In addition, in describing the present disclosure, when it is determined that detailed descriptions of related known configurations or functions may obscure the subject matter of the present disclosure, detailed descriptions thereof will be omitted.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다. 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 개시를 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다.Unless otherwise defined, all terms (including technical and scientific terms) used in this specification may be used as meanings commonly understood by those skilled in the art to which the present disclosure pertains. In addition, terms defined in the commonly used dictionary are not ideally or excessively interpreted unless specifically defined. The terminology used herein is for describing the embodiments and is not intended to limit the present disclosure. In the present specification, the singular form also includes the plural form unless otherwise specified in the phrase.

또한, 본 개시의 구성 요소를 설명하는 데 있어서, 제1, 제2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 또는 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing components of the present disclosure, terms such as first, second, A, B, (a), and (b) may be used. These terms are only for distinguishing the component from other components, and the nature, order, or order of the component is not limited by the term. When a component is described as being "connected", "coupled" or "connected" to another component, the component may be directly connected to or connected to the other component, but another component between each component It will be understood that elements may be "connected", "coupled" or "connected".

명세서에서 사용되는 "포함한다 (comprises)" 및/또는 "포함하는 (comprising)"은 언급된 구성 요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성 요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.As used herein, "comprises" and/or "comprising" refers to the components, steps, operations and/or elements mentioned above, the presence of one or more other components, steps, operations and/or elements. Or do not exclude additions.

본 명세서에 대한 설명에 앞서, 본 명세서에서 사용되는 몇몇 용어들에 대하여 명확하게 하기로 한다.Prior to the description of the present specification, some terms used in the specification will be clarified.

본 명세서에서, API 기능코드란, API(Application Programming Interface)의 기능 분류를 나타내도록 정의한 코드이다. 상기 API 기능코드는 악성코드의 행위 유형을 나타내는 분류 코드를 생성하기 위해 이용될 수 있다. 상기 API 기능코드의 예는 도 9를 참조하도록 한다.In this specification, the API function code is code defined to indicate a functional classification of an API (Application Programming Interface). The API function code can be used to generate a classification code indicating the behavior type of the malicious code. For an example of the API function code, refer to FIG. 9.

본 명세서에서 인스트럭션(instruction)이란, 기능을 기준으로 묶인 일련의 컴퓨터 판독가능 명령어들로서 컴퓨터 프로그램의 구성 요소이자 프로세서에 의해 실행되는 것을 가리킨다.In this specification, an instruction is a series of computer-readable instructions grouped by function and refers to a component of a computer program and executed by a processor.

이하, 본 개시의 몇몇 실시예들에 대하여 첨부된 도면에 따라 상세하게 설명한다.Hereinafter, some embodiments of the present disclosure will be described in detail according to the accompanying drawings.

도 1은 본 개시의 몇몇 실시예들에 따른 악성코드 분류 시스템을 나타내는 예시적인 구성도이다.1 is an exemplary configuration diagram illustrating a malicious code classification system according to some embodiments of the present disclosure.

도 1에 도시된 바와 같이, 상기 악성코드 분류 시스템은 행위 분석 시스템(10) 및 악성코드 분류 장치(20)를 포함할 수 있다. 단, 이는 본 개시의 목적을 달성하기 위한 바람직한 실시예일 뿐이며, 필요에 따라 일부 구성 요소가 추가되거나 삭제될 수 있음은 물론이다. 또한, 도 1에 도시된 악성코드 분류 시스템의 각각의 구성 요소들은 기능적으로 구분되는 기능 요소들을 나타낸 것으로서, 복수의 구성 요소가 실제 물리적 환경에서는 서로 통합되는 형태로 구현될 수도 있음에 유의한다.As illustrated in FIG. 1, the malicious code classification system may include a behavior analysis system 10 and a malicious code classification device 20. However, this is only a preferred embodiment for achieving the object of the present disclosure, and of course, some components may be added or deleted as necessary. In addition, it is noted that each component of the malicious code classification system illustrated in FIG. 1 is functionally divided functional elements, and a plurality of components may be implemented in an integrated form in an actual physical environment.

또한, 실제 물리적 환경에서 상기 각각의 구성 요소들은 복수의 세부 기능 요소로 분리되는 형태로 구현될 수도 있다. 예컨대, 악성코드 분류 장치(20)의 제1 기능은 제1 컴퓨팅 장치에서 구현되고, 제2 기능은 제2 컴퓨팅 장치에서 구현될 수도 있다. 이하, 상기 각각의 구성 요소에 대하여 설명한다.Further, in the actual physical environment, each of the components may be implemented in a form of being divided into a plurality of detailed functional elements. For example, the first function of the malicious code classification device 20 may be implemented in the first computing device, and the second function may be implemented in the second computing device. Hereinafter, each of the components will be described.

상기 악성코드 분류 시스템에서, 행위 분석 시스템(10)은 악성코드에 대한 행위 분석을 수행하는 시스템이다. 행위 분석 시스템(10)은 하나 이상의 컴퓨팅 장치로 구현될 수 있다. 상기 컴퓨팅 장치의 일 예는 도 26을 참조하도록 한다.In the malicious code classification system, the behavior analysis system 10 is a system that performs behavior analysis on the malicious code. The behavior analysis system 10 may be implemented with one or more computing devices. An example of the computing device will be described with reference to FIG. 26.

참고로, "행위 분석"이라는 용어는 당해 기술 분야에서 "동적 분석"이라는 용어와 혼용되어 사용될 수 있을 것이나, 명세서의 명료함을 위해 본 명세서에서는 행위 분석이라는 용어로 통일하여 사용하도록 한다.For reference, the term "behavior analysis" may be used interchangeably with the term "dynamic analysis" in the art, but for the sake of clarity, in this specification, the term behaviour analysis is used uniformly.

행위 분석 시스템(10)은 샌드박스(sandbox)와 같이 고립된 환경에서 악성코드에 대한 행위 분석을 수행하고, 행위 분석 결과를 제공할 수 있다. 이때, 상기 행위 분석 결과에는 악성코드의 API(Application Programming Interface) 콜 시퀀스(call sequence) 정보가 포함될 수 있다.The behavior analysis system 10 may perform behavior analysis on malicious code in an isolated environment such as a sandbox, and provide behavior analysis results. At this time, the behavior analysis result may include application program interface (API) call sequence information of the malicious code.

몇몇 실시예에서, 행위 분석 시스템(10)은, 도 2에 도시된 바와 같이, 분석 매니저(30)와 하나 이상의 워커(40-1 내지 40-n)를 포함할 수 있다. 이때, 분석 매니저(30)와 각각의 워커(40-1 or 40-2 or ? or 40-n)는 독립된 컴퓨팅 장치로 구현될 수 있고, 장치 내의 컴퓨팅 모듈로 구현될 수도 있다. 이해의 편의를 제공하기 위해, 도 2를 참조하여 본 실시예에 따른 행위 분석 시스템(10)의 동작에 대하여 부연 설명하도록 한다. 이하에서, 하나 이상의 워커(40-1 내지 40-n)를 총칭하거나 임의의 워커(40-1 or 40-2 or ? or 40-n)를 지칭하는 경우에는 참조 번호 "40"을 이용하도록 한다.In some embodiments, the behavioral analysis system 10 may include an analysis manager 30 and one or more workers 40-1 to 40-n, as shown in FIG. 2. In this case, the analysis manager 30 and each worker 40-1 or 40-2 or? Or 40-n may be implemented as an independent computing device or a computing module in the device. In order to provide convenience of understanding, an operation of the behavior analysis system 10 according to the present embodiment will be described in detail with reference to FIG. 2. Hereinafter, when one or more workers 40-1 to 40-n are generically referred to or arbitrary workers 40-1 or 40-2 or? Or 40-n, reference numeral "40" is used. .

분석 매니저(30)는 워커(40)와 행위 분석 태스크에 대한 전반적인 제어 및 관리를 수행하는 모듈이다. 분석 매니저(30)는 태스크 매니저(31), 수집부(33) 및 행위 정보 DB(35)를 포함할 수 있다.The analysis manager 30 is a module that performs overall control and management for the worker 40 and behavior analysis tasks. The analysis manager 30 may include a task manager 31, a collection unit 33, and behavior information DB 35.

태스크 매니저(31)는 행위 분석 태스크를 워커(40)에게 할당하는 등의 태스크 관리를 수행한다. 가령, 태스크 매니저(31)는 유휴 상태에 있는 워커(40) 또는 활성화된 가상 머신(virtual machine)의 개수가 기준치 미만인 워커(40)에게 행위 분석 태스크를 할당할 수 있다.The task manager 31 performs task management, such as assigning a behavior analysis task to the worker 40. For example, the task manager 31 may assign a behavior analysis task to the workers 40 in which the number of idle workers 40 or the activated virtual machines is less than the reference value.

수집부(33)는 워커(40)로부터 행위 분석 결과를 수집하여 행위 정보 DB(35)에 저장한다.The collection unit 33 collects the behavior analysis results from the worker 40 and stores them in the behavior information DB 35.

다음으로, 워커(40)는 샌드박스 환경에서 할당된 행위 분석 태스크를 수행하는 모듈이다. 워커(40)는 하나 이상의 가상 머신(41 내지 43)과 행위 분석 결과가 저장될 로컬 DB(45)를 포함할 수 있다. 도 2에서는 샌드박스 환경의 예시로 가상 머신(41 내지 43)이 활용된 것을 예로써 도시하고 있으나, 본 개시의 기술적 범위가 이에 한정되는 것은 아니다.Next, the worker 40 is a module that performs a task analysis task assigned in a sandbox environment. The worker 40 may include one or more virtual machines 41 to 43 and a local DB 45 in which behavior analysis results are stored. In FIG. 2, the virtual machines 41 to 43 are used as examples of the sandbox environment, but the technical scope of the present disclosure is not limited thereto.

워커(40)는 각각의 가상 머신(41 or 42 or 43)에서 악성코드에 대한 행위 분석을 수행하고, 분석 결과를 분석 매니저(30)에게 보고한다. 보다 구체적으로, 워커(40)는 가상 머신을 생성하여 악성코드가 실행될 가상 환경을 구성하고, 상기 생성된 가성 머신 내에서 악성코드를 직접 실행하며, 실행된 악성코드의 동작을 모니터링함으로써 행위 분석을 수행할 수 있다.The worker 40 performs behavior analysis on the malicious code in each virtual machine 41 or 42 or 43, and reports the analysis result to the analysis manager 30. More specifically, the worker 40 creates a virtual machine to configure a virtual environment in which the malicious code is to be executed, directly executes the malicious code in the generated virtual machine, and monitors the behavior of the executed malicious code to perform behavior analysis. It can be done.

몇몇 실시예에서, 분석 회피형 악성코드의 악성 행위를 탐지하기 위해, 워커(40)는 페이크 정보를 활용할 수 있다. 여기서, 상기 분석 회피형 악성코드는 실행 환경에 대한 탐지 기능이 구비된 지능형 코드들로, 가상 환경으로 탐지된 경우 악성 행위를 수행하지 않도록 구현된 코드를 의미한다. 가령, 상기 분석 회피형 악성 코드는 가상 환경임을 나타내는 특징 값(e.g. 가상 머신만의 설정 값)을 읽어오는 API(이하, "가상 환경 탐지 API")를 호출하고, 반환 값을 확인하여 현재 실행 환경이 가상 환경인지 여부를 판단할 수 있다. 상기 페이크 정보에는 실제 환경과 유사한 값이 미리 설정되어 있는데, 워커(40)는 가상 환경 탐지 API의 호출을 후킹(hooking)하고, 미리 준비된 페이크 정보를 후킹된 API의 반환 값으로 제공함으로써 분석 회피형 악성코드의 회피 기능을 무력화시킬 수 있다. 본 실시예에 따르면, 분석 회피형 악성코드에 대한 탐지 정확도가 향상되며, 분석 회피형 악성코드에 대해서도 신뢰도 높은 행위 분석 결과가 제공될 수 있다.In some embodiments, in order to detect malicious behavior of the analysis-avoidance malicious code, the worker 40 may utilize fake information. Here, the analysis-avoidance malicious code is intelligent codes equipped with a detection function for an execution environment, and means a code implemented to not perform a malicious action when detected as a virtual environment. For example, the analysis evasion-type malicious code calls an API (hereinafter referred to as "virtual environment detection API") that reads a feature value (eg, a virtual machine-specific setting value) indicating that it is a virtual environment, and checks the return value to determine the current execution environment It is possible to determine whether it is a virtual environment. In the fake information, a value similar to the real environment is set in advance, and the worker 40 hooks the call of the virtual environment detection API and provides the prepared fake information as the return value of the hooked API, thereby avoiding analysis malicious The code evasion feature can be disabled. According to the present embodiment, the detection accuracy of the analysis-avoidance malicious code is improved, and a highly reliable behavior analysis result can also be provided for the analysis-avoidance malware.

다시 도 1을 참조하여 설명을 이어가도록 한다.Again, the description will be continued with reference to FIG. 1.

상기 악성코드 분류 시스템에서, 악성코드 분류 장치(20)는 악성코드에 대한 분류 기능이 구비된 컴퓨팅 장치이다. 여기서, 상기 컴퓨팅 장치는, 노트북, 데스크톱(desktop), 랩탑(laptop) 등이 될 수 있으나, 이에 국한되는 것은 아니며 컴퓨팅 기능이 구비된 모든 종류의 장치를 포함할 수 있다. 상기 컴퓨팅 장치의 일 예시는 도 26을 참조하도록 한다. 이하의 서술에서는, 설명의 편의상 악성코드 분류 장치(20)를 분류 장치(20)로 약칭하도록 한다.In the malicious code classification system, the malicious code classification device 20 is a computing device equipped with a classification function for malicious codes. Here, the computing device may be a laptop, a desktop, a laptop, or the like, but is not limited thereto, and may include all types of devices equipped with computing functions. An example of the computing device is referred to FIG. 26. In the following description, for convenience of description, the malicious code classification device 20 will be abbreviated as the classification device 20.

분류 장치(20)는 행위 분석 시스템(10)으로부터 대량의 악성코드에 대한 행위 분석 결과를 제공받고, 상기 행위 분석 결과에 기반하여 악성코드를 분류하기 위한 분류 모델을 구축할 수 있다. 또한, 분류 장치(20)는 분류 모델을 이용하여 신규 악성코드를 분류할 수 있다. 중복된 설명을 배제하기 위해, 분류 장치(20)의 동작에 대한 자세한 설명은 도 4 이하의 도면을 참조하여 후술하도록 한다.The classification device 20 may receive a behavior analysis result for a large amount of malicious code from the behavior analysis system 10 and build a classification model for classifying the malicious code based on the behavior analysis result. In addition, the classification device 20 may classify new malicious codes using a classification model. In order to exclude duplicate description, a detailed description of the operation of the classification device 20 will be described later with reference to the drawings of FIG. 4 and below.

몇몇 실시예에서, 행위 분석 시스템(10)과 분류 장치(20)는 네트워크를 통해 통신할 수 있다. 여기서, 상기 네트워크는 근거리 통신망(Local Area Network; LAN), 광역 통신망(Wide Area Network; WAN), 이동 통신망(mobile radio communication network), Wibro(Wireless Broadband Internet) 등과 같은 모든 종류의 유/무선 네트워크로 구현될 수 있다.In some embodiments, behavior analysis system 10 and classification device 20 may communicate over a network. Here, the network is a wired/wireless network of any kind, such as a local area network (LAN), a wide area network (WAN), a mobile radio communication network, a Wibro (Wireless Broadband Internet), and the like. Can be implemented.

전술한 악성코드 분류 시스템은 사이버 보안이 요구되는 다양한 환경에 구축되어 활용될 수 있는데, 이에 대한 예시는 도 3에 도시되어 있다. 도 3에 도시된 바와 같이, 기업 내 인트라넷(50)의 사이버 보안을 담당하는 보안 시스템(51)에 전술한 악성코드 분류 시스템이 활용될 수 있다. 가령, 상기 악성코드 분류 시스템은 보안 시스템(51)의 구성요소로써 인트라넷(50)에 유입된 신규 악성코드를 분류하고, 분류 결과를 보안 관리자에게 제공할 수 있다.The above-described malicious code classification system may be constructed and utilized in various environments where cyber security is required, and an example of this is illustrated in FIG. 3. As illustrated in FIG. 3, the above-described malicious code classification system may be utilized in the security system 51 in charge of cyber security of the intranet 50 in the enterprise. For example, the malicious code classification system may classify new malicious codes introduced into the intranet 50 as components of the security system 51 and provide a classification result to the security manager.

분류 결과가 제공되면, 보안 관리자는 상기 분류 결과에 기반하여 유사한 악성 행위를 수행하는 유사 악성코드(e.g. 변종 악성코드)들을 확인할 수 있다. 또한, 보안 관리자는 상기 유사 악성코드에 의해 수행된 사이버 침해 사고의 규모 및 위험성에 기반하여 신규 악성코드의 위험도를 신속하게 파악할 수 있게 된다. 이로 인해, 보안 관리자는 신속한 대응 조치를 수립하여 사이버 침해 사고의 확산을 방지할 수 있고, 위험도에 따라 적절한 대응 우선 순위를 지정함으로써 사이버 침해 사고에 보다 체계적으로 대응할 수 있게 된다.When a classification result is provided, the security manager can identify similar malicious codes (e.g. variant malicious codes) performing similar malicious actions based on the classification result. In addition, the security manager can quickly grasp the risk of new malware based on the scale and risk of cyber infringement incidents performed by the similar malware. For this reason, the security manager can prevent the spread of cyber infringement incidents by establishing prompt response measures, and can more systematically respond to cyber infringement incidents by assigning an appropriate response priority according to the risk level.

지금까지 도 1 내지 도 3을 참조하여 본 개시의 몇몇 실시예들에 따른 악성코드 분류 시스템과 이에 대한 활용예에 대하여 설명하였다. 이하에서는, 분류 장치(20)의 구성 및 동작에 대하여 도 4 내지 도 6을 참조하여 설명한다.So far, referring to FIGS. 1 to 3, a malicious code classification system according to some embodiments of the present disclosure and an application example thereof have been described. Hereinafter, the configuration and operation of the classification device 20 will be described with reference to FIGS. 4 to 6.

도 4는 본 개시의 몇몇 실시예들에 따른 분류 장치(20)를 나타내는 예시적인 블록도이다. 특히, 도 4는 분류 모델을 구축하기 위한 기능 흐름을 함께 도시하고 있다.4 is an exemplary block diagram illustrating a classification device 20 in accordance with some embodiments of the present disclosure. In particular, FIG. 4 also shows a functional flow for constructing a classification model.

도 4에 도시된 바와 같이, 분류 장치(20)는 수집부(61), 전처리부(63), 클러스터링부(65), 분류 모델 구축부(67) 및 분류부(69)를 포함할 수 있다. 다만, 도 4에는 본 개시의 실시예와 관련 있는 구성요소들만이 도시되어 있다. 따라서, 본 개시가 속한 기술분야의 통상의 기술자라면 도 4에 도시된 구성요소들 외에 다른 범용적인 구성 요소들이 더 포함될 수 있음을 알 수 있다. 또한, 도 4에 도시된 분류 장치(20)의 각각의 구성 요소들은 기능적으로 구분되는 기능 요소들을 나타낸 것으로서, 복수의 구성 요소가 실제 물리적 환경에서는 서로 통합되는 형태로 구현될 수도 있음에 유의한다. 이하, 분류 모델을 구축하기 위한 각 구성 요소의 동작에 대하여 살펴보도록 한다.4, the classification device 20 may include a collection unit 61, a pre-processing unit 63, a clustering unit 65, a classification model building unit 67, and a classification unit 69. . However, only components related to the exemplary embodiment of the present disclosure are illustrated in FIG. 4. Accordingly, a person skilled in the art to which the present disclosure belongs may recognize that other general-purpose components may be further included in addition to the components illustrated in FIG. 4. In addition, it is noted that each component of the classification device 20 shown in FIG. 4 is functionally divided functional elements, and a plurality of components may be implemented in an integrated form in an actual physical environment. Hereinafter, the operation of each component for constructing the classification model will be described.

수집부(61)는 악성코드의 행위 정보(즉, 행위 분석 결과)를 수집한다. 이때, 악성코드의 행위 정보에는 악성코드의 API 콜 시퀀스 정보가 포함된다.The collection unit 61 collects malicious code behavior information (ie, behavior analysis results). At this time, the behavior information of the malicious code includes API call sequence information of the malicious code.

수집부(61)는 행위 분석 시스템(10) 또는 별도의 악성코드 DB로부터 악성코드의 행위 정보를 수집할 수 있을 것이나, 본 개시의 기술적 범위가 이에 한정되는 것은 아니다.The collection unit 61 may collect the behavior information of the malicious code from the behavior analysis system 10 or a separate malicious code DB, but the technical scope of the present disclosure is not limited thereto.

다음으로, 전처리부(63)는 수집된 행위 정보를 전처리하여 행위 벡터를 생성한다. 이외에도, 전처리부(63)는 악성코드의 파일 타입을 식별하거나, API 기능코드를 이용하여 악성코드 별로 분류 코드를 생성하는 등의 작업을 더 수행할 수 있다.Next, the pre-processing unit 63 pre-processes the collected action information to generate an action vector. In addition, the pre-processing unit 63 may further perform operations such as identifying the file type of the malicious code or generating a classification code for each malicious code using the API function code.

도 5에 도시된 바와 같이, 몇몇 실시예에 따른 전처리부(63)는 파일 타입 식별부(63-1), 분류 코드 생성부(63-2), 주요 API 추출부(63-3) 및 행위 벡터 생성부(63-4)를 포함할 수 있다.As shown in FIG. 5, the pre-processing unit 63 according to some embodiments includes a file type identification unit 63-1, a classification code generation unit 63-2, a main API extraction unit 63-3, and actions A vector generator 63-4 may be included.

파일 타입 식별부(63-1)는 악성코드의 파일 타입을 식별한다. 가령, 문서형 악성코드의 경우 pdf, hwp, doc 등의 파일 타입을 가질 수 있는데, 파일의 확장자 등에 기반하여 악성코드의 파일 타입이 식별될 수 있다.The file type identification unit 63-1 identifies the file type of the malicious code. For example, in the case of document-type malicious code, it may have a file type of pdf, hwp, doc, and the like, and the file type of the malicious code may be identified based on the file extension.

다음으로, 분류 코드 생성부(63-2)는 악성코드 별로 분류 코드를 생성한다. 구체적으로, 분류 코드 생성부(63-2)는 기 정의된 API 기능코드를 이용하여 악성코드의 분류 코드를 생성한다. 가령, 제1 악성코드가 제1 API와 제2 API를 호출하는 경우, 상기 제1 API의 기능코드와 상기 제2 API의 기능코드를 종합(e.g. or 연산)하여 상기 제1 악성코드의 분류코드가 생성될 수 있다. 분류 코드 생성부(63-2)의 동작에 대한 보다 자세한 설명은 도 8 내지 도 10을 참조하여 후술하도록 한다.Next, the classification code generation unit 63-2 generates classification codes for each malicious code. Specifically, the classification code generation unit 63-2 generates classification codes of malicious codes using predefined API function codes. For example, when the first malicious code calls the first API and the second API, the function code of the first API and the function code of the second API are combined (eg or calculated) to classify the first malicious code. Can be generated. A more detailed description of the operation of the classification code generation unit 63-2 will be described later with reference to FIGS. 8 to 10.

몇몇 실시예에서, 분류 코드 생성부(63-2)는 악성코드가 호출한 전체 API 중에서 주요 API의 기능코드를 종합하여 분류 코드를 생성할 수도 있다. 상기 주요 API를 결정하는 방법에 대한 설명은 후술하도록 한다.In some embodiments, the classification code generation unit 63-2 may generate a classification code by synthesizing function codes of major APIs among all APIs called by the malicious code. The method for determining the main API will be described later.

다음으로, 주요 API 추출부(63-3)는 악성코드가 호출한 전체 API 중에서 주요 API를 결정하고 전체 API 콜 시퀀스 중에서 주요 API의 콜 시퀀스를 추출한다. 상기 주요 API는 해당 악성코드의 행위 특징을 잘 나타내는 대표적인 API를 의미한다. 주요 API를 추출하는 이유는 중요하지 않은 API들(e.g. 다수의 정상코드 or 악성코드들이 공통적으로 호출하는 API)이 행위 벡터에 포함되면 악성코드의 분류의 정확도가 떨어지기 때문이다.Next, the main API extracting unit 63-3 determines the main API among all APIs called by the malicious code and extracts the call sequence of the main API from among all the API call sequences. The main API means a representative API that well represents the behavior characteristics of the malicious code. The reason for extracting the main API is that if the non-critical APIs (e.g. APIs commonly called by many normal codes or malicious codes) are included in the action vector, the accuracy of the classification of the malicious code is deteriorated.

몇몇 실시예에서, 주요 API 추출부(63-3)는 TF-IDF(Term Frequency-Inverse Document Frequency) 기법을 적용하여 주요 API를 결정할 수 있는데, 이에 대한 자세한 설명은 도 11 내지 도 14를 참조하여 후술하도록 한다.In some embodiments, the main API extraction unit 63-3 may determine a main API by applying a Term Frequency-Inverse Document Frequency (TF-IDF) technique, for details of which is described with reference to FIGS. 11 to 14 It will be described later.

몇몇 실시예에서, 주요 API 추출부(63-3)는 해당 악성코드의 파일 타입이 문서형인 경우에 한하여 TF-IDF에 기반한 주요 API 추출 과정을 수행할 수 있다. 문서형 악성코드의 경우, 악성 행위가 내장된 스크립트에 의해 주로 수행되고, 실제 호출되는 API의 대부분은 정상코드들도 공통적으로 호출하는 API이기 때문이다. 따라서, 공통 호출 API를 정제하기 위한 목적에 중점을 두는 경우에는, 문서형 악성코드에 한정하여 TF-IDF 기법이 활용될 수도 있다.In some embodiments, the main API extraction unit 63-3 may perform a main API extraction process based on TF-IDF only when the file type of the malicious code is a document type. This is because, in the case of document-type malicious code, malicious behavior is mainly performed by a built-in script, and most of the APIs actually called are APIs that commonly call normal codes. Therefore, when focusing on the purpose of purifying the common call API, the TF-IDF technique may be utilized only for document-type malware.

다음으로, 행위 벡터 생성부(63-4)는 상기 주요 API의 콜 시퀀스 정보로부터 악성코드의 행위 벡터를 생성한다. 이에 대한 자세한 설명은 도 15 내지 도 18을 참조하여 후술하도록 한다.Next, the action vector generation unit 63-4 generates action vectors of malicious codes from call sequence information of the main API. A detailed description thereof will be described later with reference to FIGS. 15 to 18.

참고로, 도 5에 도시된 기능 흐름은 본 개시의 목적을 달성하기 위한 일부 예시에 불과한 것임에 유의하여야 한다. 본 개시의 다른 몇몇 실시예들에 따르면, 전처리부(63)의 기능 흐름은 얼마든지 변형될 수 있다. 왜냐하면, 파일 타입 식별부(63-1), 분류 코드 생성부(63-2) 및 주요 API 추출부(63-3) 사이에는 순서에 따른 종속성이 존재하지 않기 때문이다.For reference, it should be noted that the functional flow illustrated in FIG. 5 is only some examples for achieving the purpose of the present disclosure. According to some other embodiments of the present disclosure, the functional flow of the pre-processing unit 63 may be modified in any way. This is because there is no dependency in order between the file type identification unit 63-1, the classification code generation unit 63-2, and the main API extraction unit 63-3.

다시 도 4를 참조하여 설명을 이어가도록 한다.The description will be continued again with reference to FIG. 4.

다음으로, 클러스터링부(65)는 악성코드들의 행위 벡터를 클러스터링하여 악성코드 클러스터를 구축한다. 이렇게 구축된 악성코드 클러스터는 유사한 악성 행위를 수행하는 유사/변종 악성코드의 집합을 나타내게 된다.Next, the clustering unit 65 builds a malicious code cluster by clustering the action vectors of the malicious codes. The malicious code cluster constructed in this way represents a set of similar/variant malicious codes that perform similar malicious actions.

몇몇 실시예에서, 클러스터링부(65)는 K-Medoids 클러스터링 알고리즘을 이용하여 악성코드 클러스터를 구축할 수 있다. K-Medoids 클러스터링 알고리즘은 K-평균 클러스터링(K-means clustering) 알고리즘의 변형 중 하나로써, 클러스터 중심에 가장 가까이 위치한 대표 객체(medoids)를 중심으로 클러스터링을 수행하는 알고리즘이다. K-Medoids 클러스터링 알고리즘은 평균 값을 이용함에 따라 이상치(outlier)에 민감한 K-평균 클러스터링 알고리즘과는 달리, 이상치의 영향에 강인한(robust) 특성을 지닌다. 본 실시예에 따르면, 이상치에 강인한 클러스터링 알고리즘을 적용함으로써, 행위 벡터(또는 행위 정보)에 노이즈가 존재하는 경우에도 신뢰도 높은 클러스터링 결과가 제공될 수 있다.In some embodiments, the clustering unit 65 may construct a malware cluster using the K-Medoids clustering algorithm. The K-Medoids clustering algorithm is a variant of the K-means clustering algorithm, and is an algorithm that performs clustering around representative objects (medoids) located closest to the center of the cluster. Unlike the K-means clustering algorithm, which is sensitive to outliers, the K-Medoids clustering algorithm is robust to the effects of outliers. According to this embodiment, by applying a robust clustering algorithm to outliers, highly reliable clustering results can be provided even when noise is present in the action vector (or action information).

몇몇 실시예에서, 클러스터링부(65)는 악성코드의 파일 타입에 따라 악성코드를 그룹핑하고, 악성코드 그룹 별로 클러스터링을 수행할 수 있다. 그렇게 함으로써, 행위 유형 별로 보다 정확한(또는 세분화된) 클러스터링 결과가 제공될 수 있다. 본 실시예에 대한 자세한 설명은 후술하도록 한다.In some embodiments, the clustering unit 65 may group malicious codes according to file types of the malicious codes, and perform clustering for each malicious code group. By doing so, more accurate (or fine-grained) clustering results can be provided for each type of action. Detailed description of this embodiment will be described later.

몇몇 실시예에서. 클러스터링부(65)는 악성코드의 분류 코드에 따라 악성코드를 그룹핑하고, 악성코드 그룹 별로 클러스터링을 수행할 수 있다. 그렇게 함으로써, 행위 유형 별로 보다 정확한(또는 세분화된) 클러스터링 결과가 제공될 수 있다. 본 실시예에 대한 자세한 설명 또한 후술하도록 한다.In some embodiments. The clustering unit 65 may group malicious codes according to the classification codes of the malicious codes, and perform clustering for each malicious code group. By doing so, more accurate (or fine-grained) clustering results can be provided for each type of action. A detailed description of this embodiment will also be described later.

다음으로, 분류 모델 구축부(67)는 클러스터링 결과에 기반하여 분류 모델을 구축한다. 보다 구체적으로, 분류 모델 구축부(67)는 악성코드 클러스터 별로 동일한 클래스 레이블을 부여하고, 클래스 레이블과 악성코드들의 행위 벡터를 기계 학습하여 분류 모델을 구축한다.Next, the classification model construction unit 67 builds a classification model based on the clustering result. More specifically, the classification model building unit 67 assigns the same class label to each malware cluster, and constructs a classification model by machine learning the class label and the behavior vector of the malicious codes.

몇몇 실시예에서, 상기 분류 모델은 심층신경망(deep neural network; DNN)에 기반한 기계 학습 모델일 수 있다. 그러나, 본 개시의 기술적 범위가 이에 한정되는 것은 아니다.In some embodiments, the classification model may be a machine learning model based on a deep neural network (DNN). However, the technical scope of the present disclosure is not limited thereto.

다음으로, 분류부(69)는 분류 모델 구축부(67)에 의해 구축된 분류 모델을 이용하여 신규 악성코드에 대한 분류 태스크를 수행한다. 이와 관련된 기능 흐름은 도 6에 도시되어 있다.Next, the classification unit 69 performs a classification task for new malicious codes using the classification model constructed by the classification model construction unit 67. The associated functional flow is shown in FIG. 6.

도 6에 도시된 바와 같이, 신규 악성코드의 분류 과정은 수집부(61)가 상기 신규 악성코드의 행위 정보를 수집하는 것에서부터 시작된다. 다음으로, 전처리부(63)가 전술한 바와 동일한 방식으로 행위 정보를 행위 벡터로 변환하게 된다. 그러면, 분류부(69)가 신규 악성코드의 행위 벡터를 분류 모델에 입력하고, 그 결과로 신규 악성코드의 분류 결과를 획득하여 출력하게 된다.As illustrated in FIG. 6, the classification process of the new malicious code starts from the collection unit 61 collecting the behavior information of the new malicious code. Next, the pre-processing unit 63 converts the behavior information into the behavior vector in the same manner as described above. Then, the classification unit 69 inputs the behavior vector of the new malicious code into the classification model, and as a result, obtains and outputs the classification result of the new malicious code.

한편, 본 개시의 다른 몇몇 실시예들에 따르면, 클러스터링부(65)에 의해 구축된 악성코드 클러스터를 이용하여 신규 악성코드에 대한 분류가 수행될 수도 있다. 즉, 악성코드 클러스터가 분류 모델로 활용될 수도 있다. 이와 같은 경우, 분류부(69)는 신규 악성코드의 행위 벡터에 매칭되는 악성코드 클러스터를 결정함으로써 신규 악성코드를 분류할 수 있다.On the other hand, according to some other embodiments of the present disclosure, classification of new malicious codes may be performed using a malicious code cluster constructed by the clustering unit 65. That is, the malware cluster may be used as a classification model. In this case, the classification unit 69 may classify the new malicious code by determining the malicious code cluster matching the action vector of the new malicious code.

한편, 도 4에 도시된 모든 구성 요소가 분류 장치(20)를 구현하기 위한 필수 구성요소는 아닐 수도 있음에 유의하여야 한다. 즉, 본 개시의 다른 몇몇 실시예들에 따른 분류 장치(20)는 도 4에 도시된 구성 요소 중 일부에 의해 구현될 수도 있다.Meanwhile, it should be noted that not all components shown in FIG. 4 may be essential components for implementing the classification device 20. That is, the classification device 20 according to some other embodiments of the present disclosure may be implemented by some of the components illustrated in FIG. 4.

도 4 내지 도 6에 도시된 각 구성 요소는 소프트웨어(Software) 또는, FPGA(Field Programmable Gate Array)나 ASIC(Application-Specific Integrated Circuit)과 같은 하드웨어(Hardware)를 의미할 수 있다. 그렇지만, 상기 구성 요소들은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 어드레싱(Addressing)할 수 있는 저장 매체에 있도록 구성될 수도 있고, 하나 또는 그 이상의 프로세서들을 실행시키도록 구성될 수도 있다. 상기 구성 요소들 안에서 제공되는 기능은 더 세분화된 구성 요소에 의하여 구현될 수 있으며, 복수의 구성 요소들을 합하여 특정한 기능을 수행하는 하나의 구성 요소로 구현될 수도 있다.Each component illustrated in FIGS. 4 to 6 may mean software or hardware such as a field programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). However, the above components are not limited to software or hardware, and may be configured to be in an addressable storage medium, or may be configured to execute one or more processors. The functions provided in the above components may be implemented by more detailed components, or may be implemented as a single component that performs a specific function by combining a plurality of components.

지금까지 도 4 내지 도 6을 참조하여 본 개시의 몇몇 실시예들에 따른 분류 장치(20)의 구성 및 동작에 대하여 설명하였다. 이하에서는, 도 7 내지 도 25을 참조하여 본 개시의 몇몇 실시예들에 따른 악성코드 분류 방법에 대하여 상세하게 설명한다.So far, the configuration and operation of the classification device 20 according to some embodiments of the present disclosure have been described with reference to FIGS. 4 to 6. Hereinafter, a method for classifying a malicious code according to some embodiments of the present disclosure will be described in detail with reference to FIGS. 7 to 25.

이하에서 후술될 악성코드 분류 방법의 각 단계는 프로세서를 구비한 컴퓨팅 장치에 의해 수행될 수 있다. 다시 말하면, 상기 악성코드 분류 방법의 각 단계는 프로세서에 의해 실행되는 하나 이상의 인스트럭션들로 구현될 수 있다. 상기 악성코드 분류 방법에 포함되는 모든 단계는 하나의 물리적인 컴퓨팅 장치에 의하여 실행될 수도 있을 것이나, 상기 방법의 제1 단계들은 제1 컴퓨팅 장치에 의하여 수행되고, 상기 방법의 제2 단계들은 제2 컴퓨팅 장치에 의하여 수행될 수도 있다. 이하에서는, 이해의 편의를 위해, 상기 악성코드 분류 방법의 각 단계가 분류 장치(20)에 의해 수행되는 것을 가정하여 설명을 이어가도록 한다. 다만, 상기 악성코드 분류 방법에 포함되는 각 단계의 동작 주체는 그 기재가 생략될 수도 있다.Each step of the malicious code classification method to be described below may be performed by a computing device having a processor. In other words, each step of the malicious code classification method may be implemented with one or more instructions executed by a processor. All the steps included in the malicious code classification method may be executed by one physical computing device, but the first steps of the method are performed by the first computing device, and the second steps of the method are second computing It can also be performed by the device. Hereinafter, for convenience of understanding, it is assumed that each step of the malicious code classification method is performed by the classification device 20 to continue the description. However, the description of the operation subject of each step included in the malicious code classification method may be omitted.

상기 악성코드 분류 방법은 개념적으로 악성코드의 행위 기반 클러스터링을 통해 분류 모델을 구축하는 과정과 상기 구축된 분류 모델을 이용하여 신규 악성코드를 분류하는 과정으로 구분할 수 있다. 먼저, 도 7 내지 도 24를 참조하여 분류 모델을 구축하는 과정에 대하여 설명하도록 한다.The method of classifying the malicious codes can be classified into a process of constructing a classification model through action-based clustering of the malicious codes and a process of classifying new malicious codes using the constructed classification model. First, a process of constructing a classification model will be described with reference to FIGS. 7 to 24.

도 7은 본 개시의 몇몇 실시예들에 따른 악성코드 분류 모델 구축 방법을 나타내는 예시적인 흐름도이다. 단, 이는 본 개시의 목적을 달성하기 위한 바람직한 실시예일뿐이며, 필요에 따라 일부 단계가 추가되거나 삭제될 수 있음은 물론이다.7 is an exemplary flowchart illustrating a method for constructing a malicious code classification model according to some embodiments of the present disclosure. However, this is only a preferred embodiment for achieving the object of the present disclosure, and of course, some steps may be added or deleted as necessary.

도 7에 도시된 바와 같이, 상기 방법은 악성코드에 대한 행위 분석 결과를 수집하는 단계 S100에서 시작된다. 여기서, 수집되는 행위 분석 결과는 API 콜 시퀀스 정보를 포함한다. 본 단계 S100에서 행위 분석 결과를 수집하는 방식은 어떠한 방식이 되더라도 무방하다.As illustrated in FIG. 7, the method starts at step S100 of collecting the behavior analysis results for the malicious code. Here, the collected behavior analysis results include API call sequence information. The method of collecting the behavior analysis results in this step S100 may be any method.

단계 S200에서, 행위 분석 결과를 전처리하여 악성코드 별로 행위 벡터를 생성한다. 즉, 전처리 과정을 거쳐 행위 분석 결과가 벡터 형식의 데이터로 변환된다. 본 단계 S200에 대한 자세한 설명은 도 8 내지 도 18을 참조하여 후술하도록 한다.In step S200, a behavior vector is pre-processed to generate a behavior vector for each malicious code. That is, through the pre-processing process, the behavior analysis results are converted into vector format data. Detailed description of the step S200 will be described later with reference to FIGS. 8 to 18.

단계 S300에서, 행위 벡터를 클러스터링하여 악성코드 클러스터가 구축된다. 이때, 각각의 악성코드 클러스터는 유사 악성 행위를 수행하는 악성코드 그룹을 나타내게 된다.In step S300, a malicious code cluster is constructed by clustering the action vectors. At this time, each malicious code cluster represents a group of malicious codes that perform similar malicious actions.

몇몇 실시예에서, K-Medoids 클러스터링 알고리즘에 기초하여 클러스터링이 수행될 수 있다. 다만, 본 개시의 기술적 범위가 이에 한정되는 것은 아니고, K-평균 클러스터링 알고리즘, 밀도 기반 클러스터링 알고리즘 등이 활용될 수도 있음은 물론이다.In some embodiments, clustering may be performed based on the K-Medoids clustering algorithm. However, the technical scope of the present disclosure is not limited thereto, and of course, a K-average clustering algorithm, a density-based clustering algorithm, and the like may be utilized.

본 단계 S300에 대한 자세한 설명은 도 19 내지 도 21를 참조하여 후술하도록 한다.Detailed description of the step S300 will be described later with reference to FIGS. 19 to 21.

단계 S400에서, 클러스터링 결과에 기반하여 악성코드를 분류하기 위한 분류 모델이 구축된다. 보다 구체적으로, 각 악성코드 클러스터 별로 동일한 클래스 레이블이 부여되고, 클래스 레이블과 행위 벡터를 학습하여 분류 모델이 구축된다. 물론, 전술한 바와 같이, 악성코드 클러스터 자체가 분류 모델로 활용될 수도 있다. 본 단계 S400에 대한 자세한 설명은 도 22 내지 도 24를 참조하여 후술하도록 한다.In step S400, a classification model for classifying the malicious code based on the clustering result is constructed. More specifically, the same class label is assigned to each malware cluster, and a classification model is constructed by learning class labels and behavior vectors. Of course, as described above, the malware cluster itself may be used as a classification model. Detailed description of this step S400 will be described later with reference to FIGS. 22 to 24.

참고로, 전술한 단계 S100 내지 S400 중에서, 단계 S100은 수집부(61)에 의해 수행되고, 단계 S200은 전처리부(63)에 의해 수행되며, 단계 S300은 클러스터링부(65)에 의해 수행될 수 있다. 또한, 단계 S400은 분류 모델 구축부(67)에 의해 수행될 수 있다.For reference, among the aforementioned steps S100 to S400, step S100 is performed by the collecting unit 61, step S200 is performed by the pre-processing unit 63, and step S300 can be performed by the clustering unit 65. have. In addition, step S400 may be performed by the classification model building unit 67.

지금까지 도 7을 참조하여 악성코드 분류 모델 구축 방법에 대하여 개략적으로 살펴보았다. 이하에서는, 각 단계의 세부 내용과 관련 실시예들에 대하여 상세하게 설명하도록 한다.So far, with reference to FIG. 7, a method for constructing a malicious code classification model has been schematically described. Hereinafter, details of each step and related embodiments will be described in detail.

먼저, 도 8 내지 도 18을 참조하여 단계 S200에 적용될 수 있는 전처리 방법에 대하여 설명하도록 한다.First, a preprocessing method that can be applied to step S200 will be described with reference to FIGS. 8 to 18.

도 8은 본 개시의 몇몇 실시예들에 따른 전처리 방법을 나타내는 예시적인 흐름도이다.8 is an exemplary flow diagram illustrating a pre-processing method in accordance with some embodiments of the present disclosure.

도 8에 도시된 바와 같이, 상기 전처리 방법은 악성코드의 파일 타입을 식별하는 단계 S210에서 시작된다. 상기 파일 타입은 클러스터링 단계 S300에서 악성코드를 그룹핑하기 위해 이용될 수 있다.As shown in FIG. 8, the pre-processing method starts at step S210 for identifying the file type of the malicious code. The file type may be used to group malicious codes in the clustering step S300.

단계 S230에서, 악성코드 별로 분류 코드가 생성된다. 상기 분류 코드 또한 클러스터링 단계 S300에서 악성코드를 그룹핑하기 위해 이용될 수 있다. 상기 분류 코드는 기 정의된 API 기능코드에 기초하여 생성될 수 있는데, 이해의 편의를 제공하기 위해 도 9 및 도 10을 참조하여 부연 설명하도록 한다.In step S230, classification codes are generated for each malicious code. The classification code may also be used to group malicious codes in the clustering step S300. The classification code may be generated based on a predefined API function code, and will be described in detail with reference to FIGS. 9 and 10 for convenience of understanding.

도 9는 API 기능코드의 몇몇 예시를 나타낸다. 도 9에 도시된 표(70)는 API의 기능을 17개의 카테고리로 정의하고, 각 기능 카테고리 별로 기능코드를 할당한 것을 예시하고 있다. 도 9에 도시된 표(70)는 일 예에 불과할 뿐이므로, API 기능 카테고리를 정의하는 방식, 기능코드를 할당하는 방식 등은 얼마든지 달라질 수 있다.9 shows some examples of API function codes. Table 70 shown in FIG. 9 illustrates that API functions are defined as 17 categories, and function codes are assigned to each function category. Since the table 70 shown in FIG. 9 is only an example, a method for defining an API function category, a method for allocating a function code, and the like may vary.

도 9에 도시된 표(70)에서, "Crypto"는 암호화 관련 기능을 수행하는 API의 카테고리, "Crypto"는 암호화 관련 기능을 수행하는 API의 카테고리이며, "Misc"는 기타 기능을 수행하는 API의 카테고리이다. 당해 기술 분야의 당업자라면, 카테고리의 명칭에서 해당 카테고리의 기능을 직관적으로 알 수 있을 것인 바, 더 이상의 설명은 생략하도록 한다.In the table 70 shown in FIG. 9, "Crypto" is a category of APIs that perform encryption-related functions, "Crypto" is a category of APIs that perform encryption-related functions, and "Misc" is an API that performs other functions. It is a category. Those skilled in the art will be able to intuitively know the function of the category in the name of the category, and further description will be omitted.

도 10은 기 정의된 API 기능코드(e.g. 도 9의 70)를 이용하여 제1 악성코드의 분류 코드를 생성하는 예를 도시하고 있다. 도 10은 제1 악성코드가 3개의 API(a, b, c)를 호출하는 것을 예로써 도시하고 있다.FIG. 10 shows an example of generating a classification code of the first malicious code using the predefined API function code (e.g. 70 of FIG. 9). 10 shows an example in which the first malicious code calls three APIs (a, b, and c).

도 10에 도시된 바와 같이, 상기 제1 악성코드의 API 정보(71, e.g. API 콜 시퀀스 정보)가 획득되면, 각 API 별로 기능 카테고리(72, 74, 76)와 기능 코드(73, 75, 77)가 결정될 수 있다. 이를테면, 각 API(a, b, c)의 기능 카테고리(72, 74, 76)가 결정되면, 각 기능 카테고리(72, 74, 76)에 해당하는 기능코드를 조회함으로써 각 API(a, b, c)의 기능코드(73, 75, 77)가 결정될 수 있다. 또한, 상기 제1 악성코드의 분류 코드(78)는 각 API(a, b, c)의 기능코드(73, 75, 77)를 종합한 값을 갖도록 생성될 수 있다. 도 10은 or 연산을 통해 분류 코드(78)가 생성되는 것을 예로써 도시하고 있으나, 이는 실시예에 따라 얼마든지 달라질 수 있다.As shown in FIG. 10, when the API information (eg, API call sequence information) of the first malicious code is obtained, the function categories (72, 74, 76) and function codes (73, 75, 77) for each API are obtained. ) Can be determined. For example, when the function categories 72, 74, and 76 of each API (a, b, c) are determined, the function codes corresponding to each function category (72, 74, 76) are searched for each API (a, b, The function codes 73, 75, 77 of c) can be determined. In addition, the classification code 78 of the first malicious code may be generated to have a total value of function codes 73, 75, and 77 of each API (a, b, c). 10 illustrates an example in which the classification code 78 is generated through the or operation, but this may vary depending on the embodiment.

다시 도 8을 참조하여 설명한다.It will be described again with reference to FIG. 8.

단계 S250에서, 각 악성코드 별로 주요 API가 결정되고, 상기 주요 API의 콜 시퀀스 정보가 추출된다. 상기 주요 API는 해당 악성코드의 행위 특징을 잘 나타내는 대표적인 API를 의미한다. 악성코드가 호출한 전체 API 중에서 주요 API를 추출하는 이유는 중요하지 않은 API들(e.g. 다수의 정상코드 or 악성코드들이 공통적으로 호출하는 API)이 행위 벡터에 포함되면 악성코드 분류의 정확도가 떨어지기 때문이다. 즉, 다수의 악성코드들이 공통적으로 호출하는 API가 악성코드의 행위 벡터에 포함되면, 유사 악성 행위를 수행하지 않는 악성코드들이 동일한 그룹(즉, 악성코드 클러스터)으로 분류될 수 있는데, 이와 같은 문제를 방지하기 위한 것이다.In step S250, the main API is determined for each malicious code, and call sequence information of the main API is extracted. The main API means a representative API that well represents the behavior characteristics of the malicious code. The reason for extracting the main API among all APIs called by the malicious code is that if the non-critical APIs (eg, APIs commonly called by many normal codes or malicious codes) are included in the action vector, the accuracy of the classification of the malicious code decreases Because. That is, if the API commonly called by a plurality of malicious codes is included in the action vector of the malicious code, malicious codes that do not perform similar malicious actions may be classified into the same group (ie, a malicious code cluster). It is to prevent.

몇몇 실시예에서, 주요 API를 결정하기 위해 TF-IDF 기법이 적용될 수 있다. 도 11을 참조하여 부연 설명하면, 상단의 박스(81, 83)는 문서 내 키워드의 TF-IDF 값을 산출하는 수식을 나타내고, 하단의 박스(85, 87)는 API의 TF-IDF 값을 산출하는 수식을 나타낸다. 이와 같이, 문서를 악성코드(또는 악성코드와 정상코드)에 대응하고 단어를 API에 대응시킨 다음 TF-IDF 수식에 따라 값을 산출하면, API의 TF-IDF 값이 산출될 수 있다. 이렇게 산출된 제1 악성코드의 제1 API의 TF-IDF 값은 다수의 악성코드에서 상기 제1 API가 호출된 빈도가 낮을수록, 상기 제1 악성코드에서 상기 제1 API가 호출된 빈도가 높을수록 높은 값을 갖게 된다.In some embodiments, TF-IDF techniques can be applied to determine the primary API. Referring to FIG. 11, the upper boxes 81 and 83 represent a formula for calculating the keyword's TF-IDF value in the document, and the lower boxes 85 and 87 calculate the API's TF-IDF value. Indicates the formula. In this way, if the document corresponds to the malicious code (or malicious code and normal code), and the word corresponds to the API, and then the value is calculated according to the TF-IDF formula, the TF-IDF value of the API may be calculated. The TF-IDF value of the first API of the first malicious code calculated in this way, the lower the frequency of the first API being called from a plurality of malicious codes, the higher the frequency of the first API being called from the first malicious code. The higher the value, the higher the value.

API 별로 TF-IDF 값이 산출되면, 상기 TF-IDF 값이 기준치 이상인 API가 주요 API로 결정될 수 있다. 가령, 도 12에 도시된 그래프(90)에서, TF-IDF 값이 미리 설정된 기준치(91) 이상인 API들(93 내지 99)이 해당 악성코드의 주요 API로 결정될 수 있다. 다른 몇몇 실시예들에서는, TF-IDF 값이 상위에 랭크된 k개(단, k는 1 이상의 자연수)의 API들이 해당 악성코드의 주요 API로 결정될 수도 있다. 이와 같이, TF-IDF 기법을 통해 주요 API가 결정되면, 낮은 TF-IDF 값을 갖는 공통 호출 API가 정제될 뿐만 아니라 해당 악성코드의 행위 특성이 잘 반영된 API가 추출될 수 있다.When the TF-IDF value is calculated for each API, an API in which the TF-IDF value is greater than or equal to a reference value may be determined as the main API. For example, in the graph 90 illustrated in FIG. 12, APIs 93 to 99 having a TF-IDF value equal to or greater than a preset reference value 91 may be determined as a main API of the corresponding malicious code. In some other embodiments, k APIs with a higher TF-IDF value (where k is a natural number greater than or equal to 1) may be determined as the main API of the corresponding malicious code. As described above, when the main API is determined through the TF-IDF technique, not only the common calling API having a low TF-IDF value is purified, but also an API reflecting the behavior characteristics of the corresponding malicious code can be extracted.

몇몇 실시예서는, 해당 악성코드의 파일 타입이 문서형인 경우에 한하여 주요 API 추출 과정이 수행될 수 있다. 즉, 문서형이 아닌 경우에는 전체 API 콜 시퀀스 정보로부터 행위 벡터가 생성되고, 문서형 악성코드인 경우에는 주요 API의 콜 시퀀스 정보로부터 행위 벡터가 생성될 수 있다. 이에 대한 이유는 전술한 설명 내용을 참조하도록 한다.In some embodiments, the main API extraction process may be performed only when the file type of the malicious code is a document type. That is, if it is not a document type, an action vector may be generated from all API call sequence information, and in the case of a document type malicious code, an action vector may be generated from call sequence information of a major API. The reason for this is to refer to the above description.

도 13 및 도 14는 악성코드의 전체 API 콜 시퀀스에서 주요 API 콜 시퀀스를 추출하는 방법을 예시하고 있다. 도 13 및 도 14에서 음영으로 표시된 API는 주요 API를 가리킨다.13 and 14 illustrate a method of extracting the main API call sequence from the entire API call sequence of the malicious code. The shaded API in FIGS. 13 and 14 indicates the main API.

몇몇 실시예에서, 도 13에 도시된 바와 같이, 전체 API 콜 시퀀스(101)에서 주요 API(e, c, n)만이 순서대로 추출되어 주요 API의 콜 시퀀스(103)가 구성될 수 있다.In some embodiments, as shown in FIG. 13, only the main APIs e, c, and n are extracted in order from the entire API call sequence 101, so that the call sequence 103 of the main API may be configured.

다른 몇몇 실시예에서, 도 14에 도시된 바와 같이, 전체 API 콜 시퀀스(111)에서 주요 API(e, c, n)와 함께 주요 API(e, c, n)에 인접한 API들이 더 추출될 수 있다. 가령, 전체 API 콜 시퀀스(111)에서 제1 주요 API(n)와 인접한 API(b, d)들이 더 추출되어 주요 API 콜 시퀀스(113)가 구성될 수 있다. 인접한 API를 더 추출하는 이유는 상기 인접한 API가 주요 API의 악성 행위를 보조하기 위한 용도로 사용되었을 가능성이 높기 때문이다.In some other embodiments, as illustrated in FIG. 14, APIs adjacent to the main APIs (e, c, n) may be further extracted along with the main APIs (e, c, n) in the entire API call sequence 111. have. For example, the API APIs (b, d) adjacent to the first main API (n) may be further extracted from the entire API call sequence 111 to form the main API call sequence 113. The reason why the neighboring API is further extracted is that it is highly likely that the neighboring API has been used for supporting the malicious behavior of the main API.

특히, 도 14는 주요 API의 직전에 호출된 API와 직후에 호출된 API를 포함하여 2개의 인접 API를 추출하는 것을 예시하고 있으나, 함께 추출되는 인접 API의 개수는 실시예에 따라 달라질 수 있다. 다른 몇몇 실시예에서는, 주요 API의 TF-IDF 값에 비례하여 추출되는 인접 API의 개수가 결정될 수도 있다. 이를테면, TF-IDF 값이 높을수록 더 많은 개수의 인접 API가 추출될 수도 있다.In particular, FIG. 14 illustrates extracting two adjacent APIs, including an API called immediately before the main API and an API called immediately after, but the number of adjacent APIs extracted together may vary according to embodiments. In some other embodiments, the number of neighboring APIs extracted in proportion to the TF-IDF value of the main API may be determined. For example, the higher the TF-IDF value, the greater the number of neighboring APIs may be extracted.

다시 도 8을 참조하여 설명을 이어가도록 한다.The description will be continued again with reference to FIG. 8.

단계 S270에서,상기 주요 API의 콜 시퀀스 정보를 가공하여 악성코드의 행위 벡터가 생성된다. 행위 벡터를 생성하는 구체적인 방식은 실시예에 따라 달라질 수 있다.In step S270, an action vector of the malicious code is generated by processing call sequence information of the main API. The specific manner of generating the action vector may vary depending on the embodiment.

몇몇 실시예에서, 주요 API의 콜 시퀀스에서 N-gram 단위의 행위 특징이 추출되고, 상기 행위 특징을 벡터 요소로 갖는 행위 벡터가 생성된다. 가령, 행위 특징이 벡터의 컬럼에 대응되고, 행위 특징의 빈도 값이 컬럼 값에 대응되도록 행위 벡터가 생성될 수 있다.In some embodiments, N-gram unit behavior features are extracted from the call sequence of the main API, and behavior vectors having the behavior features as vector elements are generated. For example, an action vector may be generated such that the action feature corresponds to a column of vectors, and the frequency value of the action feature corresponds to column values.

다른 몇몇 실시예에서, 도 15에 도시된 바와 같이, N-gram 단위의 행위 특징이 추출되고, 피처 해싱(feature hashing)을 통해 행위 벡터가 생성될 수 있다(S271, S273). 피처 해싱을 수행하는 이유는 벡터의 차수(or 차원)를 감소시키고, 서로 다른 악성코드의 벡터 차수(즉, 벡터 요소의 개수)을 일치시키기 위해서이다. 보다 이해의 편의를 제공하기 위해, 본 실시예에 대하여 도 16 내지 도 18을 참조하여 부연 설명하도록 한다.In some other embodiments, as illustrated in FIG. 15, N-gram unit behavior features are extracted, and behavior vectors may be generated through feature hashing (S271, S273 ). The reason to perform feature hashing is to reduce the order of the vectors (or dimension), and to match the vector orders of different malicious codes (ie, the number of vector elements). In order to provide more convenience, the present embodiment will be described in detail with reference to FIGS. 16 to 18.

도 16은 악성코드 A(121)에 대한 주요 API 콜 시퀀스(123)와 악성코드 B(125)에 대한 주요 API 콜 시퀀스(127)를 예시하고 있다. 또한, 도 17은 도 16에 도시된 콜 시퀀스(123, 127)에서 2-gram 단위의 행위 특징을 추출하는 것을 예시하고 있다. 도 17에 도시된 심볼(A, B, C, D)은 주요 API의 명칭을 대체하는 용도로 편의상 이용된 것이다.16 illustrates the main API call sequence 123 for the malware A 121 and the main API call sequence 127 for the malware B 125. In addition, FIG. 17 exemplifies extracting 2-gram unit behavior characteristics from the call sequences 123 and 127 illustrated in FIG. 16. The symbols A, B, C, and D shown in FIG. 17 are used for convenience of replacing the names of major APIs.

도 17을 참조하면, 악성코드 A(121) 및 B(125)의 주요 API 콜 시퀀스(123, 127)를 심볼로 대체하면, 왼편과 같은 심볼열(131, 135)로 표현될 수 있다. 심볼열(131, 135)에 2-gram을 적용하면, 오른편에 도시된 바와 같이, 악성코드 A(121)의 행위 특징(133)은 AA, AA, AB, BC, CC가 되고, 악성코드 B(125)의 행위 특징(137)은 AA, AB, BC, CD, DD가 된다.Referring to FIG. 17, when the main API call sequences 123 and 127 of the malicious codes A 121 and B 125 are replaced with symbols, they may be represented by symbol sequences 131 and 135 as shown on the left. When 2-gram is applied to the symbol strings 131 and 135, as shown on the right, the behavior characteristics 133 of the malware A 121 become AA, AA, AB, BC, and CC, and the malware B The behavior characteristics 137 of 125 are AA, AB, BC, CD, and DD.

도 16에 도시된 주요 API 콜 시퀀스(123, 127)는 설명의 편의를 위해 다소 짧은 길이로 예시되었으나, 실제 악성코드의 주요 API 콜 시퀀스는 훨씬 더 길 수 있으며, 이로 인해 n-gram 단위의 행위 특징을 벡터 요소로 갖는 행위 벡터는 매우 고차원의 벡터가 될 수 있다. 또한, 상기 행위 벡터는 대부분의 벡터 요소가 "0"인 희소 벡터(sparse vector)가 될 확률이 높다. 또한, 악성코드 별로 주요 API 콜 시퀀스의 길이가 다르면, 행위 벡터의 길이도 악성코드 별로 달라지기 때문에, 벡터의 길이를 일치시키는 과정이 반드시 수행되어야 한다. 이와 같은 다양한 이유로 인해 추출된 행위 특징에 대해 피처 해싱이 수행된다. 또한, 피처 해싱의 결과를 이용하여 악성코드 별로 행위 벡터가 생성된다. 이에 대한 예는 도 18에 도시되어 있다.The main API call sequences 123 and 127 illustrated in FIG. 16 are illustrated in rather short lengths for convenience of explanation, but the main API call sequences of actual malicious codes may be much longer, and this results in n-gram unit behavior. Behavior vectors having features as vector elements can be very high-dimensional vectors. In addition, the behavior vector has a high probability of becoming a sparse vector in which most vector elements are "0". In addition, if the length of the main API call sequence is different for each malicious code, since the length of the action vector is also different for each malicious code, a process of matching the length of the vector must be performed. For these various reasons, feature hashing is performed on the extracted behavior characteristics. In addition, behavior vectors are generated for each malicious code using the result of feature hashing. An example of this is shown in FIG. 18.

도 18을 참조하면, 악성코드 A(121)의 행위 특징(AA, AB, BC, CC)에 대한 해시 값이 각각 0, 1, 1, 2(박스 143 참조)라고 할 때, 악성코드 A(121)의 행위 벡터(141)는 (2, 2, 1)이 될 수 있다. 유사하게, 악성코드 A(125)의 행위 특징(AA, AB, BC, CD, DD)에 대한 해시 값이 각각 0, 1, 1, 2, 2(박스 147 참조)라고 할 때, 악성코드 B(125)의 행위 벡터(145)는 (1, 2, 2)가 될 수 있다. 즉, 피처 해싱이 수행되는 경우, 해시 값이 행위 벡터의 컬럼 인덱스를 가리키고, 행위 특징의 개수가 행위 벡터의 컬럼 값(value)으로 설정된다. 피처 해싱에 이용되는 해시 함수는 어떠한 함수가 되더라도 무방하고, 행위 벡터의 차원을 제한하기 위해 모듈로 함수(modular function, %)가 함께 이용될 수 있다. 또는, 모듈로 함수 자체가 해시 함수로 이용될 수도 있다. 상기 피처 해싱은 당해 기술 분야에서 해싱 트릭(hashing trick)과 같은 용어와 혼용되어 사용될 수 있으나, 동일한 의미를 지칭하며, 당해 기술 분야에서 이미 널리 알려진 기법인 바 더 이상의 설명은 생략하도록 한다.Referring to FIG. 18, when the hash values for the behavior characteristics (AA, AB, BC, and CC) of the malware A 121 are 0, 1, 1, and 2 (see box 143), the malware A ( 121), the action vector 141 may be (2, 2, 1). Similarly, when the hash values for the behavior characteristics (AA, AB, BC, CD, DD) of the malicious code A 125 are 0, 1, 1, 2, and 2 (refer to box 147), the malicious code B The action vector 145 of 125 may be (1, 2, 2). That is, when feature hashing is performed, the hash value indicates the column index of the action vector, and the number of action features is set as the column value of the action vector. The hash function used for feature hashing can be any function, and a modular function (%) can be used together to limit the dimension of the action vector. Alternatively, the modulo function itself may be used as a hash function. The feature hashing may be used interchangeably with a term such as a hashing trick in the art, but refers to the same meaning, and a description that is already well known in the art will be omitted.

지금까지 도 8 내지 도 18을 참조하여 본 개시의 몇몇 실시예들에 따른 전처리 방법에 대하여 설명하였다. 상술한 방법에 따르면, TF-IDF에 기반하여 추출된 주요 API의 콜 시퀀스 정보에 기초하여 악성코드에 대한 행위 벡터가 생성된다. 따라서, 행위 벡터의 길이는 감소됨에도 불구하고, 악성코드의 행위 특성이 잘 반영된 행위 벡터가 생성될 수 있다.So far, a pretreatment method according to some embodiments of the present disclosure has been described with reference to FIGS. 8 to 18. According to the above-described method, an action vector for a malicious code is generated based on call sequence information of a main API extracted based on TF-IDF. Therefore, although the length of the action vector is reduced, an action vector reflecting the behavior characteristics of the malicious code can be generated.

뿐만 아니라, 피처 해싱을 통해 희소 벡터가 생성되는 것이 방지되는 바, 데이터 공간이 효율적으로 활용될 수 있다. 나아가, 피처 해싱을 통해 생성된 낮은 차원의 행위 벡터는 기계 학습에 적합하기 때문에, 추후 분류 모델의 학습 데이터셋으로 용이하게 활용될 수 있다.In addition, since sparse vectors are prevented from being generated through feature hashing, data space can be efficiently utilized. Furthermore, since the low-dimensional action vector generated through feature hashing is suitable for machine learning, it can be easily used as a training dataset of a classification model later.

참고로, 도 8에 도시된 단계 S210, 단계 S230과 단계 S250/S270이 꼭 도 8에 도시된 순서에 따라 수행될 필요는 없고, 수행 순서는 얼마든지 변경될 수 있다.For reference, steps S210, S230, and S250/S270 shown in FIG. 8 are not necessarily performed in the order shown in FIG. 8, and the order of execution may be changed as much as possible.

이하에서는, 단계 S300에 적용될 수 있는 본 개시의 몇몇 실시예들에 따른 클러스터링 방법에 대하여 설명하도록 한다.Hereinafter, a clustering method according to some embodiments of the present disclosure that may be applied to step S300 will be described.

몇몇 실시예에서, 악성코드의 파일 타입을 기준으로 악성코드가 그룹핑되고, 악성코드 그룹 별로 클러스터링이 수행될 수 있다. 물론, 상기 클러스터링은 악성코드의 행위 벡터를 대상으로 수행된다. 파일 타입을 기준으로 악성코드를 그룹핑하는 이유는 파일 타입에 따라 악성코드의 악성 행위가 달라지기 때문이다. 즉, 일차적으로 파일 타입에 따라 악성코드를 그룹핑하면, 유사한 악성 행위를 수행하는 악성코드들이 그룹을 형성하게 되고, 형성된 그룹 내에서 클러스터링을 수행하면, 보다 정확하게 행위 유형 별로 악성코드가 분류될 수 있다. 또한, 보다 세분화된 행위 유형 별로 악성코드가 분류될 수 있다.In some embodiments, malware is grouped based on the file type of the malware, and clustering may be performed for each malware group. Of course, the clustering is performed on the action vector of the malicious code. The reason for grouping malicious codes based on file types is that malicious behavior of malicious codes varies depending on file types. That is, when the malicious codes are primarily grouped according to the file type, malicious codes that perform similar malicious behaviors form a group, and if clustering is performed within the formed groups, the malicious codes can be classified by action type more accurately. . In addition, malicious codes can be classified according to more detailed action types.

또한, 몇몇 실시예에서, 상기 파일 타입 별로 분류 모델이 구축될 수 있다. 구체적으로, 제1 파일 타입에 대한 클러스터링 결과에 기반하여 제1 분류 모델이 구축되고, 제2 파일 타입에 대한 클러스터링 결과에 기반하여 제2 분류 모델을 구축할 수 있다. 클러스터링 결과에 기반하여 분류 모델을 구축하는 방법에 대한 자세한 설명은 후술하도록 한다.In addition, in some embodiments, a classification model may be constructed for each file type. Specifically, a first classification model may be built based on the clustering result for the first file type, and a second classification model may be built based on the clustering result for the second file type. A detailed description of how to build a classification model based on clustering results will be described later.

몇몇 실시예에서, 악성코드의 분류 코드를 기준으로 악성코드가 그룹핑되고, 악성코드 그룹 별로 클러스터링이 수행된다. 분류 코드를 기준으로 악성코드를 그룹핑하는 이유는 분류 코드가 악성코드의 행위 유형을 나타내기 때문이다. 즉, 분류 코드는 API 기능코드에 기반하여 생성된 것이기 때문에, 유사한 행위를 수행하는 악성코드들은 유사한 분류 코드를 갖게 된다. 따라서, 분류 코드에 기반하여 형성된 그룹 내에서 클러스터링을 수행하면, 보다 정확하게 행위 유형 별로 악성코드가 분류될 수 있다. 또한, 보다 세분화된 행위 유형 별로 악성코드가 분류될 수 있다.In some embodiments, malicious codes are grouped based on the classification codes of the malicious codes, and clustering is performed for each malicious code group. The reason for grouping malicious codes based on the classification code is that the classification code indicates the behavior type of the malicious code. That is, since the classification code is generated based on the API function code, malicious codes performing similar actions have similar classification codes. Therefore, if clustering is performed within a group formed based on the classification code, the malicious code can be classified more accurately for each type of action. In addition, malicious codes can be classified according to more detailed action types.

도 19 내지 도 21을 참조하여 부연 설명하면, 악성코드(M29, M31, M32)는 분류 코드(151 내지 155)가 동일하기 때문에, 동일한 악성코드 그룹(157)으로 그룹핑된다. 또한, 도 20에 도시된 바와 같이, 제1 악성코드 그룹(161)의 행위 벡터에 대해 클러스터링(163)이 수행되고, 제2 악성코드 그룹(165)에 대해 클러스터링(167)이 수행된다. 이와 같이 클러스터링이 수행되면 도 21에 도시된 클러스터링 결과표(170)와 같이, 분류 코드 별로 악성코드 클러스터가 구축될 수 있다.19 to 21, the malicious codes M29, M31, and M32 are grouped into the same malicious code group 157 because the classification codes 151 to 155 are the same. In addition, as illustrated in FIG. 20, clustering 163 is performed on the action vector of the first malware group 161, and clustering 167 is performed on the second malware group 165. When the clustering is performed in this way, as shown in the clustering result table 170 shown in FIG. 21, a malicious code cluster can be constructed for each classification code.

또한, 몇몇 실시예에서, 상기 분류 코드 별로 분류 모델이 구축될 수 있다. 구체적으로, 제1 분류 코드에 대한 클러스터링 결과에 기반하여 제1 분류 모델이 구축되고, 제2 분류 코드에 대한 클러스터링 결과에 기반하여 제2 분류 모델을 구축할 수 있다. 클러스터링 결과에 기반하여 분류 모델을 구축하는 방법에 대한 자세한 설명은 후술하도록 한다.In addition, in some embodiments, a classification model may be constructed for each classification code. Specifically, a first classification model may be built based on the clustering result for the first classification code, and a second classification model may be built based on the clustering result for the second classification code. A detailed description of how to build a classification model based on clustering results will be described later.

몇몇 실시예에서, 파일 타입 및 분류 코드를 기준으로 악성코드가 그룹핑되고, 악성코드 그룹별로 클러스터링이 수행될 수도 있다.In some embodiments, malicious codes are grouped based on file types and classification codes, and clustering may be performed for each malicious code group.

지금까지 도 19 내지 도 21을 참조하여 본 개시의 몇몇 실시예들에 따른 클러스터링 방법에 대하여 설명하였다. 이하에서는, 도 22 내지 도 24를 참조하여 단계 S400에서 적용될 수 있는 방법들에 대하여 설명하도록 한다.So far, a clustering method according to some embodiments of the present disclosure has been described with reference to FIGS. 19 to 21. Hereinafter, methods that can be applied in step S400 will be described with reference to FIGS. 22 to 24.

클러스터링이 완료되면, 악성코드 클러스터별로 클래스 레이블이 부여된다. 구체적으로, 제1 악성코드 클러스터에 속한 제1 악성코드들에게는 제1 클래스 레이블이 부여되고, 제2 악성코드 클러스터에 속한 제2 악성코드들에게는 제2 클래스 레이블이 부여된다. 즉, 동일 악성코드 클러스터에 속한 악성코드들은 동일한 클래스 레이블을 갖게 된다.When clustering is completed, class labels are assigned to each malware cluster. Specifically, the first class label is assigned to the first malwares belonging to the first malware cluster, and the second class label is assigned to the second malwares belonging to the second malware cluster. That is, malicious codes belonging to the same malicious code cluster have the same class label.

레이블링 작업이 완료되면, 도 22에 도시된 학습 과정(175)을 통해 분류 모델이 구축될 수 있다. 학습 과정(175)에서, 행위 벡터는 입력으로 활용되고 기 부여된 클래스 레이블은 정답 레이블로 활용된다. 도 22은 분류 모델이 심층 신경망인 것을 예로써 도시하고 있으나, 본 개시의 기술적 범위가 이에 한정되는 것은 아니며, SVM(support vector machine)과 같이 다른 종류의 기계 학습 알고리즘 또는 모델이 활용될 수도 있다.When the labeling operation is completed, a classification model may be constructed through the learning process 175 illustrated in FIG. 22. In the learning process 175, the action vector is used as an input and the pre-assigned class label is used as a correct answer label. 22 shows the classification model as an example of a deep neural network, but the technical scope of the present disclosure is not limited thereto, and other types of machine learning algorithms or models may be utilized, such as a support vector machine (SVM).

한편, 본 개시의 다양한 실시예들에 따르면, 정확도 높은 분류 모델을 구축하기 위해 학습 전에 학습 데이터를 선별/정제하는 과정이 수행될 수 있는데, 이하 상기 학습 데이터 선별 과정과 관련된 다양한 실시예에 대하여 설명하도록 한다.Meanwhile, according to various embodiments of the present disclosure, a process of selecting/purifying learning data before learning may be performed in order to construct a highly accurate classification model, and various embodiments related to the learning data selecting process will be described below. Do it.

몇몇 실시예에서, 악성코드 클러스터의 중심(centroid)에서 일정 거리 이내에 위치한 악성코드의 행위 벡터만이 학습 데이터로 선별될 수 있다.In some embodiments, only action vectors of malware located within a certain distance from the centroid of the malware cluster may be selected as training data.

몇몇 실시예에서, 악성코드 클러스터의 중심 벡터와의 유사도가 기준치 이상인 행위 벡터들만이 학습 데이터로 선별될 수 있다. 이때, 상기 유사도는 코사인 유사도에 기초하여 산출될 수 있을 것이나, 본 개시의 기술적 범위가 이에 한정되는 것은 아니다.In some embodiments, only action vectors having a similarity level or higher than the central vector of the malware cluster may be selected as training data. At this time, the similarity may be calculated based on the cosine similarity, but the technical scope of the present disclosure is not limited thereto.

몇몇 실시예에서, 악성코드 클러스터 내에서 밀집도가 기준치 이상인 영역에 위치한 행위 벡터만이 학습 데이터로 선별될 수 있다. 가령, 도 23에 도시된 바와 같이, 제1 클러스터(181)에서 밀집도가 기준치 이상인 영역(182)의 행위 벡터에만 제1 클래스 레이블(183)이 부여되고, 제2 클러스터(184)에서 밀집도가 기준치 이상인 영역(185)의 행위 벡터에만 제2 클래스 레이블(186)이 부여되어, 학습 데이터로 활용될 수 있다.In some embodiments, only action vectors located in a region where the density is greater than or equal to a reference value in the malware cluster may be selected as learning data. For example, as illustrated in FIG. 23, in the first cluster 181, the first class label 183 is assigned only to the action vector of the region 182 in which the density is greater than or equal to the reference value, and the density in the second cluster 184 is the reference value. The second class label 186 is assigned only to the action vector of the above-described region 185 and can be used as learning data.

몇몇 실시예에서, 전술한 실시예들의 조합에 기초하여 학습 데이터 선별이 이루어질 수 있다. 가령, 악성코드 클러스터의 중심을 기준으로 일정 거리 이내에 위치한 제1 행위 벡터들과 상기 일정 거리 바깥에 위치한 영역 중에서 밀집도가 기준치 이상인 영역의 제2 행위 벡터들만이 학습 데이터로 선별될 수도 있다.In some embodiments, learning data selection may be based on a combination of the above-described embodiments. For example, only the first action vectors located within a certain distance based on the center of the malware cluster and the second action vectors in a region having a density greater than or equal to a reference value among areas located outside the predetermined distance may be selected as learning data.

몇몇 실시예에서, 정확도 높은 분류 모델을 구축하기 위해 가중치 기반 학습이 수행될 수 있다. 가령, 도 24에 도시된 바와 같이, 각 행위 벡터(194 내지 196)에 샘플 가중치가 부여되고, 상기 샘플 가중치에 기반하여 분류 모델(197)에 대한 기계 학습이 수행될 수 있다. 이때, 샘플 가중치에 기반하여 학습을 수행하는 방식은 학습 오차(즉, 정답 값과 예측 값의 차이)를 상기 샘플 가중치에 따라 조정(즉, 증감)하고, 조정된 학습 오차를 최소화하는 방향으로 분류 모델(197)의 가중치를 갱신하는 방식이 될 수 있을 것이나, 본 개시의 기술적 범위가 이에 한정되는 것은 아니다.In some embodiments, weight-based learning can be performed to build a highly accurate classification model. For example, as illustrated in FIG. 24, a sample weight is assigned to each action vector 194 to 196, and machine learning for the classification model 197 may be performed based on the sample weight. At this time, the method of performing learning based on the sample weight adjusts the learning error (that is, the difference between the correct answer value and the predicted value) according to the sample weight (ie increases or decreases) and classifies the adjusted learning error in the direction of minimizing. It may be a method of updating the weight of the model 197, but the technical scope of the present disclosure is not limited thereto.

도 24에 도시된 바와 같이, 제1 행위 벡터(194)의 샘플 가중치는 제1 행위 벡터(194)에 대응되는 포인트(191)와 클러스터 중심(193) 간의 거리에 기초하여 결정(e.g. 거리가 가까울수록 샘플 가중치는 높은 값으로 결정됨)되고, 제2 행위 벡터(195)의 샘플 가중치는 제2 행위 벡터(195)에 대응되는 포인트(192)와 클러스터 중심(193) 간의 거리에 기초하여 결정될 수 있다. 그러나, 본 개시의 기술적 범위가 이에 한정되는 것은 아니다. 가령, 상기 샘플 가중치는 행위 벡터와 클러스터의 중심 벡터 간의 유사도에 기초하여 결정(e.g. 유사도가 높을수록 샘플 가중치는 높은 값으로 결정됨)될 수도 있다.As illustrated in FIG. 24, the sample weight of the first action vector 194 is determined based on the distance between the point 191 corresponding to the first action vector 194 and the cluster center 193 (eg, the distance is close). The collected sample weight is determined to be a high value), and the sample weight of the second action vector 195 may be determined based on the distance between the point 192 corresponding to the second action vector 195 and the cluster center 193. . However, the technical scope of the present disclosure is not limited thereto. For example, the sample weight may be determined based on the similarity between the behavior vector and the central vector of the cluster (e.g., the higher the similarity, the higher the sample weight is determined).

지금까지 도 22 내지 도 24를 참조하여 본 개시의 다양한 실시예들에 따른 학습 데이터 선별 방법과 학습 방법 등에 대하여 설명하였다. 상술한 방법에 따르면, 정제된 학습 데이터를 활용하여 학습함으로써 분류 모델의 성능이 향상될 수 있다. 뿐만 아니라, 가중치 기반 학습을 통해 클러스터 내 대표적인 행위 벡터들(e.g. 중심에 가까이 위치한 행위 벡터)을 더 강하게 학습함으로써 분류 모델의 성능이 더욱 개선될 수 있다.So far, the learning data selection method and the learning method according to various embodiments of the present disclosure have been described with reference to FIGS. 22 to 24. According to the above-described method, the performance of the classification model may be improved by learning using refined learning data. In addition, the performance of the classification model may be further improved by more strongly learning representative behavior vectors (e.g. behavior vectors located close to the center) in the cluster through weight-based learning.

이하에서는, 도 25를 참조하여 본 개시의 몇몇 실시예들에 따른 신규 악성코드 분류 방법에 대하여 설명하도록 한다.Hereinafter, a method for classifying a new malicious code according to some embodiments of the present disclosure will be described with reference to FIG. 25.

도 25는 본 개시의 몇몇 실시예들에 따른 신규 악성코드 분류 방법을 나타내는 예시적인 흐름도이다. 단, 이는 본 개시의 목적을 달성하기 위한 바람직한 실시예일뿐이며, 필요에 따라 일부 단계가 추가되거나 삭제될 수 있음은 물론이다.25 is an exemplary flowchart illustrating a method for classifying a new malicious code according to some embodiments of the present disclosure. However, this is only a preferred embodiment for achieving the object of the present disclosure, and of course, some steps may be added or deleted as necessary.

도 25에 도시된 바와 같이, 상기 신규 악성코드 분류 방법은 신규 악성코드에 대한 행위 분석 결과를 획득하는 단계 S500에서 시작된다. 이때, 상기 행위 분석 결과는 API 콜 시퀀스 정보를 포함한다.As illustrated in FIG. 25, the method for classifying new malware starts at step S500 for obtaining a result of behavior analysis for the new malware. At this time, the behavior analysis result includes API call sequence information.

단계 S600에서, 행위 분석 결과를 전처리하여 신규 악성코드의 행위 벡터가 생성된다. 본 단계 S600에 대한 설명은 도 8 내지 도 18의 설명 부분을 참조하도록 한다.In step S600, an action vector of a new malicious code is generated by preprocessing the action analysis result. The description of the step S600 will be referred to the description of FIGS. 8 to 18.

단계 S700에서, 상기 신규 악성코드에 대응되는 분류 모델에 상기 생성된 행위 벡터를 입력하고, 출력 결과에 따라 신규 악성코드가 분류된다. 여기서, 상기 대응되는 분류 모델은 상기 신규 악성코드의 파일 타입 또는 분류 코드에 의해 결정될 수 있다.In step S700, the generated action vector is input to the classification model corresponding to the new malicious code, and the new malicious code is classified according to the output result. Here, the corresponding classification model may be determined by the file type or classification code of the new malicious code.

예를 들어, 파일 타입 별로 분류 모델이 구축된 경우라면, 상기 신규 악성코드의 파일 타입에 매칭되는 분류 모델로 상기 행위 벡터가 입력될 수 있다. 다른 예를 들어, 분류 코드 별로 분류 모델이 구축된 경우라면, 상기 신규 악성코드의 분류 코드에 매칭되는 분류 모델로 상기 행위 벡터가 입력될 수 있다.For example, if a classification model is constructed for each file type, the behavior vector may be input as a classification model matching the file type of the new malicious code. For another example, if a classification model is constructed for each classification code, the action vector may be input as a classification model matching the classification code of the new malicious code.

전술한 단계 S500 내지 S700 중에서, 단계 S500은 수집부(61)에 의해 수행되고, 단계 S600은 전처리부(63)에 의해 수행되며, 단계 S700은 분류부(69)에 의해 수행될 수 있다.Among the above-described steps S500 to S700, step S500 is performed by the collecting unit 61, step S600 is performed by the pre-processing unit 63, and step S700 can be performed by the sorting unit 69.

지금까지 도 25를 참조하여 본 개시의 몇몇 실시예들에 따른 신규 악성코드 분류 방법에 대하여 설명하였다. 상술한 방법에 따르면, 행위 기반 분류 모델을 통해 신규 악성코드에 대한 분류 정보와 유사한 악성 행위를 수행하는 유사 악성코드(e.g. 변종 악성코드)들이 확인될 수 있다. 따라서, 보안 관리자는 상기 유사 악성코드에 의해 수행된 사이버 침해 사고의 규모 및 위험성에 기반하여 신규 악성코드의 위험도를 파악할 수 있으며, 위험도에 따라 적절한 대응 우선 순위를 지정함으로써 체계적인으로 사이버 침해 사고에 대응할 수 있게 된다.So far, a method for classifying a new malicious code according to some embodiments of the present disclosure has been described with reference to FIG. 25. According to the above-described method, similar malicious codes (e.g. variant malicious codes) performing malicious actions similar to the classification information for new malicious codes may be identified through the action-based classification model. Therefore, the security manager can grasp the risk of new malicious code based on the scale and risk of cyber infringement incidents performed by the similar malicious codes, and systematically respond to cyber infringement incidents by assigning an appropriate response priority according to the risk. It becomes possible.

이하에서는, 본 개시의 다양한 실시예들에 따른 장치(e.g. 분류 장치 20)/시스템(e.g. 행위 분석 시스템 10)을 구현할 수 있는 예시적인 컴퓨팅 장치에 대하여 설명하도록 한다.Hereinafter, an exemplary computing device capable of implementing a device (e.g. classification device 20)/system (e.g. behavior analysis system 10) according to various embodiments of the present disclosure will be described.

도 26은 본 개시의 다양한 실시예들에 따른 장치/시스템을 구현할 수 있는 예시적인 컴퓨팅 장치를 나타내는 예시적인 하드웨어 구성도이다.26 is an example hardware configuration diagram illustrating an example computing device capable of implementing a device/system in accordance with various embodiments of the present disclosure.

도 26에 도시된 바와 같이, 컴퓨팅 장치(200)는 하나 이상의 프로세서(210), 버스(250), 통신 인터페이스(270), 프로세서(210)에 의하여 수행되는 컴퓨터 프로그램을 로드(load)하는 메모리(230)와, 컴퓨터 프로그램(291)을 저장하는 스토리지(290)를 포함할 수 있다. 다만, 도 26에는 본 개시의 실시예와 관련 있는 구성요소들만이 도시되어 있다. 따라서, 본 개시가 속한 기술분야의 통상의 기술자라면 도 26에 도시된 구성요소들 외에 다른 범용적인 구성 요소들이 더 포함될 수 있음을 알 수 있다.As illustrated in FIG. 26, the computing device 200 may include a memory (for loading) a computer program performed by one or more processors 210, a bus 250, a communication interface 270, and a processor 210. 230, and a storage 290 for storing the computer program 291. However, only components related to the exemplary embodiment of the present disclosure are illustrated in FIG. 26. Accordingly, a person skilled in the art to which the present disclosure belongs may recognize that other general-purpose components may be further included in addition to the components illustrated in FIG. 26.

프로세서(210)는 컴퓨팅 장치(200)의 각 구성의 전반적인 동작을 제어한다. 프로세서(210)는 CPU(Central Processing Unit), MPU(Micro Processor Unit), MCU(Micro Controller Unit), GPU(Graphic Processing Unit) 또는 본 개시의 기술 분야에 잘 알려진 임의의 형태의 프로세서를 포함하여 구성될 수 있다. 또한, 프로세서(210)는 본 개시의 실시예들에 따른 방법을 실행하기 위한 적어도 하나의 애플리케이션 또는 프로그램에 대한 연산을 수행할 수 있다. 컴퓨팅 장치(200)는 하나 이상의 프로세서를 구비할 수 있다.The processor 210 controls the overall operation of each component of the computing device 200. The processor 210 comprises a CPU (Central Processing Unit), MPU (Micro Processor Unit), MCU (Micro Controller Unit), GPU (Graphic Processing Unit) or any type of processor well known in the art of the present disclosure. Can be. Also, the processor 210 may perform operations on at least one application or program for executing the method according to embodiments of the present disclosure. Computing device 200 may include one or more processors.

메모리(230)는 각종 데이터, 명령 및/또는 정보를 저장한다. 메모리(230)는 전술한 본 개시의 다양한 실시예들에 따른 방법/동작을 실행하기 위하여 스토리지(290)로부터 하나 이상의 프로그램(291)을 로드할 수 있다. 가령, 메모리(230)에 컴퓨터 프로그램(291)이 로드되면, 도 4 내지 도 6에 도시된 바와 같이 모듈이 메모리(230) 상에 구현될 수 있다. 메모리(230)는 RAM과 같은 휘발성 메모리로 구현될 수 있을 것이나, 본 개시의 기술적 범위가 이에 한정되는 것은 아니다.The memory 230 stores various data, commands and/or information. The memory 230 may load one or more programs 291 from the storage 290 to execute the method/operation according to various embodiments of the present disclosure described above. For example, when the computer program 291 is loaded in the memory 230, a module may be implemented on the memory 230 as illustrated in FIGS. 4 to 6. The memory 230 may be implemented as a volatile memory such as RAM, but the technical scope of the present disclosure is not limited thereto.

버스(250)는 컴퓨팅 장치(200)의 구성 요소 간 통신 기능을 제공한다. 버스(250)는 주소 버스(Address Bus), 데이터 버스(Data Bus) 및 제어 버스(Control Bus) 등 다양한 형태의 버스로 구현될 수 있다.The bus 250 provides communication functions between components of the computing device 200. The bus 250 may be implemented as various types of buses, such as an address bus, a data bus, and a control bus.

통신 인터페이스(270)는 컴퓨팅 장치(200)의 유무선 인터넷 통신을 지원한다. 또한, 통신 인터페이스(270)는 인터넷 통신 외의 다양한 통신 방식을 지원할 수도 있다. 이를 위해, 통신 인터페이스(270)는 본 개시의 기술 분야에 잘 알려진 통신 모듈을 포함하여 구성될 수 있다.The communication interface 270 supports wired and wireless Internet communication of the computing device 200. In addition, the communication interface 270 may support various communication methods other than Internet communication. To this end, the communication interface 270 may include a communication module well known in the art of the present disclosure.

스토리지(290)는 상기 하나 이상의 프로그램(291)을 비임시적으로 저장할 수 있다. 스토리지(290)는 ROM(Read Only Memory), EPROM(Erasable Programmable ROM), EEPROM(Electrically Erasable Programmable ROM), 플래시 메모리 등과 같은 비휘발성 메모리, 하드 디스크, 착탈형 디스크, 또는 본 개시가 속하는 기술 분야에서 잘 알려진 임의의 형태의 컴퓨터로 읽을 수 있는 기록 매체를 포함하여 구성될 수 있다.The storage 290 may store the one or more programs 291 non-temporarily. The storage 290 is well-known in the art of non-volatile memory such as read only memory (ROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EPMROM), flash memory, hard disks, removable disks, or the present disclosure. And any known form of computer-readable recording media.

컴퓨터 프로그램(291)은 메모리(230)에 로드될 때 프로세서(210)로 하여금 본 개시의 다양한 실시예들에 따른 방법/동작을 수행하도록 하는 하나 이상의 인스트럭션들(instructions)을 포함할 수 있다. 즉, 프로세서(210)는 상기 하나 이상의 인스트럭션들을 실행함으로써, 본 개시의 다양한 실시예에 따른 동작/방법들을 수행할 수 있다.Computer program 291 can include one or more instructions that, when loaded into memory 230, cause processor 210 to perform a method/operation in accordance with various embodiments of the present disclosure. That is, the processor 210 may perform operations/methods according to various embodiments of the present disclosure by executing the one or more instructions.

예를 들어, 컴퓨터 프로그램(291)은 복수의 악성코드에 대한 API 콜 시퀀스(call sequence) 정보를 획득하는 동작, TF-IDF(Term Frequency-Inverse Document Frequency) 기법을 이용하여 상기 API 콜 시퀀스 정보로부터 주요 API에 대한 콜 시퀀스 정보를 추출하는 동작, 상기 추출된 콜 시퀀스 정보에 기초하여 상기 복수의 악성코드 각각에 대한 행위 벡터를 생성하는 동작 및 상기 생성된 행위 벡터를 클러스터링하여, 악성코드 클러스터를 구축하는 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함할 수 있다. 이와 같은 경우, 컴퓨팅 장치(200)를 통해 본 개시의 몇몇 실시예들에 따른 분류 장치(20)가 구현될 수 있다.For example, the computer program 291 obtains API call sequence information for a plurality of malicious codes, from the API call sequence information using TF-IDF (Term Frequency-Inverse Document Frequency) technique Extracting call sequence information for major APIs, generating action vectors for each of the plurality of malicious codes based on the extracted call sequence information, and clustering the generated action vectors to build a malware cluster It may include one or more instructions to perform the operation. In such a case, the classification device 20 according to some embodiments of the present disclosure may be implemented through the computing device 200.

예를 들어, 컴퓨터 프로그램(291)은 기 정의된 API 기능코드를 이용하여 복수의 악성코드 각각의 행위 유형을 나타내는 분류 코드를 생성하는 동작, 상기 생성된 분류 코드를 기준으로 상기 복수의 악성코드를 그룹핑하는 동작 및 상기 그룹핑을 통해 형성된 악성코드 그룹 별로 클러스터링을 수행하여, 상기 악성코드 그룹 별로 악성코드 클러스터를 구축하는 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함할 수 있다. 이와 같은 경우, 컴퓨팅 장치(200)를 통해 본 개시의 다른 몇몇 실시예들에 따른 분류 장치(20)가 구현될 수 있다.For example, the computer program 291 generates a classification code indicating each behavior type of a plurality of malicious codes using a predefined API function code, and the plurality of malicious codes based on the generated classification code. It may include one or more instructions to perform grouping operation and clustering for each malicious code group formed through the grouping to perform an operation for building a malicious code cluster for each malicious code group. In such a case, the classification device 20 according to some other embodiments of the present disclosure may be implemented through the computing device 200.

지금까지 도 26을 참조하여 본 개시의 다양한 실시예들에 따른 장치/시스템을 구현할 수 있는 예시적인 컴퓨팅 장치에 대하여 설명하였다.So far, an exemplary computing device capable of implementing a device/system according to various embodiments of the present disclosure has been described with reference to FIG. 26.

지금까지 도 1 내지 도 26을 참조하여 본 개시의 다양한 실시예들 및 그 실시예들에 따른 효과들을 언급하였다. 본 개시의 기술적 사상에 따른 효과들은 이상에서 언급한 효과들로 제한되지 않으며, 언급되지 않은 또 다른 효과들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해될 수 있을 것이다.So far, various embodiments of the present disclosure and effects according to the embodiments have been described with reference to FIGS. 1 to 26. Effects according to the technical spirit of the present disclosure are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those skilled in the art from the following description.

지금까지 도 1 내지 도 26을 참조하여 설명된 본 개시의 기술적 사상은 컴퓨터가 읽을 수 있는 매체 상에 컴퓨터가 읽을 수 있는 코드로 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록 매체는, 예를 들어 이동형 기록 매체(CD, DVD, 블루레이 디스크, USB 저장 장치, 이동식 하드 디스크)이거나, 고정식 기록 매체(ROM, RAM, 컴퓨터 구비 형 하드 디스크)일 수 있다. 상기 컴퓨터로 읽을 수 있는 기록 매체에 기록된 상기 컴퓨터 프로그램은 인터넷 등의 네트워크를 통하여 다른 컴퓨팅 장치에 전송되어 상기 다른 컴퓨팅 장치에 설치될 수 있고, 이로써 상기 다른 컴퓨팅 장치에서 사용될 수 있다.The technical idea of the present disclosure described so far with reference to FIGS. 1 to 26 may be embodied as computer readable codes on a computer readable medium. The computer-readable recording medium may be, for example, a removable recording medium (CD, DVD, Blu-ray Disc, USB storage device, removable hard disk), or a fixed recording medium (ROM, RAM, hard disk equipped with a computer). You can. The computer program recorded on the computer-readable recording medium may be transmitted to another computing device through a network such as the Internet and installed on the other computing device, and thus used on the other computing device.

이상에서, 본 개시의 실시예를 구성하는 모든 구성 요소들이 하나로 결합되거나 결합되어 동작하는 것으로 설명되었다고 해서, 본 개시의 기술적 사상이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 개시의 목적 범위 안에서라면, 그 모든 구성요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다.In the above, even if all components constituting the embodiments of the present disclosure are described as being combined or operated as one, the technical spirit of the present disclosure is not necessarily limited to these embodiments. That is, within the scope of the present disclosure, all of the components may be selectively combined and operated.

도면에서 동작들이 특정한 순서로 도시되어 있지만, 반드시 동작들이 도시된 특정한 순서로 또는 순차적 순서로 실행되어야만 하거나 또는 모든 도시 된 동작들이 실행되어야만 원하는 결과를 얻을 수 있는 것으로 이해되어서는 안 된다. 특정 상황에서는, 멀티태스킹 및 병렬 처리가 유리할 수도 있다. 더욱이, 위에 설명한 실시예들에서 다양한 구성들의 분리는 그러한 분리가 반드시 필요한 것으로 이해되어서는 안 되고, 설명된 프로그램 컴포넌트들 및 시스템들은 일반적으로 단일 소프트웨어 제품으로 함께 통합되거나 다수의 소프트웨어 제품으로 패키지 될 수 있음을 이해하여야 한다.Although the operations are shown in a specific order in the drawings, it should not be understood that the operations must be performed in a specific order or in a sequential order, or all illustrated operations must be executed to obtain a desired result. In certain situations, multitasking and parallel processing may be advantageous. Moreover, the separation of the various configurations in the above-described embodiments should not be understood as such separation is necessary, and the described program components and systems may generally be integrated together into a single software product or packaged into multiple software products. It should be understood that there is.

이상 첨부된 도면을 참조하여 본 개시의 실시예들을 설명하였지만, 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자는 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 본 개시가 다른 구체적인 형태로도 실시될 수 있다는 것을 이해할 수 있다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로 이해해야만 한다. 본 개시의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 개시에 의해 정의되는 기술적 사상의 권리범위에 포함되는 것으로 해석되어야 할 것이다.Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, a person of ordinary skill in the art to which the present disclosure pertains may implement the present disclosure in other specific forms without changing the technical spirit or essential features. You can understand that there is. Therefore, it should be understood that the above-described embodiments are illustrative in all respects and not restrictive. The scope of protection of the present disclosure should be interpreted by the claims below, and all technical spirits within the scope equivalent thereto should be interpreted as being included in the scope of the technical spirits defined by the present disclosure.

Claims (22)

컴퓨팅 장치에 의하여 수행되는 악성코드 분류 방법에 있어서,
복수의 악성코드에 대한 API 콜 시퀀스(call sequence) 정보를 획득하는 단계;
TF-IDF(Term Frequency-Inverse Document Frequency) 기법을 이용하여 상기 API 콜 시퀀스 정보로부터 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계;
상기 추출된 콜 시퀀스 정보에 기초하여 상기 복수의 악성코드 각각에 대한 행위 벡터를 생성하는 단계; 및
상기 생성된 행위 벡터를 클러스터링하여, 악성코드 클러스터를 구축하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
In the malicious code classification method performed by the computing device,
Obtaining API call sequence information for a plurality of malicious codes;
Extracting call sequence information for a major API from the API call sequence information using a TF-IDF (Term Frequency-Inverse Document Frequency) technique;
Generating an action vector for each of the plurality of malicious codes based on the extracted call sequence information; And
Clustering the generated action vector, characterized in that it comprises the step of building a malware cluster,
How to classify malware.
제1 항에 있어서,
상기 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계는,
상기 복수의 악성코드 중 문서형 악성코드에 한하여 상기 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 1,
Extracting call sequence information for the main API,
Characterized in that it comprises the step of extracting the call sequence information for the main API only for document-type malware among the plurality of malware,
How to classify malware.
제1 항에 있어서,
상기 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계는,
제1 악성코드에 의해 호출된 API 중에서 TF-IDF 값이 기준치 이상인 API를 제1 주요 API로 선정하는 단계;
상기 제1 악성코드의 API 콜 시퀀스에서 상기 제1 주요 API를 추출하여 상기 제1 악성코드의 주요 API 콜 시퀀스를 구성하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 1,
Extracting call sequence information for the main API,
Selecting an API having a TF-IDF value equal to or greater than a reference value among APIs called by the first malicious code as the first main API;
And extracting the first main API from the API call sequence of the first malicious code to construct a main API call sequence of the first malicious code.
How to classify malware.
제1 항에 있어서,
상기 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계는,
제1 악성코드에 의해 호출된 API 중에서 TF-IDF 값이 기준치 이상인 API를 제1 주요 API로 선정하는 단계;
상기 제1 악성코드의 API 콜 시퀀스에서 상기 제1 주요 API와 상기 제1 주요 API에 인접한 API를 함께 추출하여 상기 제1 악성코드의 주요 API 콜 시퀀스를 구성하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 1,
Extracting call sequence information for the main API,
Selecting an API having a TF-IDF value equal to or greater than a reference value among APIs called by the first malicious code as the first main API;
And extracting together the first main API and an API adjacent to the first main API from the API call sequence of the first malicious code to construct a main API call sequence of the first malicious code.
How to classify malware.
제4 항에 있어서,
상기 추출되는 인접 API의 개수는 상기 제1 주요 API의 TF-IDF 값에 기초하여 결정되는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 4,
The number of adjacent APIs to be extracted is determined based on the TF-IDF value of the first main API,
How to classify malware.
제1 항에 있어서,
상기 행위 벡터를 생성하는 단계는,
상기 추출된 콜 시퀀스 정보로부터 n-gram 단위의 행위 특징을 추출하는 단계; 및
상기 추출된 행위 특징을 기초로 상기 행위 벡터를 생성하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 1,
Generating the behavior vector,
Extracting n-gram unit behavior characteristics from the extracted call sequence information; And
And generating the action vector based on the extracted action feature.
How to classify malware.
제1 항에 있어서,
상기 악성코드 클러스터를 구축하는 단계는,
각 악성코드의 파일 타입을 식별하는 단계;
상기 식별된 파일 타입을 기준으로 상기 복수의 악성코드를 그룹핑하는 단계; 및
상기 그룹핑을 통해 형성된 악성코드 그룹 별로 클러스터링을 수행하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 1,
The step of building the malware cluster,
Identifying a file type of each malicious code;
Grouping the plurality of malicious codes based on the identified file type; And
Characterized in that it comprises the step of performing clustering for each malware group formed through the grouping,
How to classify malware.
제1 항에 있어서,
상기 악성코드 클러스터를 구축하는 단계는,
기 정의된 API 기능코드를 이용하여 악성코드 별로 행위 유형을 나타내는 분류 코드를 생성하는 단계;
상기 생성된 분류 코드를 기준으로 상기 복수의 악성코드를 그룹핑하는 단계; 및
상기 그룹핑을 통해 형성된 악성코드 그룹 별로 클러스터링을 수행하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 1,
The step of building the malware cluster,
Generating a classification code indicating an action type for each malicious code using the predefined API function code;
Grouping the plurality of malicious codes based on the generated classification code; And
Characterized in that it comprises the step of performing clustering for each malware group formed through the grouping,
How to classify malware.
제1 항에 있어서,
상기 구축된 악성코드 클러스터 별로 동일한 클래스 레이블을 부여하는 단계; 및
상기 부여된 클래스 레이블과 상기 악성코드 클러스터에 속한 행위 벡터를 학습하여 악성코드를 분류하기 위한 분류 모델을 구축하는 단계를 더 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 1,
Assigning the same class label for each of the constructed malware clusters; And
Characterized in that it further comprises the step of constructing a classification model for classifying the malicious code by learning the assigned class label and the action vector belonging to the malicious code cluster,
How to classify malware.
제9 항에 있어서,
신규 악성코드에 대한 API 콜 시퀀스 정보를 획득하는 단계;
상기 신규 악성코드의 API 콜 시퀀스 정보로부터 상기 신규 악성코드에 대한 행위 벡터를 생성하는 단계; 및
상기 구축된 분류 모델에 상기 신규 악성코드의 행위 벡터를 입력하고, 상기 구축된 분류 모델의 출력 값에 따라 상기 신규 악성코드를 분류하는 단계를 더 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 9,
Obtaining API call sequence information for new malware;
Generating an action vector for the new malware from the API call sequence information of the new malware; And
Characterized in that it further comprises the step of inputting the behavior vector of the new malware into the constructed classification model, and classifying the new malicious code according to the output value of the constructed classification model,
How to classify malware.
제9 항에 있어서,
상기 악성코드 클러스터 내에서 밀집도가 기준치 미만인 영역에 위치한 행위 벡터는 상기 분류 모델의 학습에 이용되지 않는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 9,
Characterized in that the behavior vector located in a region where the density is less than the reference value in the malware cluster is not used for learning the classification model,
How to classify malware.
제9 항에 있어서,
상기 분류 모델을 구축하는 단계는,
상기 악성코드 클러스터에 속한 행위 벡터 별로 가중치를 부여하는 단계; 및
상기 부여된 가중치에 기반하여 상기 분류 모델을 학습시키는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 9,
The step of building the classification model,
Assigning weights to each action vector belonging to the malicious code cluster; And
Characterized in that it comprises the step of training the classification model based on the assigned weight,
How to classify malware.
제12 항에 있어서,
상기 가중치는 상기 악성코드 클러스터의 중심에서 상기 행위 벡터가 위치한 포인트까지의 거리에 기초하여 결정되는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 12,
The weight is determined based on the distance from the center of the malware cluster to the point where the action vector is located,
How to classify malware.
제12 항에 있어서,
상기 가중치는 상기 악성코드 클러스터의 중심 벡터와 상기 행위 벡터 간의 유사도에 기초하여 결정되는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 12,
The weight is determined based on the similarity between the central vector of the malicious code cluster and the action vector,
How to classify malware.
제1 항에 있어서,
상기 클러스터링은,
k-medoids 클러스터링 알고리즘에 의해 수행되는 것을 특징으로 하는,
악성코드 분류 방법.
According to claim 1,
The clustering,
Characterized by a k-medoids clustering algorithm,
How to classify malware.
컴퓨팅 장치에 의하여 수행되는 악성코드 분류 방법에 있어서,
기 정의된 API 기능코드를 이용하여 복수의 악성코드 각각의 행위 유형을 나타내는 분류 코드를 생성하는 단계;
상기 생성된 분류 코드를 기준으로 상기 복수의 악성코드를 그룹핑하는 단계; 및
상기 그룹핑을 통해 형성된 악성코드 그룹 별로 클러스터링을 수행하여, 상기 악성코드 그룹 별로 악성코드 클러스터를 구축하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
In the malicious code classification method performed by the computing device,
Generating a classification code indicating an action type of each of the plurality of malicious codes using the predefined API function codes;
Grouping the plurality of malicious codes based on the generated classification code; And
And performing clustering for each malicious code group formed through the grouping, and constructing a malicious code cluster for each malicious code group.
How to classify malware.
제16 항에 있어서,
상기 분류 코드를 생성하는 단계는,
제1 악성코드에 의해 호출된 제1 API에 대한 제1 기능코드를 얻어오는 단계;
상기 제1 악성코드에 의해 호출된 제2 API에 대한 제2 기능코드를 얻어오는 단계; 및
상기 제1 기능코드 및 상기 제2 기능코드를 종합하여 상기 제1 악성코드에 대한 분류 코드를 생성하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 16,
Generating the classification code,
Obtaining a first function code for the first API called by the first malware;
Obtaining a second function code for the second API called by the first malicious code; And
Comprising the step of synthesizing the first function code and the second function code to generate a classification code for the first malicious code,
How to classify malware.
제16 항에 있어서,
상기 악성코드 그룹 별로 악성코드 클러스터를 구축하는 단계는,
제1 악성코드 그룹에 속한 제1 복수의 악성코드의 API 콜 시퀀스(call sequence) 정보에 기초하여 상기 제1 복수의 악성코드 각각에 대한 행위 벡터를 생성하는 단계; 및
상기 생성된 행위 벡터를 클러스터링하여, 상기 제1 악성코드 그룹에 대한 악성코드 클러스터를 구축하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 16,
The step of building a malware cluster for each of the malicious code groups,
Generating an action vector for each of the first plurality of malicious codes based on API call sequence information of the first plurality of malicious codes belonging to the first malicious code group; And
Clustering the generated action vector, characterized in that it comprises the step of building a malware cluster for the first group of malware,
How to classify malware.
제18 항에 있어서,
상기 행위 벡터를 생성하는 단계는,
TF-IDF(Term Frequency-Inverse Document Frequency) 기법을 이용하여 상기 API 콜 시퀀스 정보에서 주요 API에 대한 콜 시퀀스 정보를 추출하는 단계; 및
상기 추출된 콜 시퀀스 정보에 기초하여 상기 제1 복수의 악성코드 각각에 대한 행위 벡터를 생성하는 단계를 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 18,
Generating the behavior vector,
Extracting call sequence information for a major API from the API call sequence information using a TF-IDF (Term Frequency-Inverse Document Frequency) technique; And
And generating an action vector for each of the first plurality of malicious codes based on the extracted call sequence information.
How to classify malware.
제16 항에 있어서,
상기 악성코드 그룹 별로 구축된 악성코드 클러스터를 이용하여, 상기 악성코드 그룹 별로 분류 모델을 구축하는 단계를 더 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 16,
It characterized in that it further comprises the step of building a classification model for each of the malicious code groups, using the malicious code clusters built for each of the malicious code groups,
How to classify malware.
제20 항에 있어서,
상기 기 정의된 API 기능코드를 이용하여 신규 악성코드에 대한 분류 코드를 생성하는 단계;
상기 구축된 분류 모델 중에서 상기 신규 악성코드의 분류 코드에 매칭되는 분류 모델을 선정하는 단계; 및
상기 선정된 분류 모델을 이용하여 상기 신규 악성코드를 분류하는 단계를 더 포함하는 것을 특징으로 하는,
악성코드 분류 방법.
The method of claim 20,
Generating classification codes for new malicious codes using the predefined API function codes;
Selecting a classification model matching the classification code of the new malicious code from the constructed classification model; And
Characterized in that it further comprises the step of classifying the new malicious code using the selected classification model,
How to classify malware.
프로세서; 및
상기 프로세서에 의해 실행되는 하나 이상의 인스트럭션들(instructions)을 포함하는 메모리를 포함하되,
상기 프로세서는,
상기 하나 이상의 인스트럭션들을 실행함으로써,
복수의 악성코드에 대한 API 콜 시퀀스(call sequence) 정보를 획득하고,
TF-IDF(Term Frequency-Inverse Document Frequency) 기법을 이용하여 상기 API 콜 시퀀스 정보로부터 주요 API에 대한 콜 시퀀스 정보를 추출하며,
상기 추출된 콜 시퀀스 정보에 기초하여 상기 복수의 악성코드 각각에 대한 행위 벡터를 생성하고,
상기 생성된 행위 벡터를 클러스터링하여, 악성코드 클러스터를 구축하는 것을 특징으로 하는,
악성코드 분류 장치.
Processor; And
A memory comprising one or more instructions executed by the processor,
The processor,
By executing the one or more instructions,
Obtain API call sequence information for a plurality of malicious codes,
The call sequence information for the main API is extracted from the API call sequence information by using TF-IDF (Term Frequency-Inverse Document Frequency) technique,
Create an action vector for each of the plurality of malicious codes based on the extracted call sequence information,
Characterized in that by constructing a cluster of malicious codes by clustering the generated action vector,
Malware classification device.
KR1020180162434A 2018-12-14 2018-12-14 Method for classifying malware and apparatus thereof KR20200073822A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180162434A KR20200073822A (en) 2018-12-14 2018-12-14 Method for classifying malware and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180162434A KR20200073822A (en) 2018-12-14 2018-12-14 Method for classifying malware and apparatus thereof

Publications (1)

Publication Number Publication Date
KR20200073822A true KR20200073822A (en) 2020-06-24

Family

ID=71408058

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180162434A KR20200073822A (en) 2018-12-14 2018-12-14 Method for classifying malware and apparatus thereof

Country Status (1)

Country Link
KR (1) KR20200073822A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102302484B1 (en) 2020-11-26 2021-09-14 숭실대학교산학협력단 Method for mobile malware classification based feature selection, recording medium and device for performing the method
KR20220022170A (en) * 2020-08-18 2022-02-25 아주대학교산학협력단 System and method for analyzing malware in application
KR20220097767A (en) * 2020-12-31 2022-07-08 주식회사 이스트시큐리티 Apparatus for generating signature that reflects the similarity of the malware detection classification system based on deep neural networks, method therefor, and computer recordable medium storing program to perform the method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150124020A (en) 2014-04-25 2015-11-05 (주) 세인트 시큐리티 System and method for setting malware identification tag, and system for searching malware using malware identification tag

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150124020A (en) 2014-04-25 2015-11-05 (주) 세인트 시큐리티 System and method for setting malware identification tag, and system for searching malware using malware identification tag

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220022170A (en) * 2020-08-18 2022-02-25 아주대학교산학협력단 System and method for analyzing malware in application
KR102302484B1 (en) 2020-11-26 2021-09-14 숭실대학교산학협력단 Method for mobile malware classification based feature selection, recording medium and device for performing the method
WO2022114392A1 (en) * 2020-11-26 2022-06-02 숭실대학교 산학협력단 Feature selection-based mobile malicious code classification method, and recording medium and device for performing same
US11809557B2 (en) 2020-11-26 2023-11-07 Foundation Of Soongsil University-Industry Cooperation Mobile malicious code classification method based on feature selection and recording medium and device for performing the same
KR20220097767A (en) * 2020-12-31 2022-07-08 주식회사 이스트시큐리티 Apparatus for generating signature that reflects the similarity of the malware detection classification system based on deep neural networks, method therefor, and computer recordable medium storing program to perform the method

Similar Documents

Publication Publication Date Title
KR101880628B1 (en) Method for labeling machine-learning dataset and apparatus thereof
US10521587B1 (en) Detecting code obfuscation using recurrent neural networks
US7809670B2 (en) Classification of malware using clustering that orders events in accordance with the time of occurance
US20190384911A1 (en) Methods and systems for malware detection and categorization
BR102015017215A2 (en) computer-implemented method for classifying mobile applications, and computer program encoded on non-transient storage medium
US11580222B2 (en) Automated malware analysis that automatically clusters sandbox reports of similar malware samples
EP3051767A1 (en) Method and apparatus for automatically identifying signature of malicious traffic using latent dirichlet allocation
Palahan et al. Extraction of statistically significant malware behaviors
KR20200073822A (en) Method for classifying malware and apparatus thereof
KR102074909B1 (en) Apparatus and method for classifying software vulnerability
KR20200076845A (en) System for analyzing malware and operating method thereof
WO2020230137A1 (en) System and method for automated multi-objective policy implementation, using reinforcement learning
US11954202B2 (en) Deep learning based detection of malicious shell scripts
JP2017004123A (en) Determination apparatus, determination method, and determination program
Balram et al. Static malware analysis using machine learning algorithms on APT1 dataset with string and PE header features
Rahul et al. Analysis of machine learning models for malware detection
WO2017010350A1 (en) Software analysis system, software analysis method, and software analysis program
CN104504334A (en) System and method used for evaluating selectivity of classification rules
O'Kane et al. N-gram density based malware detection
Hosseini et al. Android malware classification using convolutional neural network and LSTM
CN105631336B (en) Detect the system and method for the malicious file in mobile device
NL2029433A (en) Method and system for clustering executable files
JP6191440B2 (en) Script management program, script management apparatus, and script management method
Vatamanu et al. Building a practical and reliable classifier for malware detection
KR20200073824A (en) Method for profiling malware and apparatus thereof

Legal Events

Date Code Title Description
E601 Decision to refuse application