KR20100054940A - Apparatus and method for preventing malware using signature verification for embedded linux - Google Patents

Apparatus and method for preventing malware using signature verification for embedded linux Download PDF

Info

Publication number
KR20100054940A
KR20100054940A KR1020080113791A KR20080113791A KR20100054940A KR 20100054940 A KR20100054940 A KR 20100054940A KR 1020080113791 A KR1020080113791 A KR 1020080113791A KR 20080113791 A KR20080113791 A KR 20080113791A KR 20100054940 A KR20100054940 A KR 20100054940A
Authority
KR
South Korea
Prior art keywords
binary file
signature
malicious program
file
malicious
Prior art date
Application number
KR1020080113791A
Other languages
Korean (ko)
Inventor
김종
김태형
김성진
Original Assignee
포항공과대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 포항공과대학교 산학협력단 filed Critical 포항공과대학교 산학협력단
Priority to KR1020080113791A priority Critical patent/KR20100054940A/en
Publication of KR20100054940A publication Critical patent/KR20100054940A/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
    • G06F21/562Static detection
    • G06F21/565Static detection by checking file integrity
    • 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/554Detecting local intrusion or implementing counter-measures involving event detection and direct action

Abstract

PURPOSE: An apparatus and a method for preventing malware using signature verification for an embedded Linux are provided to intercept a root kit which installs a virus and a backdoor influencing an EFL(Executable and Linking Format) binary execution file. CONSTITUTION: An encryption decryption module(140) provides a control module for decoding and/or encoding required for authenticating a signature of a binary file. If the signature for the binary file does not exist or the binary file is changed, a first transmission unit(150) provides the binary file to an external device. The first transmission unit receives a malicious program test result for the binary file.

Description

임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치 및 방법{APPARATUS AND METHOD FOR PREVENTING MALWARE USING SIGNATURE VERIFICATION FOR EMBEDDED LINUX}Apparatus and method for blocking malware using signature verification in embedded Linux {APPARATUS AND METHOD FOR PREVENTING MALWARE USING SIGNATURE VERIFICATION FOR EMBEDDED LINUX}

본 발명은 임베디드 리눅스에서의 보안 장치 및 방법에 관한 것으로서, 더욱 상세하게는 임베디드 리눅스에서의 악성 프로그램 차단 장치 및 방법에 관한 것이다.The present invention relates to a security apparatus and method in embedded Linux, and more particularly, to an apparatus and method for preventing malicious programs in embedded Linux.

해를 거듭할수록 급속히 발전하는 정보통신 기술은 인간의 삶의 질을 향상시키는 기반이 되고 있지만, 그에 따라 보안 위협도 꾸준히 증가하고 있다. 이러한 보안 위협은 모바일 기기가 발달함에 따라 기존의 PC 및 서버 등의 플랫폼을 넘어서 모바일 임베디드 시스템에서도 확산되는 추세이다. 휴대폰, PDA 등 모바일 기기들이 소형화, 경량화되면서도 다양한 기능을 보유하게 되고 3G와 같은 향상된 통신 네트워크가 실용화되면서 이전보다 대용량의 정보를 고속으로 전송할 수 있는 환경이 조성되고 있는데, 이와 함께 사용자의 중요한 정보를 유출하거나 특정 기기의 사용을 방해하는 보안 위협이 일어날 수 있다. 특히 통신-금융 시스템의 컨버전스를 통해 모바일 기기에 전자상거래 기능이 추가됨에 따라 악성프로그램에 적절한 대응을 하지 못할 경우 막대한 경제적 손실이 예상된다.Over the years, the rapidly developing information and communication technology has been the foundation for improving the quality of human life, but security threats are steadily increasing accordingly. As mobile devices evolve, these security threats are spreading beyond mobile PCs and servers to mobile embedded systems. As mobile devices such as mobile phones and PDAs become smaller and lighter, they have various functions, and advanced communication networks such as 3G become more practical, creating an environment that can transmit large amounts of information at a higher speed than before. Security threats can occur that can leak or prevent the use of certain devices. In particular, as e-commerce is added to mobile devices through the convergence of telecommunications-financial systems, huge economic losses are expected if the program fails to properly respond to malicious programs.

그래서 향후 더욱 발전될 임베디드 시스템을 효과적으로 사용하여 성능을 극대화시키기 위한 방안으로 리눅스를 임베디드 시스템에 적용시키고자 하는 연구가 활발히 진행되고 있다. 그러나 이러한 임베디드 리눅스의 발전에 비해 그와 같은 시스템을 보호하고자 하는 보안 프로그램의 발전은 상대적으로 미흡한데, 그 이유는 현재 리눅스는 윈도우에 비해 상대적으로 일반 사용자층도 적고, 루트 권한과 사용자 권한으로 나뉘어져 있어 악성 프로그램이 침투하더라도 루트 권한을 얻지 않는 한 시스템에 큰 피해를 입힐 수 없다는 점에서 찾을 수 있다. 하지만 임베디드용으로 제작된 리눅스 시스템은 제한된 성능과 자원을 가지고 있고 유지보수가 신속하게 이루어지기 힘들어 약한 공격에 노출되더라도 지속적으로 안정적인 사용 환경을 보장할 수 없고, 리눅스가 점차 일반 사용자들에게도 보급되면서 리눅스 상에서 동작하는 악성 프로그램의 수가 매년 증가하고 있는 것을 볼 때, 임베디드 리눅스가 성공적으로 정착이 되기 위해서는 그것을 보호해줄 수 있는 보안 프로그램 개발이 반드시 필요하다.Therefore, researches are being actively conducted to apply Linux to embedded systems as a way to maximize performance by using embedded systems that will be further developed in the future. However, compared with the development of embedded Linux, the development of security programs to protect such systems is relatively incomplete because of the fact that Linux is relatively smaller than the general user base, and is divided into root and user rights. Even if a malicious program penetrates, it can be found that it can not cause great damage to the system unless root is obtained. However, Linux systems built for embedded systems have limited performance and resources, and are difficult to maintain quickly, so they cannot guarantee a stable environment even when exposed to weak attacks. Given that the number of malicious programs running on the system is increasing every year, it is necessary to develop a security program that can protect embedded Linux in order to be successfully settled.

리눅스를 위협하는 악성 프로그램들은 주로 ELF(Executable and Linking Format) 형식의 바이너리 파일을 변형시켜 악성 코드를 삽입, 실행하려 한다. 이러한 방법은 다른 파일을 감염시켜 자가 복제를 계속 발생시키는 고전적인 형태의 바이러스 외에도 웜, 트로이 목마, 루트킷 등 다양한 유형의 공격에서 활용된다. 예를 들어 RST(Remote Shell Trojan)의 경우 /bin 디렉토리 안에 있는 모든 ELF 바이너리 파일을 감염시켜 루트 권한을 가지는 쉘을 백도어를 통해 실행할 수 있게 한 다. 기존의 많은 연구들이 이러한 악성 프로그램들을 막기 위해 방화벽, 침입 탐지 시스템, 바이러스 백신 등을 제시해 왔으나, 시그니처 기반의 탐지 방법의 한계로 인해 제로데이(zero-day) 공격과 다양한 변형 공격에 약점을 보여 임베디드 시스템의 안정성과 가용성을 완벽히 보장하기가 어렵다. 약한 공격에도 큰 피해를 입을 수 있는 임베디드 시스템의 환경을 고려할 때, 이런 문제점은 반드시 해결이 되어야 한다. 또한 안정성과 가용성을 보장하기 위해서는 시스템이 안전하게 유지가 되는지 실시간으로 확인해야 하나, 기존 어플리케이션 기반의 방법들은 하나의 독립적인 프로세스로서 메모리에 상주해야 하기 때문에 임베디드 시스템의 자원을 일정부분 지속적으로 소비하는 문제점이 생긴다. 따라서 기존의 PC 및 서버 등의 환경에서 사용되었던 보안 시스템보다 임베디드 시스템의 자원을 효율적으로 사용하는 방법이 필요하다.Malicious programs that threaten Linux often try to insert and execute malicious code by transforming binary files in the Executable and Linking Format (ELF) format. In addition to the classical forms of viruses that infect other files and cause self-replication to continue, they are used in many types of attacks, including worms, Trojan horses, and rootkits. For example, RST (Remote Shell Trojan) infects all ELF binary files in the / bin directory so that a shell with root privileges can be run through the back door. Many previous studies have suggested firewalls, intrusion detection systems, antiviruses, etc. to prevent these malicious programs. However, the limitations of signature-based detection methods show weaknesses in zero-day attacks and various variant attacks. It is difficult to fully guarantee the stability and availability of the system. This problem must be solved when considering the environment of an embedded system that can be damaged by weak attacks. In addition, in order to ensure stability and availability, it is necessary to confirm in real time whether the system is kept safe. However, existing application-based methods must consume some of the resources of the embedded system because they must reside in memory as an independent process. This occurs. Therefore, there is a need for a method of using resources of an embedded system more efficiently than a security system used in an environment such as a PC and a server.

한편 각 시스템에서 사용되는 임베디드 리눅스가 범용 리눅스와는 다르게 특정한 목적을 위한 하드웨어에 최적화된다는 점을 감안하여 기존 시스템의 변경을 필요로 하지 않으면서 쉽고 빠르게 시스템에 적용 및 해제가 가능한 방법을 개발하여야 한다.On the other hand, considering that embedded Linux used in each system is optimized for hardware for a specific purpose unlike general purpose Linux, it is necessary to develop a method that can be applied to and released from the system quickly and easily without requiring modification of the existing system. .

서명 검증 기법은 자료를 전송하는 과정 중 발생할 수 있는 위조 및 변조를 방지하기 위해 주로 사용된다. 도 1은 서명 검증 기법에서 서명 생성 및 검증 과정을 나타내는 개념도이다. 도 1을 참조하면, 서명 검증 기법은 크게 생성과 검증 두 부분으로 나눌 수 있다. 서명 생성 단계에서 전송자는 원본 자료를 MD5나 SHA-1 등과 같은 해쉬함수를 사용하여 메시지 다이제스트를 생성한다. 생성된 메시지 다이 제스트를 전송자의 개인키로 암호화하게 되면 수신자에게 전달될 전자서명이 생성된다. 이렇게 생성된 서명은 자료와 함께 수신자에게 보내진다. 자료를 전송받은 수신자는 서명 검증 단계를 거치게 되는데 이 단계에서 수신자는 전송된 자료로부터 전송자가 서명 생성 단계에서 사용했던 것과 동일한 해쉬함수를 사용하여 새로운 메시지 다이제스트를 생성한다. 그 다음 전송된 서명을 전송자의 공개키로 복호화하여 서명 생성 단계에서 전송자가 생성했던 메시지 다이제스트를 얻은 뒤 새로 생성한 메시지 다이제스트와 비교를 한다. 이처럼 서명 검증 기법은 자료를 전부 암호화하지 않아 연산에 필요한 시스템 자원과 시간을 줄이면서도 자료의 위조 및 변조를 막을 수 있다는 장점을 가진다. 이러한 특성은 성능이 제약되어 있는 임베디드 환경에서 시스템을 효과적으로 보호하는 데 도움을 줄 수 있다.Signature verification techniques are primarily used to prevent forgery and tampering that can occur during the transmission of data. 1 is a conceptual diagram illustrating a signature generation and verification process in a signature verification technique. Referring to FIG. 1, the signature verification technique can be divided into two parts, generation and verification. In the signature generation phase, the sender creates a message digest from the original data using a hash function such as MD5 or SHA-1. Encrypting the generated message digest with the sender's private key creates an electronic signature to be delivered to the recipient. The signature thus generated is sent to the recipient with the data. The recipient of the data goes through a signature verification step, where the receiver creates a new message digest using the same hash function that the sender used in the signature generation phase. Then, the transmitted signature is decrypted with the sender's public key to obtain the message digest generated by the sender in the signature generation step, and then compared with the newly created message digest. As such, the signature verification technique has the advantage of not encrypting all the data, thereby reducing the system resources and time required for the operation, while preventing the forgery and tampering of the data. These characteristics can help effectively protect the system in embedded environments where performance is limited.

