KR102161233B1 - Apparatus and method for classifying malicious code data - Google Patents

Apparatus and method for classifying malicious code data Download PDF

Info

Publication number
KR102161233B1
KR102161233B1 KR1020180125418A KR20180125418A KR102161233B1 KR 102161233 B1 KR102161233 B1 KR 102161233B1 KR 1020180125418 A KR1020180125418 A KR 1020180125418A KR 20180125418 A KR20180125418 A KR 20180125418A KR 102161233 B1 KR102161233 B1 KR 102161233B1
Authority
KR
South Korea
Prior art keywords
malicious code
code data
frequency domain
converting
classifying
Prior art date
Application number
KR1020180125418A
Other languages
Korean (ko)
Other versions
KR20190128977A (en
Inventor
최창희
박장현
이경식
이화성
정일훈
윤호상
Original Assignee
국방과학연구소
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 국방과학연구소 filed Critical 국방과학연구소
Priority to PCT/KR2018/012506 priority Critical patent/WO2019216502A1/en
Publication of KR20190128977A publication Critical patent/KR20190128977A/en
Application granted granted Critical
Publication of KR102161233B1 publication Critical patent/KR102161233B1/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
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/141Discrete Fourier transforms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/145Square transforms, e.g. Hadamard, Walsh, Haar, Hough, Slant transforms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/147Discrete orthonormal transforms, e.g. discrete cosine transform, discrete sine transform, and variations therefrom, e.g. modified discrete cosine transform, integer transforms approximating the discrete cosine transform

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Discrete Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 개시는 변종 악성코드 그룹을 분류하는 장치 및 방법에 관한 것이다. 본 개시에서는 악성코드 데이터에 포함된 섹션 코드 각각에 대응하는 바이너리 정보를 변환함으로써 1차원 벡터를 생성하고, 1차원 벡터를 유한 신호로 간주하여 유한 신호를 주파수 영역으로 변환하는 방법을 개시한다. 또한, 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출하고, 추출된 특징점에 기초하여 변종 악성코드 그룹을 분류하는 방법을 개시한다.The present disclosure relates to an apparatus and method for classifying a group of variant malicious codes. The present disclosure discloses a method of generating a one-dimensional vector by converting binary information corresponding to each section code included in the malicious code data, and converting a finite signal into a frequency domain by considering the one-dimensional vector as a finite signal. In addition, a method of extracting a feature point based on the strength of a signal component for each frequency in a frequency domain and classifying a variant malicious code group based on the extracted feature point is disclosed.

Description

악성코드 데이터를 분류하는 장치 및 방법{APPARATUS AND METHOD FOR CLASSIFYING MALICIOUS CODE DATA}Device and method to classify malicious code data {APPARATUS AND METHOD FOR CLASSIFYING MALICIOUS CODE DATA}

본 개시는 악성코드 데이터를 분류하는 장치 및 방법을 제공한다.The present disclosure provides an apparatus and method for classifying malicious code data.

최근 사이버 공간이 제 4의 전장으로 거론될 정도로 중요해졌다. 사이버 전은 강대국들은 물론이고, 전통적인 군사력이 떨어지는 국가에서도 많은 노력을 기울이고 있는 부분이다. 특히 특정 국가나 단체를 표적으로 하는 APT(Advanced Persistent Threat)공격은 전통적인 무기의 효과를 상회할 정도로 피해도가 커지고 있는 실정이다.Recently, cyberspace has become so important that it is mentioned as the fourth battlefield. Cyber warfare is a part where a lot of effort is being made not only in the powerful countries but also in countries with low traditional military power. In particular, APT (Advanced Persistent Threat) attacks targeting a specific country or group are becoming more damaging than the effects of traditional weapons.

APT 공격에 사용되는 악성코드는 새로 만드는 경우도 있지만, 새로운 악성코드를 제작하는데 엄청난 인력과 재화가 소요되므로, 악성코드는 모듈 형식으로 제작되는 경우가 많다. 모듈 형식의 악성코드는 자주 재사용되며, 전문가들은 코드 조각의 유사성을 분석하여 공격그룹을 판별할 수 있다. 비록 코드가 유사하다고 하여 공격그룹이 반드시 동일하다고 할 수는 없지만, 코드의 유사성은 보조 지표로 활용될 수 있다.Malicious codes used for APT attacks are sometimes created, but since it takes a lot of manpower and goods to create new malicious codes, malicious codes are often produced in a module format. Malware in the form of a module is frequently reused, and experts can identify attack groups by analyzing the similarity of code fragments. Although code similarity does not necessarily mean that attack groups are identical, code similarity can be used as an auxiliary indicator.

종래에는 코드의 유사성을 이용하여 악성코드의 변종을 분류하는 연구가 활발히 진행되어왔다. 예를 들어, 악성코드의 크기에 기초하여 악성코드를 직사각형에 가깝도록 2차원 이미지로 변환한 후, 이미지의 텍스처와 관련된 GIST 특징점을 추출하여 추출된 특징점을 악성코드의 분류에 사용하여왔다. 이와 같이 악성코드를 2차원 이미지로 구현함으로써 2차원 이미지에 영상처리 기법을 적용하여 악성코드를 분류할 수 있었으나, i가 실제 악성코드 배열 축이고, j가 인위적으로 만든 축이라 할 때 Img(i,j)와 Img(i,j+1) 간의 상관관계는 없다. Conventionally, research has been actively conducted to classify variants of malicious codes using code similarity. For example, based on the size of the malicious code, after converting the malicious code into a two-dimensional image close to a rectangle, GIST feature points related to the texture of the image are extracted, and the extracted feature points have been used for classification of the malicious code. By implementing the malicious code as a two-dimensional image in this way, it was possible to classify the malicious code by applying an image processing technique to the two-dimensional image, but when i is the actual malicious code array axis and j is the artificially created axis, Img(i, There is no correlation between j) and Img(i,j+1).

이에 따라, 악성코드를 2차원 이미지로 변환하지 않고 변종 악성코드 그룹을 분류하는 기술이 요구된다.Accordingly, there is a need for a technique for classifying a group of variant malicious codes without converting the malicious code into a two-dimensional image.

악성코드 데이터를 분류하는 장치 및 방법을 제공하는데 있다. 또한, 상기 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는 데 있다. 본 실시예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제들로 한정되지 않으며, 이하의 실시예들로부터 또 다른 기술적 과제들이 유추될 수 있다.It is to provide an apparatus and method for classifying malicious code data. Further, it is to provide a computer-readable recording medium in which a program for executing the method on a computer is recorded. The technical problem to be achieved by this embodiment is not limited to the technical problems as described above, and other technical problems may be inferred from the following embodiments.

상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 개시의 제1 측면은, 악성코드 그룹을 분류하는 방법에 있어서, 악성코드 데이터를 수신하는 단계; 상기 악성코드 데이터를 섹션 코드 별로 분리하는 단계; 상기 섹션 코드 각각에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성하는 단계; 상기 생성된 1차원 벡터를 유한 신호로 간주하고, 상기 유한 신호를 주파수 영역으로 변환하는 단계; 상기 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출하는 단계; 및 상기 추출된 특징점에 기초하여 상기 악성코드 데이터를 특정 악성코드 그룹으로 분류하는 단계;를 포함하는 방법을 제공할 수 있다.As a technical means for achieving the above-described technical problem, a first aspect of the present disclosure provides a method for classifying a group of malicious codes, the method comprising: receiving malicious code data; Separating the malicious code data for each section code; Converting binary information corresponding to each of the section codes to generate a one-dimensional vector; Considering the generated one-dimensional vector as a finite signal and converting the finite signal into a frequency domain; Extracting feature points based on the strength of each frequency signal component in the frequency domain; And classifying the malicious code data into a specific malicious code group based on the extracted feature points.

또한, 상기 섹션 코드 각각에 대응하는 바이너리 정보 중 opcode에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성하는 단계;를 포함하는 방법을 제공할 수 있다.In addition, a method comprising: generating a one-dimensional vector by converting binary information corresponding to an opcode among binary information corresponding to each of the section codes may be provided.

또한, 머신 러닝 기법이 적용되어 학습된 모델에 상기 추출된 특징점을 입력하는 단계; 및 상기 모델을 구동하여 상기 악성코드 데이터를 특정 악성코드 그룹으로 분류하는 단계;를 포함하는 방법을 제공할 수 있다.In addition, inputting the extracted feature points to a model trained by applying a machine learning technique; And classifying the malicious code data into a specific malicious code group by driving the model.

또한, 상기 학습된 모델은 그레디언트 부스팅(Gradient Boosting) 모델인 것인, 방법을 제공할 수 있다.In addition, it is possible to provide a method in which the learned model is a gradient boosting model.

또한, 상기 추출된 특징점에 대해 배깅(Bagging; Bootstrap Aggregating) 알고리즘을 적용하여 오버피팅(overfitting)을 방지하는 단계;를 포함하는 방법을 제공할 수 있다.In addition, it is possible to provide a method including a step of preventing overfitting by applying a bagging (Bootstrap Aggregating) algorithm to the extracted feature points.

또한, 이산 코사인 변환(Discrete Cosine Transform)을 적용하여 상기 유한 신호를 상기 주파수 영역으로 변환하는 단계;를 포함하는 방법을 제공할 수 있다.In addition, a method comprising: transforming the finite signal into the frequency domain by applying a discrete cosine transform may be provided.

또한, 이산 푸리에 변환(Discrete Fourier Transform)을 적용하여 상기 유한 신호를 상기 주파수 영역으로 변환하는 단계;를 포함하는 방법을 제공할 수 있다.In addition, a method comprising: transforming the finite signal into the frequency domain by applying a Discrete Fourier Transform may be provided.

또한, 코사인 변환(Cosine Transform), 푸리에 변환(Fourier Transform), 국소 푸리에 변환(Short-Time Fourier Transform), 하르 변환(Haar transform) 및 웨이블릿 변환(Wavelet Transform) 중 적어도 어느 하나를 적용하여 상기 유한 신호를 상기 주파수 영역으로 변환하는 단계;를 포함하는 방법을 제공할 수 있다.In addition, the finite signal is obtained by applying at least one of Cosine Transform, Fourier Transform, Short-Time Fourier Transform, Har transform, and Wavelet Transform. It may provide a method comprising a; converting into the frequency domain.

또한, 상기 변환된 주파수 영역에서 DC 성분을 제거하고, 낮은 주파수(low frequency) 영역의 데이터 중 일부를 제거하는 단계;를 포함하는 방법을 제공할 수 있다.In addition, a method including: removing a DC component from the converted frequency domain and removing some of data in a low frequency domain may be provided.

또한, 상기 악성코드 데이터는, 어셈블러(ASseMbler, ASM) 파일 형식 또는 바이트(bytes) 파일 형식인 것인, 방법을 제공할 수 있다.In addition, the malicious code data may be provided in an assembler (ASseMbler, ASM) file format or a bytes file format.

본 개시의 제 2 측면은, 적어도 하나의 프로그램을 저장하는 저장부; 악성코드 데이터를 수신하는 통신부; 및 상기 적어도 하나의 프로그램을 실행함으로써 악성코드 데이터를 분류하기 위한 적어도 하나의 프로세서;를 포함하며, 상기 저장부는, 상기 적어도 하나의 프로세서가, 상기 악성코드 데이터를 섹션 코드 별로 분리하는 단계; 상기 섹션 코드 각각에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성하는 단계; 상기 생성된 1차원 벡터를 유한 신호로 간주하고, 상기 유한 신호를 주파수 영역으로 변환하는 단계; 상기 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출하는 단계; 및 상기 추출된 특징점에 기초하여 상기 악성코드 데이터를 특정 악성코드 그룹으로 분류하는 단계;를 실행하도록 하는 명령어들을 포함하는 것을 특징으로 하는, 장치를 제공할 수 있다.A second aspect of the present disclosure includes: a storage unit for storing at least one program; A communication unit for receiving malicious code data; And at least one processor for classifying malicious code data by executing the at least one program, wherein the storage unit comprises: separating, by the at least one processor, the malicious code data for each section code; Converting binary information corresponding to each of the section codes to generate a one-dimensional vector; Considering the generated one-dimensional vector as a finite signal and converting the finite signal into a frequency domain; Extracting feature points based on the strength of each frequency signal component in the frequency domain; And classifying the malicious code data into a specific malicious code group based on the extracted feature points. The apparatus may be provided, comprising instructions for executing.

본 개시의 제 3 측면은, 제 1 측면의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공할 수 있다.A third aspect of the present disclosure may provide a computer-readable recording medium in which a program for executing the method of the first aspect on a computer is recorded.

본 발명에 따르면, 악성코드 데이터를 주파수 영역으로 나타내고, 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출할 수 있으며, 악성코드 데이터에 대한 특징점에 기초하여 악성코드 데이터가 어느 악성코드 그룹에 속하는지 여부를 효과적 식별할 수 있다.According to the present invention, malicious code data is represented in a frequency domain, feature points can be extracted based on the strength of signal components for each frequency, and malicious code data belongs to a certain malicious code group based on the feature points of the malicious code data. Whether or not can be effectively identified.

도 1은 일 실시예에 따른 악성코드 데이터를 분류하는 방법의 흐름도이다.
도 2는 일 실시예에 따른 악성코드 데이터를 나타내는 1차원 벡터를 주파수 영역으로 변환하는 예시를 설명하기 위한 도면이다.
도 3은 일 실시예에 따른 일 실시예에 따른 악성코드 데이터의 바이너리 정보에 포함된 opcode에 기초하여 악성코드 데이터의 특징점을 추출하는 예시를 설명하기 위한 도면이다.
도 4은 일 실시예에 따른 특징점에 대해 배깅 알고리즘을 적용하는 예시를 설명하기 위한 도면이다.
도 5는 일 실시예에 따른 악성코드 분류 장치의 블록도이다.
1 is a flowchart of a method of classifying malicious code data according to an exemplary embodiment.
FIG. 2 is a diagram illustrating an example of converting a 1D vector representing malicious code data into a frequency domain, according to an exemplary embodiment.
FIG. 3 is a diagram for explaining an example of extracting feature points of malicious code data based on opcodes included in binary information of malicious code data according to an embodiment.
4 is a diagram for explaining an example of applying a bagging algorithm to a feature point according to an embodiment.
5 is a block diagram of an apparatus for classifying a malicious code according to an embodiment.

본 명세서에서 다양한 곳에 등장하는 "일부 실시예에서" 또는 "일 실시예에서" 등의 어구는 반드시 모두 동일한 실시예를 가리키는 것은 아니다.Phrases such as "in some embodiments" or "in one embodiment" appearing in various places in this specification are not necessarily all referring to the same embodiment.

본 개시의 일부 실시예는 기능적인 블록 구성들 및 다양한 처리 단계들로 나타내어질 수 있다. 이러한 기능 블록들의 일부 또는 전부는, 특정 기능들을 실행하는 다양한 개수의 하드웨어 및/또는 소프트웨어 구성들로 구현될 수 있다. 예를 들어, 본 개시의 기능 블록들은 하나 이상의 마이크로프로세서들에 의해 구현되거나, 소정의 기능을 위한 회로 구성들에 의해 구현될 수 있다. 또한, 예를 들어, 본 개시의 기능 블록들은 다양한 프로그래밍 또는 스크립팅 언어로 구현될 수 있다. 기능 블록들은 하나 이상의 프로세서들에서 실행되는 알고리즘으로 구현될 수 있다. 또한, 본 개시는 전자적인 환경 설정, 신호 처리, 및/또는 데이터 처리 등을 위하여 종래 기술을 채용할 수 있다. “매커니즘”, “요소”, “수단” 및 “구성”등과 같은 용어는 넓게 사용될 수 있으며, 기계적이고 물리적인 구성들로서 한정되는 것은 아니다. 또한, 명세서에 기재된 “…부”, “…모듈” 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다.Some embodiments of the present disclosure may be represented by functional block configurations and various processing steps. Some or all of these functional blocks may be implemented with various numbers of hardware and/or software components that perform specific functions. For example, the functional blocks of the present disclosure may be implemented by one or more microprocessors, or may be implemented by circuit configurations for a predetermined function. In addition, for example, the functional blocks of the present disclosure may be implemented in various programming or scripting languages. The functional blocks may be implemented as an algorithm executed on one or more processors. In addition, the present disclosure may employ conventional techniques for electronic environment setting, signal processing, and/or data processing. Terms such as “mechanism”, “element”, “means” and “composition” can be used widely, and are not limited to mechanical and physical configurations. In addition, “… Wealth”, “… The term “module” refers to a unit that processes at least one function or operation, which may be implemented as hardware or software, or a combination of hardware and software.

또한, 도면에 도시된 구성 요소들 간의 연결 선 또는 연결 부재들은 기능적인 연결 및/또는 물리적 또는 회로적 연결들을 예시적으로 나타낸 것일 뿐이다. 실제 장치에서는 대체 가능하거나 추가된 다양한 기능적인 연결, 물리적인 연결, 또는 회로 연결들에 의해 구성 요소들 간의 연결이 나타내어질 수 있다. In addition, the connecting lines or connecting members between the components illustrated in the drawings are merely illustrative of functional connections and/or physical or circuit connections. In an actual device, connections between components may be represented by various functional connections, physical connections, or circuit connections that can be replaced or added.

이하 첨부된 도면을 참고하여 본 개시를 상세히 설명하기로 한다.Hereinafter, the present disclosure will be described in detail with reference to the accompanying drawings.

도 1은 일 실시예에 따른 악성코드 데이터를 분류하는 방법의 흐름도이다.1 is a flowchart of a method of classifying malicious code data according to an exemplary embodiment.

도 1을 참조하면, 단계 110에서 악성코드 분류 장치는 외부로부터 악성코드 데이터를 수신할 수 있다.Referring to FIG. 1, in step 110, the apparatus for classifying malicious code may receive malicious code data from the outside.

악성코드 데이터에는 기존의 악성코드 외에도 변종 악성코드가 포함될 수 있다. 변종 악성코드는 아래의 다양한 기법이 적용되어 생성될 수 있다.In addition to the existing malicious code, malicious code data may include variant malicious code. Variant malicious code can be generated by applying the following various techniques.

변종 악성코드는 난독화(Obfuscation) 기법에 의해 생성될 수 있으며, 난독화 기법은 쓰레기코드 삽입(dead code insertion), 레지스터 재할당(register reassignment), 서브루틴 재배치(subroutine reordering), 인스트럭션 치환(instruction substitution), 코드 전위(code transportation), 코드 통합(code integration) 등을 포함할 수 있다.Variant malware can be generated by obfuscation techniques, and obfuscation techniques include dead code insertion, register reassignment, subroutine reordering, and instruction replacement. substitution), code transportation, code integration, and the like.

