KR20150096061A - The device for analyzing a malware based on similarity - Google Patents

The device for analyzing a malware based on similarity Download PDF

Info

Publication number
KR20150096061A
KR20150096061A KR1020140017010A KR20140017010A KR20150096061A KR 20150096061 A KR20150096061 A KR 20150096061A KR 1020140017010 A KR1020140017010 A KR 1020140017010A KR 20140017010 A KR20140017010 A KR 20140017010A KR 20150096061 A KR20150096061 A KR 20150096061A
Authority
KR
South Korea
Prior art keywords
string
code
similarity
malicious code
filter
Prior art date
Application number
KR1020140017010A
Other languages
Korean (ko)
Other versions
KR101550820B1 (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 KR1020140017010A priority Critical patent/KR101550820B1/en
Publication of KR20150096061A publication Critical patent/KR20150096061A/en
Application granted granted Critical
Publication of KR101550820B1 publication Critical patent/KR101550820B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

According to an embodiment of the present invention, a device for analyzing malware based on similarity may include: a malware database storing structured strings of the malware; an unpacking unit which unpacks programs that are presumed to be malware; a code extracting unit which extracts binary code from the unpacked programs; a decompiler converting the extracted binary code to a different code; and a code analyzing unit which determines whether the program is malware by converting the converted code to the structured string and comparing the similarity between the converted string and the string stored in the malware database.

Description

유사도에 기초하여 악성코드를 분석하는 장치{The device for analyzing a malware based on similarity}[0001] The present invention relates to a device for analyzing a malicious code based on similarity,

본 발명은 유사도에 기초하여 악성코드를 분석하는 장치에 관한 것이다. The present invention relates to an apparatus for analyzing malicious code based on the degree of similarity.

인터넷 및 컴퓨터 기술이 지속적으로 개발됨에 따라, 인터넷 및 컴퓨터는 전세계 사람들에게 필수적으로 사용하는 기술로 자리 잡게 되었다. 또한, 인터넷 및 컴퓨터 기술의 개발과 함께, 이러한 기술을 악용하여 부당한 이익을 챙기려는 시도도 증가하고 있다. 예를 들면, 악성코드(Malware)를 사용자들의 컴퓨터에 설치 및 배포하여, 사용자들로부터 부당한 이익을 챙기는 방법이 증가하고 있다. 여기서, 악성코드(Malware)란, 컴퓨터 사용자의 승인 없이 컴퓨터에 침투하거나 설치되어, 악의적인 행동을 하는 프로그램을 의미한다. 이는 프로그램이 가지고 있는 그 자체의 특징보다는 프로그램을 생성한 사람의 의도에 따라 악성코드(Malware) 여부가 결정된다. 이러한 악성코드(Malware)로는, 컴퓨터 바이러스(Virus), 웜(Warm), 트로이 목마(Trojan horse), 스파이웨어(Spyware)가 대표적이며, 이들 외에도 해롭고 불필요한 소프트웨어들은 모두 악성코드(Malware)의 범주에 속한다. As the Internet and computer technology continue to develop, the Internet and computers have become essential technologies for people all over the world. Along with the development of the Internet and computer technologies, there are also increasing attempts to exploit these technologies to gain undue profits. For example, malicious code (Malware) is installed and distributed on users' computers, and there is an increasing number of ways to gain unfair advantage from users. Here, malware refers to a program that is infiltrated or installed in a computer without permission of a computer user and malicious. This is determined by the intention of the person who created the program, rather than the characteristics of the program itself. These malicious codes are computer viruses, worms, Trojan horses and spyware. In addition to these, harmful and unnecessary software are all classified into malware category. Belongs.

이에 따라, 안티 바이러스 공급 업체들이 다양한 솔루션을 제공하여, 악성코드(Malware)를 제거하려고 있지만, 해커들은 탐지가 어려운 새로운 악성코드(Malware)를 대량으로 생산 및 배포하여, 안티 바이러스의 탐지를 피하고 있다. 특히, 최근 5년 사이에 새로운 악성코드(Malware)는 기하급수적으로 증가하고 있다. 또한, 새로운 악성코드(Malware)의 대부분은 종래의 악성코드(Malware)의 변종이다. As a result, antivirus vendors offer a variety of solutions to eliminate malware, but hackers are massively producing and distributing new malware that is difficult to detect, avoiding the detection of antivirus . In particular, new malware has increased exponentially in the last five years. In addition, most of the new malware is a variant of conventional malware.

이와 같이, 새로운 악성코드(Malware)의 출현의 급격한 증가 및 높은 악성코드(Malware)의 변종 비율을 살펴볼 때, 새로운 변종 코드들을 신속하게 분석할 수 있는 장치가 요구된다. Thus, when the emergence of new malware and the high rate of malware variants are examined, a device is needed to quickly analyze the new variant codes.

Silvio Cesare et al. "Malwise: An Effective and Efficient Classification System for Packed and Polymorphic Malware," IEEE Transactions on Computer 2013Silvio Cesare et al. "Malwise: An Effective and Efficient Classification System for Packed and Polymorphic Malware," IEEE Transactions on Computer 2013 Silvio Cesare et al. "Malware Variant Detection Using Similarity Search over Sets of Control Flow Graphs", TSPC 2011Silvio Cesare et al. "Malware Variant Detection Using Similarity Search over Control Flow Graphs", TSPC 2011

본 발명이 이루고자 하는 기술적 과제는 정확하게 악성코드를 분석할 수 있는 유사도에 기초하여 악성코드를 분석하는 장치를 제공하는 것이다. SUMMARY OF THE INVENTION It is an object of the present invention to provide an apparatus for analyzing a malicious code based on the degree of similarity capable of accurately analyzing a malicious code.

또한, 본 발명이 이루고자 하는 다른 기술적 과제는, 빠른 속도로 악성코드를 분석할 수 있는 유사도에 기초하여 악성코드를 분석하는 장치를 제공하는 것이다. According to another aspect of the present invention, there is provided an apparatus for analyzing a malicious code based on a degree of similarity capable of analyzing a malicious code at a high speed.

본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치는 악성코드들의 구조화된 문자열을 저장하는 악성코드 데이터베이스; 악성코드로 추정되는 프로그램을 언패킹하는 언패킹부; 상기 언패킹된 프로그램으로부터 바이너리 코드를 추출하는 코드 추출부; 상기 추출된 바이너리 코드를 다른 코드로 변환하는 디컴파일러; 및 상기 변환된 코드를 구조화된 문자열로 변환하고, 상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열의 유사도를 비교하여, 상기 프로그램이 악성코드인지 여부를 판별하는 코드 분석부를 포함할 수 있다. An apparatus for analyzing a malicious code based on a degree of similarity according to an embodiment of the present invention includes a malicious code database storing a structured string of malicious codes; An unpacking unit for unpacking a program estimated to be malicious code; A code extracting unit for extracting a binary code from the unpacked program; A decompiler for converting the extracted binary code into another code; And a code analyzer for converting the converted code into a structured string and comparing the converted string with the similarity of the string stored in the malicious code database to determine whether the program is malicious code.

또한, 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치에서, 상기 코드 분석부는 상기 변환된 코드를 구조화된 문자열로 변환하는 문자열 변환부; 상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열들을 일정한 조건에 따라 필터링하고, 필터링되지 않은 문자열들의 유사도를 측정하는 유사도 측정부; 및 상기 유사도 측정 결과에 따라 상기 프로그램이 악성코드인지 여부를 판별하는 악성코드 판별부를 포함할 수 있다. In the apparatus for analyzing a malicious code based on the degree of similarity according to an embodiment of the present invention, the code analyzing unit may include a character string converting unit for converting the converted code into a structured character string; A similarity measuring unit for filtering the converted string and the strings stored in the malicious code database according to a predetermined condition and measuring the similarity of the unfiltered strings; And a malicious code discrimination unit for discriminating whether the program is a malicious code according to the result of the similarity measurement.

또한, 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치에서, 상기 코드 분석부는 상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열들의 동일 여부를 해쉬 값을 이용하여 판별하고, 동일한 문자열들을 필터링하는 제 1 필터를 포함할 수 있다. In the apparatus for analyzing a malicious code based on the degree of similarity according to an embodiment of the present invention, the code analyzing unit may determine whether the converted character string and the strings stored in the malicious code database are the same by using a hash value, And may include a first filter that filters the same strings.

또한, 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치에서, 상기 코드 분석부는 상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열의 길이 차이를 판별하고, 일정한 길이 차이 이상의 문자열들을 필터링하는 제 2 필터를 포함할 수 있다. In the apparatus for analyzing a malicious code based on the degree of similarity according to an embodiment of the present invention, the code analyzing unit determines the difference in length between the converted character string and the character string stored in the malicious code database, Lt; RTI ID = 0.0 > a < / RTI >

또한, 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치에서, 상기 코드 분석부는 상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열을 구성하는 문자의 개수의 차이를 판별하고, 문자 개수의 차이의 합이 일정한 값 이상이되는 문자열들을 필터링하는 제 3 필터를 포함할 수 있다. In the apparatus for analyzing a malicious code based on the degree of similarity according to an embodiment of the present invention, the code analyzer may discriminate a difference between the converted character string and the number of characters constituting the character string stored in the malicious code database, And a third filter for filtering the strings whose sum of differences in the number of characters is equal to or greater than a predetermined value.

본 발명에 따른 유사도에 기초하여 악성코드를 분석하는 장치에 의하면, 편집 거리(edit distance) 알고리즘을 사용하여 유사도 분석의 정확도를 높일 수 있다. According to the apparatus for analyzing malicious codes based on the similarity according to the present invention, the accuracy of the similarity analysis can be enhanced by using an edit distance algorithm.

또한, 본 발명에 따른 유사도에 기초하여 악성코드를 분석하는 장치에 의하면, 유사도 분석을 위해 비교하는 대상 문자열을 감소시켜 연산 처리 속도를 향상시킬 수 있다. Further, according to the apparatus for analyzing malicious code based on the degree of similarity according to the present invention, it is possible to improve the processing speed by reducing the target character strings to be compared for similarity analysis.

도 1은 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치를 개략적으로 나타낸 도면이다.
도 2는 4개의 함수로 구성된 프로그램의 제어 흐름 그래프를 나타낸 도면이다.
도 3은 프로그램을 구성하는 함수의 제어 흐름 그래프를 구조화된 문자열로 변환하는 과정을 나타낸 도면이다.
도 4는 분기 명령어에 대한 변환 테이블이다.
도 5는 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치의 제 1 필터에 의해 필터링되는 과정을 설명하기 위한 도면이다.
도 6은 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치의 제 2 필터에 의해 필터링되는 과정을 설명하기 위한 도면이다.
도 7은 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치의 제 3 필터에 의해 필터링되는 과정을 설명하기 위한 도면이다.
도 8은 편집 거리를 측정하는 과정을 설명하기 위한 도면이다.
도 9는 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치에서 유사도를 측정하는 문자열을 나타낸 도면이다.
1 is a schematic diagram of an apparatus for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention.
2 is a diagram showing a control flow graph of a program composed of four functions.
3 is a diagram illustrating a process of converting a control flow graph of a function constituting a program into a structured string.
4 is a conversion table for the branch instruction word.
5 is a diagram for explaining a process of filtering by a first filter of an apparatus for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention.
6 is a diagram for explaining a process of filtering by a second filter of an apparatus for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention.
7 is a diagram for explaining a process of filtering by a third filter of an apparatus for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention.
8 is a view for explaining a process of measuring the edit distance.
9 is a diagram showing a character string for measuring the similarity in an apparatus for analyzing malicious code based on the similarity according to an embodiment of the present invention.

본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 본 발명에 대해 구체적으로 설명하기로 한다. The terms used in this specification will be briefly described and the present invention will be described in detail.

본 발명에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. While the present invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiments.

또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 발명에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 발명의 전반에 걸친 내용을 토대로 정의되어야 한다. Also, in certain cases, there may be a term selected arbitrarily by the applicant, in which case the meaning thereof will be described in detail in the description of the corresponding invention. Therefore, the term used in the present invention should be defined based on the meaning of the term, not on the name of a simple term, but on the entire contents of the present invention.

명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. 또한, 명세서에 기재된 "...부", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다. When an element is referred to as "including" an element throughout the specification, it is to be understood that the element may include other elements as well, without departing from the spirit or scope of the present invention. Also, the terms "part," " module, "and the like described in the specification mean units for processing at least one function or operation, which may be implemented in hardware or software or a combination of hardware and software .

아래에서는 첨부한 도면을 참고하여 본 발명의 실시예에 대하여 본발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.

도 1은 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치를 개략적으로 나타낸 도면이다. 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)는 언패킹부(110), 코드 추출부(120), 디컴파일러(130), 코드 분석부(140) 및 악성코드 데이터베이스(150)를 포함할 수 있다. 1 is a schematic diagram of an apparatus for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention. An apparatus 100 for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention includes an unpacking unit 110, a code extracting unit 120, a decompiler 130, a code analyzing unit 140, And a code database 150.