2001년 SELinux 프로젝트가 발표된 이후 리누즈 토발즈를 비롯한 리눅스 커널 개발자들은 리눅스 커널의 보안 강화를 위해 커널 내부에 대한 일반적인 접근제어 구조가 필요하다는 인식을 갖게 되었다. 그리고 SELinux 외에 POSIX.1e capabilities, DTE(Domain and Type Enforcement)와 같은 다양한 접근제어 모델들이 있다는 점에 착안하여 사용자가 원하는 접근제어 모델의 보안 정책을 자유롭게 선택하여 리눅스 커널에 적용할 수 있도록 리눅스 보안 모듈(Linux Security Module, 이하 LSM) 프로젝트를 진행하였다. 그 결과, 2002년 6월 이후부터 정식으로 표준 리눅스 커널에 LSM 기본 구조가 포함되었다.Since the release of the SELinux project in 2001, Linux kernel developers, including Linus Torvalds, have become aware of the need for general access control structures inside the kernel to make the Linux kernel more secure. In addition to SELinux, there are various access control models such as POSIX.1e capabilities and DTE (Domain and Type Enforcement), so that the Linux security module can be freely selected and applied to the Linux kernel. (Linux Security Module, LSM) project was carried out. As a result, since June 2002, the LSM framework has been included in the standard Linux kernel.

LSM 기본 구조는 task, inode, open file 등의 커널 내부 객체에 접근하기 전에 거쳐야 하는 보안 정책들을 위한 더미 함수(Dummy Function)를 정의한다. 따 라서 보안 정책 개발자는 커널 모듈로 LSM 기본 구조에서 제공하는 더미 함수를 재정의하여 원하는 보안 정책을 쉽게 구현할 수 있고, 사용자는 커널 모듈을 적재하는 것만으로 간단히 원하는 보안 정책을 적용할 수가 있다.The LSM framework defines a dummy function for security policies that must be passed before accessing kernel internal objects such as tasks, inodes, and open files. Therefore, the security policy developer can easily implement the desired security policy by redefining the dummy function provided by the LSM basic structure as the kernel module, and the user can apply the desired security policy simply by loading the kernel module.

따라서 본 발명의 제1 목적은 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치를 제공하는 것이다.Accordingly, a first object of the present invention is to provide a malicious program blocking device using signature verification in embedded Linux.

그리고, 본 발명의 제2 목적은 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 방법을 제공하는 것이다.A second object of the present invention is to provide a malicious program blocking method using signature verification in embedded Linux.

또한, 본 발명의 제3 목적은 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 방법 수행하는 프로그램이 기록된 컴퓨터가 판독 가능한 기록매체를 제공하는 것이다.It is also a third object of the present invention to provide a computer-readable recording medium having recorded thereon a program for executing a malicious program blocking method using a signature verification method in embedded Linux.

상술한 본 발명의 제1 목적을 달성하기 위한 본 발명의 일 측면에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치는, 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치에 있어서, 실행될 바이너리 파일에 대한 서명을 검증하고, 상기 서명 검증 결과 및 악성 프로그램 검사 결과 중 적어도 하나에 기초하여 상기 바이너리 파일의 실행 여부를 결정하는 제어 모듈과, 상기 바이너리 파일에 대한 서명 검증 시 요구되는 암호화 및 복호화 중 적어도 하나에 대한 결과를 상기 제어 모듈에 제공하는 암호화 복호화 모듈 및 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우 및 상기 서명 검증 결과 상기 바이너리 파일이 변경된 경우 중 어느 하나의 경우에 상기 바이너리 파일을 외부 장치에 제공하고, 상기 외부 장치로부터 상기 바이너리 파일에 대한 악성 프로 그램 검사 결과를 제공 받아 상기 제어 모듈에 제공하는 제1 송수신부를 구비한다.In order to achieve the first object of the present invention, an apparatus for blocking malicious programs using signature verification in embedded Linux according to an aspect of the present invention includes a binary to be executed in an apparatus for blocking malware using signature verification in embedded Linux. A control module for verifying a signature on a file and determining whether to execute the binary file based on at least one of the signature verification result and a malicious program inspection result, and encrypting and decrypting required for signature verification on the binary file The cryptographic decryption module providing a result for at least one to the control module and the signature on the binary file do not exist, and when the binary file is changed as a result of the signature verification, the binary file is stored in an external device. Offering to, awards And a first transceiver configured to receive a malicious program test result of the binary file from an external device and provide the result to the control module.

상기 제1 송수신부는 상기 외부 장치로부터 상기 바이너리 파일에 대한 서명을 추가로 제공 받아 상기 제어 모듈에 추가로 제공하고, 상기 제어 모듈은 상기 제공 받은 서명을 상기 바이너리 파일에 삽입할 수 있다.The first transceiver may further receive a signature for the binary file from the external device and additionally provide the signature to the control module, and the control module may insert the received signature into the binary file.

상기 제어 모듈은 상기 바이너리 파일에 악성 프로그램이 포함되지 않고 상기 바이너리 파일에 대한 서명이 없는 경우에 상기 제공 받은 서명을 상기 바이너리 파일에 삽입할 수 있다.The control module may insert the provided signature into the binary file when a malicious program is not included in the binary file and there is no signature on the binary file.

상기 제어 모듈은, 서명 검증 결과 및 악성 프로그램 검사 결과 중 적어도 하나에 기초하여 상기 바이너리 파일의 실행 여부를 결정하는 실행 제어 모듈 및 상기 바이너리 파일에 대한 서명을 검증하고, 상기 바이너리 파일에 대한 서명 검증 결과 및 상기 바이너리 파일에 대한 악성 프로그램 검사 결과 중 적어도 하나를 상기 실행 제어 모듈에 제공하는 파일 무결성 검증 모듈을 구비할 수 있다.The control module verifies a signature for the binary file and an execution control module for determining whether to execute the binary file based on at least one of a signature verification result and a malicious program inspection result, and a signature verification result for the binary file. And a file integrity verification module for providing at least one of malicious program inspection results for the binary file to the execution control module.

상기 제1 송수신부는 상기 외부 장치로부터 상기 바이너리 파일에 대한 서명을 추가로 제공 받아 상기 파일 무결성 검증 모듈을 경유하여 상기 제어 모듈에 추가로 제공하고, 상기 제어 모듈은 상기 제공 받은 서명을 상기 바이너리 파일에 삽입할 수 있다.The first transceiver may further receive a signature for the binary file from the external device and provide the signature to the control module via the file integrity verification module, and the control module may provide the received signature to the binary file. Can be inserted.

상기 바이너리 파일은 ELF(Executable and Linking Format) 형식일 수 있다.The binary file may be in Executable and Linking Format (ELF).

상기 제어 모듈 및 상기 암호화 복호화 모듈은 임베디드 리눅스 시스템의 커널 레벨(Kernel Level)에서 동작하고, 상기 제1 송수신부는 임베디드 리눅스 시스템의 사용자 레벨(User Level)에서 동작할 수 있다.The control module and the cryptographic decryption module may operate at a kernel level of an embedded Linux system, and the first transceiver may operate at a user level of an embedded Linux system.

상기 제어 모듈은 상기 바이너리 파일이 메모리에 적재되어 실행되기 전에 상기 서명 검증 결과 및 악성 프로그램 검사 결과 중 적어도 하나에 기초하여 상기 바이너리 파일의 실행 여부를 결정할 수 있다.The control module may determine whether to execute the binary file based on at least one of the signature verification result and the malicious program inspection result before the binary file is loaded into the memory and executed.

