KR102258910B1 - Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System - Google Patents

Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System Download PDF

Info

Publication number
KR102258910B1
KR102258910B1 KR1020190095917A KR20190095917A KR102258910B1 KR 102258910 B1 KR102258910 B1 KR 102258910B1 KR 1020190095917 A KR1020190095917 A KR 1020190095917A KR 20190095917 A KR20190095917 A KR 20190095917A KR 102258910 B1 KR102258910 B1 KR 102258910B1
Authority
KR
South Korea
Prior art keywords
entropy
ransomware
files
backup system
file
Prior art date
Application number
KR1020190095917A
Other languages
Korean (ko)
Other versions
KR20210017142A (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 KR1020190095917A priority Critical patent/KR102258910B1/en
Publication of KR20210017142A publication Critical patent/KR20210017142A/en
Application granted granted Critical
Publication of KR102258910B1 publication Critical patent/KR102258910B1/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Debugging And Monitoring (AREA)

Abstract

백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 방법 및 시스템이 제시된다. 일 측면에 있어서, 본 발명에서 제안하는 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 방법은 백업 시스템을 통해 사용자 별, 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하는 단계, 사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨어 탐지모듈로 전달하는 단계, 각 사용자의 랜섬웨어 탐지모듈에서 백업 시스템으로 동기화되는 파일의 엔트로피를 측정하는 단계 및 백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지하는 단계를 포함한다. An effective ransomware detection method and system using machine learning based on the entropy of a file in a backup system is presented. In one aspect, the effective ransomware detection method using machine learning based on the entropy of a file in the backup system proposed by the present invention measures the entropy for each user and each file format through the backup system, and each measured entropy The step of deriving an entropy reference value for detecting a file infected with ransomware using machine learning based on Measuring the entropy of the file synchronized from the detection module to the backup system, and detecting the file infected with the ransomware by comparing the measured entropy of the file synchronized to the backup system with the entropy reference value transmitted from the backup system.

Figure R1020190095917
Figure R1020190095917

Description

백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 방법 및 시스템{Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System}{Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System}

본 발명은 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지방법 및 장치에 관한 것이다. The present invention relates to an effective ransomware detection method and apparatus using machine learning based on the entropy of a file in a backup system.

빅데이터와 클라우스 서비스가 등장함으로써, 사용자의 데이터는 중요한 요소 중 하나이며, 데이터의 신뢰성과 무결성을 보장하는 것이 이러한 서비스들의 핵심 기술 중 하나이다. 공격자는 이러한 서비스들이 데이터를 중요하게 생각한다는 점에 착안하여, 데이터를 인질로 금전을 요구하는 공격을 시도하였으며, 이는 랜섬웨어라 불린다. 랜섬웨어는 랜섬(ransom)과 멀웨어(malware)의 합성어이며, 시스템에 침투한 후, 사용자의 파일들을 암호화하여 사용자가 읽지 못하도록 방해하거나 시스템을 잠그는 공격 기술이다. 공격자는 이와 같이 시스템을 장악한 후, 암호화된 파일을 복호하거나 시스템을 언락하는 대가로 금전을 요구한다.With the advent of big data and cloud services, user data is one of the important factors, and ensuring data reliability and integrity is one of the core technologies of these services. The attacker took the data as hostage and demanded money, paying attention to the fact that these services value data, which is called ransomware. Ransomware is a compound word of ransom and malware, and after infiltrating the system, it encrypts the user's files to prevent the user from reading or locks the system. After taking control of the system in this way, the attacker demands money in exchange for decrypting encrypted files or unlocking the system.

이와 같은 랜섬웨어는 최근에 등장한 것이 아니라, 1989년 "PC CYBORG/AIDS information Trojan"으로 처음 출현하였다. 이 때 등장한 랜섬웨어는 악성코드 제작자로부터 많이 제작되지 않고 외면당하였으며, 거의 15년 동안 버려졌다. 하지만 최근 인터넷 사용, e-commerce의 등장, 그리고 빅데이터와 클라우드 서비스의 등장으로, 2005년 랜섬웨어가 다시 탄생되었다. 이렇게 등장한 랜섬웨어들로는 PC BYBORG, Reveton, CryZip, May Archieve, FAVEAC, FastBsod, CryptoLocker, GPCoder, SimpleLocker, TeslaCrypt, CryptorBit, KeRanger, CryptoWall 등이 있다. This ransomware did not appear recently, but first appeared as "PC CYBORG/AIDS information Trojan" in 1989. The ransomware that appeared at this time was not produced much by the malware creators and was ignored, and was abandoned for almost 15 years. However, with the recent Internet use, the advent of e-commerce, and the advent of big data and cloud services, ransomware was reborn in 2005. These ransomwares include PC BYBORG, Reveton, CryZip, May Archieve, FAVEAC, FastBsod, CryptoLocker, GPCoder, SimpleLocker, TeslaCrypt, CryptorBit, KeRanger, and CryptoWall.

많은 랜섬웨어가 등장함으로써 심각한 피해사례가 발생함에도 불구하고, 랜섬웨어로부터 시스템을 보호하기 어려운 이유 중 하나는 알려지지 않은 랜섬웨어를 탐지하고 방지하는 것이 어렵기 때문이다. 우선, 랜섬웨어가 침투하여 시스템이 감염된 후에는 사용자는 복호키가 없으므로 시스템 및 파일을 복구하지 못한다. 또한 자신의 침투 행위와 시스템을 장악하는 행위를 은닉함으로써 사용자나 안티-바이러스 소프트웨어가 랜섬웨어를 탐지하기 어렵다. 그 이유 중 하나는 공격자가 익명 네트워크인 토르 네트워크(Tor netowrk)를 사용함으로써 자신의 신분을 숨기는 것이 가능하기 때문이다. 게다가, 공격자가 요구한 금전을 지불하더라도 데이터의 복호나 시스템의 언락(unlock)에 실패함으로써 2차 피해를 유발시킨다.Despite the fact that many ransomware appear and cause serious damage, one of the reasons why it is difficult to protect a system from ransomware is that it is difficult to detect and prevent unknown ransomware. First of all, after the ransomware infiltrates and infects the system, the user does not have the decryption key, so the system and files cannot be recovered. In addition, it is difficult for users or anti-virus software to detect ransomware by concealing their own infiltration and system control. One of the reasons is that it is possible for attackers to hide their identity by using the anonymous network Tor netowrk. In addition, even if the attacker pays the requested amount, it causes secondary damage by failing to decrypt data or unlock the system.

랜섬웨어를 자세히 살펴보면, 암호화하지 않는 랜섬웨어(Non-Cryptographic Ransomware; NCR), 암호화하는 랜섬웨어(Cryptographic Ransomware, CGR)로 분류된다. 암호화하지 않은 랜섬웨어는 스크린을 잠그거나 MBR이나 파티션 테이블을 수정함으로써 시스템과 사용자의 인터렉션(interaction)을 방해한다. 암호화하는 랜섬웨어는 암호학적 알고리즘을 사용하여 파일을 암호화함으로써 정당한 사용자조차 파일을 읽거나 실행할 수 없도록 방해하며, 비밀키 암호화 랜섬웨어(Private-key Cryptosystem Ransomware; PrCR)와 공개키 암호화 랜섬웨어(Public-key Cryptosystem Ransomware, PuCR)로 분류된다. 비밀키 암호화 랜섬웨어는 DES, AES와 같은 비밀키 기반의 암호학적 알고리즘을 활용하여 데이터를 암호화한다. 공개키 암호화 랜섬웨어는 RSA와 같은 공개키 기반의 암호학적 알고리즘을 활용하여 데이터를 암호화한다. 이와 같이 다양한 랜섬웨어로 인하여 심각한 피해가 발생하였으며, ZDNet에 의하면, 공격자가 약 $27 million의 수익이 발생하였다. 따라서 랜섬웨어를 조기에 탐지하는 방안과 랜섬웨어에 감염된 파일이나 시스템을 복원하는 방안이 시급하다. If we take a closer look at Ransomware, it is classified into Non-Cryptographic Ransomware (NCR) and Cryptographic Ransomware (CGR). Unencrypted ransomware disrupts user interaction with the system by locking the screen or modifying the MBR or partition table. Encrypting ransomware uses a cryptographic algorithm to encrypt files, preventing even legitimate users from reading or executing files. Private-key Cryptosystem Ransomware (PrCR) and Public Key Encryption Ransomware (Public -key Cryptosystem Ransomware, PuCR). Secret key encryption ransomware encrypts data using secret key-based cryptographic algorithms such as DES and AES. Public key encryption ransomware encrypts data using a public key-based cryptographic algorithm such as RSA. Serious damage occurred due to various ransomware like this, and according to ZDNet, the attacker generated about $27 million in revenue. Therefore, it is urgent to detect ransomware early and to restore files or systems infected with ransomware.

이러한 문제점을 해결하기 위하여, 시스템이 랜섬웨어에 감염되는 것을 탐지하고 방지하기 위한 다양한 방안들이 연구되었으며, 이러한 방안들은 네 가지로 분류된다; 파일 기반 탐지, 시스템 기반 행위 탐지, 자원 기반 행위 탐지, 연결 기반 행위 탐지. 파일 기반 탐지 방안은 특정한 포맷의 파일에서 악의적인 시그네쳐(signature)를 탐지하는 방안이다. 하지만 이 방안은 알려지지 않은 랜섬웨어를 탐지하지 못하는 한계점이 있다. 시스템 기반 행위 탐지 방안은 파일 및 디렉토리의 무결성을 검증함으로써 랜섬웨어를 탐지하고, 시스템의 악의적인 행위를 감시함으로써 랜섬웨어를 차단하는 방안이다. 이 방안은 오탐율 및 미탐율이 높고 무결성 검증과 행위 감시를 위한 시간이 오래 소요되는 단점이 있다. 자원 기반 행위 탐지는 랜섬웨어가 파일을 암호화하기 위하여 소모하는 자원의 사용률을 기반으로 랜섬웨어를 탐지하는 방안이다. 하지만 이 방안은 CPU, I/O와 같은 자원을 수집하기 위하여 많은 시간이 요구되고, 오탐율 및 미탐율이 높은 단점이 있다. 연결 기반 행위 탐지 방안은 랜섬웨어가 암호화에 필요한 키를 서버로부터 수신한다는 점에 기인하여, 외부로의 연결을 감시함으로써 랜섬웨어를 탐지하고 방지하는 방안이다. 하지만 이 방안은 네트워크로 연결하지 않는 랜섬웨어를 탐지하지 못한다. 따라서 현재 제안된 대부분의 방안은 오탐율과 미탐율이 높아 효과적으로 랜섬웨어를 탐지하지 못하며, 클라우드를 포함한 백업 시스템에서 탐지하지 못하는 문제점이 있다.In order to solve this problem, various methods for detecting and preventing the system from being infected with ransomware have been studied, and these methods are classified into four; File-based detection, system-based behavior detection, resource-based behavior detection, connection-based behavior detection. The file-based detection method is a method of detecting a malicious signature in a file of a specific format. However, this method has a limitation in that it cannot detect unknown ransomware. The system-based behavior detection method detects ransomware by verifying the integrity of files and directories, and blocks ransomware by monitoring malicious behavior of the system. This method has a disadvantage in that the false positive rate and false positive rate are high, and it takes a long time for integrity verification and behavior monitoring. The resource-based behavior detection is a method of detecting ransomware based on the usage rate of resources consumed by the ransomware to encrypt files. However, this method requires a lot of time to collect resources such as CPU and I/O, and has disadvantages in that the false positive rate and the false positive rate are high. The connection-based behavior detection method is a method for detecting and preventing ransomware by monitoring external connections due to the fact that the ransomware receives a key required for encryption from a server. However, this method does not detect ransomware that does not connect to the network. Therefore, most of the currently proposed methods have a problem in that they cannot effectively detect ransomware due to high false positive and false positive rates, and cannot be detected by backup systems including the cloud.

PC와 같은 일반 시스템에서의 랜섬웨어 감염은 심각한 문제가 발생한다. 예를 들어, 사용자의 모든 파일이 암호화되어 복구하지 못하거나 시스템이 잠김으로써 시스템의 구동을 방해한다. 그러므로 상기와 같이 기존의 랜섬웨어 탐지방안들을 이용하여 일부 랜섬웨어를 탐지하고 방지함으로써 시스템을 보호할 수 있다. 하지만 대부분 기존의 방안들은 일반 시스템에서의 랜섬웨어 탐지만을 고려하는 한계가 존재한다. 다시 말하면, 클라우드와 같은 백업 시스템으로 전달되는 파일은 고려하지 않으며, 백업 시스템으로 전달되는 랜섬웨어에 감염된 파일을 탐지하지 못함으로써 심각한 문제가 발생한다. 백업 시스템을 사용하는 주요한 목적은 사용자의 파일을 백업하는 것이다. 따라서 사용자의 파일이 암호화된 경우, 드롭박스(dropbox)와 구글 원드라이브와 같은 클라우드 서비스, USB 스토리지 및 외장 디스크와 같은 백업 시스템으로부터 백업된 파일을 동기화함으로써 원본 파일을 복원할 수 있다. 그럼에도 불구하고, 랜섬웨어에 감염된 파일이 이러한 백업 시스템으로 동기화되는 경우에는 백업된 파일을 통해서도 복원이 불가능하다. 예를 들어, 시스템의 데이터가 랜섬웨어에 감염되어 암호화된 파일이 백업 시스템으로 전달되면, 원본 파일이 암호화된 파일로 대체된다. 파일이 대체된 이후, 사용자는 백업 시스템으로부터 복구를 시도하더라도 원본 파일을 복원하지 못하는 문제점이 발생한다. 이와 같이 백업 시스템으로 동기화되는 파일의 랜섬웨어 감염여부를 판단함으로써 백업되는 파일을 복호하기 위한 방안이 시급하다.Ransomware infection in general systems such as PCs causes serious problems. For example, all of the user's files are encrypted and cannot be recovered, or the system is locked, preventing the system from running. Therefore, it is possible to protect the system by detecting and preventing some ransomware using the existing ransomware detection methods as described above. However, most of the existing methods have limitations in considering only the detection of ransomware in a general system. In other words, files delivered to a backup system such as the cloud are not considered, and files infected with ransomware delivered to the backup system cannot be detected, causing serious problems. The main purpose of using a backup system is to back up your files. Therefore, if a user's files are encrypted, the original files can be restored by synchronizing the backed up files from cloud services such as dropbox and Google OneDrive, USB storage, and backup systems such as external disks. Nevertheless, if the files infected with ransomware are synchronized with such a backup system, it is impossible to restore them even through the backed up files. For example, if the data in the system is infected with ransomware and the encrypted file is delivered to the backup system, the original file is replaced with the encrypted file. After the file is replaced, the user cannot restore the original file even if he tries to recover it from the backup system. As described above, a method for decrypting the backed-up file by determining whether the file synchronized with the backup system is infected with ransomware is urgently needed.

본 발명이 이루고자 하는 기술적 과제는 기계학습을 통하여 감염된 파일을 정확하고 효과적으로 분류하기 위한 방안을 도출하고, 다양한 기계학습 모델을 기반으로 최적의 모델을 선정함으로써, 단순히 엔트로피의 기준치를 정의하여 백업 시스템으로 동기화되는 랜섬웨어에 감염된 파일을 탐지하는 방안의 문제점을 해결하기 위한 방법 및 장치를 제공하는데 있다.The technical task to be achieved by the present invention is to derive a method for accurately and effectively classifying infected files through machine learning, and by selecting an optimal model based on various machine learning models, simply define a reference value of entropy and use it as a backup system. An object of the present invention is to provide a method and an apparatus for solving a problem of a method of detecting a file infected with a synchronized ransomware.

일 측면에 있어서, 본 발명에서 제안하는 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 방법은 백업 시스템을 통해 사용자 별, 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하는 단계, 사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨어 탐지모듈로 전달하는 단계, 각 사용자의 랜섬웨어 탐지모듈에서 백업 시스템으로 동기화되는 파일의 엔트로피를 측정하는 단계 및 백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지하는 단계를 포함한다. In one aspect, the effective ransomware detection method using machine learning based on the entropy of a file in the backup system proposed by the present invention measures the entropy for each user and each file format through the backup system, and each measured entropy The step of deriving an entropy reference value for detecting a file infected with ransomware using machine learning based on Measuring the entropy of the file synchronized from the detection module to the backup system, and detecting the file infected with the ransomware by comparing the measured entropy of the file synchronized to the backup system with the entropy reference value transmitted from the backup system.

백업 시스템을 통해 사용자 별, 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하는 단계는 랜섬웨어에 감염된 파일을 분류하고 엔트로피 기준치를 도출하기 위할 기계학습 모델은 KNN(K-Nearest Neighbors), 선형 모델(Linear model), 결정 트리(Decision tree), 결정트리 앙상블(Decision tree ensemble), 커널 기법(Kernel trick), 딥 러닝(Deep learning)을 포함한다. The step of measuring entropy for each user and file format through the backup system, and deriving the entropy reference value for detecting files infected with ransomware using machine learning based on each measured entropy, is to classify files infected with ransomware. And the machine learning models to derive the entropy reference value are KNN (K-Nearest Neighbors), Linear model, Decision tree, Decision tree ensemble, Kernel trick, Deep. Including deep learning.

기계학습 모델에 기초하여 학습과 분류를 사용자 별로 수행함으로써 파일포맷 별 최적의 엔트로피 기준치를 추출하고, 지속적으로 기준치를 추출하여 갱신함으로써 인공지능적인 특징을 갖는다. By performing learning and classification for each user based on a machine learning model, the optimal entropy reference value for each file format is extracted, and it has an artificial intelligence feature by continuously extracting and updating the reference value.

각 사용자의 랜섬웨어 탐지모듈에서 백업 시스템으로 동기화되는 파일의 엔트로피를 측정하는 단계는 램섬웨어 탐지모듈 내부에 기계학습 모델을 포함하여, 동기화되는 파일을 테스트 세트로 사용하여 랜섬웨어에 감염된 파일을 탐지하는 것이 가능하다. The step of measuring the entropy of files synchronized from the ransomware detection module of each user to the backup system includes a machine learning model inside the ramsomware detection module and uses the synchronized files as a test set to detect files infected with ransomware. it is possible to do

사용자 별, 파일포맷 별 엔트로피에 기초한 기계학습을 통해 도출된 기준치를 활용함으로써 실시간으로 백업 시스템에 전달되는 랜섬웨어에 감염된 파일을 탐지하여 백업 시스템에 저장된 파일을 안전하게 보호하며, 사용자의 시스템이 랜섬웨어에 감염되는 경우에도 백업 시스템으로부터 원본 파일을 복원한다. By utilizing the reference value derived through machine learning based on entropy for each user and file format, it detects files infected with ransomware delivered to the backup system in real time and safely protects the files stored in the backup system. It restores the original files from the backup system even in case of infection.

또 다른 일 측면에 있어서, 본 발명에서 제안하는 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 시스템은 사용자들의 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하여 사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨서 탐지모듈로 전달하는 백업 시스템 및 백업 시스템으로 동기화되는 파일의 엔트로피를 측정하고, 백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지하는 각 사용자의 랜섬웨어 탐지모듈을 포함한다. In another aspect, an effective ransomware detection system using machine learning based on the entropy of a file in the backup system proposed in the present invention measures the entropy of each file format of users, and a machine based on each measured entropy Using learning, the entropy standard for detecting files infected with ransomware is derived, and the entropy standard for each user and file format is transmitted to the user's ransomware detection module, and the entropy of the file synchronized with the backup system is determined. and a ransomware detection module of each user that detects a file infected with ransomware by measuring and comparing the measured entropy of the file synchronized to the backup system with the entropy reference value transmitted from the backup system.

백업 시스템은 사용자들의 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 수행하는 학습부 및 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하여 사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨서 탐지모듈로 전달하는 엔트로피 기준치 설정부를 포함한다. The backup system measures the entropy of each user's file format, and the learning unit that performs machine learning based on each measured entropy and the entropy standard for detecting files infected with ransomware are derived for each user and each file format. and an entropy reference value setting unit that transmits the entropy reference value to the user's ransomware detection module.

랜섬웨어 탐지모듈은 백업 시스템으로 동기화되는 파일의 엔트로피를 측정하는 측정부 및 백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지하는 각 사용자의 랜섬웨어 탐지부를 포함한다.The ransomware detection module includes a measurement unit that measures the entropy of a file synchronized with the backup system, and each user who detects a file infected with ransomware by comparing the measured entropy of the file synchronized with the backup system with the entropy reference value received from the backup system. of ransomware detection unit.

본 발명의 실시예들에 따르면 백업 시스템으로 전달되는 파일의 엔트로피를 기반으로 탐지하고, 기계학습을 통하여 지속적으로 최적의 기준치를 반영할 수 있다. 따라서 기존의 탐지방안보다 탐지율이 매우 높으며, 오탐율과 미탐율이 낮은 장점이 있다. 또한, 다양한 기계학습 모델을 기반으로 랜섬웨어에 감염된 파일을 탐지하기 위한 최적을 모델을 선정하고, 엔트로피 기준치를 도출하므로 매우 효과적이며 정확도가 높다. 또한, 백업 시스템에서 사용자에 따른 엔트로피 기준치와 모델을 자동적으로 적용함으로써 인공지능적인 요소를 가지며, 이러한 특징은 매우 발전적으로 랜섬웨어를 탐지할 수 있다. According to embodiments of the present invention, it is possible to detect based on the entropy of a file transmitted to a backup system, and continuously reflect an optimal reference value through machine learning. Therefore, the detection rate is very high compared to the existing detection methods, and there are advantages of low false positive and false positive rates. In addition, it is very effective and highly accurate because it selects an optimal model for detecting files infected with ransomware based on various machine learning models and derives an entropy reference value. In addition, it has an artificial intelligence element by automatically applying the entropy reference value and model according to the user in the backup system, and this feature can detect ransomware very advanced.

도 1은 본 발명의 일 실시예에 따른 압축파일 엔트로비 비교 결과를 나타내는 그래프이다.
도 2는 본 발명의 일 실시예에 따른 파일포맷 별 엔트로피 측정결과를 나타내는 도면이다.
도 3은 본 발명의 일 실시예에 따른 랜섬웨어 탐지 시스템의 동작을 설명하기 위한 개략도이다.
도 4는 본 발명의 일 실시예에 따른 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 방법을 설명하기 위한 흐름도이다.
도 5는 본 발명의 일 실시예에 따른 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 시스템의 구성을 나타내는 도면이다.
도 6은 본 발명의 일 실시예에 따른 정밀도-재현율 곡선을 나타내는 그래프이다.
도 7은 본 발명의 일 실시예에 따른 ROC 곡선을 나타내는 그래프이다.
1 is a graph showing a compression file entropy comparison result according to an embodiment of the present invention.
2 is a diagram illustrating entropy measurement results for each file format according to an embodiment of the present invention.
3 is a schematic diagram illustrating an operation of a ransomware detection system according to an embodiment of the present invention.
4 is a flowchart illustrating an effective ransomware detection method using machine learning based on entropy of a file in a backup system according to an embodiment of the present invention.
5 is a diagram showing the configuration of an effective ransomware detection system using machine learning based on the entropy of a file in the backup system according to an embodiment of the present invention.
6 is a graph showing a precision-recall curve according to an embodiment of the present invention.
7 is a graph showing an ROC curve according to an embodiment of the present invention.

본 발명에서는 파일의 엔트로피를 기반으로 랜섬웨어에 감염된 파일을 탐지하는 방안을 제안한다. 랜섬웨어가 파일을 암호화하는 동작을 기반으로, 암호화된 파일에서 나타나는 특징을 활용한다. 암호문에서 나타나는 특징 중 하나는 균일성이며, 본 발명에서는 균일성을 측정하는 방법 중 하나로 엔트로피를 활용한다. 엔트로피는 다양한 방법을 통하여 측정할 수 있으며, 그 중 NIST 800-90b가 대표적이다. The present invention proposes a method of detecting a file infected with ransomware based on the entropy of the file. Based on how the ransomware encrypts the file, it utilizes the characteristics that appear in the encrypted file. One of the characteristics appearing in ciphertext is uniformity, and in the present invention, entropy is used as one of the methods for measuring uniformity. Entropy can be measured through various methods, among which NIST 800-90b is representative.

본 발명에서 제안하는 랜섬웨어 탐지방안을 검증하기 위하여, 시스템 및 사용자에게 중요한 파일인 시스템 파일, 문서 파일, 이미지 파일, 소스코드 파일, 실행 파일, 압축 파일을 대상으로 원본 파일과 암호화된 파일의 엔트로피를 비교한다. 이러한 파일들의 엔트로피를 측정하면, 시스템 파일, 소스코드 파일, 실행 파일은 비교적으로 랜섬웨어에 감염된 파일의 탐지가 쉽다. 하지만, 문서 파일, 이미지 파일, 특히 압축파일의 엔트로피 중 일부는 무결한 파일의 엔트로피보다 낮은 경우가 존재하여 효과적으로 탐지하기 어려우며, 이를 도 1에 나타내었다. In order to verify the ransomware detection method proposed in the present invention, the entropy of the original file and the encrypted file for the system file, document file, image file, source code file, executable file, and compressed file, which are important files for the system and user. compare If the entropy of these files is measured, system files, source code files, and executable files are relatively easy to detect ransomware-infected files. However, some of the entropy of a document file, an image file, and particularly a compressed file may be lower than the entropy of an intact file, so it is difficult to detect effectively, which is shown in FIG. 1 .

도 1은 본 발명의 일 실시예에 따른 압축파일 엔트로비 비교 결과를 나타내는 그래프이다. 1 is a graph showing a compression file entropy comparison result according to an embodiment of the present invention.

따라서 본 발명에서는 단순히 엔트로피의 기준치를 정의하여 백업 시스템으로 동기화되는 랜섬웨어에 감염된 파일을 탐지하는 방안의 문제점을 해결하기 위하여, 기계학습을 통하여 감염된 파일을 정확하고 효과적으로 분류하기 위한 방안을 도출한다. 즉, 다양한 기계학습 모델을 기반으로 최적의 모델을 선정하는 것이 본 발명의 목표이다. 이하, 본 발명의 실시 예를 첨부된 도면을 참조하여 상세하게 설명한다. 본 발명의 기여는 다음과 같다.Therefore, in the present invention, in order to solve the problem of a method of detecting a file infected with ransomware synchronized with a backup system by simply defining a reference value of entropy, a method for accurately and effectively classifying infected files is derived through machine learning. That is, it is an object of the present invention to select an optimal model based on various machine learning models. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The contribution of the present invention is as follows.

기존 랜섬웨어 탐지방안은 백업 시스템에서 랜섬웨어에 감염된 파일을 탐지하지 못한다. 하지만 본 발명은 파일포맷 별 엔트로피를 기반으로 기계학습을 통하여 도출된 기준치를 활용함으로써 실시간으로 백업 시스템에 전달되는 랜섬웨어에 감염된 파일을 효과적으로 탐지한다. 이를 통하여 백업 시스템에 저장된 파일을 안전하게 보호하며, 사용자의 시스템이 랜섬웨어에 감염되는 경우에도 백업 시스템으로부터 원본 파일을 복원한다.Existing ransomware detection methods cannot detect ransomware-infected files in the backup system. However, the present invention effectively detects a file infected with ransomware delivered to a backup system in real time by utilizing a reference value derived through machine learning based on entropy for each file format. Through this, the files stored in the backup system are safely protected, and even if the user's system is infected with ransomware, the original files are restored from the backup system.

기존 랜섬웨어 탐지방안은 탐지율이 낮고, 오탐율과 미탐율이 높은 문제점이 있다. 또한 자원 및 네트워크 정보를 수집하여야 하며, 시스템 내의 모든 행위를 감시함으로 인하여 자원 소모가 많은 단점이 있다. 하지만 제안하는 방안은 백업 시스템으로 전달되는 파일의 엔트로피를 기반으로 탐지하고, 기계학습을 통하여 지속적으로 최적의 기준치를 반영할 수 있다. 따라서 기존의 탐지방안보다 탐지율이 매우 높으며, 오탐율과 미탐율이 낮은 장점이 있다.Existing ransomware detection methods have problems with a low detection rate and high false positive and non-detection rates. In addition, resource and network information must be collected, and all activities in the system are monitored, which consumes a lot of resources. However, the proposed method can detect based on the entropy of the file delivered to the backup system and continuously reflect the optimal reference value through machine learning. Therefore, the detection rate is very high compared to the existing detection methods, and there are advantages of low false positive and false positive rates.

제안하는 방안은 다양한 기계학습 모델을 기반으로 랜섬웨어에 감염된 파일을 탐지하기 위한 최적을 모델을 선정하고, 엔트로피 기준치를 도출하므로 매우 효과적이며 정확도가 높다. 또한 백업 시스템에서 사용자에 따른 엔트로피 기준치와 모델을 자동적으로 적용함으로써 인공지능적인 요소를 가지며, 이러한 특징은 매우 발전적으로 랜섬웨어를 탐지할 수 있을 것으로 사료된다.The proposed method is very effective and has high accuracy because it selects an optimal model for detecting files infected with ransomware based on various machine learning models and derives an entropy reference value. In addition, it has an artificial intelligence element by automatically applying the entropy reference value and model according to the user in the backup system, and this feature is considered to be able to detect ransomware very advanced.

먼저, 제안하는 랜섬웨어 탐지방안에 필요한 사전지식에 대하여 설명한다. 랜섬웨어를 탐지하기 위한 핵심 정보인 엔트로피와 엔트로피 측정방법에 대하여 서술한다. 또한, 본 발명에서는 측정한 엔트로피를 기반으로 랜섬웨어에 감염된 파일들과 클린(clean) 파일들을 분류하기 위하여 기계학습을 활용하며, 필요한 기계학습 모델들을 서술한다. 이러한 모델들을 기반으로 적합한 기계학습 모델을 도출하는 것이 본 발명의 목표이다. 기계학습 모델들로는 KNN(K-Nearest Neighbors), 선형 모델(Linear model), 결정 트리(Decision tree), 결정트리 앙상블(Decision tree ensemble), 커널 기법(Kernel trick), 딥 러닝(Deep learning)을 포함한다. 또한, 이러한 모델들을 평가하기 위하여 모델평가 결과를 도출하며, 평가 모델로는 교차검증, 분할기를 포함한 교차검증, LOOCV, 임의분할 교차검증을 포함한다.First, the prior knowledge required for the proposed ransomware detection method will be described. It describes entropy, which is key information for detecting ransomware, and entropy measurement method. In addition, in the present invention, machine learning is used to classify files infected with ransomware and clean files based on the measured entropy, and necessary machine learning models are described. It is an object of the present invention to derive a suitable machine learning model based on these models. Machine learning models include KNN (K-Nearest Neighbors), linear models, decision trees, decision tree ensembles, kernel tricks, and deep learning. do. In addition, model evaluation results are derived to evaluate these models, and evaluation models include cross-validation, cross-validation including divider, LOOCV, and random-split cross-validation.

암호학에서 생성된 암호문의 성능을 평가하는 방법 중 하나로 엔트로피 측정이 있다. 엔트로피는 균일함을 측정하는 방법이며, 이는 생성된 암호문의 무질서(disorder) 또는 무작위성(randomness)를 측정한다. 예를 들어, 암호 결과로 나타나는 값이 0x00~0xFF까지라면, 생성되는 각 값의 확률이 동일하여야 한다. 만약 특정 값, 혹은 특정 범위의 값의 발생빈도가 많거나 적은 등 통계적으로 치우침(bias)이 나타난다면, 많거나 적게 생성되는 값의 확률을 기반으로 복호가 가능한 취약점이 발생한다. 이러한 문제점을 해결하기 위하여, 암호 기술은 암호문으로 생성되는 각 값의 발생 확률이 거의 동일하도록 설계되었으며, 이를 균일함이라 불린다.One of the methods to evaluate the performance of generated ciphertext in cryptography is entropy measurement. Entropy is a method of measuring uniformity, which measures the disorder or randomness of the generated ciphertext. For example, if the values appearing as a result of encryption range from 0x00 to 0xFF, the probability of each generated value should be the same. If there is a statistical bias such as a high or low frequency of occurrence of a specific value or a specific range of values, a decryption vulnerability occurs based on the probability of generating more or less values. In order to solve this problem, the encryption technology is designed so that the probability of occurrence of each value generated by the ciphertext is almost the same, which is called uniformity.

균일함은 엔트로피를 기반으로 측정할 수 있으며, 엔트로피를 측정하는 방법으로 푸아송 분포(poisson distribution), 해밍 거리(hamming distance), 자연 방출(spontaneous emission) 등이 있다. 그 중 NIST에서 엔트로피를 측정하기 위한 방법과 도구를 제공하고 NIST 800-90b로 공개하였다. 이는 측정 방법에 따라 통계(statistic) 기반 측정 방법과 예측(predictor) 기반 측정 방법으로 분류된다. Uniformity can be measured based on entropy, and methods for measuring entropy include a poisson distribution, a hamming distance, and spontaneous emission. Among them, NIST provided a method and a tool for measuring entropy, and it was published as NIST 800-90b. It is classified into a statistic-based measurement method and a predictor-based measurement method according to the measurement method.

도 2는 본 발명의 일 실시예에 따른 파일포맷 별 엔트로피 측정결과를 나타내는 도면이다. 2 is a diagram illustrating entropy measurement results for each file format according to an embodiment of the present invention.

본 발명에서는 측정속도를 빠르게 하기 위하여 통계 기반 측정방법을 활용한다. 이 측정방법들은 최대 공통 값 평가(most common value estimate), 충돌 시험 평가(collision test estimate), 마코브 시험 평가(markov test estimate), 및 압축 시험 평가(compression test estimate)가 있다. 이러한 방법들은 자주 나타나는 확률, 임의의 반복되는 패턴, 연속된 값 사이의 의존성을 기반으로 엔트로피를 측정한다. 각 파일포맷 별 엔트로피 측정결과를 도 2에 나타내었다.In the present invention, a statistical-based measurement method is used to speed up the measurement speed. These measures include a most common value estimate, a collision test estimate, a markov test estimate, and a compression test estimate. These methods measure entropy based on frequent occurrences of probabilities, random repeating patterns, and dependencies between successive values. The entropy measurement results for each file format are shown in FIG. 2 .

도 2를 살펴보면, 대부분의 파일들에서 최대 공통 값 평가가 가장 높은 엔트로피를 가지며, 마코브 시험 평가가 가장 낮은 엔트로피를 가진다. 파일포맷 별 엔트로피를 살펴보면, 소스코드 파일이 가장 낮은 엔트로피를 가지며, 문서 파일과 압축 파일이 가장 높은 엔트로피를 가진다. Referring to FIG. 2 , in most files, the maximum common value evaluation has the highest entropy, and the Markov test evaluation has the lowest entropy. Looking at the entropy by file format, the source code file has the lowest entropy, and the document file and the compressed file have the highest entropy.

본 발명의 실시예에 따른 기계학습 모델은 KNN, 선형 모델, 결정 트리, 결정트리 앙상블, 커널 기법, 딥러닝을 포함한다. A machine learning model according to an embodiment of the present invention includes KNN, a linear model, a decision tree, a decision tree ensemble, a kernel technique, and deep learning.

KNN은 가장 가까운 훈련 데이터 포인트 하나를 최근접 이웃으로 찾아 예측에 사용한다. 임의의 k개의 이웃을 분류하며, 각 클래스에 속한 이웃의 개수를 기반으로 이웃이 더 많은 클래스를 레이블로 지정한다. 따라서 각 클래스로 지정한 영역으로 결정 경계(decision boundary)를 나누며, 경계를 기반으로 데이터를 분류하는 모델이다. 이 모델에서 중요한 매개변수는 데이터 포인트 사이의 거리를 재는 방법과 이웃의 수이며, 모델의 성능은 매개변수에 의존적이다.KNN finds one nearest training data point as its nearest neighbor and uses it for prediction. Classify k random neighbors, and label classes with more neighbors based on the number of neighbors in each class. Therefore, it is a model that divides the decision boundary into areas designated by each class and classifies data based on the boundary. The important parameters in this model are the distance between data points and the number of neighbors, and the performance of the model depends on the parameters.

선형 모델은 입력 특성에 대한 선형 함수를 이용하여 예측을 수행하며, 일반화된 예측 함수는 다음과 같다. The linear model performs prediction using a linear function for input characteristics, and the generalized prediction function is as follows.

Figure 112019080765112-pat00001
(1)
Figure 112019080765112-pat00001
(One)

x[0]부터 x[p]까지는 하나의 데이터 포인트에 대한 특성이며, w와 b는 모델이 학습할 파라미터이다. 즉, w는 기울기이고, b는 y축과 만나는 절편이다.

Figure 112019080765112-pat00002
는 모델이 생성한 예측값이다. 이 모델은 다양한 회귀 모델을 포함하며, 회귀 모델로는 선형 회귀(linear regression), 릿지 회귀(Ridge regression), 라쏘 회귀(Lasso regression), 로지스틱 회귀(Logistic regression), 선형 서포트 벡터 머신(LinearSVC, support vector classifier)을 포함한다. From x[0] to x[p] are the characteristics of one data point, and w and b are parameters for the model to learn. That is, w is the slope, and b is the intercept that intersects the y-axis.
Figure 112019080765112-pat00002
is the predicted value generated by the model. This model includes various regression models, including linear regression, ridge regression, lasso regression, logistic regression, and linear support vector machine (LinearSVC, support). vector classifier).