일 실시예에서 악성코드 데이터는 어셈블러(ASseMbler, ASM) 파일 형식 또는 바이트(bytes) 파일 형식일 수 있다. ASM 파일은 실제 악성코드를 읽은 내용을 IDA(Interactive DisAssembler) 프로그램에 텍스트 형태로 저장한 파일이며, 바이트(bytes) 파일은 악용을 방지하기 위해 헤더가 제거된 형태의 파일이다.In an embodiment, the malicious code data may be in an assembler (ASseMbler, ASM) file format or a bytes file format. The ASM file is a file that stores the contents of the actual malicious code read in the IDA (Interactive DisAssembler) program in text format, and the bytes file is a file whose header has been removed to prevent abuse.

이하의 자료 분석 결과는 Kaggle 사이트(https://www.kaggle.com/c/malware-classification/data)에 업로드된 Microsoft에서 제공하는 Malware dataset을 사용하였다. Malware dataset는 9개의 변종 라벨이 붙어있는 10,868개의 malware를 ASM 파일 및 바이트(bytes) 형태 두 가지로 제공한다.The following data analysis results used a Malware dataset provided by Microsoft that was uploaded to the Kaggle site (https://www.kaggle.com/c/malware-classification/data). The Malware dataset provides 10,868 malware labeled 9 variants in both ASM files and bytes.

단계 120에서 악성코드 분류 장치는 악성코드 데이터를 섹션 코드 별로 분리할 수 있다.In step 120, the malicious code classification apparatus may separate malicious code data for each section code.

일 실시예에서 섹션 코드는 .idata, .data, .text, .rdata, .rsrc, .reloc 및 .bss를 포함할 수 있으나, 이에 제한되지 않는다. 예를 들어, .idata는 IAT에 관련된 정보들이 존재 하는 섹션이고, .text는 프로그램의 code 관련 정보가 들어 있는 섹션이며, .reloc PE 파일의 Relocate 정보를 담고 있는 섹션이다.In one embodiment, the section code may include .idata, .data, .text, .rdata, .rsrc, .reloc, and .bss, but is not limited thereto. For example, .idata is a section containing IAT-related information, .text is a section containing program code-related information, and a section containing relocate information of a .reloc PE file.

악성코드 분류 장치는 ASM 파일에 포함된 주소 정보에 기초하여 바이트 파일을 섹션 코드 별로 분리할 수 있다. 기본적으로 바이트 파일에는 헤더가 존재하지 않아 바이트 파일만을 이용하여 섹션 코드를 분리하는 것은 어려울 수 있다. ASM 파일은 각 섹션에 대한 명세가 있으므로, ASM 파일에 포함된 주소 정보를 이용하여 섹션 코드를 분리할 수 있다. The malicious code classification apparatus may separate the byte file for each section code based on address information included in the ASM file. Basically, since there is no header in the byte file, it may be difficult to separate the section code using only the byte file. Since the ASM file has a specification for each section, the section code can be separated by using the address information included in the ASM file.

Malware dataset에 포함된 malware를 섹션 코드 별로 분리한 결과, 가장 많은 수가 존재하는 섹션 코드는 아래 표 1과 같다.As a result of separating malware included in the Malware dataset by section code, the section codes with the largest number are shown in Table 1 below.

Section NameSection Name FrequencyFrequency .idata.idata 10,33910,339 .data.data 10,29510,295 .text.text 10,28910,289 .rdata.rdata 9,2559,255 .rsrc.rsrc 6,2716,271 .reloc.reloc 2,2992,299 .bss.bss 1,0471,047

단계 130에서 악성코드 분류 장치는 섹션 코드 각각에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성할 수 있다.In step 130, the malicious code classification apparatus may generate a one-dimensional vector by converting binary information corresponding to each section code.

악성코드 데이터로부터 분리된 섹션 코드 각각에는 바이너리(binary) 정보가 대응될 수 있다. 바이너리 정보는 복수개의 바이트(byte)로 구성될 수 있으며, 1 바이트는 0~255 범위를 가질 수 있다. Binary information may correspond to each section code separated from malicious code data. Binary information may be composed of a plurality of bytes, and 1 byte may have a range of 0 to 255.

악성코드 분류 장치는 섹션 코드 각각에 대응하는 바이너리 정보를 변환하는데 있어서 특정 테이블을 이용하지 않고, 바이너리 정보를 구성하는 복수개의 바이트 각각을 곧 바로 수치 값으로 변환함으로써 1차원 벡터를 생성할 수 있다. 예를 들어, 악성코드 분류 장치는 특정 섹션 코드에 대응하는 복수개의 바이트 각각을 2진수로 변환함으로써 1차원 벡터를 생성할 수 있다.The malicious code classification apparatus can generate a one-dimensional vector by directly converting each of a plurality of bytes constituting the binary information into a numeric value without using a specific table in converting binary information corresponding to each section code. For example, the malicious code classification apparatus may generate a one-dimensional vector by converting each of a plurality of bytes corresponding to a specific section code into a binary number.

이 때, 악성코드 데이터 중에서 IDA에서 해석 불가능한 문자의 경우 "??"로 표기될 수 있는데, 악성코드 분류 장치는 "??"로 표기된 문자를 0 혹은 255으로 변환하거나, 삭제함으로써 1차원 벡터를 생성할 수 있다.At this time, in the case of a character that cannot be interpreted by IDA among malicious code data, it may be indicated as “??”. The malicious code classification device converts the character indicated by “??” to 0 or 255, or deletes the one-dimensional vector. Can be generated.

단계 140에서 악성코드 분류 장치는 생성된 1차원 벡터를 유한 신호로 간주하고, 유한 신호를 주파수 영역으로 변환할 수 있다.In step 140, the malicious code classification apparatus may regard the generated 1D vector as a finite signal, and may convert the finite signal into a frequency domain.

악성코드 분류 장치는 단계 130에서 생성된 1차원 벡터를 유한 신호로 간주하여 코사인 변환(Cosine Transform) 또는 이산 코사인 변환(Discrete Cosine Transform)을 적용함으로써 유한 신호를 주파수 영역으로 변환할 수 있다.The malicious code classification apparatus may convert the finite signal into the frequency domain by considering the one-dimensional vector generated in step 130 as a finite signal and applying a Cosine Transform or Discrete Cosine Transform.

예를 들어, 1차원 벡터를 유한 신호 x(t)라고 할 때, x(t)에 코사인 변환을 적용하면 아래 수학식 1과 같이 나타낼 수 있다.For example, when a one-dimensional vector is a finite signal x(t), it can be expressed as Equation 1 below by applying a cosine transform to x(t).

Figure 112018103516245-pat00001
Figure 112018103516245-pat00001

한편, 수학식 1을 통해 산출된 x(t)의 주파수 영역 X(ξ) 중에서, 배경 신호를 나타내는 DC 성분이 제거될 수 있다. 또한, 주파수 영역 X(ξ) 중에서, 낮은 주파수(low frequency) 영역의 데이터 중 일부가 제거될 수 있다. 이 때, 악성코드 분류 장치는 낮은 주파수(low frequency) 영역에서 소정의 퍼센트(α%)의 데이터를 제거할 수 있다. 이를 통해 변종 악성코드 그룹 분류 결과의 정확도를 높일 수 있다.Meanwhile, from the frequency domain X(ξ) of x(t) calculated through Equation 1, the DC component representing the background signal may be removed. In addition, among the frequency domain X(ξ), some of data in the low frequency domain may be removed. In this case, the malicious code classification apparatus may remove a predetermined percentage (α%) of data in a low frequency region. Through this, it is possible to increase the accuracy of the result of classifying the variant malicious code group.

또한, 악성코드 분류 장치는 단계 130에서 생성된 1차원 벡터를 유한 신호로 간주하여 푸리에 변환(Fourier Transform) 또는 이산 푸리에 변환(Discrete Fourier Transform)을 적용함으로써 유한 신호를 주파수 영역으로 변환할 수 있다.In addition, the malicious code classification apparatus may convert the finite signal into a frequency domain by considering the one-dimensional vector generated in step 130 as a finite signal and applying Fourier Transform or Discrete Fourier Transform.

예를 들어, 1차원 벡터를 유한 신호 x(t)라고 할 때, x(t)에 푸리에 변환을 적용하면 아래 수학식 2와 같이 나타낼 수 있다.For example, when a one-dimensional vector is a finite signal x(t), it can be expressed as Equation 2 below by applying a Fourier transform to x(t).

Figure 112018103516245-pat00002
Figure 112018103516245-pat00002

한편, 수학식 2를 통해 산출된 x(t)의 주파수 영역 X(ξ)의 경우 허수부도 존재하므로, 실수부, 허수부, 크기 및 각도가 도메인으로 추출될 수 있다.Meanwhile, in the case of the frequency domain X(ξ) of x(t) calculated through Equation 2, since an imaginary part also exists, a real part, an imaginary part, a size and an angle may be extracted as a domain.

일 실시예에서, 악성코드 분류 장치는 1차원 벡터를 유한 신호로 간주하여, 유산 신호에 대해 코사인 변환(또는 이산 코사인 변환) 및 푸리에 변환(또는 이산 푸리에 변환)을 적용할 수 있으며, 그 결과 코사인 변환에서 주파수 영역의 신호 세기와, 푸리에 변환에서 실수부, 허수부, 크기 및 각도 값 총 다섯 가지 도메인에 대해 단계 160에서 특징점을 추출할 수 있다.In one embodiment, the malware classification apparatus may consider a one-dimensional vector as a finite signal and apply a cosine transform (or discrete cosine transform) and a Fourier transform (or discrete Fourier transform) to the legacy signal, and as a result, the cosine In step 160, a feature point may be extracted for a total of five domains: signal strength in the frequency domain in the transform, real part, imaginary part, magnitude, and angle value in the Fourier transform.

악성코드 분류 장치는 단계 130에서 생성된 1차원 벡터를 유한 신호로 간주하고, 코사인 변환(Cosine Transform), 푸리에 변환(Fourier Transform), 국소 푸리에 변환(Short-Time Fourier Transform), 하르 변환(Haar transform) 및 웨이블릿 변환(Wavelet Transform) 중 적어도 어느 하나를 적용하여 유한 신호를 주파수 영역으로 변환할 수 있으나, 이에 제한되지 않는다.The malware classification apparatus considers the one-dimensional vector generated in step 130 as a finite signal, and uses a Cosine Transform, Fourier Transform, Short-Time Fourier Transform, and Har transform. ) And a wavelet transform (Wavelet Transform) may be applied to transform the finite signal into the frequency domain, but is not limited thereto.