언패킹부(110)는 악성코드(Malware)로 추정되는 프로그램을 언패킹(Unpacking)하여, 악성코드(Malware)로 추정되는 프로그램의 바이너리 코드(binary code)를 외부로 드러나게 할 수 있다. 일반적으로, 프로그램은 패킹(Packing)되어 있으므로, 실제 코드를 추출하기 위해서는 언패킹(Unpacking)을 하여야 한다. 따라서, 언패킹부(110)는 프로그램의 바이너리 코드를 풀어서 외부로 드러나게 할 수 있다. The unpacking unit 110 can unpack the program estimated as malware and expose the binary code of the program estimated to be malware to the outside. Generally, since the program is packed, unpacking is required to extract the actual code. Accordingly, the unpacking unit 110 can unpack the binary code of the program and expose it to the outside.

또한, 악성코드(Malware)로 추정되는 프로그램은 적어도 하나 이상의 함수를 포함할 수 있다. 그리고, 언패킹된 프로그램을 구성하는 함수들은 제어 흐름 그래프(Control flow graph)로 나타낼 수도 있다. In addition, a program estimated as malware may include at least one function. The functions forming the unpacked program can also be expressed as a control flow graph.

도 2는 4개의 함수로 구성된 프로그램의 제어 흐름 그래프를 나타낸 도면이다. 일반적으로, 프로그램을 구성하는 함수들은 입력 값과 조건에 따라 출력 값이 달라지는 형태를 포함할 수 있고, 이를 도식화하여 제어 흐름 그래프(Control flow graph)로 나타낼 수 있다. 프로그램이 4개의 함수로 구성된 경우, 4개의 함수를 도 2에 도시된 바와 같이 제어 흐름 그래프(Control flow graph)를 나타낼 수 있다. 2 is a diagram showing a control flow graph of a program composed of four functions. Generally, the functions constituting the program may include a form in which output values are changed according to input values and conditions, and can be represented by a control flow graph. When the program is composed of four functions, four functions can represent a control flow graph as shown in FIG.