선형 회귀는 예측과 훈련 세트에 있는 타깃 y 사이의 평균 제곱 오차(mean squared error)를 최소화하는 파라미터 w와 b를 찾는다. 평균제곱 오차는 예측값과 타깃값의 차이를 제공하여 더한 후, 샘플의 개수로 나눈 것이며, 식 (2)에 나타내었다.Linear regression finds parameters w and b that minimize the mean squared error between the prediction and the target y in the training set. The mean square error is obtained by adding the difference between the predicted value and the target value, then dividing by the number of samples, and is shown in Equation (2).

Figure 112019080765112-pat00003
(2)
Figure 112019080765112-pat00003
(2)

여기서 n은 샘플 개수이다. 기울기 파라미터 w는 가중치(weight)나 계수(coefficient)라 불리며, 파라미터 b는 편향(offset)이나 절편(intercept)이라 불린다. 이 모델은 복잡도를 제어할 수 없는 단점이 있다. 따라서 이를 해결하기 위하여 복잡도를 제어할 수 있는 릿지 회귀 모델을 사용한다.where n is the number of samples. The slope parameter w is called a weight or coefficient, and the parameter b is called an offset or intercept. This model has the disadvantage that the complexity cannot be controlled. Therefore, in order to solve this problem, a ridge regression model that can control the complexity is used.