단계 150에서, 악성코드 분류 장치는 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출할 수 있다. 단계 150은 도 2에서 후술하기로 한다.In step 150, the apparatus for classifying a malicious code may extract a feature point based on the strength of a signal component for each frequency in the frequency domain. Step 150 will be described later in FIG. 2.

단계 160에서, 악성코드 분류 장치는 추출된 특징점에 기초하여 악성코드 데이터를 특정 악성코드 그룹으로 분류할 수 있다.In step 160, the malicious code classification apparatus may classify the malicious code data into a specific malicious code group based on the extracted feature points.

유사한 코드 또는 기능을 가지는 악성코드 데이터들은 동일한 악성코드 그룹에 속할 수 있다. 악성코드 분류 장치는 새롭게 수신된 악성코드 데이터를 기존의 악성코드 그룹 중 어느 악성코드 그룹으로 분류할지 여부를 결정하기 위해, 새롭게 수신된 악성코드 데이터의 특징점을 이용할 수 있다.Malicious code data having similar codes or functions may belong to the same malicious code group. The malicious code classification apparatus may use the characteristic points of the newly received malicious code data to determine whether to classify the newly received malicious code data into which malicious code group among the existing malicious code groups.

먼저, 악성코드 분류 장치는 머신 러닝 기법을 이용하여 특정 악성코드 데이터에 대한 특징점 및 특정 악성코드 데이터가 속한 악성코드 그룹을 매칭시켜 학습을 수행할 수 있다. First, the malicious code classification apparatus may perform learning by matching a feature point for specific malicious code data and a malicious code group to which the specific malicious code data belongs using a machine learning technique.