코드 추출부(120)는 프로그램으로부터 바이너리 코드를 추출할 수 있다. 코드 추출부(120)는 언패킹부(110)에 의해 바이너리 코드가 외부로 드러난 프로그램으로부터 바이너리 코드를 추출할 수 있다. The code extracting unit 120 can extract the binary code from the program. The code extracting unit 120 can extract the binary code from the program in which the binary code is revealed to the outside by the unpacking unit 110. [

디컴파일러(130)는 추출된 바이너리 코드를 C 언어와 같은 하이레벨 코드로 변환할 수 있다. The decompiler 130 can convert the extracted binary code into a high level code such as the C language.

코드 분석부(140)는 하이레벨 코드를 구조화된 악성코드(Malware) 문자열로 변환하고, 변환된 문자열을 가지는 프로그램이 악성코드(Malware)인지 여부를 판별할 수 있다. 보다 구체적으로, 코드 분석부(140)는 제어 흐름 그래프(Control flow graph)를 구조화된 악성코드(Malware) 문자열로 변환할 수 있다. The code analysis unit 140 may convert the high-level code into a structured malware string, and determine whether the program having the converted string is malware. More specifically, the code analysis unit 140 may convert a control flow graph into a structured malware string.

또한, 변환된 문자열의 메타 데이터(Meta data)를 연산할 수 있다. 그리고, 연산된 메타 데이터의 값과 악성코드 데이터베이스에 저장된 악성코드들(Malwares)의 메타 데이터 값을 비교하여, 변환된 문자열이 악성코드(Malware)인지를 판별할 수 있다.In addition, metadata of the converted character string (Meta data) can be calculated. Then, it is possible to determine whether the converted string is malware by comparing the value of the calculated metadata with the metadata value of the malicious codes (Malwares) stored in the malicious code database.

코드 분석부(140)는 문자열 변환부(141), 유사도 측정부(142) 및 악성코드 판별부(143)를 포함할 수 있다. 그리고, 악성코드 데이터베이스(Malware database)(150)는 이미 알려진 악성코드들의 구조화된 문자열이 저장되어 있을 수 있다. The code analyzing unit 140 may include a character string converting unit 141, a similarity measuring unit 142, and a malicious code determining unit 143. In addition, the malware database 150 may store a structured string of known malicious codes.

제어 흐름을 가진 함수는 디컴파일(Decompile)된 후, 브랜치 명령어만을 남길 수 있다. 그리고, 이를 다시 최종적으로 변환하면 구조화된 문자열이 될 수 있다. 브랜치 명령어를 구조화된 문자열로 변환하는 경우, 다양한 분기 명령어가 존재할 수 있고, 그러한 분기 명령어는 변환 테이블로 나타낼 수 있다.A function with control flow can be decompiled, leaving only branch instructions. And finally, it can be converted into a structured string. When converting a branch instruction into a structured string, various branch instructions may exist, and such branch instructions may be represented by a translation table.

도 3은 프로그램을 구성하는 함수의 제어 흐름 그래프를 구조화된 문자열로 변환하는 과정을 나타낸 도면이고, 도 4는 분기 명령어에 대한 변환 테이블이다. FIG. 3 is a diagram illustrating a process of converting a control flow graph of a function constituting a program into a structured string, and FIG. 4 is a conversion table for a branch instruction.

도 3에 도시된 바와 같이, 악성코드(A)는 디컴파일된 후, 브랜치 명령어만을 가진 형태(B)가 될 수 있다. 그리고, 이를 변환하여, 구조화된 문자열(C)와 같이 나타낼 수 있다. B에서 C로 변환할 때, 다양한 분기 명령어가 존재하는데, 그 분기 명령어에 대한 변환 테이블은 도 4와 같을 수 있다. 도 4에서 타켓 명령어는 모두 분기 명령어들일 수 있다. As shown in Fig. 3, the malicious code A may be in the form (B) having only branch instructions after being decompiled. Then, it can be transformed and expressed as a structured string (C). When converting from B to C, there are various branch instructions, and the conversion table for that branch instruction may be as shown in FIG. In FIG. 4, all of the target commands may be branch instructions.

이와 같이, 코드 분석부(140)의 문자열 변환부(141)는 악성코드(Malware)로 추정되는 프로그램을 구성하는 함수들을 도 3의 C와 같은 구조화된 문자열로 변환시킬 수 있다. In this way, the string conversion unit 141 of the code analysis unit 140 can convert the functions constituting the program estimated as malware into a structured string such as C in Fig.

코드 분석부(140)의 유사도 측정부(142)는 악성코드(Malware)의 유사도를 측정할 수 있다. 유사도 측정부(142)는 메타 데이터 연산부(142a), 저장부(142b), 제 1 필터(142c), 제 2 필터(142d), 제 3 필터(142e), 문자열 유사도 측정부(142f) 및 악성코드 유사도 측정부(142g)를 포함할 수 있다. The similarity measuring unit 142 of the code analyzing unit 140 may measure the similarity of the malware. The similarity measuring unit 142 includes a metadata calculating unit 142a, a storing unit 142b, a first filter 142c, a second filter 142d, a third filter 142e, a string similarity measuring unit 142f, And a code similarity measurement unit 142g.

메타 데이터 연산부(142a)는 구조화된 문자열의 메타 데이터(Meta data)를 연산할 수 있다. 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)에서, 메타 데이터(Meta data)는 구조화된 문자열의 특징을 나타내는 값일 수 있다. The metadata operation unit 142a may calculate meta data of the structured character string. In the apparatus 100 for analyzing malicious codes based on the degree of similarity according to an embodiment of the present invention, the meta data may be a value indicating a characteristic of the structured character string.