릿지 회귀 모델은 가중치 w의 절대값을 가능한 한 작게 한다는 것이며, 이는 모든 특성이 출력에 주는 영향을 최소한으로 만든다. 이를 규제(regularization)라 한다. 즉, 모델이 과대적합되지 않도록 강제로 제한한다는 의미이며, 이 모델에서 사용하는 규제 방식을 L2 규제라 한다. 이 모델은 계수의 L2 노름(norm)의 제곱을 페널티로 적용하며, 식 (3)에 나타내었다.The ridge regression model is to make the absolute value of the weight w as small as possible, which minimizes the influence of all features on the output. This is called regularization. In other words, it means that the model is forcibly restricted so that it does not overfit, and the regulatory method used in this model is called L2 regulation. This model applies the square of the L2 norm of the coefficient as a penalty, and is shown in Equation (3).

Figure 112019080765112-pat00004
(3)
Figure 112019080765112-pat00004
(3)

여기에서 a를 크게 하면, 가중치가 감소함으로써 페널티의 효과가 커지고, a를 작게 하면 가중치가 증가함으로써 페널티의 효과가 작아진다.Here, if a is increased, the effect of the penalty is increased by decreasing the weight, and when a is decreased, the effect of the penalty is decreased by increasing the weight.

선형 회귀 모델에 규제를 적용하는 방법은 릿지 회귀 모델과 라쏘 회귀 모델이 있다. 릿지 회귀 모델은 L2 규제를 사용하며, 라쏘 회귀 모델은 L1 규제를 사용한다. 이 모델은 계수의 절댓값의 합인 계수 벡터의 L1 노름(norm)을 페널티로 사용하며, 식 (4)에 나타내었다.There are ridge regression model and lasso regression model as a method of applying regulation to linear regression model. Ridge regression models use L2 regulation, and Lasso regression models use L1 regulation. This model uses the L1 norm of the coefficient vector, which is the sum of the absolute values of the coefficients, as a penalty, and is shown in Equation (4).