일 실시예에서, 악성코드 분류 장치는 그레디언트 부스팅(Gradient Boosting) 모델에 특정 악성코드 데이터에 대한 특징점을 입력하여 학습을 수행할 수 있으며, 학습 결과에 기초하여 기수신된 또는 새롭게 수신된 악성코드 데이터를 특정 악성코드 그룹으로 분류할 수 있다.In one embodiment, the malware classification apparatus may perform learning by inputting feature points for specific malware data into a gradient boosting model, and previously received or newly received malware data based on the learning result. Can be classified into specific malicious code groups.

악성코드 분류 장치는 학습된 모델에 새롭게 수신된 악성코드 데이터를 입력함으로써, 새롭게 수신된 악성코드 데이터를 특정 악성코드 그룹으로 분류할 수 있다.The malicious code classification apparatus may classify newly received malicious code data into a specific malicious code group by inputting newly received malicious code data into the learned model.

본 발명에 따르면, 악성코드 데이터를 주파수 영역으로 변환하고, 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출하며, 추출된 특징점에 기초하여 악성코드 데이터를 특정 악성코드 그룹으로 분류할 수 있다. 이를 통해, 기존의 악성코드가 어느 악성코드 그룹에 속하는지 분류할 수 있다는 점 외에도, 악성코드 탐지를 우회하기 위한 각종 기법들이 적용되어 생성된 변종들 즉, 변송 악성코드가 어떠한 악성코드 그룹에 속하는지 역시 효과적으로 분류할 수 있다.According to the present invention, it is possible to convert malicious code data into a frequency domain, extract feature points based on the strength of signal components for each frequency, and classify malicious code data into specific malicious code groups based on the extracted feature points. Through this, in addition to being able to classify which malicious code group the existing malicious code belongs to, various techniques for bypassing malicious code detection are applied to create variants, i.e., to which malicious code group the transfer malicious code belongs. It can be effectively classified as well.