상기 제어 모듈은 상기 바이너리 파일의 실행 과정에 있어서 커널 레벨(Kernel Level에서 후킹(Hooking)할 수 있다.The control module may hook at a kernel level in a process of executing the binary file.

상기 제어 모듈은 LSM(Linux Security Modules) 프레임 워크에 있어서 file_mmap 함수를 변경할 수 있다.The control module may change the file_mmap function in the Linux Security Modules (LSM) framework.

상기 제어 모듈은 상기 바이너리 파일에 대한 서명 검증 시 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용할 수 있다.The control module may be configured to perform keyed-hash message authentication code message-digest algorithm 5 (HMAC-MD5), keyed-hash message authentication code secure hash agorithm-1 (HMAC-SHA-1), and RSA when verifying a signature on the binary file. At least one can be used.

상기 제1 송수신부는 상기 외부 장치와 상기 바이너리 파일에 대한 서명 검증 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용할 수 있다.The first transceiver may use ISAKMP (Internet Security Association & Key Management Protocol) in exchanging a secret key required for signature verification of the binary file with the external device.

상술한 본 발명의 제1 목적을 달성하기 위한 본 발명의 다른 측면에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치는, 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치에 있어서, 외부 장치로부터 바이너리 파일을 제공 받는 제2 송수신부 및 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 검사하며, 상기 악성 프로그램 검사 결과를 상기 제2 송수신부를 경유하여 상기 외부 장치에 제공하는 악성 프로그램 검사 모듈을 구 비한다.An apparatus for blocking malicious programs using a signature verification method in embedded Linux according to another aspect of the present invention for achieving the first object of the present invention includes an external device in the apparatus for blocking malicious programs using a signature verification method in embedded Linux. And a second transmission / reception unit receiving a binary file from the binary file and checking whether the binary file includes a malicious program, and providing a malicious program inspection module that provides the malicious program inspection result to the external device via the second transmission / reception unit. Compared.

상기 악성 프로그램 차단 장치는 상기 악성 프로그램 검사 결과 상기 바이너리 파일에 악성 프로그램이 포함되지 않은 경우에 상기 바이너리 파일에 대한 서명을 상기 제2 송수신부에 제공하는 서명 생성 모듈을 더 구비하되, 상기 제2 송수신부는 상기 바이너리 파일에 대한 서명을 상기 외부 장치에 추가로 제공할 수 있다.The malicious program blocking device further includes a signature generation module that provides a signature for the binary file to the second transceiver when the malicious file does not include a malicious program as a result of the malicious program inspection, wherein the second transmission / reception is performed. The unit may additionally provide a signature for the binary file to the external device.

상기 서명 생성 모듈은 상기 바이너리 파일에 대한 서명 생성 시 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용할 수 있다.The signature generation module generates keyed-hash message authentication code message-digest algorithm 5 (HMAC-MD5), keyed-hash message authentication code secure hash algorithm-1 (HMAC-SHA-1), and RSA when generating a signature for the binary file. At least one of may be used.

상기 제2 송수신부는 상기 외부 장치와 상기 바이너리 파일에 대한 서명 생성 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용할 수 있다.The second transceiver may use ISAKMP (Internet Security Association & Key Management Protocol) in exchanging a secret key required for generating a signature for the binary file with the external device.

상기 바이너리 파일은 ELF(Executable and Linking Format) 형식일 수 있다.The binary file may be in Executable and Linking Format (ELF).

또한, 상술한 본 발명의 제2 목적을 달성하기 위한 본 발명의 또 다른 일 측면에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 방법은, 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 방법에 있어서, 실행될 바이너리 파일에 대한 서명이 존재하는지 여부를 판단하는 단계와, 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우에 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 판단하는 단계 및 상기 바이너리 파일에 악성 프로그램이 포함되는 경우에 상기 바이너리 파일의 실행을 차단하는 단계를 포함한 다.In addition, the malicious program blocking method using the signature verification method in the embedded Linux according to another aspect of the present invention for achieving the second object of the present invention, to the malicious program blocking method using the signature verification method in embedded Linux Determining whether a signature exists for the binary file to be executed; determining whether a malicious program is included in the binary file when the signature for the binary file does not exist; and when the binary file is malicious. Blocking the execution of the binary file when the program is included.

상기 악성 프로그램 차단 방법은, 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우에 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 판단하는 단계 후에, 상기 바이너리 파일에 악성 프로그램이 포함되지 않는 경우에 상기 바이너리 파일에 대한 서명을 생성하는 단계와, 상기 생성된 서명을 상기 바이너리 파일에 삽입하는 단계 및 상기 바이너리 파일의 실행을 허용하는 단계를 더 포함할 수 있다.The malicious program blocking method may further include determining whether a malicious program is included in the binary file when there is no signature on the binary file, and then, when the binary file does not include a malicious program, the binary file. The method may further include generating a signature, inserting the generated signature into the binary file, and allowing execution of the binary file.

상기 바이너리 파일에 악성 프로그램이 포함되지 않는 경우에 상기 바이너리 파일에 대한 서명을 생성하는 단계는 상기 바이너리 파일에 대한 서명 생성 시 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용할 수 있다.If the binary file does not contain a malicious program, generating a signature for the binary file may include keyed-hash message authentication code message-digest algorithm 5 (HMAC-MD5) and HMAC- when generating a signature for the binary file. At least one of Keyed-Hash Message Authentication Code Secure Hash Algorithm-1 (SHA-1) and RSA may be used.

상기 바이너리 파일에 악성 프로그램이 포함되지 않는 경우에 상기 바이너리 파일에 대한 서명을 생성하는 단계는 상기 바이너리 파일에 대한 서명 생성 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용할 수 있다.If the binary file does not contain a malicious program, the step of generating a signature for the binary file may include ISAKMP (Internet Security Association & Key Management Protocol) in exchanging a secret key required for generating a signature for the binary file. Can be used.

상기 악성 프로그램 차단 방법은, 상기 실행될 바이너리 파일에 대한 서명이 존재하는지 여부를 판단하는 단계 후에, 상기 바이너리 파일에 대한 서명이 존재하는 경우에 상기 바이너리 파일에 대한 서명을 검증하는 단계 및 상기 검증 결과 상기 바이너리 파일이 변경되지 않은 경우에 상기 바이너리 파일의 실행을 허용하는 단계를 더 포함하되, 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우에 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 판단하는 단계는 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우 및 상기 검증 결과 상기 바이너리 파일이 변경된 경우 중 어느 하나의 경우에 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 판단할 수 있다.The malicious program blocking method may further include: verifying a signature on the binary file when the signature on the binary file exists after determining whether a signature on the binary file to be executed exists; The method may further include allowing execution of the binary file when the binary file has not been changed, and determining whether a malicious program is included in the binary file when the signature of the binary file does not exist. It may be determined whether a malicious program is included in the binary file when the signature of the binary file does not exist and when the binary file is changed as a result of the verification.

상기 바이너리 파일에 대한 서명이 존재하는 경우에 상기 바이너리 파일에 대한 서명을 검증하는 단계는 상기 바이너리 파일에 대한 서명 검증 시 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용할 수 있다.If the signature on the binary file exists, verifying the signature on the binary file may include keyed-hash message authentication code message-digest algorithm 5 (HMAC-MD5) and HMAC-SHA upon signature verification of the binary file. At least one of -1 (keyed-Hash Message Authentication Code Secure Hash Algorithm-1) and RSA may be used.

상기 바이너리 파일에 대한 서명이 존재하는 경우에 상기 바이너리 파일에 대한 서명을 검증하는 단계는 상기 바이너리 파일에 대한 서명 검증 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용할 수 있다.If the signature on the binary file exists, verifying the signature on the binary file may use ISAKMP (Internet Security Association & Key Management Protocol) in exchanging a secret key required for signature verification on the binary file. Can be.

상기 바이너리 파일은 ELF(Executable and Linking Format) 형식일 수 있다.The binary file may be in Executable and Linking Format (ELF).

상기 악성 프로그램 차단 방법은 상기 바이너리 파일이 메모리에 적재되어 실행되기 전에 동작할 수 있다.The malicious program blocking method may operate before the binary file is loaded into memory and executed.

상기 악성 프로그램 차단 방법은 상기 바이너리 파일의 실행 과정에 있어서 커널(Kernel) 레벨에서 후킹(Hooking)할 수 있다.The malicious program blocking method may hook at a kernel level in the execution process of the binary file.

상기 악성 프로그램 차단 방법은 LSM(Linux Security Modules) 프레임 워크 에 있어서 file_mmap 함수를 변경할 수 있다.The malicious program blocking method may change a file_mmap function in a Linux Security Modules (LSM) framework.

또한, 상술한 본 발명의 제3 목적을 달성하기 위한 본 발명의 또 다른 일 측면에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 방법을 수행하는 프로그램이 기록된 컴퓨터가 판독 가능한 기록매체는 상기 방법을 수행하는 프로그램이 기록된 컴퓨터가 판독 가능한 기록매체이다.In addition, a computer-readable recording medium having recorded thereon a program for performing a malicious program blocking method using a signature verification method in embedded Linux according to another aspect of the present invention for achieving the third object of the present invention is A computer readable recording medium having recorded thereon a program for performing the method.

상기와 같은 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치 및 방법에 따르면, ELF 바이너리 실행 파일을 감염시키는 바이러스는 물론, 공유 라이브러리를 변조하여 백도어를 설치하는 루트킷 또한 차단할 수 있다.According to the above-described apparatus and method for blocking malicious programs using signature verification in embedded Linux, a virus that infects ELF binary executable files, as well as a rootkit for installing a backdoor by tampering with a shared library can be blocked.

또한, LSM 형태의 커널 모듈로 구현하여 기존에 사용되던 임베디드 리눅스에 쉽고 빠르게 적용 및 제거가 가능하며, 추가적인 하드웨어 장비 없이 메모리에 프로세스를 상주시키지 않으면서도 실시간으로 악성 프로그램을 효과적으로 탐지할 수 있어서 효율적이고 안전한 시스템 유지가 가능하다.In addition, LSM type kernel module can be applied to and removed from embedded Linux easily and quickly, and it can efficiently detect malicious programs in real time without resident process in memory without additional hardware equipment. Safe system maintenance is possible.

나아가, 알려지지 않은 신종 공격에 바로 노출되지 않아 대응할 수 있는 시간을 확보할 수 있으며, 공인된 서버를 사용하여 검증하기 때문에 검사 결과에 신뢰성이 높고 시스템의 유지보수가 쉽고 빠르게 이루어질 수 있다.In addition, it is possible to secure time to respond by not immediately exposed to unknown new attacks, and because it is verified using an authorized server, the inspection results are reliable and the maintenance of the system can be made easily and quickly.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발 명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.As the invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the present invention to specific embodiments, it should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. Like reference numerals are used for like elements in describing each drawing.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, A, and B may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that other components may be present in between. Should be. On the other hand, when a component is said to be "directly connected" or "directly connected" to another component, it should be understood that there is no other component in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. Terms such as those defined in the commonly used dictionaries should be construed as having meanings consistent with the meanings in the context of the related art and shall not be construed in ideal or excessively formal meanings unless expressly defined in this application. Do not.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, with reference to the accompanying drawings, it will be described in detail a preferred embodiment of the present invention. Hereinafter, the same reference numerals are used for the same components in the drawings, and duplicate descriptions of the same components are omitted.

도 2는 본 발명의 일 실시예에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치의 구성을 나타내는 블록도이다.Figure 2 is a block diagram showing the configuration of a malicious program blocking device using a signature verification method in embedded Linux according to an embodiment of the present invention.

도 2를 참조하면, 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치는 크게 서명검증장치(100)와 서명생성장치(200)로 나눌 수 있다.Referring to FIG. 2, a malicious program blocking device using a signature verification method in embedded Linux may be largely divided into a signature verification device 100 and a signature generation device 200.

상기 서명검증장치(100)는 실행 제어 모듈(122), 파일 무결성 검증 모듈(124), 암호화 복호화 모듈(140) 및 제1 송수신부(150)를 구비한다. 이 경우 상기 서명검증장치(100)는 임베디드 시스템일 수 있다.The signature verification apparatus 100 includes an execution control module 122, a file integrity verification module 124, an encryption decryption module 140, and a first transceiver 150. In this case, the signature verification apparatus 100 may be an embedded system.

상기 실행 제어 모듈(122)은 임베디드 리눅스에서 사용자 또는 프로그램이 실행 가능한 특정 바이너리 파일(110)에 대해 실행 명령을 내리는 경우에 상기 특정 바이너리 파일(110)을 실제로 실행할 것인지 여부를 결정한다. 즉, 상기 실행 제어 모듈(122)은 상기 바이너리 파일(110)이 메모리에 적재되어 실행되기 전에 상기 바이너리 파일(110)에 악성 프로그램이 포함되는지 여부에 따라 상기 바이너리 파일(110)의 실행 여부를 결정한다. 이 경우 상기 바이너리 파일(110)은 ELF(Executable and Linking Format) 형식일 수 있다.The execution control module 122 determines whether to execute the specific binary file 110 when an execution command is executed for a specific binary file 110 executable by a user or a program in embedded Linux. That is, the execution control module 122 determines whether to execute the binary file 110 according to whether the binary file 110 includes a malicious program before the binary file 110 is loaded into the memory and executed. do. In this case, the binary file 110 may be in an Executable and Linking Format (ELF) format.

일반적인 바이너리 파일에 대한 실행 과정은 다음과 같다. 사용자 또는 프로그램이 임베디드 리눅스 시스템의 사용자 레벨(User Level)에서 특정 바이너리 파일에 대한 실행 명령을 내리는 경우 상기 실행 명령은 임베디드 리눅스 운영체제에 대한 시스템 콜(System Call)의 형태로 수행되는데, 이러한 시스템 콜은 커널 레벨(Kernel Level)에서 처리된다. 커널 레벨에서 상기 실행 명령이 허용되는 경우 가상 메모리(Virtual Memory)가 할당되고, 상기 할당된 가상 메모리와 가용한 물리적 메모리(Physical Memory) 간에 메모리 맵핑(Memory Mapping)이 설정되어 상기 특정 바이너리 파일(110)이 실행될 수 있다.The general binary file execution process is as follows. When a user or a program issues an execution command for a specific binary file at the user level of the embedded Linux system, the execution command is executed in the form of a system call to the embedded Linux operating system. It is handled at the kernel level. When the execution command is allowed at the kernel level, virtual memory is allocated, and memory mapping is set between the allocated virtual memory and the available physical memory so that the specific binary file 110 can be set. ) May be executed.