Figure 112019080765112-pat00005
(4)
Figure 112019080765112-pat00005
(4)

이 모델도 릿지 회귀 모델과 마찬가지로, a를 크게 하면, 가중치가 감소함으로써 페널티의 효과가 커지고, a를 작게 하면 가중치가 증가함으로써 페널티의 효과가 작아진다. 일반적으로는 릿지 회귀 모델과 라쏘 회귀 모델 중 릿지 회귀 모델을 선호한다. 하지만 특성이 많고 일부분 특성만 중요한 경우에는 라쏘 회귀 모델이 더 좋을 수도 있다. Similarly to the ridge regression model in this model, if a is increased, the effect of the penalty is increased by decreasing the weight, and when a is decreased, the effect of the penalty is decreased by increasing the weight. In general, the ridge regression model is preferred among the ridge regression model and the lasso regression model. However, if there are many features and only a few features are important, the Lasso regression model may be better.

선형 분류 모델로는 로지스틱 회귀 모델과 선형 서포트 벡터 머신 모델이 있다. 선, 평면, 초평면을 사용하여 두 개의 클래스를 구분하는 분류기이며, 식 (5)에 나타내었다. Linear classification models include logistic regression models and linear support vector machine models. It is a classifier that classifies two classes using a line, a plane, and a hyperplane, and is shown in Equation (5).

Figure 112019080765112-pat00006
(5)
Figure 112019080765112-pat00006
(5)

이 모델은 특성들의 가중치 합을 임계치 0과 비교한다. 결과가 0보다 작으면 클래스를 -1로 예측하고, 0보다 크면 +1로 예측하며, 예측 결과를 기반으로 클래스를 분류한다.The model compares the weighted sum of the features to a threshold of zero. If the result is less than 0, the class is predicted as -1, if it is greater than 0, it is predicted as +1, and the class is classified based on the prediction result.

결정 트리 모델은 분류와 회귀 문제에 널리 사용하는 모델이며, 결정에 도달하기 위하여 예/아니오 질문을 이어가면서 학습한다. 이 모델은 예/아니오 질문 목록으로 데이터를 분할하는 것이며, 데이터를 분할하는 것은 각 분할된 영역(결정 트리의 리프) 한 개의 타깃값 (하나의 클래스나 하나의 회귀 분석 결과)을 가질 때까지 반복한다. 타깃 하나로만 이루어진 리프 노드를 순수 노드(pure node)라 불린다. 이 모델의 단점은 모든 리프 노드가 순수 노드가 될 때까지 데이터를 분할하면, 모델이 매우 복잡해지고 훈련 데이터에 과대적합된다. 이를 제어하는 방법은 두 가지 이다; 사전 가지치기(pre-pruning)과 사후 가지치기(post-pruning). 사전 가지치기는 트리 생성을 일찍 중단하는 전략이며, 사후 가지치기는 트리 생성 후, 데이터 포인트가 적은 노드를 삭제하거나 병합하는 전략이다. Decision tree models are widely used models for classification and regression problems, and are learned by successive yes/no questions to arrive at a decision. This model partitions the data into a list of yes/no questions, and partitioning the data iterates until each partitioned region (a leaf of the decision tree) has one target value (one class or one regression analysis result). do. A leaf node consisting of only one target is called a pure node. The disadvantage of this model is that if we partition the data until all leaf nodes are pure nodes, the model becomes very complex and overfits the training data. There are two ways to control this; Pre-pruning and post-pruning. Pre-pruning is a strategy to stop tree creation early, and post-pruning is a strategy to delete or merge nodes with few data points after tree creation.

앙상블(ensemble)은 여러 기계학습 모델을 연결하여 더 강력한 모델을 만드는 기법이며, 분류와 회귀 문제의 다양한 데이터셋에서 효과적이라고 입증되었다. 결정 트리 기반의 앙상블 모델로는 랜덤 포레스트 모델(random forest)과 그래디언트 부스팅 결정트리 모델(gradient boosting)이 있다. 랜덤 포레스트 모델은 결정 트리가 훈련 데이터에 과대적합되는 단점을 해결하기 위하여 조금씩 다른 여러 결정 트리를 묶은 후, 그 결과들의 평균을 계산하는 방법이다. 다른 여러 결정 트리를 생성하는 방법은 데이터 포인트를 무작위로 선택하는 방법과 분할 테스트에서 특성을 무작위로 선택하는 방법이 있다. 그래디언트 부스팅 결정트리 모델은 이전 트리의 오차를 보완하는 방식으로 순차적으로 트리를 생성하며, 이 모델은 무작위성이 없다. 그 대신, 강력한 사전 가지치기를 사용하며, 보통 다섯 정도의 깊지 않은 트리를 사용하므로 성능 측면에서 좋은 모델이다.Ensemble is a technique to build a more powerful model by linking multiple machine learning models, and it has been proven to be effective in various datasets of classification and regression problems. Decision tree-based ensemble models include a random forest model and a gradient boosting decision tree model. The random forest model is a method of calculating the average of several decision trees that are slightly different in order to solve the disadvantage of overfitting the decision tree to the training data. There are two other methods of generating decision trees: randomly selecting data points and randomly selecting features in a split test. The gradient boosting decision tree model creates trees sequentially in a way that compensates for the errors of the previous tree, and this model has no randomness. Instead, it uses strong pre-pruning, which is usually a good model from a performance standpoint as it uses a shallow tree of five or so.

잘 알려진 커널 기법으로 커널 서포트 벡터 머신 모델(kernelized support vector machines)이 있다. 이 모델은 입력 데이터에서 단순한 초평면(hyperplane)으로 정의되지 않는 더 복잡한 모델을 생성할 수 있도록 확장한 것이다. 그 이유로 직선과 초평면은 유연하지 못하며, 저차원 데이터셋에는 선형 모델이 매우 제한적이다. 이를 해결하기 위하여 특성을 곱하거나 거듭제곱하는 방식으로 새로운 특성을 추가한다. 하지만 특성이 많아지면 연산 비용이 커지는 단점이 존재한다.A well-known kernel technique is kernelized support vector machines. This model is an extension of the input data to create more complex models that are not defined by simple hyperplanes. For this reason, straight lines and hyperplanes are not flexible, and linear models are very limited for low-dimensional datasets. To solve this, a new feature is added by multiplying or powering the feature. However, there is a disadvantage that the calculation cost increases as the number of characteristics increases.

연산 비용을 줄이기 위하여, 새로운 특성을 많이 생성하지 않고서도 고차원에서 분류기를 학습시킬 수 있는 커널 기법(kernel trick)이 있다. 이 기법은 실제로 데이터를 확장하지 않고, 확장된 특성에 대한 데이터 포인트들의 거리(더 정확히는 스칼라 곱)를 계산한다. 이를 기반으로, SVM은 각 훈련 데이터 포인트가 두 클래스 사이의 결정 경계를 구분하며, 경계에 위치한 데이터 포인트들을 서포트 벡터(support vector)라 불린다. 따라서 새로운 데이터 포인트에 대하여 예측하려면, 각 서포트 벡터와의 거리를 측정하며, 이는 가우시안 커널에 의해 계산된다. 거리를 구하는 식을 식 (6)에 나타내었다. In order to reduce the computational cost, there is a kernel trick that can train a classifier in a high dimension without generating many new features. This technique does not actually expand the data, but rather computes the distance (more precisely, the scalar product) of the data points for the extended feature. Based on this, in SVM, each training data point distinguishes a decision boundary between two classes, and data points located at the boundary are called a support vector. Therefore, to predict a new data point, the distance to each support vector is measured, which is calculated by a Gaussian kernel. The formula for calculating the distance is shown in Equation (6).

Figure 112019080765112-pat00007
(6)
Figure 112019080765112-pat00007
(6)

여기서 x1과 x2는 데이터 포인트이며, ||x1-x2||는 유클리디안 거리이다. 감마(

Figure 112019080765112-pat00008
, gamma)는 가우시안 커널의 폭을 제어하는 매개변수이다. 이 모델은 감마 매개변수로 하나의 훈련 샘플이 미치는 영향의 범위를 결정한다. 작은 값은 넓은 영역이며, 큰 값은 제한적인 범위를 가진다. 그리고 C 매개변수는 유클리디안 거리를 제한하는 것으로, 선형 모델에서 나타낸 매개변수와 비슷한 규제 매개변수이며, 각 포인트의 중요도를 제한한다.where x1 and x2 are data points, and ||x1-x2|| is the Euclidean distance. gamma(
Figure 112019080765112-pat00008
, gamma) are parameters that control the width of the Gaussian kernel. The model determines the range of influence of one training sample as a gamma parameter. A small value is a large area, and a large value has a limited range. And the C parameter limits the Euclidean distance, which is a regulatory parameter similar to the parameter shown in the linear model, and limits the importance of each point.

본 발명에서는 비교적 간단하게 분류와 회귀에 활용할 수 있는 신경망(다시 말해, 딥러닝) 모델인 다중 퍼셉트론(Multilayer perceptrons; MLP)를 활용한다. 이 모델은 선형회귀 모델인 식 (1)에서 출력에 이르는 과정인 가중치 합을 만드는 과정을 한 번이 아닌, 여러 번 반복하며, 중간 단계를 구성하는 은닉 유닛(hidden unit)을 계산하여 다시 가중치 합을 계산하는 모델이다. 이러한 은닉 유닛이 은닉층(hidden layer)을 구성하며, 이러한 은닉층으로 인하여 딥러닝을 수행한다. 이 모델에서 중요한 매개변수는 은닉층의 유닛 개수이며, 많은 은닉유닛이 추가될수록 연산 비용이 커지는 단점이 있다.In the present invention, multilayer perceptrons (MLP), which are neural network (ie, deep learning) models that can be relatively simply used for classification and regression, are used. This model repeats the process of making the weighted sum, which is the process from Equation (1), which is a linear regression model, to the output, not once, but several times, and calculates the hidden unit constituting the intermediate step and re-weights the sum. It is a model that calculates This hidden unit constitutes a hidden layer, and deep learning is performed due to this hidden layer. An important parameter in this model is the number of units in the hidden layer, and as many hidden units are added, the computation cost increases.

본 발명에서 활용하는 모델 평가 방법은 교차 검증(cross-validation), 분할기를 포함한 교차검증, LOOCV, 임의분할 교차검증을 포함한다. The model evaluation method utilized in the present invention includes cross-validation, cross-validation including divider, LOOCV, and randomized cross-validation.

교차 검증은 데이터를 여러 번 반복해서 나누고, 여러 모델을 학습하는 방법이다. 가장 널리 사용되는 교차 검증 방법은 k-겹 교차 검증(k-fold cross-validation)이며, 보통 5나 10의 겹(fold)을 사용한다. 예를 들어 5-겹 교차 검증이면, 거의 비슷한 크기의 부분 집합을 5개로 나누며, 그 후, 일련의 모델들을 만든다. 첫 번째 모델은 첫 번째 폴드를 테스트 세트로 사용하고, 나머지 2부터 5까지 폴드를 훈련 세트로 사용하여 학습한다. 이 평가방법은 이렇게 다섯 번째 모델까지 반복하는 검증 방법이다. 이와 같이 단순히 세트를 분류하면 잘못된 평가결과를 가지는 경우도 존재한다. Cross-validation is a method of iteratively dividing data multiple times and training multiple models. The most widely used cross-validation method is k-fold cross-validation, which usually uses 5 or 10 folds. For example, in 5-fold cross-validation, a subset of approximately similar size is divided into 5, and then a series of models is created. The first model is trained using the first fold as the test set and the other folds 2 through 5 as the training set. This evaluation method is a verification method that repeats up to the fifth model. In this way, simply classifying sets may result in erroneous evaluation results.

이를 해결하기 위하여 계층별 k-겹 교차 검증(stratified k-fold cross-validation)을 사용한다. 이 검증방법은 폴드 안의 클래스 비율을 전체 데이터셋의 클래스 비율과 같도록 데이터를 분류하며, 이를 분할기를 포함한 교차검증 방법이라 불린다.To solve this problem, stratified k-fold cross-validation is used for each layer. This verification method classifies the data so that the class ratio in the fold is the same as the class ratio of the entire dataset, which is called a cross-validation method including a divider.

LOOCV(Leave-one-out cross-validation)는 폴드 하나에 샘플 하나만 포함하는 k-겹 교차 검증 방법이다. 이 방법은 각 반복에서 하나의 데이터 포인트를 선택해 테스트 세트로 활용한다.Leave-one-out cross-validation (LOOCV) is a k-fold cross-validation method that includes only one sample per fold. This method selects one data point from each iteration and uses it as a test set.