도 2는 일 실시예에 따른 악성코드 데이터를 나타내는 1차원 벡터를 주파수 영역으로 변환하는 예시를 설명하기 위한 도면이다.FIG. 2 is a diagram illustrating an example of converting a 1D vector representing malicious code data into a frequency domain, according to an exemplary embodiment.

도 2를 참조하면 악성코드 데이터에 포함된 각각의 섹션 코드는 주소(210)를 가질 수 있다. 예를 들어, 주소(210)를 나타내는 '10004000', …, '10004040'은 각각 하나의 섹션 코드에 대응되는 주소(210)일 수 있다.Referring to FIG. 2, each section code included in malicious code data may have an address 210. For example, '10004000' representing the address 210,… , '10004040' may each be an address 210 corresponding to one section code.

각 주소(210)에는 섹션 코드에 대응하는 바이너리 정보(220)가 저장될 수 있으며, 악성코드 분류 장치는 바이너리 정보(220)를 구성하는 복수개의 바이트 전부를 변환하여 1차원 벡터를 생성할 수 있다. 예를 들어, 악성코드 분류 장치는 바이트 값 00, 10 및 FF를 각각 0, 16 및 255로 변환함으로써 1차원 벡터를 생성할 수 있다.Each address 210 may store binary information 220 corresponding to the section code, and the malicious code classification apparatus may generate a one-dimensional vector by converting all of a plurality of bytes constituting the binary information 220 . For example, the malicious code classification apparatus may generate a one-dimensional vector by converting byte values 00, 10, and FF into 0, 16, and 255, respectively.

악성코드 분류 장치는 1차원 벡터를 유한 신호로 간주할 수 있으며, 유한 신호는 공간(spatial) 영역에서 제 1 그래프(230)와 같이 표시될 수 있다.The malicious code classification apparatus may regard a one-dimensional vector as a finite signal, and the finite signal may be displayed as a first graph 230 in a spatial area.

악성코드 분류 장치는 유한 신호에 이산 코사인 변환(Discrete Cosine Transform)을 적용함으로써 유한 신호를 주파수 영역으로 변환할 수 있고, 이 때 주파수(frequency) 영역의 제 2 그래프(240)를 산출할 수 있다.The malicious code classification apparatus may convert a finite signal into a frequency domain by applying a Discrete Cosine Transform to the finite signal, and at this time, calculate a second graph 240 in a frequency domain.

추가적으로, 악성코드 분류 장치는 제 2 그래프(240)에서 배경 신호를 나타내는 DC 성분과, 낮은 주파수(low frequency) 영역에서 소정의 퍼센트(α%)의 데이터를 제거함으로써 제 3 그래프(250)를 산출할 수 있다. 악성코드 분류 장치는 DC 성분과 낮은 주파수 영역의 데이터 일부가 제거된 제 3 그래프(250)에 기초하여 특징점을 추출함으로써, 악성코드 분류 결과의 정확도를 높일 수 있다.Additionally, the malicious code classification apparatus calculates the third graph 250 by removing the DC component representing the background signal from the second graph 240 and a predetermined percentage (α%) of data in the low frequency region. can do. The malicious code classification apparatus may increase the accuracy of the malicious code classification result by extracting a feature point based on the third graph 250 from which a DC component and a part of data in the low frequency domain have been removed.

악성코드 분류 장치는 제 3 그래프(250)의 각 주파수 별 신호 성분의 세기에 기초하여 특징점(260)을 추출할 수 있다. The malicious code classification apparatus may extract the feature point 260 based on the strength of the signal component for each frequency in the third graph 250.

일 실시예에서 악성코드 분류 장치는 제 3 그래프(250)에서 표 2에 적시된 통계치들을 특징점(feature name)을 추출할 수 있다. 그러나, 특징점 종류는 이에 제한되지 않는다. In an embodiment, the malicious code classification apparatus may extract a feature name from statistics indicated in Table 2 from the third graph 250. However, the type of feature point is not limited thereto.

Figure 112018103516245-pat00003
Figure 112018103516245-pat00003

악성코드 분류 장치는 추출된 특징점에 기초하여 악성코드 데이터를 특정 악성코드 그룹으로 분류할 수 있다. 추출된 특징점은 머신 러닝/딥러닝의 입력 데이터로 활용될 수 있다. 일 실시예에서 악성코드 분류 장치는 그레디언트 부스팅(Gradient Boosting) 모델에 추출된 특징점을 적용하여 학습을 수행할 수 있으며, 학습 결과에 기초하여 새롭게 수신된 악성코드 데이터를 특정 악성코드 그룹으로 분류할 수 있다.The malicious code classification apparatus may classify malicious code data into a specific malicious code group based on the extracted feature points. The extracted feature points can be used as input data for machine learning/deep learning. In an embodiment, the malicious code classification apparatus may perform learning by applying the extracted feature points to a gradient boosting model, and classify newly received malicious code data into a specific malicious code group based on the learning result. have.

도 3은 일 실시예에 따른 악성코드 데이터의 바이너리 정보에 포함된 opcode에 기초하여 악성코드 데이터의 특징점을 추출하는 예시를 설명하기 위한 도면이다.3 is a diagram for describing an example of extracting feature points of malicious code data based on opcodes included in binary information of malicious code data according to an exemplary embodiment.