상기 실행 제어 모듈(122)은 커널 레벨에서 동작하며, ELF 바이너리 파일과 같은 바이너리 파일에 대해 실행 명령이 내려지고 커널 레벨에서 상기 바이너리 파일(110)에 대한 시스템 콜이 실행되면 악성 프로그램이 포함되는지 여부에 따라 상기 바이너리 파일(110)의 실행 여부를 결정한다.The execution control module 122 operates at the kernel level, and if a command is executed for a binary file such as an ELF binary file and a system call is executed for the binary file 110 at the kernel level, whether a malicious program is included in the execution control module 122. It is determined whether or not to execute the binary file 110 according to.

상기 실행 제어 모듈(122)은 모든 바이너리 파일에 대하여 상기 서명 인증을 반드시 거치도록 하기 위하여 상기 시스템 콜에 대하여 커널 레벨 후킹(Hooking)을 한다. 후킹(Hooking)이란 통상적으로 이벤트 핸들러 기반의 운영체제 상에서 이벤트 또는 함수를 가로채서 변환하는 것을 의미한다. 예를 들어, LSM(Linux Security Module)을 이용하는 경우 후킹을 이용하여 기존에 사용하던 임베디드 리눅스의 커널을 재컴파일할 필요 없이 서명 인증을 수행할 수 있다.The execution control module 122 performs kernel level hooking on the system call in order to ensure that all the binary files undergo the signature authentication. Hooking typically means intercepting and converting an event or function on an event handler-based operating system. For example, if you are using the Linux Security Module (LSM), you can use hooking to perform signature authentication without having to recompile your existing embedded Linux kernel.

도 3은 본 발명의 일 실시예에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치에서 LSM을 이용하는 경우의 바이너리 파일 실행 단계별 후킹 함수를 나타내는 블록도이다.FIG. 3 is a block diagram illustrating a hooking function for each binary file execution step when an LSM is used in an apparatus for blocking malicious programs using signature verification in embedded Linux according to an embodiment of the present invention.

상기 도 3을 참조하면, do_mmap 함수 다음에 수행되는 file_mmap 함수를 변경하여 바이너리 파일이 메모리에 적재되어 실행되기 전에 상기 바이너리 파일의 무결성을 검사할 수 있다. 이를 통해 바이너리 실행 파일 형태로 존재하는 바이러스(Virus)나 웜(Worm) 등의 악성 프로그램 외에도 기존 프로그램의 취약점을 이용하여 바이너리 실행 파일이나 동적 라이브러리 파일의 내용을 변경하는 코드 삽입 공격(Code Injection Attack), 루트킷(Rootkit) 실행 등을 막을 수 있어 시스템을 안전하게 보호할 수 있다.Referring to FIG. 3, the integrity of the binary file may be checked before the binary file is loaded and executed by changing a file_mmap function performed after the do_mmap function. Through this, Code Injection Attack that modifies the contents of binary executable files or dynamic library files by using vulnerabilities of existing programs in addition to malicious programs such as viruses and worms that exist in the form of binary executable files It can also prevent rootkits from running, which keeps your system safe.

다시 상기 도 2를 참조하면, 상기 실행 제어 모듈(122)은 악성 프로그램 포함 여부를 판단하기 위해 상기 파일 무결성 검증 모듈(124)에 상기 바이너리 파일(110)에 대한 서명 검증을 요청하고, 상기 파일 무결성 검증 모듈(124)로부터 제공되는 서명 검증 결과 및 악성 프로그램 검사 결과에 기초하여 상기 바이너리 파일(110)에 대한 실행 여부를 결정한다.Referring back to FIG. 2, the execution control module 122 requests the file integrity verification module 124 for signature verification of the binary file 110 to determine whether a malicious program is included and the file integrity. The execution of the binary file 110 is determined based on the signature verification result and the malware inspection result provided from the verification module 124.

상기 실행 제어 모듈(122)은 상기 악성 프로그램 검사 결과 상기 바이너리 파일(110)에 악성 프로그램이 포함되지 않고, 상기 바이너리 파일(110)에 대한 서명이 없는 경우 후술할 상기 파일 무결성 검증 모듈(124)로부터 제공되는 상기 바이너리 파일(110)에 대한 서명을 상기 바이너리 파일(110)에 삽입한다.The execution control module 122, from the file integrity verification module 124 which will be described later when the malicious program does not include a malicious program in the binary file 110 and there is no signature on the binary file 110. The signature for the provided binary file 110 is inserted into the binary file 110.

상기 파일 무결성 검증 모듈(124)은 상기 실행 제어 모듈(122)로부터 상기 바이너리 파일(110)에 대한 서명 검증 요청을 받고, 상기 바이너리 파일(110)에 대한 서명 검증 결과, 상기 바이너리 파일(110)에 대한 악성 프로그램 검사 결과 및 상기 바이너리 파일(110)에 대한 서명 중 적어도 하나를 상기 실행 제어 모듈(122)에 제공한다.The file integrity verification module 124 receives a signature verification request for the binary file 110 from the execution control module 122, and as a result of the signature verification for the binary file 110, the file integrity verification module 124. At least one of a malicious program check result and a signature for the binary file 110 is provided to the execution control module 122.

상기 파일 무결성 검증 모듈(124)은 상기 바이너리 파일(110)에 대한 서명이 존재하는 경우, 즉 상기 바이너리 파일(110)이 서명을 포함하고 있는 경우에는 서명 검증 기법을 사용하여 상기 바이너리 파일(110)의 변경 여부를 먼저 확인한다.The file integrity verification module 124 uses the signature verification technique when the signature on the binary file 110 exists, that is, when the binary file 110 includes a signature. Check first to see if it has changed.

상기 파일 무결성 검증 모듈(124)은 상기 확인 결과 상기 바이너리 파일(110)이 변경되지 않은 경우에는 상기 서명 검증 결과를 상기 실행 제어 모듈(122)에 제공한다.The file integrity verification module 124 provides the execution verification module 122 to the signature verification result when the binary file 110 is not changed as a result of the verification.

상기 파일 무결성 검증 모듈(124)은 상기 바이너리 파일(110)에 대한 서명이 존재하지 않거나, 상기 확인 결과 상기 바이너리 파일(110)이 변경된 경우에는 상기 바이너리 파일(110)에 대한 악성 프로그램 검사 및 서명 생성을 위하여 상기 제1 송수신부(150)를 경유하여 상기 서명생성장치(200)로 상기 바이너리 파일(110)을 전송한다. 바이너리 파일(110)을 실행할 때마다 악성 프로그램에 감염되었는지 여 부를 검사하지 아니하고, 서명 검증 기법을 사용하여 실행하고자 하는 바이너리 파일(110)의 변경 여부를 먼저 확인함으로써 임베디드 리눅스 시스템 전체의 시스템 자원 소모를 최소화할 수 있다.The file integrity verification module 124 checks the malware and generates a signature when the binary file 110 does not exist or the binary file 110 is changed as a result of the verification. For this purpose, the binary file 110 is transmitted to the signature generator 200 via the first transceiver 150. Whenever the binary file 110 is executed, it does not check whether it is infected by malicious programs, but first checks whether the binary file 110 to be executed is changed by using signature verification techniques to reduce system resource consumption of the entire embedded Linux system. It can be minimized.

상기 파일 무결성 검증 모듈(124)은 상기 바이너리 파일(110)에 대한 서명 검증 기법으로서 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용할 수 있다.The file integrity verification module 124 uses a keyed-Hash Message Authentication Code Message-Digest algorithm 5 (HMAC-MD5) and a keyed-Hash Message Authentication Code (HMAC-SHA-1) as a signature verification scheme for the binary file 110. Secure Hash Algorithm-1) and RSA may be used.

예를 들어, 단순히 MD5 알고리즘만으로 서명을 생성한다면 공격자가 감염된 파일에 MD5로 생성한 서명을 붙여서 정상적으로 서명 인증이 된 파일인 것처럼 배포할 수가 있다. 반면, HMAC-MD5는 각 임베디드 시스템별로 서버와 미리 공유한 비밀 키를 이용하여 서명 검증을 하기 때문에 공유한 비밀 키를 모르는 경우에는 위조된 서명을 만들어 낼 수 없어서 서버와 임베디드 시스템의 공유키가 유출되지 않는 한 서명 위조를 방지할 수 있다. 상기 비밀 키에 대하여는 상기 제1 송수신부(150)와 관련하여 후술한다.For example, if you simply generate a signature using the MD5 algorithm, an attacker can attach an MD5-generated signature to an infected file and distribute it as if it were a signed file. On the other hand, HMAC-MD5 verifies the signature using the secret key shared with the server in advance for each embedded system, so if the shared secret is not known, the forged signature cannot be generated, so the shared key of the server and the embedded system is leaked. Unless otherwise forged, signature forgery can be prevented. The secret key will be described later with reference to the first transceiver 150.