예를 들면, 메타 데이터(Meta data)는 해쉬(Hash) 값, 문자열 길이 및 문자열의 각 문자의 개수 중 적어도 하나 이상을 포함할 수 있다. 본 발명의 실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)에서, 메타 데이터 연산부(142a)는 구조화된 문자열의 해쉬 값, 문자열 길이 및 문자열의 각 문자의 개수를 연산할 수 있으며, 저장부(142b)는 연산된 메타 데이터를 저장할 수 있다. For example, the meta data may include at least one of a hash value, a character string length, and the number of characters of a character string. In the apparatus 100 for analyzing a malicious code based on the similarity according to the embodiment of the present invention, the metadata operation unit 142a can calculate the hash value of the structured string, the string length, and the number of each character of the string , And the storage unit 142b may store the computed metadata.

제 1 필터(142c)는 문자열 변환부(141)를 통해 구조화된 문자열을 입력 받을 수 있다. 그리고, 제 1 필터(142c)는 입력받은 문자열과 악성코드 데이터베이스(150)에 저장된 악성코드들(Malwares)의 문자열이 동일한지 여부를 판별하고, 악성코드 데이터베이스(150)에 저장된 악성코드들(Malwares)과 동일한 문자열을 필터링(filtering)할 수 있다. 이 때, 제 1 필터(142c)는 문자열의 동일 여부를 판별하기 위해, 해쉬 값을 이용할 수 있다. 제 1 필터(142c)는 동일 특징(Identical character)을 이용하여 문자열을 필터링하므로, 동일 특징 필터(Identical Character filter)라고 명할 수도 있다. The first filter 142c can receive the structured character string through the character string conversion unit 141. [ The first filter 142c determines whether or not the inputted string is identical to the string of the malicious codes stored in the malicious code database 150. The malicious code stored in the malicious code database 150 ) Can be filtered. At this time, the first filter 142c may use a hash value to determine whether or not the character string is the same. Since the first filter 142c filters a character string using an identical character, the first filter 142c may be called an identical character filter.

이하, 제 1 필터(142c)의 동작을 상세히 살펴보면 다음과 같다. Hereinafter, the operation of the first filter 142c will be described in detail.

본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)에서, 문자열 변환부(141)를 통해 구조화된 문자열을 x라 하고, 악성코드 데이터베이스(150)에 저장된 악성코드들(Malwares)의 문자열을 y라고 하는 경우, 제 1 필터(142c)는 입력되는 문자열들 중에서, 문자열 y와 동일한 해쉬 값을 가지는 문자열 x을 필터링할 수 있다. 즉, 제 1 필터(142c)는 입력되는 문자열들 중에서, 문자열 y와 동일한 해쉬 값을 가지는 문자열 x를 필터링하고, 나머지 문자열들을 출력할 수 있다. In the apparatus 100 for analyzing a malicious code based on the degree of similarity according to an embodiment of the present invention, the structured string is represented by x through the string conversion unit 141, and the malicious code stored in the malicious code database 150 The first filter 142c can filter the string x having the same hash value as the string y among the input strings. That is, the first filter 142c may filter the character string x having the same hash value as the character string y among the inputted strings, and output the remaining characters.