매우 유연한 교차 검증 전략은 임의 분할 교차 검증(shuffle-split cross-validation)이다. 이 방법은 특정 크기만큼을 훈련 세트와 테스트 세트를 만들도록 분할하며, 각 분할은 특정 횟수만큼 반복하는 방법이다. 이 방법은 반복 횟수를 훈련 세트나 테스트 세트의 크기와 독립적으로 조절해야 할 때 유용하다.A very flexible cross-validation strategy is shuffle-split cross-validation. In this method, a specific size is divided to make a training set and a test set, and each division is repeated a specific number of times. This method is useful when the number of iterations needs to be adjusted independently of the size of the training or test set.

도 3은 본 발명의 일 실시예에 따른 랜섬웨어 탐지 시스템의 동작을 설명하기 위한 개략도이다. 3 is a schematic diagram illustrating an operation of a ransomware detection system according to an embodiment of the present invention.

랜섬웨어 탐지를 위하여 백업 시스템은 백업 시스템 상의 파일(310)에 대하여 파일 포맷 별 추출(320)을 수행한다. 이후, 사용자들의 파일포맷 별 엔트로피를 측정(300)하고, 측정된 엔트로피를 기반으로 기계학습(340)을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 기준치를 도출(350)한다. 각 사용자 별, 그리고 파일포맷 별 도출된 기준치는 사용자들의 클라이언트 소프트웨어로 전달된다. 각 사용자의 클라이언트 소프트웨어는 랜섬웨어 탐지모듈을 내장하며, 탐지모듈에서는 백업 시스템으로 동기화되는 파일의 엔트로피를 측정한다. 그 파일의 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지할 수 있다. 또한 시스템의 자원이 가능한 경우에는 탐지모듈 내부에 기계학습 모델을 포함할 수 있으며, 동기화되는 파일들을 테스트 세트로 사용하여 랜섬웨어에 감염된 파일을 탐지한다. 도 4 및 도 5를 참조하여 제안하는 랜섬웨어 탐지 시스템에 대하여 더욱 상세히 설명한다. In order to detect ransomware, the backup system performs extraction 320 for each file format on the file 310 on the backup system. Thereafter, entropy for each file format of users is measured ( 300 ), and a reference value for detecting a file infected with ransomware is derived ( 350 ) using machine learning ( 340 ) based on the measured entropy. The standard values derived for each user and each file format are delivered to the user's client software. Each user's client software has a built-in ransomware detection module, and the detection module measures the entropy of files synchronized to the backup system. A file infected with ransomware can be detected by comparing the entropy of the file with the entropy threshold received from the backup system. In addition, if system resources are available, a machine learning model can be included in the detection module, and files infected with ransomware are detected using synchronized files as a test set. The proposed ransomware detection system will be described in more detail with reference to FIGS. 4 and 5 .

도 4는 본 발명의 일 실시예에 따른 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 방법을 설명하기 위한 흐름도이다.4 is a flowchart illustrating an effective ransomware detection method using machine learning based on entropy of a file in a backup system according to an embodiment of the present invention.

제안하는 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 방법은 백업 시스템을 통해 사용자 별, 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하는 단계(410), 사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨어 탐지모듈로 전달하는 단계(420), 각 사용자의 랜섬웨어 탐지모듈에서 백업 시스템으로 동기화되는 파일의 엔트로피를 측정하는 단계(430) 및 백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지하는 단계(440)를 포함한다. In the proposed backup system, an effective ransomware detection method using machine learning based on the entropy of a file measures the entropy for each user and each file format through the backup system, and uses machine learning based on each measured entropy to detect ransomware. Step 410 of deriving an entropy reference value for detecting a file infected with ware, a step of transferring the derived entropy reference value for each user and file format to the ransomware detection module of users (420), each user's ransomware detection module Measuring the entropy of the file synchronized to the backup system in step 430 and detecting the file infected with ransomware by comparing the measured entropy of the file synchronized to the backup system with the entropy reference value transmitted from the backup system (440) includes

단계(410)에서, 백업 시스템을 통해 사용자 별, 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출한다. In step 410, entropy for each user and file format is measured through the backup system, and an entropy reference value for detecting a file infected with ransomware is derived using machine learning based on each measured entropy.

백업 시스템은 각 사용자의 백업 데이터를 저장한다. 랜섬웨어에 감염된 파일을 탐지하기 위하여 각 사용자의 백업 데이터의 엔트로피 기준치를 측정한다. 엔트로피 기준치는 파일 포맷들마다 다른 기준치를 가지므로 파일 포맷 별 엔트로피를 측정한다. 엔트로피 측정은 비교적 측정속도가 빠른 최대 공통 값 평가(most common value estimate), 충돌 시험 평가(collision test estimate), 마코브 시험 평가(markov test estimate), 및 압축 시험 평가(compression test estimate)를 사용한다.The backup system stores each user's backup data. To detect ransomware-infected files, the entropy threshold of each user's backup data is measured. Since the entropy reference value has a different reference value for each file format, entropy for each file format is measured. The entropy measurement uses a relatively fast most common value estimate, a collision test estimate, a markov test estimate, and a compression test estimate. .

백업 시스템은 랜섬웨어에 감염된 파일을 분류하고 엔트로피 기준치를 도출하기 위하여 기계학습을 이용한다. 활용되는 기계학습 모델은 KNN(K-Nearest Neighbors), 선형 모델(Linear model), 결정 트리(Decision tree), 결정트리 앙상블(Decision tree ensemble), 커널 기법(Kernel trick), 딥 러닝(Deep learning)이다. 이 모델들을 기반으로 학습과 분류를 사용자 별로 수행함으로써 파일포맷 별 최적의 엔트로피 기준치를 추출하며, 지속적으로 기준치를 추출하여 갱신함으로써 인공지능적인 특징을 가진다. The backup system uses machine learning to classify files infected with ransomware and derive entropy standards. The machine learning models used are KNN (K-Nearest Neighbors), linear model, decision tree, decision tree ensemble, kernel trick, deep learning. to be. Based on these models, by performing learning and classification for each user, the optimal entropy reference value for each file format is extracted, and it has an artificial intelligence feature by continuously extracting and updating the reference value.

단계(420)에서, 사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨어 탐지모듈로 전달한다. In step 420, the entropy reference value derived for each user and each file format is transmitted to the users' ransomware detection module.

단계(410)에서 추출된 엔트로피 기준치는 사용자의 클라이언트 소프트웨어로 전달된다. 클라이언트 소프트웨어에 내장된 랜섬웨어 탐지모듈은 백업 시스템으로 동기화되는 파일들의 엔트로피를 측정한다. The entropy reference value extracted in step 410 is transmitted to the user's client software. The ransomware detection module built into the client software measures the entropy of files synchronized to the backup system.

단계(430)에서, 각 사용자의 랜섬웨어 탐지모듈에서 백업 시스템으로 동기화되는 파일의 엔트로피를 측정한다. In step 430, the entropy of the file synchronized from the ransomware detection module of each user to the backup system is measured.

단계(440)에서, 백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지한다. In step 440, the ransomware-infected file is detected by comparing the measured entropy of the file synchronized to the backup system with the entropy reference value transmitted from the backup system.

랜섬웨어 탐지모듈은 측정한 동기화되는 파일들의 엔트로피와 백업 시스템으로부터 전달받은 파일포맷 별 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지한다. 엔트로피 기준치는 일반적으로 대량의 파일의 평균으로 결정하는 것도 좋은 방법이다. 하지만 사용자마다 파일들의 엔트로피가 다른 특성이 발생할 수 있다. 따라서 백업 시스템은 사용자마다 백업 시스템에 저장된 파일들의 엔트로피를 측정하여 학습함으로써 사용자 파일들에 최적화된 기준치를 도출하며, 이는 더욱 정확하게 랜섬웨어에 감염된 파일을 탐지하는데 도움이 된다. The ransomware detection module detects files infected with ransomware by comparing the measured entropy of synchronized files with the standard value for each file format received from the backup system. It is also good practice to determine the entropy threshold as the average of a large number of files. However, the entropy of files may be different for each user. Therefore, the backup system derives a reference value optimized for user files by measuring and learning the entropy of the files stored in the backup system for each user, which helps to more accurately detect files infected with ransomware.

제안하는 시스템에서 기계학습을 위하여 활용하는 데이터는 파일포맷, 최대 공통 값 평가를 사용하는 엔트로피, 충돌 시험 평가를 사용하는 엔트로피, 마코브 시험 평가를 사용하는 엔트로피, 및 압축 시험 평가를 사용하는 엔트로피, 암호파일 유무(0/1)로 구성된다. 파일 포맷은 시스템 파일(1), 문서 파일(2), 이미지 파일(3), 소스코드 파일(4), 실행 파일(5), 압축 파일(6)으로 표현하였다. 엔트로피는 8비트를 기준으로 측정하였으며, 결과는 0부터 8까지의 값을 가진다. 암호파일 유무는 원본 파일은 0, 그리고 랜섬웨어에 감염되어 암호화된 파일은 1로 표현하였다. 엔트로피의 측정은 각 파일포맷 별 100개 파일과 이 파일들을 암호화한 각 파일포맷 별 100개 파일인 총 1,200개 파일들의 데이터를 수집하였다. 수집된 데이터의 일례를 표 1에 나타내었다. The data used for machine learning in the proposed system are file format, entropy using maximum common value evaluation, entropy using collision test evaluation, entropy using Markov test evaluation, and entropy using compressed test evaluation, It consists of the presence or absence of an encryption file (0/1) The file format was expressed as a system file (1), a document file (2), an image file (3), a source code file (4), an executable file (5), and a compressed file (6). Entropy was measured based on 8 bits, and the result has a value from 0 to 8. The presence or absence of the encrypted file was expressed as 0 for the original file and 1 for the encrypted file infected with ransomware. For entropy measurement, data of a total of 1,200 files, 100 files for each file format and 100 files for each file format that encrypted these files, were collected. An example of the collected data is shown in Table 1.

<표 1><Table 1>

Figure 112019080765112-pat00009
Figure 112019080765112-pat00009

도 5는 본 발명의 일 실시예에 따른 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지 시스템의 구성을 나타내는 도면이다.5 is a diagram showing the configuration of an effective ransomware detection system using machine learning based on the entropy of a file in the backup system according to an embodiment of the present invention.

본 실시예에 따른 랜섬웨어 탐지 시스템(500)은 랜섬웨어 탐지 모듈(510), 버스(520), 네트워크 인터페이스(530), 메모리(540), 데이터베이스(550) 및 백업 시스템(560)을 포함할 수 있다. 메모리(540)는 운영체제(541) 및 기계학습을 활용한 랜섬웨어 탐지 루틴(542)을 포함할 수 있다. 랜섬웨어 탐지 모듈(510)은 측정부(511) 및 랜섬웨어 탐지부(512)를 포함할 수 있다. 다른 실시예들에서 랜섬웨어 탐지 시스템(500)은 도 5의 구성요소들보다 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 랜섬웨어 탐지 시스템(500)은 디스플레이나 트랜시버(transceiver)와 같은 다른 구성요소들을 포함할 수도 있다.The ransomware detection system 500 according to the present embodiment may include a ransomware detection module 510 , a bus 520 , a network interface 530 , a memory 540 , a database 550 , and a backup system 560 . can The memory 540 may include an operating system 541 and a ransomware detection routine 542 utilizing machine learning. The ransomware detection module 510 may include a measurement unit 511 and a ransomware detection unit 512 . In other embodiments, the ransomware detection system 500 may include more components than those of FIG. 5 . However, there is no need to clearly show most of the prior art components. For example, the ransomware detection system 500 may include other components such as a display or a transceiver.

메모리(540)는 컴퓨터에서 판독 가능한 기록 매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 또한, 메모리(540)에는 운영체제(541)와 기계학습을 활용한 랜섬웨어 탐지 루틴(542)을 위한 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 드라이브 메커니즘(drive mechanism, 미도시)을 이용하여 메모리(540)와는 별도의 컴퓨터에서 판독 가능한 기록 매체로부터 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록 매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록 매체(미도시)를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록 매체가 아닌 네트워크 인터페이스(530)를 통해 메모리(540)에 로딩될 수도 있다. The memory 540 is a computer-readable recording medium and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive. In addition, program codes for the operating system 541 and the ransomware detection routine 542 using machine learning may be stored in the memory 540 . These software components may be loaded from a computer-readable recording medium separate from the memory 540 using a drive mechanism (not shown). The separate computer-readable recording medium may include a computer-readable recording medium (not shown) such as a floppy drive, a disk, a tape, a DVD/CD-ROM drive, and a memory card. In another embodiment, the software components may be loaded into the memory 540 through the network interface 530 instead of a computer-readable recording medium.

버스(520)는 랜섬웨어 탐지 시스템(500)의 구성요소들간의 통신 및 데이터 전송을 가능하게 할 수 있다. 버스(520)는 고속 시리얼 버스(high-speed serial bus), 병렬 버스(parallel bus), SAN(Storage Area Network) 및/또는 다른 적절한 통신 기술을 이용하여 구성될 수 있다.Bus 520 may enable communication and data transfer between components of ransomware detection system 500 . Bus 520 may be configured using a high-speed serial bus, parallel bus, storage area network (SAN), and/or other suitable communication technology.