상기 암호화 복호화 모듈(140)은 상기 파일 무결성 검증 모듈(124)로부터 상기 바이너리 파일(110)에 대한 서명 검증 시 요구되는 암호화 및 복호화 중 적어도 하나에 대한 요청을 받고, 상기 요청에 상응하여 암호화 및 복호화 중 적어도 하나에 대한 결과를 상기 파일 무결성 검증 모듈(124)에 제공한다. 즉, 상기 암호화 복호화 모듈(140)은 상기 파일 무결성 검증 모듈(124)이 선택하는 서명 검증 기법에 사용되는 암호화 복호화 과정을 지원한다. 이 경우 상기 암호화 복호화 알고리즘은 MD5(Message-Digest algorithm 5), SHA-1(Secure Hash Algorithm-1) 및 RSA가 될 수 있다.The encryption decryption module 140 receives a request from the file integrity verification module 124 for at least one of encryption and decryption required when verifying a signature on the binary file 110, and encrypts and decrypts corresponding to the request. Provide results for at least one of the file integrity verification modules 124. That is, the encryption decryption module 140 supports an encryption decryption process used for the signature verification scheme selected by the file integrity verification module 124. In this case, the encryption decryption algorithm may be Message-Digest algorithm 5 (MD5), Secure Hash Algorithm-1 (SHA-1), and RSA.

상기 제1 송수신부(150)는 상기 파일 무결성 검증 모듈(124)로부터 상기 바이너리 파일(110)에 대한 파일 전송 요청을 받고, 상기 바이너리 파일(110)에 대한 악성 프로그램 검사 결과 및 상기 바이너리 파일(110)에 대한 서명 중 적어도 하나를 상기 파일 무결성 검증 모듈(124)에 제공한다. 이 경우, 상기 제1 송수신부(150)는 상기 바이너리 파일(110)을 상기 서명생성장치(200)에 제공하고, 상기 서명생성장치(200)로부터 상기 바이너리 파일(110)에 대한 악성 프로그램 검사 결과 및 상기 바이너리 파일(110)에 대한 서명 중 적어도 하나를 제공 받아 상기 파일 무결성 검증 모듈(124)로 제공한다.The first transceiver 150 receives a file transfer request for the binary file 110 from the file integrity verification module 124, performs a malicious program check result on the binary file 110, and the binary file 110. Provide the file integrity verification module 124 with at least one of the signatures. In this case, the first transceiving unit 150 provides the binary file 110 to the signature generator 200, and a result of the malicious program test for the binary file 110 from the signature generator 200. And at least one of a signature for the binary file 110 is provided to the file integrity verification module 124.

상기 제1 송수신부(150)는 상기 서명생성장치(200)와 상기 바이너리 파일(110)에 대한 서명 검증 시 요구되는 상기 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용할 수 있다. 상기 파일 무결성 검증 모듈(124)이 서명 검증 방법으로서 HMAC-MD5 및 HMAC-SHA-1을 사용하는 경우에는 ISAKMP와 같은 비밀 키 교환 프로토콜이 요구되나, 공개 키 방식인 RSA를 사용하는 경우에는 ISAKMP와 같은 비밀 키 교환 프로토콜이 요구되지 않는다.The first transceiver 150 may use an ISAKMP (Internet Security Association & Key Management Protocol) in exchanging the secret key required for signature verification of the signature generator 200 and the binary file 110. have. When the file integrity verification module 124 uses HMAC-MD5 and HMAC-SHA-1 as signature verification methods, a secret key exchange protocol such as ISAKMP is required.However, when using a public key RSA, ISAKMP and The same secret key exchange protocol is not required.

상기 비밀 키 교환에 대해 보다 상세하게 설명하면 다음과 같다. 상기 서명검증장치(100)와 상기 서명생성장치(200)는 상기 파일 무결성 검증 모듈(124)이 바이너리 파일의 서명 검증을 위해 사용되는 비밀 키를 생성하기 위해 상호 인증 및 키 분배 과정을 거친다. 예를 들어, ISAKMP 프로토콜을 사용하는 경우, 서버와 임베디드 시스템이 서로의 정보를 확인하고 인증을 한 뒤 SA(Security Association)를 설정하고 키를 교환한다. ISAKMP 프로토콜은 정해진 시간마다 자동으로 SA와 키를 갱신하므로 암호화 프로토콜의 특성상 발생할 수 있는 암호분석학(Crypto Analysis)적 공격을 막을 수 있다. 또한 메시지 전송 시 난수값을 포함하기 때문에 재전송 공격(Reply Attack)을 방지할 수 있다. ISAKMP 프로토콜은 인증을 하는 방법에 다양한 기술들을 적용할 수 있으므로 일반적으로 많이 사용되는 공인인증서를 사용하여 인증을 수행하는 방법 외에 OTP(One Time Passward)와 같은 강한 인증(Strong Authentication) 기술을 사용할 수 있다.Hereinafter, the secret key exchange will be described in detail. The signature verification device 100 and the signature generation device 200 undergo mutual authentication and key distribution to generate a secret key used by the file integrity verification module 124 for signature verification of binary files. For example, when using the ISAKMP protocol, a server and an embedded system verify each other's information and authenticate, establish a security association (SA), and exchange keys. The ISAKMP protocol automatically updates SAs and keys at fixed times, thus preventing cryptographic attacks that can occur due to the nature of the encryption protocol. In addition, since a random number is included in the message transmission, a reply attack can be prevented. Since ISAKMP protocol can apply various technologies to the authentication method, it is possible to use strong authentication technology such as OTP (One Time Passward) in addition to performing authentication using commonly used public certificate. .

상기 서명생성장치(200)는 제2 송수신부(210), 악성 프로그램 검사 모듈(220) 및 서명 생성 모듈(230)을 구비한다. 이 경우 상기 서명생성장치(200)는 서버일 수 있다.The signature generator 200 includes a second transceiver 210, a malicious program inspection module 220, and a signature generation module 230. In this case, the signature generation device 200 may be a server.

상기 서명생성장치(200)는 상기 서명검증장치(100)로부터 전송 받은 바이너리 파일(110)을 검사하여 악성 프로그램을 포함하지 않는 안전한 파일로 판정될 경우, 상기 검사한 바이너리 파일(110)에 대한 서명을 생성하여 상기 서명검증장치(100)로 전송하고, 상기 서명검증장치는 상술한 바와 같이 상기 실행 제어 모듈(122)에 의하여 상기 바이너리 파일(110)에 상기 서명을 삽입한다. 이후 상기 바이너리 파일(110)의 실행 시에는 상술한 바와 같이 상기 서명검증장치(100)에서 상기 바이너리 파일(110)의 서명 검증 과정을 통해 안전한 바이너리 파일로 판단하고 실행을 허용한다. 그러나 상기 서명 검증 과정이 실패한 경우에는 상기 서명 생성 후 상기 바이너리 파일(110)에 대한 변경이 발생한 것이므로 다시 상기 서명생성장치(200)로 보내어 상기 바이너리 파일(110)이 안전하다는 검증 과정을 거친다. The signature generation device 200 examines the binary file 110 received from the signature verification device 100 and determines that the signature file is a safe file that does not include a malicious program. Generates and transmits the signature to the signature verification apparatus 100, and the signature verification apparatus inserts the signature into the binary file 110 by the execution control module 122 as described above. Thereafter, when the binary file 110 is executed, the signature verification apparatus 100 determines that the binary file 110 is a safe binary file through a signature verification process of the binary file 110 and allows execution. However, if the signature verification process fails, since the change to the binary file 110 occurs after the signature generation, the signature file is sent to the signature generator 200 again to verify that the binary file 110 is secure.

상기 제2 송수신부(210)는 상기 서명검증장치(100)로부터 악성 프로그램 검사 및 서명 생성의 대상이 되는 바이너리 파일(110)을 제공 받고, 상기 악성 프로그램 검사 모듈(220)에 상기 바이너리 파일(110)의 검사를 요청하며, 상기 악성 프로그램 검사 모듈(220)에 의한 상기 바이너리 파일(110)에 대한 악성 프로그램 검사 결과 및 상기 서명 생성 모듈(230)에 의한 상기 바이너리파일에 대한 서명 중 적어도 하나를 상기 서명검증장치(100)에 제공한다.The second transceiver 210 receives a binary file 110 that is a target of malicious program inspection and signature generation from the signature verification apparatus 100, and the binary file 110 to the malicious program inspection module 220. Request a check, and display at least one of a result of the malicious program inspection of the binary file 110 by the malicious program inspection module 220 and a signature of the binary file by the signature generation module 230. It is provided to the signature verification device (100).

상기 제2 송수신부(210)는 상술한 바와 같이 상기 서명검증장치(100)와 상기 바이너리 파일(110)에 대한 서명 생성 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용할 수 있다. 상술한 바와 같이 상기 서명검증장치(100)의 상기 파일 무결성 검증 모듈(124)이 서명 검증 방법으로서 HMAC-MD5 및 HMAC-SHA-1을 사용하는 경우에는 ISAKMP와 같은 비밀 키 교환 프로토콜이 요구되나, 공개 키 방식인 RSA를 사용하는 경우에는 ISAKMP와 같은 비밀 키 교환 프로토콜이 요구되지 않는다.As described above, the second transmission / reception unit 210 exchanges a secret key required for generating a signature for the binary file 110 with the signature verification device 100. The ISAKMP (Internet Security Association & Key Management Protocol) Can be used. As described above, when the file integrity verification module 124 of the signature verification apparatus 100 uses HMAC-MD5 and HMAC-SHA-1 as signature verification methods, a secret key exchange protocol such as ISAKMP is required. When using public key method RSA, no secret key exchange protocol such as ISAKMP is required.

상기 악성 프로그램 검사 모듈(220)은 상기 제2 송수신부(210)로부터 상기 바이너리 파일(110)에 대한 파일 검사를 요청 받고, 상기 바이너리 파일(110)에 악성 프로그램이 포함되는지 여부를 검사하며, 상기 파일 검사 결과를 상기 송수신부에 제공하고, 상기 바이너리 파일(110)에 악성 프로그램이 포함되지 않은 경우에 상기 바이너리 파일(110)에 대한 서명 생성을 상기 서명 생성 모듈(230)에 요청한 다. 상기 악성 프로그램 검사 모듈(220)은 상기 악성 프로그램 검사를 수행함에 있어서 악성 프로그램 샘플 데이터베이스(DB)에 기초한 대조 방법, 악성 프로그램 정의 파일 또는 악성 프로그램 패턴 파일에 기초한 대조 방법 등을 사용할 수 있다. 상기 대조 방법은 안티바이러스(Anti-Virus) 프로그램, 백신(Vaccine) 프로그램, 스파이웨어(Spyware) 제거 프로그램 등이 사용하고 있는 검사 엔진의 검사 방법과 유사한 방식으로 구현될 수 있다.The malicious program inspection module 220 receives a file inspection request for the binary file 110 from the second transceiver 210, and checks whether a malicious program is included in the binary file 110. The file check result is provided to the transceiver, and when the malicious file is not included in the binary file 110, the signature generation module 230 requests the signature generation module 230 to generate a signature for the binary file 110. The malicious program inspection module 220 may use a verification method based on a malicious program sample database (DB), a verification program based on a malicious program definition file, or a malicious program pattern file in performing the malicious program inspection. The control method may be implemented in a manner similar to that of a scan engine used by an anti-virus program, a vaccine program, a spyware removal program, and the like.