메타 데이터 연산부(142a)를 통해 구조화된 문자열의 해쉬 값들이 연산되면, 제 1 필터(142c)는 연산된 해쉬 값과 동일한 해쉬 값을 가진 문자열을 악성코드 데이터베이스(150)에 요청할 수 있다. 요청된 문자열과 동일한 문자열이 악성코드 데이터베이스(150)에 존재하는 것이 확인되면, 요청된 문자열은 제 1 필터(142c)에 의해 필터링될 수 있다. 문자열이 서로 동일하면, 유사도는 1이 될 수 있다. 제 1 필터(142c)는 유사도가 1인 문자열을 필터링할 수 있다. When the hash values of the structured character string are calculated through the metadata operation unit 142a, the first filter 142c may request the malicious code database 150 for a string having the same hash value as the calculated hash value. If it is confirmed that the same character string as the requested character string exists in the malicious code database 150, the requested character string can be filtered by the first filter 142c. If the strings are equal to each other, the degree of similarity can be 1. The first filter 142c may filter a character string having a similarity of 1. [

도 5는 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치의 제 1 필터에 의해 필터링되는 과정을 설명하기 위한 도면이다. 5 is a diagram for explaining a process of filtering by a first filter of an apparatus for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention.

도 5에 도시된 바와 같이, 구조화된 문자열 BR과 동일한 문자열은 악성코드 데이터베이스(150)에 존재하고, 이들은 제 1 필터(142c)에 의해 필터링될 수 있다. 그리고, 유사도가 1인 문자열이 필터링되면, 구조화된 문자열과 악성코드 데이터베이스(150)에 저장된 문자열을 비교하는 횟수는 32회에서 21회로 감소될 수 있다. As shown in FIG. 5, the same strings as the structured string BR exist in the malicious code database 150, and they can be filtered by the first filter 142c. If the string having the similarity of 1 is filtered, the number of times the structured string is compared with the string stored in the malicious code database 150 may be reduced from 32 to 21.

제 2 필터(142d)는 제 1 필터(142c)에 의해 출력되는 문자열들 중에서, 악성코드 데이터베이스(150)에 저장된 문자열과 일정한 길이 차이 이상나는 문자열들을 필터링할 수 있다. 즉, 제 2 필터(142d)는 입력되는 문자열을 필터링하기 위해 문자열 길이(length)를 이용할 수 있다. 제 2 필터(142d)는 문자 길이를 이용하여 문자열을 필터링하므로, 길이 필터(Length filter)라고 명할 수도 있다. The second filter 142d may filter the strings stored in the malicious code database 150 and the strings that differ by a predetermined length difference from the strings output by the first filter 142c. That is, the second filter 142d may use the length of the string to filter the input character string. Since the second filter 142d filters the character string using the character length, it may be called a length filter.

이하, 제 2 필터(142d)의 동작을 상세히 살펴보면, 다음과 같다. Hereinafter, the operation of the second filter 142d will be described in detail.

문자열 x 및 y에 대해, 제 2 필터(142d)의 필터링 조건은 다음의 [수학식 1]을 이용할 수 있다. For the strings x and y, the filtering condition of the second filter 142d may use the following formula (1).

[수학식 1][Equation 1]

if len(x)≥len(y), Vthreshold*len(x)>len(y)if len (x) ≥len (y ), V threshold * len (x)> len (y)

if len(y)≥len(x), Vthreshold*len(y)>len(x)if len (y) ≥len (x ), V threshold * len (y)> len (x)

(len(x)는 문자열 x의 길이, len(y)는 문자열의 길이, Vthreshold는 유사도 기준 값(본 발명의 일실시예에서는 0.9)) (len (x) is the length of the string x, len (y) is the length of the string, and V threshold is the similarity reference value (0.9 in one embodiment of the invention)

도 6은 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치의 제 2 필터에 의해 필터링되는 과정을 설명하기 위한 도면이다. 6 is a diagram for explaining a process of filtering by a second filter of an apparatus for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention.

도 6에 도시된 바와 같이, 구조화된 문자열 BSSS와 일정한 길이 이상 차이가 나는 문자열이 악성코드 데이터베이스(150)에 존재(문자열 BSSSWBRR과 문자열 BS)하면, 이들은 제 2 필터(142d)에 의해 필터링될 수 있다. 그리고, 이러한 문자열들이 필터링되면, 구조화된 문자열과 악성코드 데이터베이스(150)에 저장된 문자열을 비교하는 횟수는 21회에서 15회로 감소할 수 있다. As shown in FIG. 6, if a string that differs from the structured string BSSS by more than a predetermined length exists in the malicious code database 150 (string BSSSWBRR and string BS), they can be filtered by the second filter 142d have. When these strings are filtered, the number of times the structured string is compared with the string stored in the malicious code database 150 may be reduced from 21 to 15.

[수학식 1]을 통해, 필터링되는지를 살펴보면, 다음과 같다. The following is a description of filtering through Equation (1).

문자열 BSSS(문자열 x)와 문자열 BS(문자열 y)는 if len(x)≥len(y), Vthreshold*len(x)>len(y)의 경우이다. 따라서, 문자열 BSSS와 문자열 BS를 [수학식 1]의 제 1 경우에 적용하면, 0.9*4 = 3.6 > 2이 된다. 이는, 필터링 조건을 만족하고, 이에 따라, 문자열 BSSS 및 문자열 BS는 제 2 필터(142d)에 의해 필터링될 수 있다. The string BSSS (string x) and the string BS (string y) are for if len (x) ≥len (y) and V threshold * len (x)> len (y). Therefore, when the string BSSS and the string BS are applied to the first case of Equation (1), 0.9 * 4 = 3.6 > 2. This satisfies the filtering condition, and thus the string BSSS and the string BS can be filtered by the second filter 142d.

또한, 문자열 BSSS(문자열 x)와 문자열 BSSSWBRR(문자열 y)은 if len(y)≥len(x), Vthreshold*len(y)>len(x)의 경우이다. 따라서, 문자열 BSSS와 문자열 BSSSWBRR를 [수학식 1]의 제 2 경우에 적용하면, 0.9*8 = 7.2 > 4이 된다. 이는, 필터링 조건을 만족하고, 이에 따라, 문자열 BSSS와 문자열 BSSSWBRR은 제 2 필터(142d)에 의해 필터링될 수 있다. The string BSSS (string x) and the string BSSSWBRR (string y) are for if len (y) ≥len (x) and V threshold * len (y)> len (x). Therefore, when the string BSSS and the string BSSSWBRR are applied to the second case of Equation (1), 0.9 * 8 = 7.2 > 4. This satisfies the filtering condition, so that the string BSSS and the string BSSSWBRR can be filtered by the second filter 142d.

제 3 필터(142e)는 제 2 필터(142d)에 의해 출력되는 문자열들 중에서, 악성코드 데이터베이스(150)에 저장된 문자열들과 문자열들을 구성하는 문자의 개수의 차이의 합이 일정 이상이 되는 문자열들을 필터링할 수 있다. 제 3 필터(142e)는 문자의 특징 빈도수를 이용하여 문자열을 필터링하므로, 특징 빈도수 필터(character frequency filter)라고 명할 수도 있다. The third filter 142e is a filter that stores, among the strings output by the second filter 142d, strings having the sum of the differences between the strings stored in the malicious code database 150 and the numbers of characters constituting the strings, Can be filtered. The third filter 142e may be referred to as a character frequency filter because it filters the character string using the character feature frequency.

이하, 제 3 필터(142e)의 동작을 상세히 살펴보면, 다음과 같다. Hereinafter, the operation of the third filter 142e will be described in detail.

문자열 x 및 y에 대해, 제 3 필터(142e)의 필터링 조건은 다음의 [수학식 2]를 이용할 수 있다. For the strings x and y, the filtering condition of the third filter 142e may use the following formula (2).

[수학식 2]&Quot; (2) "

Figure pat00001
Figure pat00001

(len(x)는 문자열 x의 길이, len(y)는 문자열의 길이, Vthreshold는 유사도 기준 값(본 발명의 일실시예서는 0.9), ci는 문자열을 구성하는 문자, freqx(ci)는 문자열 x에서 ci의 빈도수, freqy(ci)는 문자열 y에서 ci의 빈도수) (len (x) is a string x length, len (y) is long, V threshold of the string is similarity based on the value (one embodiment of the present invention clerical script is 0.9), ci is a character, freq x (ci) that make up the string Is the frequency of ci in string x, and freq y (ci) is the frequency of ci in string y)

도 7은 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치의 제 3 필터에 의해 필터링되는 과정을 설명하기 위한 도면이다. 7 is a diagram for explaining a process of filtering by a third filter of an apparatus for analyzing malicious code based on the degree of similarity according to an embodiment of the present invention.

도 7에 도시된 바와 같이, 구조화된 문자열 BSSS(문자열 x)와 문자의 개수의 차이의 합이 일정 이상이 되는 문자열은 악성코드 데이터베이스(150)에 존재(문자열 BBBR)하고, 이는 제 3 필터(142e)에 의해 필터링될 수 있다. 제 3 필터(142e)는 구조화된 문자열 각각과 악성코드 데이터베이스(150)에 존재하는 문자열 각각을 비교하여 수행할 수 있다. 그리고, 이러한 문자열들이 필터링되면, 구조화된 문자열과 악성코드 데이터베이스(150)에 저장된 문자열을 비교하는 횟수는 15회에서 6회로 감소할 수 있다. As shown in FIG. 7, a string in which the sum of the differences between the structured string BSSS (string x) and the number of characters is equal to or more than a predetermined value exists in the malicious code database 150 (string BBBR) Gt; 142e. ≪ / RTI > The third filter 142e may compare each of the structured strings and each of the strings existing in the malicious code database 150 to perform the comparison. When these strings are filtered, the number of times the structured string is compared with the string stored in the malicious code database 150 may be reduced from 15 to 6.

[수학식 2]를 통해, 필터링되는지를 살펴보면 다음과 같다. The following is a description of filtering through Equation (2).

문자열 x가 BSSS이고, 문자열 y가 BBBR이므로, len(x)는 4, len(y)는 4, freqx(B)=1, freqx(S)=3, freqx(W)=0, freqx(R)=0, freqy(B)=3, freqy(S)=0, freqy(W)=0, freqy(R)=1이다. 따라서, (4 + 4 - 6)/(2*4) = 0.25 < 0.9 이므로, 문자열 y인 BBBR은 문자열 x인 BSSS와의 관계에서 필터링될 수 있다. (X) is 4, len (y) is 4, freq x (B) = 1, freq x (S) = 3 and freq x (W) = 0, since the string x is BSSS and the string y is BBBR. freq y (R) = 0, freq y (B) = 3, freq y (S) = 0, freq y (W) = 0 and freq y (R) = 1. Thus, since (4 + 4 - 6) / (2 * 4) = 0.25 <0.9, BBBR as string y can be filtered in relation to BSSS which is string x.

문자열 유사도 측정부(142f)는 제 3 필터(142e)에 의해 출력되는 문자열 x 및 문자열 y의 유사도를 측정할 수 있다. 예를 들면, [수학식 3]을 이용하여, 문자열 x와 문자열 y의 유사도를 측정할 수 있다. The string similarity measuring unit 142f can measure the similarity of the string x and the string y output by the third filter 142e. For example, the similarity degree between the character string x and the character string y can be measured using [Equation 3].

[수학식 3]&Quot; (3) &quot;

Wed = 1 - ed(x, y)/max(len(x), len(y))Wed = 1 - ed (x, y) / max (len (x), len (y)

(Wed는 문자열 x와 문자열 y 사이의 유사도이고, len(x)는 x 문자열의 길이, len(y)는 y 문자열의 길이, ed(x, y)는 문자열 x와 문자열 y이 서로 다른 정도(x 문자열이 y 문자열과 동일해지기 위해 필요한 최소 수정 횟수(삽입, 삭제, 문자바꾸기))) (Wed is the similarity between the string x and the string y, len (x) is the length of the x string, len (y) is the length of the y string, and ed (x, y) x Minimum number of modifications needed to make the string equal to the y string (insert, delete, replace character)

[수학식 3]에서, ed(x, y)는 문자열 x와 문자열 y의 편집거리(Edit distance)로서, 문자열 x와 문자열 y가 서로 다른 정도이며, 문자열 x가 문자열 y와 동일해지기 위해 필요한 최소 수정 횟수(삽입, 삭제, 문자 바꾸기)를 의미한다. Ed (x, y) is the edit distance between the string x and the string y, and the string x and the string y are different from each other, and the string x is required to be equal to the string y. The minimum number of modifications (insertion, deletion, character replacement) means.

ed(x, y)는 다음의 [수학식 4]를 이용하여, 측정할 수 있다. ed (x, y) can be measured using the following equation (4).

[수학식 4] &Quot; (4) &quot;

Figure pat00002
Figure pat00002

[수학식 4]에 따라, 문자열 x가 문자열 y와 동일해지기 위해 필요한 최소 수정 횟수를 측정할 수 있다. According to Equation (4), the minimum number of correction times required to make the string x equal to the string y can be measured.

도 8은 편집 거리를 측정하는 과정을 설명하기 위한 도면이다. 8 is a view for explaining a process of measuring the edit distance.

도 8에 도시된 바와 같이, 문자열 x인 ABC와 문자열 y인 BC의 각 행 및 열을 비교하면, 최종적으로 ed(x, y)는 "1"이 됨을 알 수 있다. As shown in Fig. 8, when each row and column of the character string ABC and the character string y is compared, it can be seen that ed (x, y) is finally "1".

상기 살펴본 바와 같이, 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)에서, 제 1 필터(142c)는 입력되는 문자열들 중에서, 악성코드 데이터베이스(150)에 저장된 문자열과 동일한 문자열을 필터링하고, 제 2 필터(142d) 및 제 3 필터(142e)는 입력되는 문자열들 중에서, 악성코드 데이터베이스(150)에 저장된 문자열과 유사의 가능성이 매우 낮은 문자열들을 필터링할 수 있다. 그리고, 문자열 유사도 측정부(142f)는 제 1 필터(142c), 제 2 필터(142d) 및 제 3 필터(142e)에 의해 필터링되지 않은 문자열에 대해서만 유사도를 측정한다. As described above, in the apparatus 100 for analyzing malicious codes based on the degree of similarity according to an exemplary embodiment of the present invention, the first filter 142c extracts a character string stored in the malicious code database 150 And the second filter 142d and the third filter 142e may filter the strings that are very similar to the strings stored in the malicious code database 150 among the input strings. Then, the string similarity measurement unit 142f measures the similarity only to the strings that are not filtered by the first filter 142c, the second filter 142d, and the third filter 142e.

도 9는 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치에서 유사도를 측정하는 문자열을 나타낸 도면이다. 도 9에 도시된 바와 같이, 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)에 의하면, 유사도를 측정하는 문자열이 32회에서 6회로 감소될 수 있다. 9 is a diagram showing a character string for measuring the similarity in an apparatus for analyzing malicious code based on the similarity according to an embodiment of the present invention. As shown in FIG. 9, according to the apparatus 100 for analyzing malicious codes based on the degree of similarity according to an embodiment of the present invention, the string for measuring the degree of similarity can be reduced from 32 to 6 times.

즉, 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)에 의하면, 유사도를 측정하는 문자열의 개수가 감소되며, 이에 따라 연산 처리 속도가 향상될 수 있다.That is, according to the apparatus 100 for analyzing a malicious code based on the degree of similarity according to an embodiment of the present invention, the number of strings for measuring the similarity degree is reduced, and accordingly, the processing speed can be improved.

그리고, 제 1 필터(142c)는 악성코드 데이터베이스(150)에 저장된 문자열과 동일한 문자열을 필터링하므로, 가장 적은 연산 시간이 소요된다. 따라서, 문자열 유사도 측정부(142f)에 입력되는 문자열들을 필터링하는 과정에서, 제일 먼저 수행할 수 있다. 그리고, 제 2 필터(142d)와 제 3 필터(142e)는 제 3 필터(142e)가 제 2 필터(142d)를 포함하는 관계이고, 제 2 필터(142d)의 연산 시간이 적게 소요되므로, 제 2 필터(142d)를 우선적으로 수행할 수 있다. 그리고, 제 1 필터(142c)는 제 2 필터(142d) 및 제 3 필터(142e)와 독립적으로 적용될 수 있다. 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)에서는 제 1 필터(142c) 내지 제 3 필터(142e)를 모두 사용하였으나, 제 1 필터(142c) 내지 제 3 필터(142e) 중 적어도 하나 이상을 사용할 수도 있다. Since the first filter 142c filters the same character string as that stored in the malicious code database 150, the first filter 142c requires the least computation time. Therefore, it can be performed first in the process of filtering the strings inputted to the string similarity measuring unit 142f. Since the second filter 142d and the third filter 142e have a relationship in which the third filter 142e includes the second filter 142d and the calculation time of the second filter 142d is small, 2 filter 142d can be preferentially performed. The first filter 142c may be applied independently of the second filter 142d and the third filter 142e. The first filter 142c to the third filter 142e are all used in the apparatus 100 for analyzing malicious code based on the degree of similarity according to the embodiment of the present invention. However, the first filter 142c to the third filter 142c, And at least one of the first electrode 142e and the second electrode 142e may be used.