네트워크 인터페이스(530)는 랜섬웨어 탐지 시스템(500)을 컴퓨터 네트워크에 연결하기 위한 컴퓨터 하드웨어 구성요소일 수 있다. 네트워크 인터페이스(530)는 랜섬웨어 탐지 시스템(500)을 무선 또는 유선 커넥션을 통해 컴퓨터 네트워크에 연결시킬 수 있다.The network interface 530 may be a computer hardware component for connecting the ransomware detection system 500 to a computer network. The network interface 530 may connect the ransomware detection system 500 to a computer network through a wireless or wired connection.

데이터베이스(550)는 백업 시스템에서 파일의 엔트로피를 기반으로 기계학습을 활용한 효과적인 랜섬웨어 탐지를 위해 필요한 모든 정보를 저장 및 유지하는 역할을 할 수 있다. 도 5에서는 랜섬웨어 탐지 시스템(500)의 내부에 데이터베이스(550)를 구축하여 포함하는 것으로 도시하고 있으나, 이에 한정되는 것은 아니며 시스템 구현 방식이나 환경 등에 따라 생략될 수 있고 혹은 전체 또는 일부의 데이터베이스가 별개의 다른 시스템 상에 구축된 외부 데이터베이스로서 존재하는 것 또한 가능하다.The database 550 may serve to store and maintain all information necessary for effective ransomware detection using machine learning based on the entropy of a file in the backup system. Although FIG. 5 illustrates that the database 550 is built and included in the ransomware detection system 500, it is not limited thereto and may be omitted depending on the system implementation method or environment, or the entire or part of the database is It is also possible to exist as an external database built on another separate system.

랜섬웨어 탐지 모듈(510)은 기본적인 산술, 로직 및 랜섬웨어 탐지 시스템(500)의 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(540) 또는 네트워크 인터페이스(530)에 의해, 그리고 버스(520)를 통해 랜섬웨어 탐지 모듈(510)로 제공될 수 있다. 랜섬웨어 탐지 모듈(510)은 측정부(511) 및 랜섬웨어 탐지부(512)를 위한 프로그램 코드를 실행하도록 구성될 수 있다. 이러한 프로그램 코드는 메모리(540)와 같은 기록 장치에 저장될 수 있다.The ransomware detection module 510 may be configured to process commands of a computer program by performing basic arithmetic, logic, and input/output operations of the ransomware detection system 500 . The instructions may be provided to the ransomware detection module 510 by the memory 540 or network interface 530 and via the bus 520 . The ransomware detection module 510 may be configured to execute program codes for the measurement unit 511 and the ransomware detection unit 512 . Such program codes may be stored in a recording device such as the memory 540 .

백업 시스템(560)은 학습부(561) 및 엔트로피 기준치 설정부(562)를 포함할 수 있다. The backup system 560 may include a learning unit 561 and an entropy reference value setting unit 562 .

측정부(511), 랜섬웨어 탐지부(512), 학습부(561) 및 엔트로피 기준치 설정부(562)는 도 4의 단계들(410~440)을 수행하기 위해 구성될 수 있다.The measuring unit 511 , the ransomware detecting unit 512 , the learning unit 561 , and the entropy reference value setting unit 562 may be configured to perform steps 410 to 440 of FIG. 4 .

랜섬웨어 탐지 시스템(500)은 측정부(511) 및 랜섬웨어 탐지부(512)를 포함할 수 있다.The ransomware detection system 500 may include a measurement unit 511 and a ransomware detection unit 512 .

측정부(511)는 백업 시스템으로 동기화되는 파일의 엔트로피를 측정한다. 측정부(511)는 시스템의 자원이 가능한 경우 램섬웨어 탐지모듈 내부에 기계학습 모델을 포함하여, 동기화되는 파일을 테스트 세트로 사용하여 랜섬웨어에 감염된 파일을 탐지한다. The measurement unit 511 measures the entropy of a file synchronized with the backup system. The measurement unit 511 detects a file infected with ransomware by using a synchronized file as a test set by including a machine learning model in the ramsomware detection module when system resources are available.

랜섬웨어 탐지부(512)는 각 사용자의 소프트웨어에 내장될 수 있고, 백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지한다. The ransomware detection unit 512 may be embedded in each user's software and detects a file infected with ransomware by comparing the measured entropy of the file synchronized to the backup system with the entropy reference value transmitted from the backup system.

학습부(561)는 사용자들의 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 수행한다. The learning unit 561 measures entropy for each file format of users, and performs machine learning based on each measured entropy.

엔트로피 기준치 설정부(562)는 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하여 사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨서 탐지모듈로 전달한다. 엔트로피 기준치 설정부(562)는 파일포맷 별 최적의 엔트로피 기준치를 추출하고, 지속적으로 기준치를 추출하여 갱신함으로써 인공지능적인 특징을 갖는다. The entropy reference value setting unit 562 derives an entropy reference value for detecting a file infected with ransomware, and delivers the derived entropy reference value for each user and file format to the ransomware detection module of users. The entropy reference value setting unit 562 has an artificial intelligence feature by extracting an optimal entropy reference value for each file format and continuously extracting and updating the reference value.

제안하는 랜섬웨어 탐지 시스템(500)은 사용자 별, 파일포맷 별 엔트로피에 기초한 기계학습을 통해 도출된 기준치를 활용함으로써 실시간으로 백업 시스템에 전달되는 랜섬웨어에 감염된 파일을 탐지하여 백업 시스템에 저장된 파일을 안전하게 보호하며, 사용자의 시스템이 랜섬웨어에 감염되는 경우에도 백업 시스템으로부터 원본 파일을 복원할 수 있다. The proposed ransomware detection system 500 detects files infected with ransomware delivered to the backup system in real time by utilizing a reference value derived through machine learning based on entropy for each user and file format, and stores the files stored in the backup system. It is safe and secure, and even if the user's system is infected with ransomware, the original files can be restored from the backup system.

지도학습을 위하여 임의의 개수로 훈련 세트와 테스트 세트를 분류하였으며, 훈련 세트와 테스트세트의 점수를 표 2에 나타내었다.For supervised learning, training sets and test sets were classified into arbitrary numbers, and the scores of the training sets and test sets are shown in Table 2.

<표 2><Table 2>

Figure 112019080765112-pat00010
Figure 112019080765112-pat00010

결과를 살펴보면, KNN, LinearSVC, SVM, 및 MLP는 훈련 세트와 테스트 세트 모두 완벽하게 데이터를 분류하였다. 결정 트리(Decision tree), 랜덤 포레스트(random forest), 및 그래디언트 부스팅(gradient boosting)은 매우 높은 수준으로 데이터를 분류하며, 선형 회귀(linear regression), 릿지 회귀(ridge regression), 및 로지스틱 회귀(logistic regression)는 높은 수준으로 데이터를 분류한다. 하지만 라쏘 회귀(lasso regression)는 훈련 세트와 테스트 세트의 점수가 매우 낮다. Looking at the results, KNN, LinearSVC, SVM, and MLP completely classified the data in both the training set and the test set. Decision trees, random forests, and gradient boosting classify data at a very high level, such as linear regression, ridge regression, and logistic regression. regression) classifies data at a high level. However, in lasso regression, the training and test sets score very low.

여기에서 사용한 파라미터는 대부분 기본값으로 설정하였으며, 기계학습 모델의 성능은 파라미터에 의존적이므로 최상의 점수를 가지는 매개변수를 도출하였다. 더욱 정확한 측정을 위하여, 훈련 세트, 검증 세트, 테스트 세트를 분류하였으며, 각 점수를 표 3에 나타내었다.Most of the parameters used here were set as default values, and since the performance of the machine learning model depends on the parameters, the parameters with the best scores were derived. For more accurate measurement, the training set, validation set, and test set were classified, and each score is shown in Table 3.

<표 3><Table 3>

Figure 112019080765112-pat00011
Figure 112019080765112-pat00011

결과를 살펴보면, 라쏘 회귀(Lasso regression), 로지스틱 회귀(logistic regression), 결정 트리(Decision tree), 랜덤 포레스트(random forest), 및 그래디언트 부스팅(gradient boosting)의 점수가 향상되었다. 각각을 살펴보면, 라쏘 회귀(Lasso regression)는 트레이닝 세트 점수는 0.16에서 0.90으로 증가하였으며, 562%가 향상되었다. 테스트 세트 점수는 0.16에서 0.88로 증가하였으며, 550%가 향상되었다. 로지스틱 회귀(logistic regression)는 트레이닝 세트 점수가 0.91에서 1.0으로 109% 향상되었으며, 테스트 세트 점수가 0.887에서 1.0으로 112% 향상되었다. 결정 트리(Decision tree)는 트레이닝 세트 점수가 0.998에서 1.0으로 100.2% 향상되었으며, 테스트 세트 점수가 0.997에서 1.0으로 100.3% 향상되었다. 랜덤 포레스트(random forest)는 트레이닝 세트 점수가 0.996에서 1.0으로 100.4% 향상되었으며, 테스트 세트 점수가 0.987에서 1.0으로 101% 향상되었다. 그래디언트 부스팅(gradient boosting)은 트레이닝 세트 점수가 0.998에서 1.0으로 100.2% 향상되었으며, 테스트 세트 점수가 0.997에서 1.0으로 100.3% 향상되었다. 최적의 파라미터를 적용함으로써 선형 회귀(linear regression), 릿지 회귀(ridge regression), 및 라쏘 회귀(Lasso regression)를 제외한 모든 모델이 완벽하게 랜섬웨어에 감염된 파일을 분류하여 탐지가 가능함을 검증하였다. Looking at the results, the scores of Lasso regression, logistic regression, decision tree, random forest, and gradient boosting improved. Looking at each, Lasso regression increased the training set score from 0.16 to 0.90, an improvement of 562%. The test set score increased from 0.16 to 0.88, an improvement of 550%. Logistic regression improved the training set score by 109% from 0.91 to 1.0 and the test set score improved by 112% from 0.887 to 1.0. The decision tree improved the training set score by 100.2% from 0.998 to 1.0, and the test set score improved by 100.3% from 0.997 to 1.0. The random forest improved the training set score by 100.4% from 0.996 to 1.0, and the test set score improved by 101% from 0.987 to 1.0. Gradient boosting improved the training set score by 100.2% from 0.998 to 1.0, and the test set score improved by 100.3% from 0.997 to 1.0. By applying the optimal parameters, it was verified that all models except for linear regression, ridge regression, and Lasso regression perfectly classify ransomware-infected files and detect them.

모델 평가 결과를 도출하기 위하여 앞서 설명된 교차 검증 방법을 기반으로 최적의 검증 모델을 도출하였으며, 그 결과를 표 4에 나타내었다. In order to derive the model evaluation results, an optimal verification model was derived based on the cross-validation method described above, and the results are shown in Table 4.

<표 4><Table 4>

Figure 112019080765112-pat00012
Figure 112019080765112-pat00012

결과를 살펴보면 결정 트리만이 완벽한 교차 검증 점수를 가진다. KNN, 로지스틱 회귀(logistic regression), 선형 SVC, 랜덤 포레스트(Random forest), 그래디언트 부스팅(gradient boosting), SVM, 및 MLP는 매우 높은 수준의 교차 검증 점수를 가지며, 선형 회귀(Linear regression), 릿지 회귀(Ridge regression), 및 라쏘 회귀(Lasso regression)는 비교적 높은 수준의 교차 검증 모델 점수를 가진다. 모든 교차 검증 점수는 0.9 이상으로 적합한 수준으로 모델을 활용할 수 있을 것으로 사료된다.Looking at the results, only decision trees have perfect cross-validation scores. KNN, logistic regression, linear SVC, random forest, gradient boosting, SVM, and MLP have very high level of cross-validation scores, linear regression, ridge regression Ridge regression, and Lasso regression have a relatively high level of cross-validation model score. All cross-validation scores are 0.9 or higher, suggesting that the model can be utilized at an appropriate level.

검증 모델을 살펴보면, 교차 검증(cross-validation) 및 k-겹 교차 검증(stratified k-fold cross-validation)이 많은 기계학습 모델에서 검증을 위하여 사용되며, LOOCV 및 임의 분할 교차 검증(shuffle-split cross-validation)은 일부분 모델에서 검증을 위하여 사용된다. Looking at the validation model, cross-validation and stratified k-fold cross-validation are used for validation in many machine learning models, and LOOCV and shuffle-split cross validation -validation) is used for validation in some models.

제안하는 시스템에서 활용한 기계학습 모델의 성능을 도출하기 위하여, 각 모델의 정확도, 정밀도, 재현율, F1-점수를 평가하였다. 정확도는 정확히 예측한 수 (TP(True Positive)와 TN(True Negative))를 전체 샘플 수로 나눈 값이며, 이를 식 (7)에 나타내었다. 정밀도는 양성으로 예측된 것(TP+FP) 중 얼마나 많은 샘플이 진짜 양성(TP)인지 측정하며, 이를 식(8)에 나타내었다. 재현율는 전체 양성 샘플 (TP+FN) 중 얼마나 많은 샘플이 양성 클래스(TP)로 분류되는지를 측정하며, 이를 식 (9)에 나타내었다. F1-점수는 정밀도와 재현율의 조화 평균이며, 둘을 하나로 요약하여 나타낸다. 이를 식 (10)에 나타내었다. 모든 성능 평가 지표는 0이 가장 낮으며, 1이 가장 높은 결과를 의미한다. 이러한 성능 평가의 결과를 표 5에 나타내었다.In order to derive the performance of the machine learning model used in the proposed system, the accuracy, precision, recall, and F1-score of each model were evaluated. Accuracy is a value obtained by dividing the number of accurately predicted numbers (TP (True Positive) and TN (True Negative)) by the total number of samples, and this is shown in Equation (7). Precision measures how many samples among those predicted to be positive (TP+FP) are truly positive (TP), and this is shown in Equation (8). Recall measures how many samples out of the total positive samples (TP+FN) are classified into the positive class (TP), which is shown in Equation (9). The F1-score is the harmonic mean of precision and recall, summarizing the two into one. This is shown in Equation (10). For all performance evaluation indicators, 0 means the lowest and 1 means the highest result. Table 5 shows the results of this performance evaluation.