도 3을 참조하면, 악성코드 데이터에 포함된 각각의 섹션 코드(310)는 주소(320)를 가질 수 있다. 또한, 각 주소(320)에는 바이너리 정보(330)가 저장될 수 있다.Referring to FIG. 3, each section code 310 included in malicious code data may have an address 320. In addition, binary information 330 may be stored in each address 320.

바이너리 정보(330)는 복수개의 바이트로 구성될 수 있는데, 바이너리 정보(330)를 구성하는 바이트들 중 일부는 프로그램의 명령어를 나타낸다. 프로그램 명령어는 opcode(연산자)와 operand(주소)로 구분되는데, opcode는 연산 동작을 나타내고 operand는 연산의 대상이 되는 데이터의 위치를 나타낸다. 예를 들어, 바이너리 정보(330) 중 '8D 64'는 opcode 'lea'에 대응되고, '8B'는 opcode 'mov'에 대응될 수 있다.The binary information 330 may be composed of a plurality of bytes, and some of the bytes constituting the binary information 330 represent instructions of a program. Program instructions are divided into opcode (operator) and operand (address), where opcode represents an operation operation and operand represents the location of data to be operated. For example, '8D 64' of the binary information 330 may correspond to opcode'lea', and '8B' may correspond to opcode'mov'.

악성코드 분류 장치는, 바이너리 정보(330)를 구성하는 복수개의 바이트 전부를 이용하는 대신, 바이너리 정보(330) 중 opcode만을 변환함으로써 1차원 벡터를 생성할 수 있다. 예를 들어, 악성코드 분류 장치는 섹션코드 '. text'에서, 명령어의 첫 번째 바이트가 16진수인 경우 이를 opcode로 판단하고 이를 2신수로 변환함으로써 1차원 벡터를 생성할 수 있다.The malicious code classification apparatus may generate a one-dimensional vector by converting only the opcode of the binary information 330 instead of using all of the plurality of bytes constituting the binary information 330. For example, the device for classifying malware is section code'. In'text', when the first byte of the instruction is a hexadecimal number, it is determined as an opcode and converted into a two-signal number to generate a one-dimensional vector.

악성코드 분류 장치는 생성된 1차원 벡터를 유한 신호로 간주하고, 유한 신호를 주파수 영역으로 변환할 수 있다. 악성코드 분류 장치는 opcode에 기초하여 생성된 1차원 벡터를 유한 신호로 간주하여 코사인 변환(Cosine Transform) 또는 이산 코사인 변환(Discrete Cosine Transform)을 적용함으로써 유한 신호를 주파수 영역으로 변환할 수 있다.The malicious code classification apparatus may regard the generated one-dimensional vector as a finite signal and convert the finite signal into a frequency domain. The malicious code classification apparatus may convert a finite signal into a frequency domain by considering a one-dimensional vector generated based on an opcode as a finite signal and applying a Cosine Transform or Discrete Cosine Transform.

또한, 악성코드 분류 장치는 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출할 수 있다. 악성코드 분류 장치는 추출된 특징점에 기초하여 악성코드 데이터를 특정 악성코드 그룹으로 분류할 수 있다.Also, the malicious code classification apparatus may extract feature points based on the strength of signal components for each frequency in the frequency domain. The malicious code classification apparatus may classify malicious code data into a specific malicious code group based on the extracted feature points.

본 발명에서는, 악성코드 데이터에 대한 바이너리 정보 중 opcode만을 선별하고, opcode에 해당하는 바이트들에 기초하여 악성코드 데이터에 대한 특징점을 추출할 수 있다. 바이너리 정보 중 operand와 각종 메타 데이터를 제외하고, opcode에 해당하는 바이트들에 기초하여 악성코드 데이터에 대한 특징점을 추출함으로써, 분류 성능을 향상시킬 수 있다.In the present invention, it is possible to select only an opcode from among binary information on the malicious code data, and extract a feature point for the malicious code data based on bytes corresponding to the opcode. Classification performance can be improved by extracting feature points for malicious code data based on bytes corresponding to opcodes, excluding operands and various metadata among binary information.

도 4는 일 실시예에 따른 특징점에 대해 배깅 알고리즘을 적용하는 예시를 설명하기 위한 도면이다.4 is a diagram illustrating an example of applying a bagging algorithm to a feature point according to an exemplary embodiment.

악성코드 분류 장치는 악성코드 데이터로부터 분리된 섹션 코드 각각에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성하고, 1차원 벡터를 유한 신호로 간주하여 유한 신호를 주파수 영역으로 변환할 수 있다. 또한, 악성코드 분류 장치는 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 악성코드 데이터에 대한 특징점을 추출할 수 있다.The malicious code classification apparatus may generate a one-dimensional vector by converting binary information corresponding to each section code separated from the malicious code data, and convert the finite signal into a frequency domain by considering the one-dimensional vector as a finite signal. Also, the malicious code classification apparatus may extract feature points for malicious code data based on the strength of signal components for each frequency in the frequency domain.

악성코드 분류 장치는 머신 러닝 기법을 이용하여 특정 악성코드 데이터에 대한 특징점 및 특정 악성코드 데이터가 속한 악성코드 그룹을 매칭시켜 학습을 수행할 수 있다. The malicious code classification apparatus may perform learning by matching a feature point for specific malicious code data and a malicious code group to which the specific malicious code data belongs using a machine learning technique.

일 실시예에서, 악성코드 분류 장치는 그레디언트 부스팅(Gradient Boosting) 모델에 특정 악성코드 데이터에 대한 특징점을 입력하여 학습을 수행할 수 있으며, 학습 결과에 기초하여 기수신된 또는 새롭게 수신된 악성코드 데이터를 특정 악성코드 그룹으로 분류할 수 있다.In one embodiment, the malware classification apparatus may perform learning by inputting feature points for specific malware data into a gradient boosting model, and previously received or newly received malware data based on the learning result. Can be classified into specific malicious code groups.

구체적으로, 악성코드 분류 장치는 악성코드 데이터에 대한 특징점을 전체 데이터세트(410)로 설정하고, 전체 데이터세트(410)에 배깅(Bagging; Bootstrap Aggregating) 알고리즘을 적용할 수 있다. 전체 데이터 세트(410)에 배깅 알고리즘이 적용됨으로써, 학습 결과가 오버피팅(overfitting)되는 것을 방지할 수 있다. Specifically, the malicious code classification apparatus may set a feature point for malicious code data as the entire dataset 410 and apply a bagging (Bootstrap Aggregating) algorithm to the entire dataset 410. By applying the bagging algorithm to the entire data set 410, overfitting of the learning result can be prevented.

배깅 알고리즘이 적용된 결과, 악성코드 분류 장치는 전체 데이터세트(410)에 대해서 여러 개의 부트스트랩 자료(420)를 생성하고, 생성된 각 부트스트랩 자료(420)를 모델링하여 복수의 모델(430)을 생성할 수 있다. 악성코드 분류 장치는 "averaging", "majority voting" 등의 기법을 적용하여 생성된 모델(430)을 결합함으로써 최종 학습 모델(440)을 생성할 수 있다.As a result of applying the bagging algorithm, the malicious code classification device generates a plurality of bootstrap data 420 for the entire dataset 410, and models the generated bootstrap data 420 to generate a plurality of models 430. Can be generated. The malicious code classification apparatus may generate the final learning model 440 by combining the models 430 generated by applying techniques such as “averaging” and “majority voting”.

한편, 부투스트랩 자료(420)란 단순 복원 임의 추출법(random sampling)을 통해 전체 데이터세트(410)로부터 선택된 크기가 동일한 복수 개의 표본 자료를 의미한다.Meanwhile, the bootstrap data 420 refers to a plurality of sample data having the same size selected from the entire dataset 410 through a simple restoration random sampling method.

도 5는 일 실시예에 따른 악성코드 분류 장치의 블록도이다.5 is a block diagram of an apparatus for classifying a malicious code according to an embodiment.