악성코드 유사도 측정부(142g)는 문자열 유사도 측정부(142f)에 의해 측정된 문자열 유사도를 기초로, 악성코드의 유사도를 측정할 수 있다. 악성코드 유사도 측정부(142g)는 문자열 x와 문자열 y 사이의 유사도를 측정한 후, 측정된 값들을 통합하여 악성코드 유사도를 측정할 수 있다. The malicious code similarity measuring unit 142g can measure the similarity of the malicious code based on the string similarity measured by the string similarity measuring unit 142f. The malicious code similarity measuring unit 142g may measure the similarity between the character string x and the character string y, and then measure the malicious code similarity by integrating the measured values.

악성코드 A가 악성코드 B에 대한 유사도는 다음의 [수학식 5]를 이용하여, 측정할 수 있다. The similarity of malicious code A to malicious code B can be measured using the following equation (5).

[수학식 5] &Quot; (5) &quot;

Figure pat00003
Figure pat00003

(SA는 악성코드 A가 악성코드 B에 대한 유사도이고, Wedi는 문자열 xi와 문자열 yi사이의 유사도이고, weightxi는 문자열 xi의 가중치이며, t는 유사도 기준값(본 발명의 일실시예에서는 0.9))(S and A is the degree of similarity is the infection A to B infection, Wed i is the degree of similarity between the string and the string x i y i, weightx i is the weight of the string x i, t is a similarity threshold (the In an embodiment of the invention 0.9)))