Figure 112019080765112-pat00013
(7)
Figure 112019080765112-pat00013
(7)

Figure 112019080765112-pat00014
(8)
Figure 112019080765112-pat00014
(8)

Figure 112019080765112-pat00015
(9)
Figure 112019080765112-pat00015
(9)

Figure 112019080765112-pat00016
(10)
Figure 112019080765112-pat00016
(10)

<표 5><Table 5>

Figure 112019080765112-pat00017
Figure 112019080765112-pat00017

결과를 살펴보면, 선형 회귀(Linear regression), 릿지 회귀(Ridge regression), 및 라쏘 회귀(Lasso regression)는 성능 평가의 의미가 없으므로 평가 결과가 없다. 그래디언트 부스팅(gradient boosting)을 제외하고 다른 모델인 KNN, 로지스틱 회귀(logistic regression), 선형 SVC, 결정 트리(decision tree), 랜덤 포레스트(random forest), SVM, 및 MLP는 정확도(accuracy), 정밀성(precision), 리콜(recall), F1-스코어가 모두 1.0이며, 이는 제안하는 방안에서 활용된 기계학습의 성능은 거의 완벽한 것을 의미한다. Looking at the results, linear regression, ridge regression, and lasso regression have no evaluation results because they have no meaning in performance evaluation. Except for gradient boosting, the other models, KNN, logistic regression, linear SVC, decision tree, random forest, SVM, and MLP, are precision), recall, and F1-score are all 1.0, which means that the performance of machine learning used in the proposed method is almost perfect.

도 6은 본 발명의 일 실시예에 따른 정밀도-재현율 곡선을 나타내는 그래프이다.6 is a graph showing a precision-recall curve according to an embodiment of the present invention.

모든 임계값을 조사하거나 한 번에 정밀도나 재현율을 살펴보기 위한 평가로, 정밀도-재현율 곡선 (precision-recall curve)이 있다. 이는 가능한 모든 임계값에 대해 정밀도와 재현율의 값을 정렬된 리스트로 곡선 그래프를 나타낼 수 있으며, 그래프의 곡선은 오른쪽 위에 가까울수록 더 좋은 분류기를 의미한다. 즉, 오른쪽 위 지점은 한 임계값에서 정밀도와 재현율이 모두 높은 곳이며, 본 발명에서는 그래프로 표현이 가능한 로지스틱 회귀(logistic regression), 선형 SVC, 결정 트리(decision tree), 랜덤 포레스트(random forest), 그래디언트 부스팅(gradient boosting) 및 SVM의 정밀도-재현율 곡선을 도 6에 나타내었다.As an evaluation for examining all thresholds or looking at precision or recall at once, there is a precision-recall curve. It can represent a curve graph as a sorted list of values of precision and recall for all possible thresholds, the closer the curve of the graph is to the upper right, the better the classifier. That is, the upper right point is a place where both precision and recall are high at a threshold, and in the present invention, logistic regression, linear SVC, decision tree, and random forest that can be expressed as graphs are used. , the precision-recall curves of gradient boosting and SVM are shown in FIG. 6 .

결과를 살펴보면, 평가 대상인 모든 모델의 결과가 곡선이 오른쪽 위를 향한다. 따라서 제안하는 방안에서 활용된 기계학습의 성능은 거의 완벽한 것을 의미한다.Looking at the results, the results of all the models to be evaluated have a curve pointing upwards to the right. Therefore, the performance of machine learning used in the proposed method is almost perfect.

여러 임계값에서 분류기의 특성을 분석하는데 널리 사용되는 도구로 ROC(Receiver Operating Characteristics) 곡선이 있다. 이 곡선은 정밀도-재현율 곡선과 비슷하게, 분류기의 모든 임계값을 고려하며, 진짜 양성 비율(True Positive Rate; TPR)에 대한 거짓 양성 비율(False Positive Rate; FPR)을 나타낸다. 진짜 양성 비율은 재현율이며, 거짓 양성 비율을 거짓 양성으로 잘못 분류된 비율이다. FPR의 수식을 식 (11)에 나타내었다.A widely used tool for characterizing a classifier at multiple thresholds is the Receiver Operating Characteristics (ROC) curve. Similar to the precision-recall curve, this curve takes into account all thresholds of the classifier and represents the false positive rate (FPR) to the true positive rate (TPR). The true positive rate is the recall rate, and the false positive rate is the proportion that is misclassified as false positives. The formula for FPR is shown in Equation (11).

Figure 112019080765112-pat00018
식 (11)
Figure 112019080765112-pat00018
Equation (11)

도 7은 본 발명의 일 실시예에 따른 ROC 곡선을 나타내는 그래프이다. 7 is a graph showing an ROC curve according to an embodiment of the present invention.

ROC 곡선은 왼쪽 위에 가까울수록 좋은 성능을 의미한다. 본 발명에서는 그래프로 표현이 가능한 로지스틱 회귀(logistic regression), 선형 SVM, 결정 트리(decision tree), 랜덤 포레스트(random forest), 그래디언트 부스팅(gradient boosting) 및 SVM의 ROC 곡선을 그림 5에 나타내었다. The closer the ROC curve is to the upper left, the better the performance. In the present invention, the ROC curves of logistic regression, linear SVM, decision tree, random forest, gradient boosting, and SVM that can be expressed as graphs are shown in Figure 5.

결과를 살펴보면, 평가 대상인 모든 모델의 결과가 곡선이 왼쪽 위를 향한다. 따라서 제안하는 방안에서 활용된 기계학습의 성능은 거의 완벽한 것을 의미한다.Looking at the results, the results of all models to be evaluated have a curve toward the upper left. Therefore, the performance of machine learning used in the proposed method is almost perfect.

마지막 평가 지표로 AUC(Area Under the Curve)가 있다. 이는 ROC 곡선 아래의 면적값으로 ROC 곡선을 요약하여 나타내며, AUC 결과는 항상 최악의 0과 최상의 1의 값 사이의 값을 가진다. 따라서 이 결과는 양성 샘플의 순위를 평가하는 것을 의미한다. 즉, 무작위로 선택한 양성 클래스 포인트의 점수가 무작위로 선택한 음성 클래스 포인트의 점수보다 높을 확률과 같다. AUC가 1이면, 모든 양성 포인트의 점수가 모든 음성 포인트의 점수보다 높은 것을 의미한다. 본 발명에서 활용한 기계학습 모델의 AUC 평가 결과를 표 6에 나타내었다.The final evaluation index is AUC (Area Under the Curve). This is a summary of the ROC curve as an area value under the ROC curve, and the AUC result always has a value between the worst 0 and the best 1. Therefore, this result means to rank the positive samples. That is, it is equal to the probability that the score of the randomly selected positive class point is higher than the score of the randomly selected negative class point. If the AUC is 1, it means that the scores of all positive points are higher than the scores of all negative points. Table 6 shows the AUC evaluation results of the machine learning model utilized in the present invention.

<표 6><Table 6>

Figure 112019080765112-pat00019
Figure 112019080765112-pat00019

결과를 살펴보면, 사용한 모든 기계학습 모델의 AUC 점수가 1.0이다. 이는 제안하는 방안에서 활용된 기계학습의 성능은 거의 완벽한 것을 의미한다.Looking at the results, the AUC score of all the machine learning models used is 1.0. This means that the performance of machine learning used in the proposed method is almost perfect.

마지막으로 제안하는 방안과 기존 방안의 탐지율 비교 결과를 표 7에 나타내었다. Finally, Table 7 shows the detection rate comparison results between the proposed method and the existing method.

<표 7><Table 7>

Figure 112019080765112-pat00020
Figure 112019080765112-pat00020

기존 방안은 파일의 정보나 signature를 기반으로 탐지하는 파일 기반 탐지, I/O 요청 및 CPU 사용률과 같은 자원 기반 탐지, 사용자 활동 및 메시지와 같은 시스템 정보를 기반으로 탐지하는 시스템 기반 탐지, API 호출을 기반으로 기계학습을 활용한 기계학습 기반 탐지, 딥 러닝(deep learning) 기반 탐지, 그리고 기타 탐지 방안으로 분류하였다. 결과를 살펴보면, 탐지율이 최소 91%부터 최대 99%로 다양한 탐지율이 도출되었다. 하지만 이러한 방안들보다 제안하는 방안은 로지스틱 회귀(logistic regression), 선형 SVC, 결정 트리(decision tree), 랜덤 포레스트(random forest), 그래디언트 부스팅(gradient boosting), SVM, MLP와 같은 모든 기계학습 분류기에서 기존 방안보다 높은 탐지율을 가진다. 따라서 제안하는 방안은 기존의 방안보다 더욱 효과적으로 랜섬웨어를 탐지하며, 특히, 백업 시스템으로 동기화되는 랜섬웨어에 감염된 파일을 탐지함으로써 사용자의 원본 파일을 보호한다. Existing methods include file-based detection that detects based on file information or signature, resource-based detection such as I/O requests and CPU utilization, system-based detection that detects based on system information such as user activity and messages, and API calls. Based on this, it was classified into machine learning-based detection using machine learning, deep learning-based detection, and other detection methods. Looking at the results, various detection rates were derived from a minimum of 91% to a maximum of 99%. However, the proposed method rather than these methods is used in all machine learning classifiers such as logistic regression, linear SVC, decision tree, random forest, gradient boosting, SVM, and MLP. It has a higher detection rate than the existing method. Therefore, the proposed method detects ransomware more effectively than the existing method, and in particular, protects the original file of the user by detecting the file infected with the ransomware synchronized with the backup system.