상기 서명 생성 모듈(230)은 상기 악성 프로그램 검사 모듈(230)로부터 상기 바이너리 파일(110)에 대한 서명 생성을 요청 받고, 상기 바이너리 파일(110)에 대한 서명을 생성하여 상기 제2 송수신부(210)에 제공한다. 이 경우 상기 서명 생성 모듈은 상기 바이너리 파일(110)에 대한 서명 생성 기법으로서 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용할 수 있다.The signature generation module 230 receives a request for generating a signature for the binary file 110 from the malicious program inspection module 230, generates a signature for the binary file 110, and generates a signature for the second transceiver 210. To provide. In this case, the signature generation module may use keyed-hash message authentication code message-digest algorithm 5 (HMAC-MD5) and keyed-hash message authentication code secure hash (HMAC-SHA-1) as a signature generation technique for the binary file 110. At least one of Algorithm-1) and RSA may be used.

도 4는 본 발명 적용시와 본 발명 비적용시의 임베디드 시스템 오버헤드를 비교한 도표이다. 임베디드 시스템의 오버헤드는 적용시와 비적용시의 바이너리 파일 실행부터 종료까지 걸리는 수행 시간을 기준으로 비교한다. 수행 시간을 비교할 때 사용한 ELF 실행 파일은 /bin/busybox ls와 /bin/busybox pwd이다.Figure 4 is a diagram comparing the overhead of the embedded system when applying the present invention and the non-applied invention. The overhead of the embedded system is compared based on the execution time from execution of binary file to completion of application and non-application. The ELF executables used to compare run times are / bin / busybox ls and / bin / busybox pwd.

실험 결과 비적용시에 비해 적용시 커널에서의 수행 시간이 증가하는 것을 확인할 수 있다. 그러나 사용자 레벨에서의 수행 시간은 거의 없고 커널 레벨에서 의 수행 시간도 매우 짧은 것으로 확인되는 바, 성능 평가에 있어서 가장 나쁜 조건(Worst Case)이라는 점과 실험에 참여한 사용자들이 느끼는 수행 속도의 차이는 체감적으로 거의 없을 정도이다. 게다가 일반적으로 사용자가 사용하는 프로그램은 사용자 단계에서 대부분의 작업을 수행하기 때문에, 본원발명은 처음 프로그램을 실행시키는 과정에서 커널 레벨에서 단 한 번만 수행되므로 전체적인 시스템 성능에 큰 지장을 주지 않는다. 또한 기존의 임베디드 리눅스 시스템에서 사용되는 ELF 바이너리 파일의 크기도 대부분 512KB 이하라는 점을 감안할 때 임베디드 시스템에서 사용되는 바이너리 파일의 크기 증가에 따른 수행 시간 증가도 크게 우려하지 않아도 될 것이다. 따라서 제안하는 방법이 효과적으로 시스템을 보호하는 것을 확인할 수 있다.Experimental results show that the execution time in the kernel increases when applied. However, there is little execution time at the user level and very short execution time at the kernel level. The worst case condition in performance evaluation and the difference in performance speed felt by users participating in the experiment are felt. Almost no enemy. In addition, since a user program generally performs most tasks at the user level, the present invention is performed only once at the kernel level during the first execution of the program, and thus does not significantly affect the overall system performance. Also, considering that the size of ELF binary files used in the existing embedded Linux system is mostly 512KB or less, the increase in execution time due to the increase in the size of the binary file used in the embedded system should not be a big concern. Therefore, we can confirm that the proposed method effectively protects the system.

도 5는 본 발명의 일 실시예에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 방법의 순서를 나타내는 흐름도이다.5 is a flowchart illustrating a procedure of a malicious program blocking method using signature verification in embedded Linux according to an embodiment of the present invention.

상기 도 5를 참조하면, 우선 실행될 바이너리 파일이 존재하는지 판단한다(S310). ELF 바이너리 파일과 같은 바이너리 파일에 대해 실행 명령이 내려지면 커널 레벨에서 상기 바이너리 파일에 대한 시스템 콜이 실행된다. 모든 바이너리 파일에 대하여 서명 인증을 반드시 거치도록 하기 위하여 상기 시스템 콜에 대하여 커널 레벨 후킹을 한다. 예를 들어, LSM(Linux Security Module)을 이용하는 경우 후킹을 이용하여 기존에 사용하던 임베디드 리눅스의 커널을 재컴파일할 필요 없이 서명 인증을 수행할 수 있다. 상기 커널 레벨 후킹 과정에 대하여는 상기 도 2에 도시된 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치의 구성 중 상기 실행 제어 모듈(122)을 참조하여 설명한 바와 동일하게 이해될 수 있으므로 용이한 이해와 중복된 내용의 혼동을 회피하기 위해 이하 설명은 생략키로 한다.Referring to FIG. 5, it is first determined whether a binary file to be executed exists (S310). When an executable command is issued for a binary file such as an ELF binary file, a system call for the binary file is executed at the kernel level. Kernel-level hooking is done on the system call to ensure that all binary files are signed. For example, if you are using the Linux Security Module (LSM), you can use hooking to perform signature authentication without having to recompile your existing embedded Linux kernel. The kernel level hooking process may be understood in the same manner as described with reference to the execution control module 122 among the components of the malicious program blocking device using the signature verification method in the embedded Linux illustrated in FIG. 2. In order to avoid confusion of duplicate contents, the following description will be omitted.

다음으로, 상기 판단 결과 실행될 바이너리 파일이 존재하는 경우 상기 바이너리 파일에 대한 서명이 존재하는지 판단하고(S320), 상기 바이너리 파일에 대한 서명이 존재하는 경우 상기 바이너리 파일에 대한 서명을 검증한다(S330). 상기 서명 검증 과정(S330)에 대하여는 상기 도 2에 도시된 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치의 구성 중 상기 파일 무결성 검증 모듈(124)을 참조하여 설명한 바와 동일하게 이해될 수 있으므로 용이한 이해와 중복된 내용의 혼동을 회피하기 위해 이하 설명은 생략키로 한다.Next, if there is a binary file to be executed as a result of the determination, it is determined whether a signature for the binary file exists (S320), and if a signature for the binary file exists, the signature on the binary file is verified (S330). . The signature verification process S330 may be easily understood as described with reference to the file integrity verification module 124 among the components of the malicious program blocking device using the signature verification method in the embedded Linux illustrated in FIG. 2. In order to avoid confusion of one understanding and overlapping contents, the following description will be omitted.

상기 바이너리 파일에 대한 서명 검증 결과(S330) 상기 바이너리 파일이 변경되지 않은 경우에는(S340), 상기 바이너리 파일의 실행을 허용한다(S390).Signature verification result for the binary file (S330) If the binary file is not changed (S340), the execution of the binary file is allowed (S390).

상기 바이너리 파일에 대한 서명이 존재하는지 판단한 결과(S320) 상기 바이너리 파일에 대한 서명이 존재하지 않거나, 상기 바이너리 파일에 대한 서명 검증 결과(S330) 상기 바이너리 파일이 변경된 경우에는(S340) 상기 바이너리 파일 내 악성 프로그램이 존재하는지 여부를 판단한다(S350). 상기 악성 프로그램 존재 여부 판단 과정(S350)에 대하여는 상기 도 2에 도시된 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치의 구성 중 상기 악성 프로그램 검사 모듈(220)을 참조하여 설명한 바와 동일하게 이해될 수 있으므로 용이한 이해와 중복 된 내용의 혼동을 회피하기 위해 이하 설명은 생략키로 한다.As a result of determining whether a signature exists for the binary file (S320), if the signature for the binary file does not exist or if the signature verification result for the binary file (S330) changes the binary file (S340) It is determined whether a malicious program exists (S350). The process of determining whether the malicious program exists (S350) will be understood as described with reference to the malicious program inspection module 220 in the configuration of the malicious program blocking device using the signature verification method in the embedded Linux shown in FIG. In order to avoid confusion of easy understanding and overlapping contents, the following description will be omitted.

상기 바이너리 파일 내 악성 프로그램이 존재하는지 여부를 판단한 결과(S350), 상기 바이너리 파일 내 악성 프로그램이 존재하는 경우에는 상기 바이너리 파일의 실행을 차단한다(S380).As a result of determining whether a malicious program exists in the binary file (S350), when a malicious program exists in the binary file, execution of the binary file is blocked (S380).

상기 바이너리 파일 내 악성 프로그램이 존재하는지 여부를 판단한 결과(S350), 상기 바이너리 파일 내 악성 프로그램이 존재하는 경우에는 상기 바이너리 파일에 대한 서명을 생성하고(S360), 상기 생성된 서명을 상기 바이너리 파일에 삽입하고(S370), 상기 바이너리 파일의 실행을 허용한다(S390). 상기 서명 생성 과정(S360)에 대하여는 상기 도 2에 도시된 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치의 구성 중 상기 서명 생성 모듈(230)을 참조하여 설명한 바와 동일하게 이해될 수 있으므로 용이한 이해와 중복된 내용의 혼동을 회피하기 위해 이하 설명은 생략키로 한다.As a result of determining whether a malicious program exists in the binary file (S350), if a malicious program exists in the binary file, a signature is generated for the binary file (S360), and the generated signature is added to the binary file. Insert (S370) and allow the execution of the binary file (S390). The signature generation process S360 may be easily understood as described with reference to the signature generation module 230 among the components of the malicious program blocking device using the signature verification scheme in the embedded Linux illustrated in FIG. 2. In order to avoid confusion of understanding and overlapping contents, the following description will be omitted.

이상 실시예를 참조하여 설명하였지만, 해당 기술분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although described with reference to the above embodiments, those skilled in the art will understand that various modifications and changes can be made without departing from the spirit and scope of the invention as set forth in the claims below. Could be.

도 1은 서명 검증 기법에서 서명 생성 및 검증 과정을 나타내는 개념도이다.1 is a conceptual diagram illustrating a signature generation and verification process in a signature verification technique.

도 2는 본 발명의 일 실시예에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치의 구성을 나타내는 블록도이다.Figure 2 is a block diagram showing the configuration of a malicious program blocking device using a signature verification method in embedded Linux according to an embodiment of the present invention.

도 3은 본 발명의 일 실시예에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치에서 LSM을 이용하는 경우의 바이너리 파일 실행 단계별 후킹 함수를 나타내는 블록도이다.FIG. 3 is a block diagram illustrating a hooking function for each binary file execution step when an LSM is used in an apparatus for blocking malicious programs using signature verification in embedded Linux according to an embodiment of the present invention.

도 4는 본원발명 적용시와 본원발명 비적용시의 임베디드 시스템 오버헤드를 비교한 도표이다.Figure 4 is a chart comparing the embedded system overhead when applying the present invention and when the present invention is not applied.