악성코드 A는 다수의 문자열들로 구성될 수 있는데, 이는 문자열 xi의 집합이 될 수 있다. 그리고, 각 문자열은 문자열의 길이에 따라 비례하는 가중치를 가지며, 이는 weightxi로 표현될 수 있다. 악성코드 A가 악성코드 B에 대한 유사도(SA)는 악성코드 A를 구성하는 문자열 xi에 대한 유사도를 측정하고, 이들을 합산하여 측정할 수 있다. 또한, 악성코드 B가 악성코드 A에 대한 유사도(SB)는 [수학식 5]를 응용하여 측정할 수 있다. 즉, 악성 코드 B를 구성하는 문자열 yi의 유사도와 문자열 yi의 가중치인 weightyi 이용하여, 측정할 수 있다. 그리고, 악성코드 A와 악성코드 B의 최종적인 유사도(SAB)는 다음의 [수학식 6]과 같이, 악성코드 A가 악성코드 B에 대한 유사도(SA)와 악성코드 B가 악성코드 A에 대한 유사도(SB)을 곱하여 측정할 수 있다. Malicious code A can consist of a number of strings, which can be a set of strings x i . And each string has a weight proportional to the length of the string, which can be expressed as weightx i . The degree of similarity (S A ) of malicious code A to malicious code B can be measured by measuring the degree of similarity with respect to the string x i constituting malicious code A and summing them. In addition, the degree of similarity (S B ) of malicious code B to malicious code A can be measured by applying [Equation 5]. That is, the similarity degree of the string y i constituting the malicious code B and the weighty i of the string y i Can be measured. The final degree of similarity (S AB ) between malicious code A and malicious code B is calculated by the following equation (6): malicious code A has similarity (S A ) to malicious code B and malicious code B has malicious code A (S B ) for a given sample.

[수학식 6] &Quot; (6) &quot;

SAB = SA * SB S AB = S A * S B