본 발명은 백업 시스템에서의 파일의 엔트로피를 기반으로 기계학습을 통하여 랜섬웨어에 감염된 파일을 탐지하는 방안을 제안하였다. 이미지 파일과 압축 파일의 일부는 엔트로피가 높은 특성을 가지며, 엔트로피 기준치만으로 랜섬웨어에 감염된 파일을 탐지하기에는 한계가 있다. 이러한 한계를 극복하기 위하여, 본 발명에서 제안하는 방안은 다양한 파일 포맷별 엔트로피를 기반으로 기계학습을 활용하여 감염된 파일을 탐지한다. 실험 결과, 엔트로피를 활용하면 대부분의 기계학습에서 매우 높은 수준으로 감염된 파일을 분류하며, 매우 낮은 수준의 오탐 및 미탐율을 가진다. 또한, 모델 평가 결과도 매우 높은 수준이며, 이는 활용된 모델을 신뢰할 수 있다는 것을 의미한다. 마지막으로 성능평가 지표인 정확도, 정밀도, 재현율, F1-점수, 정밀도-재현율 곡선, ROC 곡선, 그리고 AUC가 모두 높은 수준으로 평가되었다. 따라서 제안하는 방안은 매우 효과적으로 랜섬웨어에 감염된 파일을 탐지한다. 이를 통하여 랜섬웨어에 감염된 파일을 백업 시스템에 동기화하지 않으며, 백업 시스템에 저장된 파일을 복원함으로써 원본 파일을 복구할 수 있다. The present invention proposes a method of detecting a file infected with ransomware through machine learning based on the entropy of the file in the backup system. Some of the image files and compressed files have high entropy characteristics, and there is a limit to detecting a file infected with ransomware only with the entropy reference value. In order to overcome this limitation, the method proposed by the present invention detects an infected file using machine learning based on entropy for each file format. As a result of the experiment, if entropy is used, most machine learning classifies infected files at a very high level, and has a very low false positive and false positive rate. Also, the model evaluation results are very high, which means that the used model can be trusted. Finally, performance evaluation indicators such as accuracy, precision, recall, F1-score, precision-recall curve, ROC curve, and AUC were all evaluated at high levels. Therefore, the proposed method detects files infected with ransomware very effectively. Through this, files infected with ransomware are not synchronized to the backup system, and the original files can be restored by restoring the files stored in the backup system.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPA(field programmable array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다.  또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다.  이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다.  예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다.  또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The apparatus described above may be implemented as a hardware component, a software component, and/or a combination of a hardware component and a software component. For example, the devices and components described in the embodiments include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable array (FPA), It may be implemented using one or more general purpose or special purpose computers, such as a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications executed on the operating system. Further, the processing device may access, store, manipulate, process, and generate data in response to the execution of software. For the convenience of understanding, although it is sometimes described that one processing device is used, one of ordinary skill in the art, the processing device is a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that it may include. For example, the processing device may include a plurality of processors or one processor and one controller. In addition, other processing configurations are possible, such as a parallel processor.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다.  소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다.  소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of these, configuring the processing unit to operate as desired or processed independently or collectively. You can command the device. Software and/or data may be interpreted by a processing device or, to provide instructions or data to a processing device, of any type of machine, component, physical device, virtual equipment, computer storage medium or device. Can be embodyed. The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

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

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다.  예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and drawings as described above, various modifications and variations can be made from the above description to those of ordinary skill in the art. For example, the described techniques are performed in a different order from the described method, and/or components such as systems, structures, devices, circuits, etc. described are combined or combined in a form different from the described method, or other components Alternatively, even if substituted or substituted by an equivalent, an appropriate result can be achieved.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and those equivalent to the claims also fall within the scope of the claims to be described later.

Claims (11)

백업 시스템을 통해 사용자 별, 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하는 단계;
사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨어 탐지모듈로 전달하는 단계;
각 사용자의 랜섬웨어 탐지모듈에서 백업 시스템으로 동기화되는 파일의 엔트로피를 측정하는 단계; 및
백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지하는 단계
를 포함하고,
백업 시스템을 통해 사용자 별, 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하는 단계는,
랜섬웨어에 감염된 파일을 분류하고 엔트로피 기준치를 도출하기 위한 기계학습 모델은 KNN(K-Nearest Neighbors), 선형 모델(Linear model), 결정 트리(Decision tree), 결정트리 앙상블(Decision tree ensemble), 커널 기법(Kernel trick), 딥 러닝(Deep learning)을 포함하고,
기계학습 모델에 기초하여 학습과 분류를 사용자 별로 수행함으로써 파일포맷 별 엔트로피 기준치를 추출하고, 지속적으로 기준치를 추출하여 갱신함으로써 인공지능적인 특징을 가지며,
파일포맷 별 엔트로피 측정속도를 증가시키기 위해 최대 공통 값 평가(most common value estimate), 충돌 시험 평가(collision test estimate), 마코브 시험 평가(markov test estimate), 및 압축 시험 평가(compression test estimate)를 포함하는 통계 기반 측정방법을 이용하고, 확률 빈도, 임의의 반복되는 패턴, 연속된 값 사이의 의존성에 기초하여 엔트로피를 측정하는
랜섬웨어 탐지 방법.
Measuring entropy for each user and file format through a backup system, and deriving an entropy reference value for detecting a file infected with ransomware using machine learning based on each measured entropy;
transmitting the entropy reference value derived for each user and each file format to the users' ransomware detection module;
Measuring the entropy of files synchronized from the ransomware detection module of each user to the backup system; and
Detecting files infected with ransomware by comparing the measured entropy of files synchronized to the backup system with the entropy threshold received from the backup system
Including,
The steps of measuring entropy for each user and file format through the backup system and deriving an entropy reference value for detecting files infected with ransomware using machine learning based on each measured entropy include:
Machine learning models for classifying ransomware-infected files and deriving entropy thresholds are KNN (K-Nearest Neighbors), linear model, decision tree, decision tree ensemble, and kernel. Including Kernel trick, Deep learning,
Based on the machine learning model, by performing learning and classification for each user, the entropy reference value for each file format is extracted, and it has artificial intelligence characteristics by continuously extracting and updating the reference value,
In order to increase the entropy measurement speed for each file format, the most common value estimate, the collision test estimate, the markov test estimate, and the compression test estimate are used. It uses a statistical-based measurement method that includes, and measures entropy based on probability frequency, random repeating pattern, and dependence between successive values.
How to detect ransomware.
삭제delete 삭제delete 제1항에 있어서,
각 사용자의 랜섬웨어 탐지모듈에서 백업 시스템으로 동기화되는 파일의 엔트로피를 측정하는 단계는,
랜섬웨어 탐지모듈 내부에 기계학습 모델을 포함하여, 동기화되는 파일을 테스트 세트로 사용하여 랜섬웨어에 감염된 파일을 탐지하는
랜섬웨어 탐지 방법.
The method of claim 1,
The step of measuring the entropy of the file synchronized from the ransomware detection module of each user to the backup system is:
It includes a machine learning model inside the ransomware detection module and uses the synchronized files as a test set to detect files infected with ransomware.
How to detect ransomware.
제1항에 있어서,
사용자 별, 파일포맷 별 엔트로피에 기초한 기계학습을 통해 도출된 기준치를 활용함으로써 실시간으로 백업 시스템에 전달되는 랜섬웨어에 감염된 파일을 탐지하여 백업 시스템에 저장된 파일을 안전하게 보호하며, 사용자의 시스템이 랜섬웨어에 감염되는 경우에도 백업 시스템으로부터 원본 파일을 복원하는
랜섬웨어 탐지 방법.
The method of claim 1,
By utilizing the reference value derived through machine learning based on entropy for each user and file format, it detects files infected with ransomware delivered to the backup system in real time and safely protects the files stored in the backup system. to restore original files from backup system even if infected with
How to detect ransomware.
사용자들의 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 이용하여 랜섬웨어에 감염된 파일을 탐지하기 위한 엔트로피 기준치를 도출하여 사용자 별, 파일포맷 별 도출된 엔트로피 기준치를 사용자들의 랜섬웨어 탐지모듈로 전달하는 백업 시스템; 및
백업 시스템으로 동기화되는 파일의 엔트로피를 측정하고, 백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지하는 각 사용자의 랜섬웨어 탐지모듈
을 포함하고,
백업 시스템은,
사용자들의 파일포맷 별 엔트로피를 측정하고, 각각의 측정된 엔트로피에 기초한 기계학습을 수행하는 학습부; 및
랜섬웨어에 감염된 파일을 탐지하기 위한 사용자 별, 파일포맷 별 엔트로피 기준치를 도출하여 사용자들의 랜섬웨어 탐지모듈로 전달하며, 파일포맷 별 엔트로피 기준치를 추출하고, 지속적으로 기준치를 추출하여 갱신함으로써 인공지능적인 특징을 갖는 엔트로피 기준치 설정부
를 포함하며,
랜섬웨어 탐지모듈은,
백업 시스템으로 동기화되는 파일의 엔트로피를 측정하는 측정부; 및
백업 시스템으로 동기화되는 파일의 측정된 엔트로피와 백업 시스템으로부터 전달받은 엔트로피 기준치를 비교함으로써 랜섬웨어에 감염된 파일을 탐지하는 각 사용자의 랜섬웨어 탐지부
를 포함하고,
랜섬웨어에 감염된 파일을 분류하고 엔트로피 기준치를 도출하기 위한 기계학습 모델은 KNN(K-Nearest Neighbors), 선형 모델(Linear model), 결정 트리(Decision tree), 결정트리 앙상블(Decision tree ensemble), 커널 기법(Kernel trick), 딥 러닝(Deep learning)을 포함하고,
파일포맷 별 엔트로피 측정속도를 증가시키기 위해 최대 공통 값 평가(most common value estimate), 충돌 시험 평가(collision test estimate), 마코브 시험 평가(markov test estimate), 및 압축 시험 평가(compression test estimate)를 포함하는 통계 기반 측정방법을 이용하고, 확률 빈도, 임의의 반복되는 패턴, 연속된 값 사이의 의존성에 기초하여 엔트로피를 측정하는
랜섬웨어 탐지 시스템.
Measure the entropy of each user's file format, and use machine learning based on each measured entropy to derive the entropy reference value for detecting files infected with ransomware, and set the entropy threshold for each user and file format to the user's ransomware. a backup system that delivers to the wear detection module; and
Ransomware detection module for each user that measures the entropy of files synchronized to the backup system and detects files infected with ransomware by comparing the measured entropy of the files synchronized to the backup system with the entropy threshold received from the backup system.
Including,
backup system,
a learning unit that measures entropy for each file format of users and performs machine learning based on each measured entropy; and
To detect files infected with ransomware, the entropy threshold for each user and file format is derived and delivered to the user's ransomware detection module, and the entropy threshold for each file format is extracted and continuously extracted and updated to provide artificial intelligence. Entropy reference value setting unit with characteristics
Including,
Ransomware detection module,
a measurement unit measuring the entropy of a file synchronized to a backup system; and
Ransomware detection unit for each user that detects files infected with ransomware by comparing the measured entropy of the files synchronized to the backup system with the entropy threshold received from the backup system.
Including,
Machine learning models for classifying ransomware-infected files and deriving entropy thresholds are KNN (K-Nearest Neighbors), linear model, decision tree, decision tree ensemble, and kernel. Including Kernel trick, Deep learning,
In order to increase the entropy measurement speed for each file format, the most common value estimate, the collision test estimate, the markov test estimate, and the compression test estimate are used. It uses a statistical-based measurement method that includes, and measures entropy based on probability frequency, random repeating pattern, and dependence between successive values.
Ransomware detection system.
삭제delete 삭제delete 삭제delete 제6항에 있어서,
측정부는,
시스템의 자원이 가능한 경우 랜섬웨어 탐지모듈 내부에 기계학습 모델을 포함하여, 동기화되는 파일을 테스트 세트로 사용하여 랜섬웨어에 감염된 파일을 탐지하는
랜섬웨어 탐지 시스템.
The method of claim 6,
the measuring unit,
If system resources are available, including a machine learning model inside the ransomware detection module, it uses the synchronized file as a test set to detect files infected with ransomware.
Ransomware detection system.
제6항에 있어서,
사용자 별, 파일포맷 별 엔트로피에 기초한 기계학습을 통해 도출된 기준치를 활용함으로써 실시간으로 백업 시스템에 전달되는 랜섬웨어에 감염된 파일을 탐지하여 백업 시스템에 저장된 파일을 안전하게 보호하며, 사용자의 시스템이 랜섬웨어에 감염되는 경우에도 백업 시스템으로부터 원본 파일을 복원하는
랜섬웨어 탐지 시스템.
The method of claim 6,
By utilizing the reference value derived through machine learning based on entropy for each user and file format, it detects files infected with ransomware delivered to the backup system in real time and safely protects the files stored in the backup system. to restore original files from backup system even if infected with
Ransomware detection system.
KR1020190095917A 2019-08-07 2019-08-07 Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System KR102258910B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190095917A KR102258910B1 (en) 2019-08-07 2019-08-07 Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190095917A KR102258910B1 (en) 2019-08-07 2019-08-07 Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System

Publications (2)

Publication Number Publication Date
KR20210017142A KR20210017142A (en) 2021-02-17
KR102258910B1 true KR102258910B1 (en) 2021-06-01

Family

ID=74732328

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190095917A KR102258910B1 (en) 2019-08-07 2019-08-07 Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System

Country Status (1)

Country Link
KR (1) KR102258910B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971550B (en) * 2024-04-02 2024-07-19 潍柴动力股份有限公司 SCR system fault determination method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170223031A1 (en) * 2016-02-01 2017-08-03 Symantec Corporation Systems and methods for modifying file backups in response to detecting potential ransomware
US20180034835A1 (en) * 2016-07-26 2018-02-01 Microsoft Technology Licensing, Llc Remediation for ransomware attacks on cloud drive folders
US10121003B1 (en) * 2016-12-20 2018-11-06 Amazon Technologies, Inc. Detection of malware, such as ransomware

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170223031A1 (en) * 2016-02-01 2017-08-03 Symantec Corporation Systems and methods for modifying file backups in response to detecting potential ransomware
US20180034835A1 (en) * 2016-07-26 2018-02-01 Microsoft Technology Licensing, Llc Remediation for ransomware attacks on cloud drive folders
US10121003B1 (en) * 2016-12-20 2018-11-06 Amazon Technologies, Inc. Detection of malware, such as ransomware

Also Published As

Publication number Publication date
KR20210017142A (en) 2021-02-17

Similar Documents

Publication Publication Date Title
Lee et al. Machine learning based file entropy analysis for ransomware detection in backup systems
Thomas et al. Machine learning approaches in cyber security analytics
Homayoun et al. Know abnormal, find evil: frequent pattern mining for ransomware threat hunting and intelligence
Biggio et al. Poisoning behavioral malware clustering
Adamu et al. Ransomware prediction using supervised learning algorithms
Khasawneh et al. RHMD: Evasion-resilient hardware malware detectors
US8464340B2 (en) System, apparatus and method of malware diagnosis mechanism based on immunization database
CN111382434B (en) System and method for detecting malicious files
US20230274003A1 (en) Identifying and correcting vulnerabilities in machine learning models
Yerima et al. Android malware detection: An eigenspace analysis approach
Stokes et al. Attack and defense of dynamic analysis-based, adversarial neural malware detection models
Ellers et al. Privacy attacks on network embeddings
Mohammed et al. Adaptive secure malware efficient machine learning algorithm for healthcare data
Shafiq Anomaly detection in blockchain
KR102258910B1 (en) Method and System for Effective Detection of Ransomware using Machine Learning based on Entropy of File in Backup System
Kanaker et al. Trojan Horse Infection Detection in Cloud Based Environment Using Machine Learning.
Taylor et al. Rapid ransomware detection through side channel exploitation
Allaf et al. Confmvm: A hardware-assisted model to confine malicious vms
Kang et al. Resilience against Adversarial Examples: Data-Augmentation Exploiting Generative Adversarial Networks.
Catillo et al. A case study with CICIDS2017 on the robustness of machine learning against adversarial attacks in intrusion detection
CN114297645A (en) Method, device and system for identifying Lesox family in cloud backup system
Sethi Classification of malware models
Alotaibi An Efficient Cyber Security and Intrusion Detection System Using CRSR with PXORP-ECC and LTH-CNN.
Alsubaie et al. Building Machine Learning Model with Hybrid Feature Selection Technique for Keylogger Detection.
Cai et al. Detecting a malicious executable without prior knowledge of its patterns

Legal Events

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