도 5를 참조하면, 악성코드 분류 장치(500)는 제어부(510), 통신부(520) 및 메모리(530)를 포함할 수 있다. 도 5에 도시된 악성코드 분류 장치(500)에는 실시예와 관련된 구성요소들만이 도시되어 있다. 따라서, 도 5에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 당해 기술분야의 통상의 기술자라면 이해할 수 있다.Referring to FIG. 5, the malicious code classification apparatus 500 may include a control unit 510, a communication unit 520, and a memory 530. In the malicious code classification apparatus 500 shown in FIG. 5, only components related to the embodiment are shown. Therefore, it can be understood by those of ordinary skill in the art that other general-purpose components may be further included in addition to the components shown in FIG. 5.

통신부(520)는 악성코드 데이터를 수신할 수 있다. 일 실시예에서 악성코드 데이터는 어셈블러(ASseMbler, ASM) 파일 형식 또는 바이트(bytes) 파일 형식일 수 있다.The communication unit 520 may receive malicious code data. In an embodiment, the malicious code data may be in an assembler (ASseMbler, ASM) file format or a bytes file format.

메모리(530)는 악성코드 분류 장치(500) 내에서 처리되는 각종 데이터들을 저장하는 하드웨어이다. 예를 들어 메모리(530)는 통신부(520)에서 수신한 악성코드 데이터를 저장할 수 있다. 또한, 메모리(530)는 섹션 코드, 1차원 벡터, 특징점에 대한 데이터를 저장할 수 있다. 메모리(530)는 DRAM(dynamic random access memory), SRAM(static random access memory) 등과 같은 RAM(random access memory), ROM(read-only memory), EEPROM(electrically erasable programmable read-only memory), CD-ROM, 블루레이 또는 다른 광학 디스크 스토리지, HDD(hard disk drive), SSD(solid state drive), 또는 플래시 메모리를 포함할 수 있다.The memory 530 is hardware that stores various types of data processed in the malicious code classification apparatus 500. For example, the memory 530 may store malicious code data received from the communication unit 520. Also, the memory 530 may store data on a section code, a one-dimensional vector, and a feature point. The memory 530 is a random access memory (RAM) such as dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and CD- ROM, Blu-ray or other optical disk storage, hard disk drive (HDD), solid state drive (SSD), or flash memory.

제어부(510)는 도 1 내지 도 4에서 상술한, 변종 악성코드 그룹을 분류하기 위한 일련의 프로세스를 제어할 수 있다. 제어부(510)는 악성코드 분류 장치(500)를 제어하기 위한 전반적인 기능들을 제어하는 역할을 한다. The controller 510 may control a series of processes for classifying a group of variant malicious codes described above in FIGS. 1 to 4. The controller 510 serves to control overall functions for controlling the malicious code classification device 500.

일 실시예에서 제어부(510)는 통신부(520)에서 수신한 악성코드 데이터를 섹션 코드 별로 분리하고, 섹션 코드 각각에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성할 수 있다. 또한, 제어부(510)는 생성된 1차원 벡터를 유한 신호로 간주하고, 유한 신호를 주파수 영역으로 변환할 수 있다. 제어부(510)는 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출하고, 추출된 특징점에 기초하여 변종 악성코드 그룹을 분류할 수 있다.In an embodiment, the controller 510 may generate a one-dimensional vector by separating the malicious code data received from the communication unit 520 for each section code and converting binary information corresponding to each of the section codes. Also, the control unit 510 may regard the generated 1D vector as a finite signal and may convert the finite signal into a frequency domain. The controller 510 may extract a feature point based on the strength of a signal component for each frequency in the frequency domain, and classify a variant malicious code group based on the extracted feature point.

본 실시예들은 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행 가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈과 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다.The present embodiments may also be implemented in the form of a recording medium including instructions executable by a computer, such as a program module executed by a computer. Computer-readable media can be any available media that can be accessed by a computer, and includes both volatile and nonvolatile media, removable and non-removable media. Further, the computer-readable medium may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Communication media typically includes computer readable instructions, data structures, other data in a modulated data signal such as program modules, or other transmission mechanisms, and includes any information delivery media.

또한, 본 명세서에서, “부”는 프로세서 또는 회로와 같은 하드웨어 구성(hardware component), 및/또는 프로세서와 같은 하드웨어 구성에 의해 실행되는 소프트웨어 구성(software component)일 수 있다.In addition, in the present specification, the “unit” may be a hardware component such as a processor or a circuit, and/or a software component executed by a hardware configuration such as a processor.

전술한 본 명세서의 설명은 예시를 위한 것이며, 본 명세서의 내용이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The foregoing description of the present specification is for illustrative purposes only, and those of ordinary skill in the art to which the content of the present specification belongs will understand that it is possible to easily transform it into other specific forms without changing the technical spirit or essential features of the present invention. I will be able to. Therefore, it should be understood that the embodiments described above are illustrative in all respects and not limiting. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as being distributed may also be implemented in a combined form.

본 실시예의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 포함되는 것으로 해석되어야 한다.The scope of the present embodiment is indicated by the claims to be described later rather than the detailed description, and it should be construed that all changes or modified forms derived from the meaning and scope of the claims and their equivalent concepts are included.

Claims (12)