악성코드 판별부(143)는 유사도 측정부(142)를 통해 측정한 악성코드의 유사도에 기초하여, 악성코드로 추정되는 프로그램이 악성코드인지 여부를 판별할 수 있다. The malicious code discrimination section 143 can discriminate whether or not the program estimated by the malicious code is a malicious code based on the similarity degree of the malicious code measured through the similarity degree measurement section 142. [

이와 같이, 본 발명의 일실시예에 따른 유사도에 기초하여 악성코드를 분석하는 장치(100)에 의하면, 제 1 필터(142c) 내지 제 3 필터(142e)를 통해 유사도 측정이 불필요한 문자열들을 필터링하므로, 유사도를 측정하는 문자열의 개수를 감소시킬 수 있으며, 이에 따라 연산처리속도가 향상될 수 있다. As described above, according to the apparatus 100 for analyzing malicious codes based on the degree of similarity according to the embodiment of the present invention, the strings that do not require similarity measurement are filtered through the first filter 142c to the third filter 142e , The number of strings for measuring the degree of similarity can be reduced, and accordingly, the processing speed can be improved.

본 발명의 일 실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to an embodiment of the present invention may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions recorded on the medium may be those specially designed and constructed for the present invention or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속한다.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, It belongs to the scope of right.

110: 언패킹부
120: 코드 추출부
130: 디컴파일러
140: 코드 분석부
141: 문자열 변환부
142: 유사도 측정부
142a: 메타 데이터 연산부
142b: 저장부
142c: 제 1 필터
142d: 제 2 필터
142e: 제 3 필터
142f: 문자열 유사도 측정부
142g: 악성코드 유사도 측정부
143: 악성코드 판별부
150: 악성코드 데이터베이스
110: Unpacking part
120: Code extracting unit
130: Decompiler
140: Code analysis section
141: String conversion unit
142:
142a: metadata operation unit
142b:
142c: first filter
142d: second filter
142e: third filter
142f: a string similarity measuring unit
142g: malicious code similarity measuring unit
143: Malicious code discrimination unit
150: Malicious code database

Claims (5)

악성코드들의 구조화된 문자열을 저장하는 악성코드 데이터베이스;
악성코드로 추정되는 프로그램을 언패킹하는 언패킹부;
상기 언패킹된 프로그램으로부터 바이너리 코드를 추출하는 코드 추출부;
상기 추출된 바이너리 코드를 다른 코드로 변환하는 디컴파일러; 및
상기 변환된 코드를 구조화된 문자열로 변환하고, 상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열의 유사도를 비교하여, 상기 프로그램이 악성코드인지 여부를 판별하는 코드 분석부를 포함하는 유사도에 기초하여 악성코드를 분석하는 장치.
A malicious code database storing structured strings of malicious codes;
An unpacking unit for unpacking a program estimated to be malicious code;
A code extracting unit for extracting a binary code from the unpacked program;
A decompiler for converting the extracted binary code into another code; And
And a code analysis unit for converting the converted code into a structured string and comparing the converted string with a similarity degree of a string stored in the malicious code database to determine whether the program is a malicious code, A device for analyzing code.
제 1 항에 있어서, 상기 코드 분석부는
상기 변환된 코드를 구조화된 문자열로 변환하는 문자열 변환부;
상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열들을 일정한 조건에 따라 필터링하고, 필터링되지 않은 문자열들의 유사도를 측정하는 유사도 측정부; 및
상기 유사도 측정 결과에 따라 상기 프로그램이 악성코드인지 여부를 판별하는 악성코드 판별부를 포함하는 유사도에 기초하여 악성코드를 분석하는 장치.
The apparatus of claim 1, wherein the code analyzer
A string conversion unit for converting the converted code into a structured string;
A similarity measuring unit for filtering the converted string and the strings stored in the malicious code database according to a predetermined condition and measuring the similarity of the unfiltered strings; And
And a malicious code discrimination unit for discriminating whether the program is a malicious code according to the result of the similarity measurement.
제 2 항에 있어서, 상기 코드 분석부는
상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열들의 동일 여부를 해쉬 값을 이용하여 판별하고, 동일한 문자열들을 필터링하는 제 1 필터를 포함하는 유사도에 기초하여 악성코드를 분석하는 장치.
The apparatus of claim 2, wherein the code analyzer
And a first filter that identifies whether the converted character string is identical to a character string stored in the malicious code database using a hash value and filters the same character string.
제 2 항에 있어서, 상기 코드 분석부는
상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열의 길이 차이를 판별하고, 일정한 길이 차이 이상의 문자열들을 필터링하는 제 2 필터를 포함하는 유사도에 기초하여 악성코드를 분석하는 장치.
The apparatus of claim 2, wherein the code analyzer
And a second filter for distinguishing a length difference between the converted character string and a character string stored in the malicious code database, and filtering a character string having a predetermined length difference or more.
제 2 항에 있어서, 상기 코드 분석부는
상기 변환된 문자열과 상기 악성코드 데이터베이스에 저장된 문자열을 구성하는 문자의 개수의 차이를 판별하고, 문자 개수의 차이의 합이 일정한 값 이상이되는 문자열들을 필터링하는 제 3 필터를 포함하는 유사도에 기초하여 악성코드를 분석하는 장치.
The apparatus of claim 2, wherein the code analyzer
And a third filter for discriminating a difference between the converted character string and a character string constituting the character string stored in the malicious code database and filtering a character string whose sum of differences of the character strings is equal to or greater than a predetermined value, A device for analyzing code.
KR1020140017010A 2014-02-14 2014-02-14 The device for analyzing a malware based on similarity KR101550820B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140017010A KR101550820B1 (en) 2014-02-14 2014-02-14 The device for analyzing a malware based on similarity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140017010A KR101550820B1 (en) 2014-02-14 2014-02-14 The device for analyzing a malware based on similarity

Publications (2)

Publication Number Publication Date
KR20150096061A true KR20150096061A (en) 2015-08-24
KR101550820B1 KR101550820B1 (en) 2015-09-07

Family

ID=54058643

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140017010A KR101550820B1 (en) 2014-02-14 2014-02-14 The device for analyzing a malware based on similarity

Country Status (1)

Country Link
KR (1) KR101550820B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200095122A (en) * 2019-01-31 2020-08-10 단국대학교 산학협력단 Apparatus and method for feature information extraction and similarity comparison of android app considering obfuscation
CN116578537A (en) * 2023-07-12 2023-08-11 北京安天网络安全技术有限公司 File detection method, readable storage medium and electronic device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804920B (en) * 2018-05-24 2021-09-28 河南省躬行信息科技有限公司 Method for monitoring malicious code homology analysis based on cross-process behavior

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3992136B2 (en) 2001-12-17 2007-10-17 学校法人金沢工業大学 Virus detection method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200095122A (en) * 2019-01-31 2020-08-10 단국대학교 산학협력단 Apparatus and method for feature information extraction and similarity comparison of android app considering obfuscation
CN116578537A (en) * 2023-07-12 2023-08-11 北京安天网络安全技术有限公司 File detection method, readable storage medium and electronic device
CN116578537B (en) * 2023-07-12 2023-09-22 北京安天网络安全技术有限公司 File detection method, readable storage medium and electronic device

Also Published As

Publication number Publication date
KR101550820B1 (en) 2015-09-07

Similar Documents

Publication Publication Date Title
US20200311271A1 (en) Method of malware detection and system thereof
US11188650B2 (en) Detection of malware using feature hashing
JP6736532B2 (en) System and method for detecting malicious files using elements of static analysis
KR101162051B1 (en) Using string comparison malicious code detection and classification system and method
KR102317833B1 (en) method for machine LEARNING of MALWARE DETECTING MODEL AND METHOD FOR detecting Malware USING THE SAME
US20070152854A1 (en) Forgery detection using entropy modeling
US20120174227A1 (en) System and Method for Detecting Unknown Malware
US11256803B2 (en) Malware detection: selection apparatus, selection method, and selection program
JP6778761B2 (en) Extraction and comparison of hybrid program binary features
US9916448B1 (en) Detection of malicious mobile apps
US20120072988A1 (en) Detection of global metamorphic malware variants using control and data flow analysis
RU2728498C1 (en) Method and system for determining software belonging by its source code
US20140150101A1 (en) Method for recognizing malicious file
RU2728497C1 (en) Method and system for determining belonging of software by its machine code
Pektaş et al. Proposal of n-gram based algorithm for malware classification
KR101816045B1 (en) Malware detecting system with malware rule set
KR101550820B1 (en) The device for analyzing a malware based on similarity
CN111651768B (en) Method and device for identifying link library function name of computer binary program
O'Kane et al. N-gram density based malware detection
KR101308228B1 (en) Method for automatic detecting malware code
KR102031592B1 (en) Method and apparatus for detecting the malware
KR101473535B1 (en) Malware classification method using multi n―gram
CN108319853A (en) Virus signature processing method and processing device
CN105975854B (en) A kind of detection method and device of malicious file
CN114925369A (en) Static analysis method and system for business system container safety

Legal Events

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

Payment date: 20190826

Year of fee payment: 5