도 5는 본 발명의 일 실시예에 따른 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 방법의 순서를 나타내는 흐름도이다.5 is a flowchart illustrating a procedure of a malicious program blocking method using signature verification in embedded Linux according to an embodiment of the present invention.

* 도면의 주요부분에 대한 부호의 설명 *Explanation of symbols on the main parts of the drawings

100 : 서명검증장치 110 : 바이너리 파일100: signature verification device 110: binary file

120 : 제어 모듈 122 : 실행 제어 모듈120: control module 122: execution control module

124 : 파일 무결성 검증 모듈 140 : 암호화 복호화 모듈124: file integrity verification module 140: encryption decryption module

150 : 제1 송수신부 200 : 서명생성장치150: first transceiver 200: signature generating device

210 : 제2 송수신부 220 : 악성 프로그램 검사 모듈210: second transceiver 220: malware inspection module

230 : 서명 생성 모듈230: signature generation module

Claims (29)

임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치에 있어서,Apparatus for Blocking Malware Using Signature Verification in Embedded Linux, 실행될 바이너리 파일에 대한 서명을 검증하고, 상기 서명 검증 결과 및 악성 프로그램 검사 결과 중 적어도 하나에 기초하여 상기 바이너리 파일의 실행 여부를 결정하는 제어 모듈;A control module for verifying a signature of a binary file to be executed and determining whether to execute the binary file based on at least one of the signature verification result and a malicious program inspection result; 상기 바이너리 파일에 대한 서명 검증 시 요구되는 암호화 및 복호화 중 적어도 하나에 대한 결과를 상기 제어 모듈에 제공하는 암호화 복호화 모듈; 및An encryption decryption module for providing a result of at least one of encryption and decryption required for verifying a signature on the binary file to the control module; And 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우 및 상기 서명 검증 결과 상기 바이너리 파일이 변경된 경우 중 어느 하나의 경우에 상기 바이너리 파일을 외부 장치에 제공하고, 상기 외부 장치로부터 상기 바이너리 파일에 대한 악성 프로그램 검사 결과를 제공 받아 상기 제어 모듈에 제공하는 제1 송수신부를 구비하는 악성 프로그램 차단 장치.In the case where there is no signature on the binary file and when the binary file is changed as a result of the signature verification, the binary file is provided to an external device, and a malicious program check for the binary file is performed from the external device. Malicious program blocking device provided with a first transceiver for receiving a result provided to the control module. 제1항에 있어서,The method of claim 1, 상기 제1 송수신부는 상기 외부 장치로부터 상기 바이너리 파일에 대한 서명을 추가로 제공 받아 상기 제어 모듈에 추가로 제공하고,The first transceiver may further receive a signature for the binary file from the external device and provide the signature to the control module. 상기 제어 모듈은 상기 제공 받은 서명을 상기 바이너리 파일에 삽입하는 것을 특징으로 하는 악성 프로그램 차단 장치.And the control module inserts the received signature into the binary file. 제2항에 있어서,The method of claim 2, 상기 제어 모듈은 상기 바이너리 파일에 악성 프로그램이 포함되지 않고 상기 바이너리 파일에 대한 서명이 없는 경우에 상기 제공 받은 서명을 상기 바이너리 파일에 삽입하는 것을 특징으로 하는 악성 프로그램 차단 장치.And the control module inserts the provided signature into the binary file when the malicious file does not contain a malicious program and there is no signature on the binary file. 제1항에 있어서,The method of claim 1, 상기 제어 모듈은,The control module, 서명 검증 결과 및 악성 프로그램 검사 결과 중 적어도 하나에 기초하여 상기 바이너리 파일의 실행 여부를 결정하는 실행 제어 모듈; 및An execution control module for determining whether to execute the binary file based on at least one of a signature verification result and a malicious program inspection result; And 상기 바이너리 파일에 대한 서명을 검증하고, 상기 바이너리 파일에 대한 서명 검증 결과 및 상기 바이너리 파일에 대한 악성 프로그램 검사 결과 중 적어도 하나를 상기 실행 제어 모듈에 제공하는 파일 무결성 검증 모듈을 구비하는 것을 특징으로 하는 악성 프로그램 차단 장치.And a file integrity verification module for verifying a signature of the binary file and providing at least one of a signature verification result of the binary file and a malicious program inspection result of the binary file to the execution control module. Malware Blocker. 제4항에 있어서,The method of claim 4, wherein 상기 제1 송수신부는 상기 외부 장치로부터 상기 바이너리 파일에 대한 서명을 추가로 제공 받아 상기 파일 무결성 검증 모듈을 경유하여 상기 제어 모듈에 추가로 제공하고,The first transceiver may further receive a signature for the binary file from the external device and provide the signature to the control module via the file integrity verification module. 상기 제어 모듈은 상기 제공 받은 서명을 상기 바이너리 파일에 삽입하는 것 을 특징으로 하는 악성 프로그램 차단 장치.And the control module inserts the received signature into the binary file. 제1항에 있어서,The method of claim 1, 상기 바이너리 파일은 ELF(Executable and Linking Format) 형식인 것을 특징으로 하는 악성 프로그램 차단 장치.The binary file is a malicious program blocking device, characterized in that the Executable and Linking Format (ELF) format. 제1항에 있어서,The method of claim 1, 상기 제어 모듈 및 상기 암호화 복호화 모듈은 임베디드 리눅스 시스템의 커널 레벨(Kernel Level)에서 동작하고,The control module and the cryptographic decryption module operate at a kernel level of an embedded Linux system, 상기 제1 송수신부는 임베디드 리눅스 시스템의 사용자 레벨(User Level)에서 동작하는 것을 특징으로 하는 악성 프로그램 차단 장치.The first transceiver unit is a malicious program blocking device, characterized in that for operating at a user level (User Level) of the embedded Linux system. 제1항에 있어서,The method of claim 1, 상기 제어 모듈은 상기 바이너리 파일이 메모리에 적재되어 실행되기 전에 상기 서명 검증 결과 및 악성 프로그램 검사 결과 중 적어도 하나에 기초하여 상기 바이너리 파일의 실행 여부를 결정하는 것을 특징으로 하는 악성 프로그램 차단 장치.And the control module determines whether to execute the binary file based on at least one of the signature verification result and the malicious program inspection result before the binary file is loaded into the memory and executed. 제8항에 있어서,The method of claim 8, 상기 제어 모듈은 상기 바이너리 파일의 실행 과정에 있어서 커널 레 벨(Kernel Level에서 후킹(Hooking)하는 것을 특징으로 하는 악성 프로그램 차단 장치.The control module is a malicious program blocking device, characterized in that for hooking (Hooking) at the kernel level (Kernel Level) in the execution process of the binary file. 제9항에 있어서,10. The method of claim 9, 상기 제어 모듈은 LSM(Linux Security Modules) 프레임 워크에 있어서 file_mmap 함수를 변경하는 것을 특징으로 하는 악성 프로그램 차단 장치.The control module is a malicious program blocking device, characterized in that for changing the file_mmap function in the Linux Security Modules (LSM) framework. 제1항에 있어서,The method of claim 1, 상기 제어 모듈은 상기 바이너리 파일에 대한 서명 검증 시 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용하는 것을 특징으로 하는 악성 프로그램 차단 장치.The control module may be configured to perform keyed-hash message authentication code message-digest algorithm 5 (HMAC-MD5), keyed-hash message authentication code secure hash agorithm-1 (HMAC-SHA-1), and RSA when verifying a signature on the binary file. Malware blocking device, characterized in that using at least one. 제1항에 있어서,The method of claim 1, 상기 제1 송수신부는 상기 외부 장치와 상기 바이너리 파일에 대한 서명 검증 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용하는 것을 특징으로 하는 악성 프로그램 차단 장치.And the first transceiver uses ISAKMP (Internet Security Association & Key Management Protocol) in exchanging a secret key required for signature verification of the binary file with the external device. 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 장치에 있어서,Apparatus for Blocking Malware Using Signature Verification in Embedded Linux, 외부 장치로부터 바이너리 파일을 제공 받는 제2 송수신부; 및A second transceiver for receiving a binary file from an external device; And 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 검사하며, 상기 악성 프로그램 검사 결과를 상기 제2 송수신부를 경유하여 상기 외부 장치에 제공하는 악성 프로그램 검사 모듈을 구비하는 악성 프로그램 차단 장치.And a malicious program inspection module configured to inspect whether the binary file includes a malicious program and provide the malicious program inspection result to the external device via the second transceiver. 제13항에 있어서,The method of claim 13, 상기 악성 프로그램 차단 장치는 상기 악성 프로그램 검사 결과 상기 바이너리 파일에 악성 프로그램이 포함되지 않은 경우에 상기 바이너리 파일에 대한 서명을 상기 제2 송수신부에 제공하는 서명 생성 모듈을 더 구비하되,The malicious program blocking device further includes a signature generation module that provides a signature for the binary file to the second transceiver when the malicious file does not include a malicious program as a result of the malicious program inspection. 상기 제2 송수신부는 상기 바이너리 파일에 대한 서명을 상기 외부 장치에 추가로 제공하는 것을 특징으로 하는 악성 프로그램 차단 장치.The second transceiver unit further provides a signature for the binary file to the external device, characterized in that the malicious program blocking device. 제14항에 있어서,The method of claim 14, 상기 서명 생성 모듈은 상기 바이너리 파일에 대한 서명 생성 시 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용하는 것을 특징으로 하는 악성 프로그램 차단 장치.The signature generation module generates keyed-hash message authentication code message-digest algorithm 5 (HMAC-MD5), keyed-hash message authentication code secure hash algorithm-1 (HMAC-SHA-1), and RSA when generating a signature for the binary file. Malware blocking device, characterized in that using at least one of. 제14항에 있어서,The method of claim 14, 상기 제2 송수신부는 상기 외부 장치와 상기 바이너리 파일에 대한 서명 생성 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용하는 것을 특징으로 하는 악성 프로그램 차단 장치.And the second transmitter / receiver uses ISAKMP (Internet Security Association & Key Management Protocol) in exchanging a secret key required for generating a signature for the binary file with the external device. 제13항에 있어서,The method of claim 13, 상기 바이너리 파일은 ELF(Executable and Linking Format) 형식인 것을 특징으로 하는 악성 프로그램 차단 장치.The binary file is a malicious program blocking device, characterized in that the Executable and Linking Format (ELF) format. 임베디드 리눅스에서 서명 검증 방식을 이용한 악성 프로그램 차단 방법에 있어서,A method for blocking malicious programs using signature verification in embedded Linux, 실행될 바이너리 파일에 대한 서명이 존재하는지 여부를 판단하는 단계;Determining whether a signature exists for the binary file to be executed; 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우에 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 판단하는 단계; 및Determining whether a malicious program is included in the binary file when a signature for the binary file does not exist; And 상기 바이너리 파일에 악성 프로그램이 포함되는 경우에 상기 바이너리 파일의 실행을 차단하는 단계를 포함하는 악성 프로그램 차단 방법.Blocking the execution of the binary file when the binary file includes a malicious program. 제18항에 있어서,The method of claim 18, 상기 악성 프로그램 차단 방법은, 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우에 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 판단하 는 단계 후에,The malicious program blocking method may include determining whether a malicious program is included in the binary file when there is no signature on the binary file. 상기 바이너리 파일에 악성 프로그램이 포함되지 않는 경우에 상기 바이너리 파일에 대한 서명을 생성하는 단계;Generating a signature for the binary file if the malicious file does not contain a malicious program; 상기 생성된 서명을 상기 바이너리 파일에 삽입하는 단계; 및Inserting the generated signature into the binary file; And 상기 바이너리 파일의 실행을 허용하는 단계를 더 포함하는 것을 특징으로 하는 악성 프로그램 차단 방법.And blocking the execution of the binary file. 제19항에 있어서,The method of claim 19, 상기 바이너리 파일에 악성 프로그램이 포함되지 않는 경우에 상기 바이너리 파일에 대한 서명을 생성하는 단계는If the binary file does not contain a malicious program, generating a signature for the binary file may include 상기 바이너리 파일에 대한 서명 생성 시 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용하는 것을 특징으로 하는 악성 프로그램 차단 방법.At least one of HMAC-MD5 (keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1 (keyed-Hash Message Authentication Code Secure Hash Algorithm-1) and RSA is used to generate the signature for the binary file. Malicious program blocking method characterized in that. 제19항에 있어서,The method of claim 19, 상기 바이너리 파일에 악성 프로그램이 포함되지 않는 경우에 상기 바이너리 파일에 대한 서명을 생성하는 단계는If the binary file does not contain a malicious program, generating a signature for the binary file may include 상기 바이너리 파일에 대한 서명 생성 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용하는 것을 특징으로 하는 악성 프로그램 차단 방법.A method for blocking malicious programs, comprising using ISAKMP (Internet Security Association & Key Management Protocol) in exchanging a secret key required to generate a signature for the binary file. 제18항에 있어서,The method of claim 18, 상기 악성 프로그램 차단 방법은, 상기 실행될 바이너리 파일에 대한 서명이 존재하는지 여부를 판단하는 단계 후에,The malicious program blocking method, after determining whether a signature exists for the binary file to be executed, 상기 바이너리 파일에 대한 서명이 존재하는 경우에 상기 바이너리 파일에 대한 서명을 검증하는 단계; 및Verifying a signature on the binary file if a signature exists on the binary file; And 상기 검증 결과 상기 바이너리 파일이 변경되지 않은 경우에 상기 바이너리 파일의 실행을 허용하는 단계를 더 포함하되,Allowing execution of the binary file when the binary file has not changed as a result of the verification, 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우에 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 판단하는 단계는In the case where the signature for the binary file does not exist, determining whether the binary file includes a malicious program 상기 바이너리 파일에 대한 서명이 존재하지 않는 경우 및 상기 검증 결과 상기 바이너리 파일이 변경된 경우 중 어느 하나의 경우에 상기 바이너리 파일에 악성 프로그램이 포함되는지 여부를 판단하는 것을 특징으로 하는 악성 프로그램 차단 방법.And determining whether a binary program is included in the binary file when the signature on the binary file does not exist and when the binary file is changed as a result of the verification. 제22항에 있어서,The method of claim 22, 상기 바이너리 파일에 대한 서명이 존재하는 경우에 상기 바이너리 파일에 대한 서명을 검증하는 단계는Verifying the signature on the binary file if the signature exists on the binary file 상기 바이너리 파일에 대한 서명 검증 시 HMAC-MD5(keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1(keyed-Hash Message Authentication Code Secure Hash Algorithm-1) 및 RSA 중 적어도 하나를 사용하는 것을 특징으로 하는 악성 프로그램 차단 방법.At least one of HMAC-MD5 (keyed-Hash Message Authentication Code Message-Digest algorithm 5), HMAC-SHA-1 (keyed-Hash Message Authentication Code Secure Hash Algorithm-1) and RSA is used to verify the signature on the binary file. Malicious program blocking method characterized in that. 제22항에 있어서,The method of claim 22, 상기 바이너리 파일에 대한 서명이 존재하는 경우에 상기 바이너리 파일에 대한 서명을 검증하는 단계는Verifying the signature on the binary file if the signature exists on the binary file 상기 바이너리 파일에 대한 서명 검증 시 요구되는 비밀 키를 교환함에 있어서 ISAKMP(Internet Security Association & Key Management Protocol)를 사용하는 것을 특징으로 하는 악성 프로그램 차단 방법.A method for blocking malicious programs, comprising using ISAKMP (Internet Security Association & Key Management Protocol) in exchanging a secret key required for signature verification of the binary file. 제18항에 있어서,The method of claim 18, 상기 바이너리 파일은 ELF(Executable and Linking Format) 형식인 것을 특징으로 하는 악성 프로그램 차단 방법.The binary file is a malicious program blocking method characterized in that the Executable and Linking Format (ELF) format. 제18항에 있어서,The method of claim 18, 상기 악성 프로그램 차단 방법은 상기 바이너리 파일이 메모리에 적재되어 실행되기 전에 동작하는 것을 특징으로 하는 악성 프로그램 차단 방법.The malicious program blocking method is operable before the binary file is loaded into memory and executed. 제26항에 있어서,The method of claim 26, 상기 악성 프로그램 차단 방법은 상기 바이너리 파일의 실행 과정에 있어서 커널(Kernel) 레벨에서 후킹(Hooking)하는 것을 특징으로 하는 악성 프로그램 차단 방법.The malicious program blocking method is characterized in that the hooking (Hooking) at the kernel level (Kernel) in the execution process of the binary file. 제27항에 있어서,The method of claim 27, 상기 악성 프로그램 차단 방법은 LSM(Linux Security Modules) 프레임 워크에 있어서 file_mmap 함수를 변경하는 것을 특징으로 하는 악성 프로그램 차단 방법.The malicious program blocking method, characterized in that for changing the file_mmap function in the Linux Security Modules (LSM) framework. 제18항 내지 제28항 중 어느 한 항에 따른 방법을 수행하는 프로그램이 기록된 컴퓨터가 판독 가능한 기록매체.A computer-readable recording medium having recorded thereon a program for performing the method according to any one of claims 18 to 28.
KR1020080113791A 2008-11-17 2008-11-17 Apparatus and method for preventing malware using signature verification for embedded linux KR20100054940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080113791A KR20100054940A (en) 2008-11-17 2008-11-17 Apparatus and method for preventing malware using signature verification for embedded linux

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080113791A KR20100054940A (en) 2008-11-17 2008-11-17 Apparatus and method for preventing malware using signature verification for embedded linux

Publications (1)

Publication Number Publication Date
KR20100054940A true KR20100054940A (en) 2010-05-26

Family

ID=42279489

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080113791A KR20100054940A (en) 2008-11-17 2008-11-17 Apparatus and method for preventing malware using signature verification for embedded linux

Country Status (1)

Country Link
KR (1) KR20100054940A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101126532B1 (en) * 2011-09-01 2012-03-22 주식회사 윈스테크넷 Malware execution preventing method based on positive security using reputation information and system thereof
KR101320680B1 (en) * 2011-10-26 2013-11-21 (주)유성글로벌 Method and apparatus for integrity check of software
KR101463873B1 (en) * 2011-09-30 2014-11-20 주식회사 엔피코어 Method and apparatus for preventing data loss
US8955056B2 (en) 2012-02-24 2015-02-10 Pantech Co., Ltd. Terminal and method for assigning permission to application
US9323927B2 (en) 2013-11-04 2016-04-26 Electronics And Telecommunications Reseach Instit Apparatus and method for guaranteeing safe execution of shell command in embedded system
KR20170020137A (en) * 2015-08-13 2017-02-22 삼성전자주식회사 Method for Managing Program and Electronic Device supporting the same
KR102174629B1 (en) * 2020-02-18 2020-11-05 한화시스템 주식회사 Apparatus and method for encrypting data in communication system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101126532B1 (en) * 2011-09-01 2012-03-22 주식회사 윈스테크넷 Malware execution preventing method based on positive security using reputation information and system thereof
KR101463873B1 (en) * 2011-09-30 2014-11-20 주식회사 엔피코어 Method and apparatus for preventing data loss
KR101320680B1 (en) * 2011-10-26 2013-11-21 (주)유성글로벌 Method and apparatus for integrity check of software
US8955056B2 (en) 2012-02-24 2015-02-10 Pantech Co., Ltd. Terminal and method for assigning permission to application
US9323927B2 (en) 2013-11-04 2016-04-26 Electronics And Telecommunications Reseach Instit Apparatus and method for guaranteeing safe execution of shell command in embedded system
KR20170020137A (en) * 2015-08-13 2017-02-22 삼성전자주식회사 Method for Managing Program and Electronic Device supporting the same
KR102174629B1 (en) * 2020-02-18 2020-11-05 한화시스템 주식회사 Apparatus and method for encrypting data in communication system

Similar Documents

Publication Publication Date Title
Bhat et al. A survey on various threats and current state of security in android platform
US9514300B2 (en) Systems and methods for enhanced security in wireless communication
Dunn et al. Cloaking malware with the trusted platform module
US9413742B2 (en) Systems, methods and apparatus to apply permissions to applications
Ter Louw et al. Enhancing web browser security against malware extensions
US8474032B2 (en) Firewall+ storage apparatus, method and system
Böck et al. Towards more trustable log files for digital forensics by means of “trusted computing”
Xu et al. Data-provenance verification for secure hosts
US11392724B2 (en) Method for accelerating execution of application in a trusted execution environment
Löhr et al. Patterns for secure boot and secure storage in computer systems
KR20100054940A (en) Apparatus and method for preventing malware using signature verification for embedded linux
EP3217310A1 (en) Hypervisor-based attestation of virtual environments
Johnston et al. Recommendations for securing Internet of Things devices using commodity hardware
Apvrille et al. DigSig: Runtime Authentication of Binaries at Kernel Level.
Wong et al. On the security of containers: Threat modeling, attack analysis, and mitigation strategies
Suciu et al. Horizontal privilege escalation in trusted applications
Wong et al. Threat modeling and security analysis of containers: A survey
Hosseinzadeh et al. Recent trends in applying TPM to cloud computing
Qin et al. RIPTE: runtime integrity protection based on trusted execution for IoT device
Bhudia et al. RansomClave: ransomware key management using SGX
Jeong et al. MysteryChecker: Unpredictable attestation to detect repackaged malicious applications in Android
Safford et al. A trusted linux client (tlc)
Gupta et al. Security and Cryptography
KR20150089696A (en) Integrity Verification System and the method based on Access Control and Priority Level
Sisinni Verification of Software Integrity in Distributed Systems

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application