악성코드 데이터를 분류하는 방법에 있어서,
악성코드 데이터를 수신하는 단계;
상기 악성코드 데이터를 섹션 코드 별로 분리하는 단계;
상기 섹션 코드 각각에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성하는 단계;
상기 생성된 1차원 벡터를 유한 신호로 간주하고, 상기 유한 신호를 주파수 영역으로 변환하는 단계;
상기 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출하는 단계; 및
상기 추출된 특징점에 기초하여 상기 악성코드 데이터를 특정 악성코드 그룹으로 분류하는 단계;
를 포함하고,
상기 1차원 벡터를 생성하는 단계는,
상기 섹션 코드 각각에 대응하는 바이너리 정보 중 opcode에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성하는 단계;
를 포함하는 방법.
In the method of classifying malicious code data,
Receiving malicious code data;
Separating the malicious code data for each section code;
Converting binary information corresponding to each of the section codes to generate a one-dimensional vector;
Considering the generated one-dimensional vector as a finite signal and converting the finite signal into a frequency domain;
Extracting feature points based on the strength of signal components for each frequency in the frequency domain; And
Classifying the malicious code data into a specific malicious code group based on the extracted feature points;
Including,
The step of generating the one-dimensional vector,
Generating a one-dimensional vector by converting binary information corresponding to an opcode among binary information corresponding to each of the section codes;
How to include.
삭제delete 제 1항에 있어서,
상기 분류하는 단계는,
머신 러닝 기법이 적용되어 학습된 모델에 상기 추출된 특징점을 입력하는 단계; 및
상기 모델을 구동하여 상기 악성코드 데이터를 특정 악성코드 그룹으로 분류하는 단계;
를 포함하는, 방법.
The method of claim 1,
The classifying step,
Inputting the extracted feature points to a model trained by applying a machine learning technique; And
Classifying the malicious code data into a specific malicious code group by driving the model;
Containing, method.
제 3항에 있어서,
상기 학습된 모델은 그레디언트 부스팅(Gradient Boosting) 모델인 것인, 방법.
The method of claim 3,
The method, wherein the learned model is a gradient boosting model.
제 3항에 있어서,
상기 분류하는 단계는,
상기 추출된 특징점에 대해 배깅(Bagging; Bootstrap Aggregating) 알고리즘을 적용하여 오버피팅(overfitting)을 방지하는 단계;
를 더 포함하는, 방법.
The method of claim 3,
The classifying step,
Preventing overfitting by applying a bagging (Bootstrap Aggregating) algorithm to the extracted feature points;
The method further comprising.
제 1항에 있어서,
상기 변환하는 단계는,
이산 코사인 변환(Discrete Cosine Transform)을 적용하여 상기 유한 신호를 상기 주파수 영역으로 변환하는 단계;
를 포함하는, 방법.
The method of claim 1,
The converting step,
Transforming the finite signal into the frequency domain by applying a discrete cosine transform;
Containing, method.
제 6항에 있어서,
상기 변환하는 단계는,
이산 푸리에 변환(Discrete Fourier Transform)을 적용하여 상기 유한 신호를 상기 주파수 영역으로 변환하는 단계;
를 포함하는, 방법.
The method of claim 6,
The converting step,
Transforming the finite signal into the frequency domain by applying a Discrete Fourier Transform;
Containing, method.
제 1항에 있어서,
상기 변환하는 단계는,
코사인 변환(Cosine Transform), 푸리에 변환(Fourier Transform), 국소 푸리에 변환(Short-Time Fourier Transform), 하르 변환(Haar transform) 및 웨이블릿 변환(Wavelet Transform) 중 적어도 어느 하나를 적용하여 상기 유한 신호를 상기 주파수 영역으로 변환하는 단계;
를 포함하는, 방법.
The method of claim 1,
The converting step,
The finite signal is obtained by applying at least one of Cosine Transform, Fourier Transform, Short-Time Fourier Transform, Har transform, and Wavelet Transform. Converting into a frequency domain;
Containing, method.
제 1항에 있어서,
상기 변환하는 단계는,
상기 변환된 주파수 영역에서 DC 성분을 제거하고, 낮은 주파수(low frequency) 영역의 데이터 중 일부를 제거하는 단계;
를 더 포함하는, 방법.
The method of claim 1,
The converting step,
Removing a DC component from the converted frequency domain and removing some of the data in a low frequency domain;
The method further comprising.
제 1항에 있어서,
상기 악성코드 데이터는, 어셈블러(ASseMbler, ASM) 파일 형식 또는 바이트(bytes) 파일 형식인 것인, 방법.
The method of claim 1,
The malicious code data is an assembler (ASseMbler, ASM) file format or a bytes file format.
적어도 하나의 프로그램을 저장하는 저장부;
악성코드 데이터를 수신하는 통신부; 및
상기 적어도 하나의 프로그램을 실행함으로써 악성코드 데이터를 분류하기 위한 적어도 하나의 프로세서;
를 포함하며,
상기 저장부는, 상기 적어도 하나의 프로세서가,
상기 악성코드 데이터를 섹션 코드 별로 분리하는 단계;
상기 섹션 코드 각각에 대응하는 바이너리 정보 중 opcode에 대응하는 바이너리 정보를 변환하여 1차원 벡터를 생성하는 단계;
상기 생성된 1차원 벡터를 유한 신호로 간주하고, 상기 유한 신호를 주파수 영역으로 변환하는 단계;
상기 주파수 영역에서 각 주파수 별 신호 성분의 세기에 기초하여 특징점을 추출하는 단계; 및
상기 추출된 특징점에 기초하여 상기 악성코드 데이터를 특정 악성코드 그룹으로 분류하는 단계;
를 실행하도록 하는 명령어들을 포함하는 것을 특징으로 하는, 장치.
A storage unit for storing at least one program;
A communication unit for receiving malicious code data; And
At least one processor for classifying malicious code data by executing the at least one program;
Including,
The storage unit, the at least one processor,
Separating the malicious code data for each section code;
Generating a one-dimensional vector by converting binary information corresponding to an opcode among binary information corresponding to each of the section codes;
Considering the generated one-dimensional vector as a finite signal and converting the finite signal into a frequency domain;
Extracting feature points based on the strength of signal components for each frequency in the frequency domain; And
Classifying the malicious code data into a specific malicious code group based on the extracted feature points;
Device, characterized in that it comprises instructions for executing.
제 1항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium storing a program for executing the method of claim 1 on a computer.
KR1020180125418A 2018-05-09 2018-10-19 Apparatus and method for classifying malicious code data KR102161233B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/KR2018/012506 WO2019216502A1 (en) 2018-05-09 2018-10-22 Apparatus and method for classifying malicious code data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20180053200 2018-05-09
KR1020180053200 2018-05-09

Publications (2)

Publication Number Publication Date
KR20190128977A KR20190128977A (en) 2019-11-19
KR102161233B1 true KR102161233B1 (en) 2020-09-29

Family

ID=68771117

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180125418A KR102161233B1 (en) 2018-05-09 2018-10-19 Apparatus and method for classifying malicious code data

Country Status (1)

Country Link
KR (1) KR102161233B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102396236B1 (en) * 2021-08-11 2022-05-10 주식회사 샌즈랩 Apparatus for processing cyber threat information, method for processing cyber threat information, and medium for storing a program processing cyber threat information

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016115280A1 (en) * 2015-01-14 2016-07-21 Virta Laboratories, Inc. Anomaly and malware detection using side channel analysis
US20170147815A1 (en) * 2015-11-25 2017-05-25 Lockheed Martin Corporation Method for detecting a threat and threat detecting apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016115280A1 (en) * 2015-01-14 2016-07-21 Virta Laboratories, Inc. Anomaly and malware detection using side channel analysis
US20170147815A1 (en) * 2015-11-25 2017-05-25 Lockheed Martin Corporation Method for detecting a threat and threat detecting apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Sam Koblenski, "Everyday DSP for Programmers: DC and Impulsive Noise Removal"(2017.12.)*
Stanislav Ponomarev et al, "Fourier Transform as Feature Extraction for Malware Classification"(2014.)*

Also Published As

Publication number Publication date
KR20190128977A (en) 2019-11-19

Similar Documents

Publication Publication Date Title
US9852297B1 (en) Methods and apparatus for detecting malware samples with similar image sets
Yue et al. Imbalanced malware images classification: a CNN based approach
US9690935B2 (en) Identification of obfuscated computer items using visual algorithms
Zou et al. Improving the transferability of adversarial examples with resized-diverse-inputs, diversity-ensemble and region fitting
US11188650B2 (en) Detection of malware using feature hashing
US9398034B2 (en) Matrix factorization for automated malware detection
CN106778241B (en) Malicious file identification method and device
Kirat et al. Sigmal: A static signal processing based malware triage
CN104978521B (en) A kind of method and system for realizing malicious code mark
US20160188723A1 (en) Cloud website recommendation method and system based on terminal access statistics, and related device
US11475133B2 (en) Method for machine learning of malicious code detecting model and method for detecting malicious code using the same
CN109983464B (en) Detecting malicious scripts
Park et al. Rotation and scale invariant upsampled log-polar fourier descriptor for copy-move forgery detection
US20120066229A1 (en) Systems and methods for operating a saturated hash table
KR100961179B1 (en) Apparatus and Method for digital forensic
Beppler et al. L (a) ying in (test) bed: How biased datasets produce impractical results for actual malware families’ classification
KR102161233B1 (en) Apparatus and method for classifying malicious code data
CN114143024B (en) Black box malicious software detection countermeasure sample generation method and system based on generation countermeasure network, electronic device and storage medium
Nguyen et al. Generative adversarial networks and image-based malware classification
Naeem et al. Digital forensics for malware classification: An approach for binary code to pixel vector transition
Penrose et al. Fast contraband detection in large capacity disk drives
CN113360911A (en) Malicious code homologous analysis method and device, computer equipment and storage medium
US20220147628A1 (en) System, method and apparatus for malicious software detection
WO2019216502A1 (en) Apparatus and method for classifying malicious code data
Liu et al. Pdf malware detection using visualization and machine learning

Legal Events

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