KR20200097416A - Processor including isolated interrupt handler for securing input channel on sgx and interrupt processing method thereof - Google Patents
Processor including isolated interrupt handler for securing input channel on sgx and interrupt processing method thereof Download PDFInfo
- Publication number
- KR20200097416A KR20200097416A KR1020190014745A KR20190014745A KR20200097416A KR 20200097416 A KR20200097416 A KR 20200097416A KR 1020190014745 A KR1020190014745 A KR 1020190014745A KR 20190014745 A KR20190014745 A KR 20190014745A KR 20200097416 A KR20200097416 A KR 20200097416A
- Authority
- KR
- South Korea
- Prior art keywords
- input
- processor
- data
- enclave
- area
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/52—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
- G06F21/53—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2149—Restricted operating environment
Abstract
Description
실시예들은 입력 디바이스를 통해 입력되는 데이터의 보안과 관련된 것으로, 프로세서에 의해 실행되는 어플리케이션 및 어플리케이션에 대해 입력 디바이스를 통해 입력되는 데이터가 입력되는 입력 채널을 안전하게 보호하는 장치 및 방법에 관한 것이다.The embodiments relate to security of data input through an input device, and to an apparatus and method for safely protecting an application executed by a processor and an input channel through which data input through an input device is input for an application.
최근 프로세서에 의해 실행되는 어플리케이션(예컨대, 어플리케이션의 코드)이나 어플리케이션에 대해 입력 디바이스를 통해 입력되는 데이터의 보안에 관한 관심이 높아지고 있다.Recently, interest in security of an application (eg, an application code) executed by a processor or data input through an input device for an application is increasing.
이와 관련하여, 인텔(Intel)의 프로세서는 SGX(cSoftware Guard Extensions)와 같은 보호 기능을 개발하였다. SGX는 소프트웨어의 공격에 취약하거나 민감한 영역을 별도로 암호화해 보호하기 위한 기능으로, CPU의 확장 권한으로도 관련 내용을 파악할 수 없는 프로세서 내부의 별도 공간인 인클레이브(enclave)라는 암호화 영역을 마련하는 것을 특징으로 하고 있다. 이를 통해, 어플리케이션에서 처리하는 데이터에 대한 보안 강도를 높일 수 있고, 어플리케이션과 연관된 코드가 드러나거나 수정되는 것을 방지할 수 있다. In this regard, Intel's processors have developed protection functions such as cSoftware Guard Extensions (SGX). SGX is a function to separately encrypt and protect areas that are vulnerable or sensitive to attacks by software, and it is necessary to establish an encryption area called enclave, which is a separate space inside the processor where related contents cannot be identified even with the extended authority of the CPU. It is characterized. Through this, it is possible to increase the security strength for data processed by the application, and to prevent the application-related code from being exposed or modified.
현재의 상용 TEE(trusted execution environment) 솔루션들은 어플리케이션 로직들의 일부(Piece of Application Logics; PAL) 또는 전체의 OS 및 보안 앱들을 보호한다. 인텔의 SGX와 같이 PAL들만을 보호하는 경우, 데이터의 입출력 채널에 해당하는 I/O에 대해서는 보안이 보장되지 않으므로 그 실용성이 제한적이다. 한편, 전체의 OS 및 보안 앱들을 보호하는 솔루션(예컨대, ARM TrustZone) 경우에는 막대한 TCB(Trusted Computing Base)를 요구한다. 이 때, 보안 OS에서의 하나의 버그는 동일 시스템에 상주하는 모든 컴포넌트들을 오염(corrupt)시킬 수 있다. Current commercial TEE (trusted execution environment) solutions protect pieces of application logics (PAL) or the entire OS and security apps. In the case of protecting only PALs like Intel's SGX, security is not guaranteed for I/O corresponding to the input/output channel of data, so its practicality is limited. On the other hand, in the case of a solution (eg, ARM TrustZone) that protects the entire OS and security apps, an enormous TCB (Trusted Computing Base) is required. In this case, one bug in the security OS can corrupt all components residing in the same system.
따라서, 데이터의 입출력 채널을 안전하게 보호하면서 TCB를 경제성 있게 줄일 수 있도록 하는 방법 및 프로세서의 구조가 요구된다.Accordingly, there is a need for a method and a structure of a processor that can economically reduce TCB while safely protecting input/output channels of data.
한국공개특허 제10-2009-0130121호(공개일: 2009년 12월 17일)에서는, 소프트웨어(software)의 일부(portion)를 실행하기 위해 보안 컴퓨팅(computing) 환경을 수립하고 실시하기 위한 장치, 시스템 및 방법과 관련된 것으로, 컴퓨팅 환경 자원(resource)으로의 제한된 접근(access)을 제공하는 환경에서 소프트웨어의 일부를 실행하는 보안 프로세서를 제공하는 기술을 개시하고 있다.In Korean Patent Publication No. 10-2009-0130121 (published date: December 17, 2009), an apparatus for establishing and implementing a secure computing environment in order to execute a portion of software, In relation to a system and a method, a technology for providing a security processor that executes a part of software in an environment that provides limited access to a computing environment resource is disclosed.
상기에서 설명된 정보는 단지 이해를 돕기 위한 것이며, 종래 기술의 일부를 형성하지 않는 내용을 포함할 수 있으며, 종래 기술이 통상의 기술자에게 제시할 수 있는 것을 포함하지 않을 수 있다.The information described above is for illustrative purposes only, may include content that does not form part of the prior art, and may not include what the prior art may present to a person skilled in the art.
일 실시예는, 프로세서에 의해 실행되는 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 입력 디바이스와의 인터페이스를 포함하며, OS와 같은 소프트웨어로부터는 접근이 불가능하도록 구성되는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 포함하는 프로세서가 제공된다.In one embodiment, an isolated interrupt handler configured such that an enclave area associated with an application executed by a processor is accessible, includes an interface with an input device, and cannot be accessed from software such as an OS. ; A processor including I2H) is provided.
일 측면에 있어서, 프로세서에 있어서, 상기 프로세서에 의해 실행되는 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 상기 어플리케이션에 대해 데이터를 입력하기 위해 사용되는 입력 디바이스와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 포함하고, 상기 I2H는 상기 프로세서와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성되는, 프로세서가 제공된다.In one aspect, in the processor, an enclave area associated with an application executed by the processor is accessible, and an isolated interrupt handler comprising an interface with an input device used to input data for the application ( Isolated Interrupt Handler; I2H), wherein the I2H is configured to be inaccessible from system software associated with the processor.
상기 I2H는 상기 입력 디바이스를 위한 적어도 하나의 보안 드라이버를 제공할 수 있다. The I2H may provide at least one security driver for the input device.
상기 보안 드라이버는 커널(kernel)의 임계 영역(critical region)을 위한 고립된 실행 환경을 제공하기 위해 사용될 수 있다. The security driver may be used to provide an isolated execution environment for a critical region of a kernel.
상기 프로세서에 의해 실행되는 복수의 어플리케이션들의 각각과 연관하여 인클레이브 영역이 존재할 수 있다. An enclave area may exist in association with each of a plurality of applications executed by the processor.
상기 복수의 어플리케이션들과 연관된 인클레이브 영역들은 상기 보안 드라이버를 공유하여 사용할 수 있다. Enclave areas associated with the plurality of applications may share and use the security driver.
상기 인클레이브 영역은 상기 I2H에 접근하기 위한 인터페이스를 포함하고, 상기 I2H는 공유 데이터 영역(shared data region)을 포함하고, 상기 인클레이브 영역은 상기 입력 디바이스를 통해 입력된 데이터를 획득하기 위해 상기 인클레이브 영역의 인터페이스를 통해 상기 공유 데이터 영역에 접근할 수 있다. The enclave area includes an interface for accessing the I2H, the I2H includes a shared data region, and the enclave area is the phosphorus to obtain data input through the input device. The shared data area can be accessed through the interface of the clave area.
상기 인클레이브 영역은, 루트킷(rootkit)이 상기 인클레이브 영역과 상기 I2H 사이에서의 데이터 전달 동안 접근할 수 없도록, 소정의 보안 명령을 사용하여 상기 공유 데이터 영역을 제어할 수 있다. The enclave area may control the shared data area using a predetermined security command so that a rootkit cannot access it during data transfer between the enclave area and the I2H.
상기 인터페이스는 상기 입력 디바이스를 위한 I/O 포트이고, 상기 I/O 포트는 상기 I2H에 대한 소정의 명령(instruction)에 따라 잠금 또는 잠금 해제되고, 상기 I/O 포트가 잠긴 상태에서 상기 I/O 포트는 상기 I2H를 통해서만 독점적으로 사용될 수 있다. The interface is an I/O port for the input device, the I/O port is locked or unlocked according to a predetermined instruction for the I2H, and the I/O port is locked while the I/O port is locked. The O port can be used exclusively through the I2H.
상기 I/O 포트가 잠긴 상태에서, 상기 I/O 포트에 대한 접근이 요청되는 경우 상기 요청에 대해서는 쓰레기 값(garbage value)이 반환될 수 있다. When access to the I/O port is requested while the I/O port is locked, a garbage value may be returned for the request.
상기 I2H를 생성하는 동작, 생성된 I2H에 대해 콘텐츠(contents)를 부가하는 동작 및 상기 I2H로 진입하는(jump into) 동작은 각각 소정의 명령에 따라 수행될 수 있다. The operation of generating the I2H, the operation of adding contents to the generated I2H, and the operation of jumping into the I2H may each be performed according to a predetermined command.
상기 입력 디바이스를 통한 데이터의 입력에 따른 인터럽트가 발생한 경우, 상기 I2H와 연관된 플로우가 진행되지 않으면 상기 I2H와 연관된 플로우가 진행되지 않았음을 나타내는 검출 정보가 생성될 수 있다. When an interrupt according to the input of data through the input device occurs, detection information indicating that the flow associated with the I2H does not proceed may be generated if the flow associated with the I2H does not proceed.
다른 일 측면에 있어서, 어플리케이션을 실행하는 프로세서 및 상기 어플리케이션을 실행하기 위해 요구되는 데이터를 적어도 임시적으로 저장하는 메모리를 포함하고, 상기 프로세서는, 상기 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 상기 어플리케이션에 대해 데이터를 입력하기 위해 사용되는 입력 디바이스와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 포함하고, 상기 I2H는 상기 프로세서와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성되는, 컴퓨터가 제공된다. In another aspect, a processor for executing an application and a memory for temporarily storing at least data required to execute the application are included, wherein the processor has access to an enclave area associated with the application, and the application An Isolated Interrupt Handler (I2H) comprising an interface with an input device used to input data for, wherein the I2H is configured to be inaccessible from system software associated with the processor, A computer is provided.
또 다른 일 측면에 있어서, 프로세서에 의해 수행되는, 입력 디바이스를 통한 데이터 입력에 따른 인터럽트를 처리하는 방법에 있어서, 상기 프로세서에 의해 실행되는 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 상기 입력 디바이스와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 생성하는 단계 - 상기 I2H는 상기 프로세서와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성됨 -, 소정의 명령(instruction)에 기반하여, 상기 인터페이스로서 I/O 포트를 잠금 또는 잠금 해제하는 단계 - 상기 I/O 포트가 잠긴 상태에서 상기 I/O 포트는 상기 I2H를 통해서만 독점적으로 사용됨 - 및 상기 I2H를 통해 상기 입력 디바이스를 통해 입력된 데이터에 대응하는 코드를 수신하는 단계를 포함하는, 인터럽트를 처리하는 방법이 제공된다.In another aspect, in a method of processing an interrupt according to data input through an input device performed by a processor, an enclave area associated with an application executed by the processor is accessible, and the input device and Generating an Isolated Interrupt Handler (I2H) including an interface of-The I2H is configured to be inaccessible from system software associated with the processor -, based on a predetermined instruction, the Locking or unlocking an I/O port as an interface-When the I/O port is locked, the I/O port is exclusively used through the I2H-and data input through the input device through the I2H A method of handling an interrupt is provided, comprising receiving a code corresponding to.
상기 인터럽트를 처리하는 방법은 상기 I/O 포트가 잠긴 상태에서, 상기 I2H에 대한 진입 없이, 상기 I/O 포트에 대한 접근이 요청되는 경우 상기 요청에 대해서는 쓰레기 값(garbage value)을 반환하는 단계를 더 포함할 수 있다. The method of handling the interrupt includes the steps of returning a garbage value for the request when access to the I/O port is requested without entering the I2H while the I/O port is locked. It may further include.
상기 인클레이브 영역에는 상기 I2H에 접근하기 위한 인터페이스가 포함되고, 상기 I2H에는 공유 데이터 영역(shared data region)이 포함되고, 상기 인클레이브 영역은 상기 입력 디바이스를 통해 입력된 데이터를 획득하기 위해 상기 인클레이브 영역의 인터페이스를 통해 상기 공유 데이터 영역에 접근하되, 루트킷(rootkit)이 상기 인클레이브 영역과 상기 I2H 사이에서의 데이터 전달 동안 접근할 수 없도록, 소정의 보안 명령을 사용하여 상기 공유 데이터 영역에 접근할 수 있다. The enclave area includes an interface for accessing the I2H, the I2H includes a shared data region, and the enclave area is used to obtain the data input through the input device. Access the shared data area through the interface of the clave area, but access the shared data area using a predetermined security command so that the rootkit cannot access during data transfer between the enclave area and the I2H can do.
또 다른 일 측면에 있어서, 어플리케이션을 실행하는 프로세서를 위한 아키텍처에 있어서, 상기 프로세서는, 상기 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 상기 어플리케이션에 대해 데이터를 입력하기 위해 사용되는 입력 디바이스와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 포함하고, 상기 I2H는 상기 프로세서와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성되는, 아키텍처가 제공된다. In yet another aspect, in an architecture for a processor that executes an application, the processor is an interface with an input device that is accessible to an enclave area associated with the application and is used to input data for the application An architecture is provided that includes an Isolated Interrupt Handler (I2H), wherein the I2H is configured to be inaccessible from system software associated with the processor.
인클레이브 영역이 접근 가능하고, 입력 디바이스와의 인터페이스를 포함하며, OS와 같은 시스템 소프트웨어로부터는 접근이 불가능하도록 구성되는 I2H를 사용함으로써, 입출력 채널에 대한 보호가 제대로 이루어지지 않는 인텔의 SGX에 비해 공격자 또는 루트킷(rootkit)으로부터 입력 채널을 제대로 보호할 수 있다.Compared to Intel's SGX, which is not properly protected for input/output channels, by using I2H, the enclave area is accessible, includes the interface with the input device, and is not accessible from system software such as OS. It can properly protect the input channel from attackers or rootkits.
I2H를 통해 복수의 인클레이브들(인클레이브 영역들)에 대한 보안 드라이버가 공유됨으로써 인클레이브마다 동일한 드라이버를 중복으로 배치할 필요 없이 경제적인 방식으로 입출력 재널에 대한 보호를 실현할 수 있다. By sharing security drivers for multiple enclaves (enclave areas) through I2H, protection for input/output channels can be realized in an economical manner without the need to redundantly deploy the same driver for each enclave.
도 1은 일 실시예에 따른 컴퓨터 시스템을 나타낸다.
도 2는 예시적인 일반 시스템과 보안 시스템 간의 비교를 나타낸다.
도 3은 예시적인 각 인클레이브 영역에 드라이버를 배치하고 하이퍼바이저를 이용하여 입출력 채널을 보호하는 방법을 나타낸다.
도 4는 일 실시예에 따른 I2H를 사용하여 입출력 채널을 보호하는 방법을 나타낸다.
도 5는 일 예에 따른 I2H의 구성을 나타낸다.
도 6은 예시적인 루트킷의 I/O 포트에 대한 접근 공격에 대한 프로세서의 동작을 나타낸다.
도 7은 일 예에 따른 루트킷의 I/O 포트에 대한 접근 공격에 대한 I2H를 사용하는 프로세서의 동작을 나타낸다.
도 8은 예시적인 입력 디바이스를 통해 입력된 데이터에 인클레이브가 접근하는 방법을 나타낸다.
도 9는 일 예에 따른 입력 디바이스를 통해 입력된 데이터에 인클레이브가 I2H의 공유 데이터 영역을 통해 접근하는 방법을 나타낸다.
도 10은 일 예에 따른 입력 디바이스를 통한 데이터의 입력에 따른 인터럽트가 발생한 경우의 인터럽트 처리 방법을 나타낸다.
도 11은 일 실시예에 따른 I2H를 포함하는 프로세서에 의한 입력 디바이스를 통한 데이터 입력에 따른 인터럽트를 처리하는 방법을 나타내는 흐름도이다. 1 shows a computer system according to an embodiment.
2 shows a comparison between an exemplary general system and a security system.
3 illustrates a method of disposing drivers in each exemplary enclave area and protecting an input/output channel using a hypervisor.
4 illustrates a method of protecting an input/output channel using I2H according to an embodiment.
5 shows the configuration of I2H according to an example.
6 shows an operation of a processor in response to an access attack on an I/O port of an exemplary rootkit.
7 illustrates an operation of a processor using I2H against an attack on an I/O port of a rootkit according to an example.
8 shows how an Enclave accesses data entered through an exemplary input device.
9 illustrates a method in which an enclave accesses data input through an input device through a shared data area of I2H according to an example.
10 illustrates an interrupt processing method when an interrupt occurs due to data input through an input device according to an example.
11 is a flowchart illustrating a method of processing an interrupt according to data input through an input device by a processor including I2H according to an exemplary embodiment.
이하에서, 첨부된 도면을 참조하여 실시예들을 상세하게 설명한다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. The same reference numerals in each drawing indicate the same members.
도 1은 일 실시예에 따른 컴퓨터 시스템을 나타낸다.1 shows a computer system according to an embodiment.
컴퓨터 시스템(100)은 어플리케이션 및/또는 프로그램을 실행할 수 있는 컴퓨팅 장치(컴퓨터 또는 서버)를 포함할 수 있다. 컴퓨터 시스템(100)을 통해 실행되는 어플리케이션 및/또는 프로그램은 데이터의 입력 및/또는 출력에 있어서 보안이 요구되는 소프트웨어일 수 있다. 예컨대, 컴퓨터 시스템(100)을 통해 실행되는 어플리케이션 및/또는 프로그램 금융 서비스 및 거래를 위해 사용되는 소프트웨어일 수 있다. The
컴퓨터 시스템(100)은 스마트 폰, PC(personal computer), 노트북 컴퓨터(laptop computer), 랩탑 컴퓨터(laptop computer), 태블릿(tablet), 사물 인터넷(Internet Of Things) 기기, 또는 웨어러블 컴퓨터(wearable computer) 등의 사용자가 사용하는 단말(또는 그 일부)일 수 있다. 또는, 컴퓨터 시스템(100)은 서버 또는 그 일부일 수 있다. 컴퓨터 시스템(100)은 사물인터넷(IoT) 환경에서 동작하는 장치일 수 있다. The
말하자면, 컴퓨터 시스템(100)은 후술될 실시예들에 따른 입출력 채널을 보호하는 방법을 구현할 수 있는 프로세서를 포함하는 여하한 컴퓨팅 장치 또는 그 일부일 수 있다. That is to say, the
컴퓨터 시스템(100)은 프로세서(110) 및 메모리(120)를 포함할 수 있다.
프로세서(110)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 실행되는 컴퓨터 프로그램 및/또는 어플리케이션의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(120) 또는 도시되지 않은 통신 모듈에 의해 프로세서(110)로 제공될 수 있다. 예를 들어, 프로세서(110)는 메모리(120)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The
프로세서(110)는 컴퓨터 시스템(100)의 구성 요소들을 관리할 수 있고, 프로그램 및/또는 어플리케이션의 실행 및 데이터의 처리 등에 필요한 연산을 처리하는 구성으로서 CPU 또는 GPU와 같은 구성일 수 있고, 또는 CPU 또는 GPU의 적어도 하나의 코어(core)일 수 있다.The
메모리(120)는 프로세서(110)에 의해 실행되는 어플리케이션 및/또는 프로그램을 실행하기 위해 요구되는 데이터를 적어도 임시적으로 저장하기 위한 구성일 수 있다. 메모리(120)는 비-일시적인 컴퓨터 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory), 디스크 드라이브, SSD(solid state drive), 플래시 메모리(flash memory) 등과 같은 비소멸성 대용량 저장 장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM, SSD, 플래시 메모리, 디스크 드라이브 등과 같은 비소멸성 대용량 저장 장치는 메모리(120)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 시스템(100) 내에 존재할 수 있다. 또한, 메모리(120)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(120)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독가능한 기록매체가 아닌 통신 모듈을 통해 메모리(120)에 로딩될 수도 있다. 예를 들어, 적어도 하나의 프로그램은 개발자들 또는 어플리케이션의 설치 파일을 배포하는 파일 배포 시스템(예컨대, 외부 서버)을 통해 제공하는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 메모리(120)에 로딩될 수도 있다.The
도시되지 않은 통신 모듈은 네트워크를 통해 컴퓨터 시스템(100)이 다른 전자기기 또는 서버와 서로 통신하기 위한 기능을 제공할 수 있다. 통신 모듈은 컴퓨터 시스템(100)의 네트워크 인터페이스 카드, 네트워크 인터페이스 칩 및 네트워킹 인터페이스 포트 등과 같은 하드웨어 모듈 또는 네트워크 디바이스 드라이버(driver) 또는 네트워킹 프로그램과 같은 소프트웨어 모듈일 수 있다. A communication module, not shown, may provide a function for the
컴퓨터 시스템(100)은 입력 디바이스(130)를 포함하거나 입력 디바이스와 접속될 수 있다. 입력 디바이스(130)는 키보드, 마우스, 마이크로폰, 카메라 등의 장치를 포함할 수 있다. 한편, 컴퓨터 시스템(100)은 도시되지 않은 출력 장치를 포함하거나 출력 장치와 접속될 수 있다. 출력 장치는 디스플레이, 화자, 햅틱 피드백 디바이스(haptic feedback device) 등과 같은 장치를 포함할 수 있다.
또는, 입력 디바이스(130)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치일 수 있다. 입력 디바이스(130)는 도시된 것처럼 컴퓨터 시스템(100)과는 별개의 장치이거나 컴퓨터 시스템(100)에 포함되는 구성일 수 있다. 컴퓨터 시스템(100)은 입력 디바이스(130)와의 인터페이스를 위한 수단으로서 입출력 인터페이스를 더 포함할 수 있다. 설명한 것처럼 유사하게 컴퓨터 시스템(100)은 출력 디바이스와 접속되거나 출력 디바이스를 포함하도록 구성될 수 있다. Alternatively, the
프로세서(110)에는 실행되는 어플리케이션과 연관된 인클레이브 영역이 마련될 수 있고, 이러한 인클레이브 영역이 접근 가능하고, 입력 디바이스(130)와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)가 마련될 수 있다. I2H는 (예컨대, OS와 같은) 시스템 소프트웨어로부터는 접근이 불가능하도록 구성될 수 있다. 실시예들에서는, 이러한 I2H를 프로세서(110) 내에 마련하는 것을 통해 입력 디바이스(130)와 연관된 입출력 채널에 대한 보호를 강화할 수 있다.The
I2H를 사용하여 입력 디바이스(130)와 연관된 입출력 채널에 대한 보호를 강화하는 보다 구체적인 방법에 대해서는 후술될 도 2 내지 도 11을 참조하여 더 자세하게 설명된다. A more specific method of enhancing protection for the input/output channel associated with the
도 2는 예시적인 일반 시스템과 보안 시스템 간의 비교를 나타낸다.2 shows a comparison between an exemplary general system and a security system.
도 2의 좌측 그림에서는, 프로세서에서 실행되는 어플리케이션 및 어플리케이션에 대해 입력되는 데이터에 대해 보안 기능이 적용되지 않는 경우의 예를 나타낸다. 도시된 어플리케이션은 프로세서에 의해 실행되는 어플리케이션을 나타낸다. OS는 도시된 것처럼, 프로세서를 관리하는 프로세서 관리부, 어플리케이션과 연관하여 데이터의 입력/출력을 가능하게 하는 디바이스들에 대한 디바이스 드라이버들, 메모리를 관리하는 메모리 관리부 및 파일 시스템을 포함할 수 있다. The left figure of FIG. 2 shows an example in which a security function is not applied to an application executed in a processor and data input to an application. The illustrated application represents an application executed by a processor. As illustrated, the OS may include a processor manager for managing a processor, device drivers for devices that enable data input/output in association with an application, a memory manager for managing memory, and a file system.
도 2의 우측 그림은 프로세서에서 실행되는 어플리케이션 및 어플리케이션에 대해 입력되는 데이터에 대해 보안 기능이 적용되는 경우의 실시예를 나타낸다. 프로세서에 의해 실행되는 어플리케이션은 보안 어플리케이션으로, OS는 보안 OS로 도시되었다. 보안 OS는 프로세서 관리부 및 어플리케이션과 연관하여 데이터의 입력/출력을 가능하게 하는 디바이스들에 대한 보안 드라이버들과 메모리 관리부를 포함할 수 있다. 도시되지는 않았으나 보안 OS는 파일 시스템을 더 포함할 수 있다. 도시된 것처럼 보안 어플리케이션은 입력 디바이스를 통해 입력된 데이터에 대해 보안 드라이버를 통한 보안 경로를 사용하여 접근할 수 있다. The right diagram of FIG. 2 shows an embodiment in which a security function is applied to an application executed in a processor and data input to an application. The application executed by the processor is shown as a security application, and the OS is shown as a security OS. The security OS may include a processor manager and a memory manager and security drivers for devices that enable data input/output in association with an application. Although not shown, the security OS may further include a file system. As shown, the security application can access data input through an input device using a secure path through a security driver.
도 2의 우측 그림에서 도시된 보안 기능을 사용하는 아키텍처는 전술된 ARM의 TrustZone을 적용한 아키텍처에 대응할 수 있다. The architecture using the security function shown in the right figure of FIG. 2 may correspond to the architecture to which the above-described TrustZone of ARM is applied.
기타 상용 TEE(예컨대, 인텔의 SCX)에 대해, TrustPath를 적용한 아키텍처 및 실시예들의 I2H를 적용안 아키텍처에 대해서는 후술될 도 3 내지 도 11을 참조하여 더 자세하게 설명된다. For other commercial TEEs (eg, Intel's SCX), the architecture to which TrustPath is applied and the architecture to which I2H is applied in embodiments will be described in more detail with reference to FIGS. 3 to 11 to be described later.
도 3은 예시적인 각 인클레이브 영역에 드라이버를 배치하고 하이퍼바이저를 이용하여 입출력 채널을 보호하는 방법을 나타낸다. 3 illustrates a method of disposing drivers in each exemplary enclave area and protecting an input/output channel using a hypervisor.
도 3에서는, TrustedPath를 SGX에 적용한 아키텍처를 나타낼 수 있다(예컨대, SGXIO라고도 함). 이러한 아키텍처를 포함하는 프로세서를 프로세서(300)으로 참조하여 설명한다. 프로세서(300)는 실행되는 어플리케이션들(305) 각각에 대한 인클레이브 영역(310)을 포함할 수 있다. 인클레이브 영역(310)은 취약하거나 민감한 영역을 별도로 암호화해 보호하기 위해 프로세서(300) 내부에 별도로 마련된 공간일 수 있다. 인클레이브 영역(310)은 프로세서(300)의 확장 권한으로도 관련 내용을 파악할 수 없도록 접근이 제한될 수 있다. In FIG. 3, an architecture in which TrustedPath is applied to SGX may be shown (eg, also referred to as SGXIO). A processor including such an architecture will be described with reference to the
각 어플리케이션(305)과 연관된 인클레이브 영역(310)은 드라이버(312)를 포함할 수 있다. 드라이버(312)는 어플리케이션에 데이터를 입력(또는 출력)하기 위한 디바이스(130-2)의 보안 드라이버일 수 있다. The
프로세서(300)는 하이퍼바이저(330)를 포함할 수 있다. 하이퍼바이저(330)는 프로세서(300) 또는 메모리와 같은 다양한 컴퓨터 자원의 OS(320)에 대한 접근 방법을 통제하는 (얇은 계층의) 소프트웨어일 수 있다. The
하이퍼바이저(300) 및 인클레이브 영역(310)을 사용하여 어플리케이션(305)과 디바이스(130-2) 간에 신뢰 경로(trusted path)가 구축될 수 있다. 따라서, 디바이스(130-2)를 통해 입력되는(또는 출력) 데이터에 대한 어플리케이션(305)으로의 입력 채널(또는 출력 채널)이 보호될 수 있다.A trusted path may be established between the
보호 기능을 요구하지 않는 디바이스(130-1)의 경우 도 2에서 전술된 바와 같이 OS(320) 내에 포함된 드라이버(322)를 통해 어플리케이션(305)에 대해 입출력 채널이 일반 경로(ordinary path)로서 구축될 수 있다.In the case of the device 130-1 that does not require a protection function, the input/output channel to the
도 3과 같이, TrustedPath를 SGX에 적용하는 것에 있어서는 다음과 같은 문제점이 있을 수 있다: As shown in FIG. 3, there may be the following problems in applying TrustedPath to SGX:
1) 먼저, SGX의 설계와 관련하여 기본적인 장벽들이 존재할 수 있다. 예컨대, SGX의 경우 인클레이브의 내부에 디바이스 입출력과 관련하여 권한을 갖는 명령어들(priviledged instructions, 특권 명령어)이 존재하지 않는다(즉, 디바이스 인터페이스가 존재하지 않음). 또한, AEX (Asynchronous Enclave Exit)가 인터럽트 핸들러가 인클레이브 내에서 실행되는 것을 방지한다. 또한, 인클레이브 영역은 유저 권한으로 동작하는 것인 바 커널의 권한으로 동작하는 드라이버(입출력 드라이버)가 내부에 배치될 수 없다. 1) First, there may be basic barriers to the design of SGX. For example, in the case of SGX, there are no privileged instructions (priviledged instructions) related to device input/output inside the enclave (ie, there is no device interface). In addition, AEX (Asynchronous Enclave Exit) prevents interrupt handlers from being executed in the enclave. Also, since the enclave area operates with user authority, a driver (I/O driver) operating with the authority of the kernel cannot be placed inside.
2) I/O 독점(I/O Monopolization)의 문제가 있을 수 있다(즉, 보안 어플리케이션(305)이 종료될 때까지 리소스 릴리즈가 없게 됨)2) There may be a problem of I/O monopolization (that is, there is no resource release until the
3) 멀티-프로세서 환경에서 이중적인 비용이 발생할 수 있다. 예컨대, 각 인클레이브 영역(310) 당 하나의 드라이버(312)가 요구되므로(즉, 각각의 PAL에 대해 드라이버가 포함되어야 함) 비용의 발생이 과도하게 될 수 있다. 3) In a multi-processor environment, double costs can occur. For example, since one
또한, 아키텍처의 빗금 표시된 부분들은 TCB에 해당하는 바, 도 3에서 도시된 아키텍처는 상대적으로 더 크고 복잡한 TCB를 요구할 수 있다.In addition, the shaded portions of the architecture correspond to the TCB, and the architecture shown in FIG. 3 may require a relatively larger and more complex TCB.
이 점을 고려할 때, TrustedPath를 SGX와 같은 상업용 TEE에 대해 적용하는 것은 바람직하지 않을 수 있다. Given this point, it may not be desirable to apply TrustedPath for commercial TEEs such as SGX.
이상, 도 1 및 도 2를 참조하여 전술된 기술적 특징에 대한 설명은, 도 3에 대해서도 그대로 적용될 수 있으므로 중복되는 설명은 생략한다.In the above, descriptions of the technical features described above with reference to FIGS. 1 and 2 may be applied to FIG. 3 as they are, and thus redundant descriptions will be omitted.
도 4를 참조하여서는, 이러한 TrustedPath를 SGX에 적용함에 있어서 발생하는 문제들을 해결할 수 있는 아키텍처에 대해 설명한다. Referring to FIG. 4, an architecture capable of solving problems arising in applying the TrustedPath to SGX will be described.
도 4는 일 실시예에 따른 I2H를 사용하여 입출력 채널을 보호하는 방법을 나타낸다.4 illustrates a method of protecting an input/output channel using I2H according to an embodiment.
도 4에서 도시된 아키텍처는 TCB에서 다른 OS 컴포넌트들을 배제하면서(put off) PAL에 대한 격리가 확장되어 안전한 I/O를 제공할 수 있다. 도시된 아키텍처에서는, PAL의 보안 I/O를 제공하기 위한 드라이버들을 선택적으로 배치하고 작동시키기 위한 I2H(Isolated Interrupt Handler)(430)(또는, I2H 영역)라는 새로운 격리 영역이 마련되었다.The architecture illustrated in FIG. 4 can provide secure I/O by extending the isolation for PAL while excluding other OS components from the TCB. In the illustrated architecture, a new isolation area called I2H (Isolated Interrupt Handler) 430 (or I2H area) for selectively arranging and operating drivers for providing PAL security I/O is provided.
도 4에서는, 이와 같은 I2H를 SGX에 적용한 아키텍처를 나타낼 수 있다. 이러한 아키텍처를 포함하는 프로세서를 프로세서(400)으로 참조하여 설명한다. 프로세서(400)는 실행되는 어플리케이션들(305) 각각에 대한 인클레이브 영역(410)을 포함할 수 있다. 인클레이브 영역(410)은 취약하거나 민감한 영역을 별도로 암호화해 보호하기 위해 프로세서(400) 내부에 별도로 마련된 공간일 수 있다. 인클레이브 영역(410)은 프로세서(400)나 그 확장 권한으로도 관련 내용을 파악할 수 없도록 암호화될 수 있다. In FIG. 4, an architecture in which I2H is applied to SGX may be shown. A processor including such an architecture will be described with reference to the
고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)(430)는 프로세서(400)에 의해 실행되는 어플리케이션(305)과 연관된 인클레이브 영역(410)이 접근 가능하도록 구성될 수 있다. 또한, I2H(430)는 어플리케이션(305)에 대해 데이터를 입력하기 위해 사용되는 입력 디바이스(130)와의 인터페이스(434)를 포함할 수 있다. I2H(430)는 프로세서(400) 내에 생성되는 고립된 공간일 수 있다.The isolated interrupt handler (I2H) 430 may be configured such that the
I2H(430)는 프로세서(400)와 연관된 시스템 소프트웨어(예컨대, OS(420))로부터는 접근이 불가능하도록 구성될 수 있다. The
I2H(430)는 입력 디바이스(130)를 위한 적어도 하나의 보안 드라이버를 제공할 수 있다. 즉, I2H(430)는 입력 디바이스(130)를 위한 적어도 하나의 보안 드라이버를 포함할 수 있다. The
I2H(430)는 커널의 임계 영역(critical region)에 대해 고립 실행 환경을 제공할 수 있다. 말하자면, 보안 드라이버는 커널(kernel)의 임계 영역(critical region)을 위한 고립된 실행 환경을 제공하기 위해 사용될 수 있다. The
도시된 것처럼, 프로세서(400)에서 실행되는 어플리케이션(305)이 복수인 경우, 복수의 어플리케이션들(305)의 각각과 연관하여 인클레이브 영역(410)이 존재할 수 있다. 복수의 어플리케이션들(305)과 연관된 인클레이브 영역들(410)은 보안 드라이버를 공유하여 사용할 수 있다. 말하자면, 인클레이브 영역들(410)은 동일한 보안 드라이버들을 공유할 수 있고, 자신의 드라이버를 각각 소유하지 않을 수 있다. 도 3의 아키텍처와는 달리 인클레이브 영역(410)이 동일한 드라이버를 중복으로 포함하지 않고, 하나의 보안 드라이버를 여러 인클레이브 영역들(410)이 공유할 수 있으므로 아키텍처의 구현의 비용이 절감될 수 있다. As illustrated, when there are a plurality of
도시된 아키텍처에서, 인클레이브 영역(410)은 I2H(430)에 접근하기 위한 인터페이스(412)를 포함할 수 있다. 한편, I2H(430)는 공유 데이터 영역(shared data region)(432)을 포함할 수 있다. 인클레이브 영역(410)은 인터페이스(412)를 통해 공유 데이터 영역(432)에 접근할 수 있다. 말하자면, 인클레이브 영역(410)은 입력 디바이스(130)를 통해 입력된 데이터를 획득하기 위해 인클레이브 영역(410)의 인터페이스(412)를 통해 공유 데이터 영역(432)에 접근할 수 있다. 이 때, 인클레이브 영역(410)은, 루트킷(rootkit)이 인클레이브 영역(410)과 I2H(430) 사이에서의 데이터 전달 동안 접근할 수 없도록, 소정의 보안 명령을 사용하여 공유 데이터 영역에 접근할 수 있다. In the illustrated architecture, the
도시된 바와 같이, 인클레이브 영역(410), 보안 드라이버와 공유 데이터 영역(432)를 포함하는 I2H(430)와 인터페이스들(412, 434)을 사용하여 어플리케이션(305)과 디바이스(130) 간에 신뢰 경로(trusted path)가 구축될 수 있다. 따라서, 디바이스(130)를 통해 입력되는(또는 출력) 데이터에 대한 어플리케이션(305)으로의 입력 채널(또는 출력 채널)이 보호될 수 있다.As shown, trust between the
I2H(430)에 의해 제공되는 입력 디바이스(130)를 위한 인터페이스(434)는 예컨대, I/O 포트일 수 있다. I2H(430)는 입력 디바이스(130)를 위한 인터페이스(434)에 대한 배타적인 접근을 구성할 수 있다.The
도 3을 참조하여 전술된 아키텍처에 비해, I2H(430)를 사용함으로써 불필요한 커널 컴포넌트를 제거할 수 있으므로 TCB를 줄일 수 있다. Compared to the architecture described above with reference to FIG. 3, since unnecessary kernel components can be removed by using the
도 4에서 설명된 아키텍처를 통해서는, 다음의 위협들에 대한 보안이 제공될 수 있다:Through the architecture described in Figure 4, security against the following threats can be provided:
1) SGX 본질의 위협 모델(OS와 하이퍼바이저가 신뢰될 수 없음에 따른 위협).1) SGX intrinsic threat model (threat due to untrusted OS and hypervisor).
2) 디바이스 I/O 인터페이스들(PIO 및 MMIO)에 대한 공격, 예컨대, I/O 포트 또는 MMIO 매핑 공격(mapping attack).2) Attack on device I/O interfaces (PIO and MMIO), for example, I/O port or MMIO mapping attack.
3) 커널 스페이스 데이터 영역들(드라이버 할당 메모리 영역들)에 대한 공격, 예컨대, 루트킷(rootkit)이 타겟 입력 데이터(스캔코드, 키 코드, 키 이벤트 등을) 독출해 내는 위협.3) Attack on kernel space data areas (driver allocated memory areas), for example, a threat in which a rootkit reads target input data (scan code, key code, key event, etc.).
4) 사용자 스페이스 데이터 영역들에 대한 공격.4) Attack on user space data areas.
이상, 도 1 내지 도 3을 참조하여 전술된 기술적 특징에 대한 설명은, 도 4에 대해서도 그대로 적용될 수 있으므로 중복되는 설명은 생략한다.In the above, descriptions of the technical features described above with reference to FIGS. 1 to 3 may be applied to FIG. 4 as they are, and thus redundant descriptions will be omitted.
도 5는 일 예에 따른 I2H의 구성을 나타낸다.5 shows the configuration of I2H according to an example.
도 5에서는 도 4를 참조하여 전술된 I2H(430)의 구성들에 대해 더 자세하게 설명한다. 도시된 I2H(430)의 콘텐츠(contents)는 리눅스 시스템의 경우에 대해 예시되었다. 입력 디바이스(130)는 키보드인 것으로 가정되었다. 키보드는 물리적 키를 포함하는 키보드 또는 가상 키보드일 수 있다.In FIG. 5, the configurations of the
I2H(430)는 입력 코어 시스템(510), 키보드 드라이버(520), 키보드 컨트롤러 드라이버(530), LDISC(540), 버스 드라이버(550) 및 이벤트 핸들러(560)를 포함할 수 있다. 키보드 드라이버(430) 및 키보드 컨트롤러 드라이버(530)는 입력 디바이스(130)에 대한 보안 드라이버에 포함될 수 있다. The
예컨대, 도시된 것과 같은 I2H(430)를 생성하는 동작, 생성된 I2H(430)에 대해 구성요소들(510 내지 56)과 같은 콘텐츠(contents)를 부가하는 동작 및 I2H로 진입하는(jump into) 동작은 각각 소정의 명령에 따라 수행될 수 있다. 예컨대, 각 동작에 대해 icreate, iadd 및 ienter와 같은 명령어가 각각 사용될 수 있다. For example, an operation of generating an
도시된 것과 같이 I2H(430)이 구성됨으로써, 커널의 접근으로부터 입출력 채널이 보호될 수 있다. 예컨대, MMU(memory management unit) 보호가 적용될 수 있다. 또한, I2H(430)가 입력 디바이스(130)에 대한 드라이버들과 입력 서브 시스템(input subsystem)을 포함함으로써, 따라서, 인클레이브 영역들(410)이 입력 디바이스(130)를 통해 입력된 데이터를 안전하게 수신할 수 있다. By configuring the
I2H(430)는 커널로부터 입출력과 관련된 중요한 자산(예컨대, 입력 데이터)을 보호하기 위해 I2H(430)에 대한 접근 제어를 수행할 수 있다. 예컨대, 커널은 I2H(430)에 접근할 수 없으나 I2H(430)는 커널에 접근할 수 있다. The
이상, 도 1 내지 도 4를 참조하여 전술된 기술적 특징에 대한 설명은, 도 5에 대해서도 그대로 적용될 수 있으므로 중복되는 설명은 생략한다.In the above, descriptions of the technical features described above with reference to FIGS. 1 to 4 may be applied to FIG. 5 as they are, and thus redundant descriptions will be omitted.
도 6은 예시적인 루트킷의 I/O 포트에 대한 접근 공격에 대한 프로세서의 동작을 나타낸다.6 shows an operation of a processor in response to an access attack on an I/O port of an exemplary rootkit.
도 5를 참조하여 설명한 것처럼, 입력 디바이스(130)는 키보드인 것으로 가정되었다. 입력 디바이스(130)를 통한 데이터 입력에 따른 인터럽트가 발생한 경우, 키보드 컨트롤러 드라이버(530)는 키보드 컨트롤러(610)에 대해 데이터를 요청할 수 있다(1. i8042_read_data() {Inb(0x60)}). 이에 따라, 키보드 컨트롤러(610)는 입력된 데이터에 대응하는 키 스캔코드를 키보드 컨트롤러 드라이버(530)로 전달할 수 있다(2. Key scancode). 키보드 드라이버(520)는 키보드 컨트롤러 드라이버(530)와의 통신에 따라 데이터의 입력 이벤트를 입력 코어 시스템(510)으로 전달할 수 있다(3. Input_event()). 한편, 루트킷(620)으로부터 데이터 입력이 요청되거나, 입력된 데이터에 대한 접근이 요청되는 경우(4. Inb(0x60)), 루트킷(620)은 대응하는 키 스캔코드를 취할 수 있다(5. Key scancode). As described with reference to FIG. 5, it is assumed that the
말하자면, 도 6의 아키텍처에서는, 데이터가 입력 디바이스(130)로부터 수신되면, 루트킷(620)이 자유럽게 입력 데이터에 접근/입력 데이터를 수정할 수 있다. 즉, 입력 디바이스(130)로부터 입력되는 데이터의 입력 채널에 대한 보호가 이루어지지 않는다. 입력 디바이스(130)에 대한 I/O 포트는 공유된 매체(medium)에 해당하므로 루트킷(620)은 또한, I/O 포트 요청 공격(requesting attack)을 개시할 수 있다. That is to say, in the architecture of FIG. 6, when data is received from the
한편, 'Inb(0x60)'은 예컨대, PS2 키보드가 사용하는 0x60 입력 포트로부터 입력을 수신하는 것을 나타낼 수 있다. 일례로, 'Inb(0x60)'는 CPU 특권 명령어 중 inb/outb 명령어를 통해 지정된 입출력(I/O) 포트에 바이트 크기만큼 읽기/쓰기를 수행할 수 있고, 해당 명령어를 0x60 포트에 대해 수행한 것을 나타낼 수 있다. 루트킷(620)은 일반적인 커널과 마찬가지로 특권 명령어를 실행할 수 있으므로, 키보드로부터의 입력을 받아들일 수 있다. 도 6의 좌측의 블록들(드라이버(520, 530) 및 입력 코어 시스템(510))은 커널 안에서 동작하게 되며, 루트킷(620)은 커널 내부 메모리를 읽을 수 있으므로 해당 블록들(드라이버(520, 530) 및 입력 코어 시스템(510))에서 키보트로부터의 입력 데이터가 처리되는 동안 입력 데이터를 가로챌 수 있게 된다.Meanwhile,'Inb(0x60)' may represent receiving an input from the 0x60 input port used by the PS2 keyboard, for example. For example,'Inb(0x60)' can perform read/write as much as byte size to the designated input/output (I/O) port through the inb/outb command among CPU privilege commands, and execute the command for 0x60 port. Can indicate that. As the
한편, 입력 코어 시스템(510)은 리눅스 커널 내부에 위치되는 코드 모듈로서, 다양한 종류의 입력 장치 드라이버로부터 입력 이벤트를 전달 받아 이를 적절한 이벤트 핸들러(예컨대, 키보드 이벤트 핸들러(560))로 전달하는 것을 관리하는 시스템일 수 있다. On the other hand, the
도 7을 참조하여 이러한 도 6의 아키텍처의 문제점을 해결할 수 있는 아키텍처에 대해 더 자세하게 설명한다.An architecture capable of solving the problem of the architecture of FIG. 6 will be described in more detail with reference to FIG. 7.
이상, 도 1 내지 도 5를 참조하여 전술된 기술적 특징에 대한 설명은, 도 6에 대해서도 그대로 적용될 수 있으므로 중복되는 설명은 생략한다.In the above, descriptions of the technical features described above with reference to FIGS. 1 to 5 may be applied to FIG. 6 as they are, and thus redundant descriptions will be omitted.
도 7은 일 예에 따른 루트킷의 I/O 포트에 대한 접근 공격에 대한 I2H를 사용하는 프로세서의 동작을 나타낸다.7 illustrates an operation of a processor using I2H against an attack on an I/O port of a rootkit according to an example.
아래에서 설명되는 동작들은 도 4 및 5를 참조하여 전술된 I2H(430)와 연관하여 또는 I2H(430) 내부에서 수행될 수 있다. Operations described below may be performed in association with the
입력 디바이스(130)를 통한 데이터 입력에 따른 인터럽트가 발생한 경우, 키보드 컨트롤러 드라이버(530)는 키보드 컨트롤러(610)에 대해 데이터를 요청할 수 있다. I2H(430)의 인터페이스(434)는 입력 디바이스(130)를 위한 I/O 포트일 수 있고, I/O 포트는 I2H(430)에 대한 소정의 명령(instruction)(즉, 명령어)에 따라 잠금 또는 잠금 해제될 수 있다(1. i8042_read_data() {Port_unlock(0x60); Inb(0x60); Port_lock(0x60);}). I/O 포트가 잠긴 상태에서 I/O 포트는 I2H(430)를 통해서만 독점적으로 사용될 수 있다. 키보드 컨트롤러(610)는 입력된 데이터에 대응하는 키 스캔코드를 키보드 컨트롤러 드라이버(530)로 전달할 수 있다(2. Key scancode). 키보드 드라이버(520)는 키보드 컨트롤러 드라이버(530)와의 통신에 따라 데이터의 입력 이벤트를 입력 코어 시스템(510)으로 전달할 수 있다(3. Input_event()). 한편, 루트킷(620)으로부터 데이터 입력이 요청되거나, 입력된 데이터에 대한 접근이 요청되는 경우(4. Inb(0x60)), 루트킷(620)에 대해서는 대응하는 키 스캔코드가 아닌 쓰레기 값이 반환될 수 있다(5. Garbage value). 즉, 잠긴 매체(I/O 포트가 잠긴 상태)에 대한 루트킷(620)의 접근의 요청은 쓰레기 값을 반환하게 된다. When an interrupt according to data input through the
도 7의 아키텍처에서는, 루트킷(620)이 입력 데이터에 접근하거나 입력 데이터를 수정할 수 없고, 입력 디바이스(130)로부터 입력되는 데이터의 입력 채널에 대한 보호가 이루어지게 된다. 말하자면, 루트킷(620)은 I2H(430)의 영역 내에서 및 I2H(430)를 통한 (입력된) 데이터 전달에 대해 접근할 수 없다. 이는 I2H(430) 내부 코드 및 데이터 영역을 특권 모드로부터 접근을 허가하지 못하도록 함과 동시에 I2H(430) 내에서 인터페이스(434)에 해당하는 특정한 I/O 포트의 사용을 잠금/잠금 해제하는 명령을 사용함에 따라 이루어질 수 있다. 예컨대, I/O 포트가 잠긴 상태에서, I/O 포트에 대한 접근이 요청되는 경우에는 해당 요청에 대해서는 쓰레기 값(garbage value)이 반환될 수 있다.In the architecture of FIG. 7, the
도 7에서 설명된 실시예의 경우, 드라이버(520, 530)) 및 입력 코어 시스템(510)이 I2H(430)에 의해 감싸져 있고(즉, I2H(430) 내부에 존재하고), I2H(430)는 일반 커널 메모리와는 달리 루트킷(620)이 접근할 수 없는 고립된 영역이므로, 루트킷(620)은 I2H(430) 내부에서 데이터가 처리되는 동안에는 입력 데이터를 탈취할 수 없게 된다. In the case of the embodiment described in FIG. 7, the
이상, 도 1 내지 도 6을 참조하여 전술된 기술적 특징에 대한 설명은, 도 7에 대해서도 그대로 적용될 수 있으므로 중복되는 설명은 생략한다.In the above, descriptions of the technical features described above with reference to FIGS. 1 to 6 may be applied to FIG. 7 as they are, and thus redundant descriptions will be omitted.
도 8은 예시적인 입력 디바이스를 통해 입력된 데이터에 인클레이브가 접근하는 방법을 나타낸다.8 shows how an Enclave accesses data entered through an exemplary input device.
예컨대, 도 8은 일반적인 인클레이브 입력 인터페이스(일례로, 인텔의 SGX)에서의 입력 디바이스(130)를 통해 입력된 데이터에 대한 인클레이브 영역(310)의 접근 방법을 나타낸다. 인클레이브 영역(310)은 신뢰되지 않은 호스트 프로세스(Untrusted Host Process)(810)를 통해 입력 디바이스(130)를 통해 입력된 데이터에 대한 읽기(read)를 요청할 수 있고(1. OCALL(read)), 신뢰되지 않은 호스트 프로세스(810)는 TTY(Line Discipline; LDISC)(540)에 대해 데이터의 읽기를 요청하고(2. Read()), TTY(540)는 신뢰되지 않은 호스트 프로세스(810)로 데이터를 반환할 수 있다(3. ldisc.read(); copy_to_user()). 반환되는 데이터는 입력 코어 시스템(510)으로부터 키보드 이벤트 핸들러(560)를 통해 전달된 것일 수 있다(ldisc.receive_buf()). For example, FIG. 8 shows a method of accessing the
도시된 도 8의 구조에서는 신뢰되지 않은 호스트 프로세스(810)가 인클레이브 영역(310)의 인터페이스로서 사용됨으로써, 데이터가 프로세스(process) 및 커널 사이에서 전달되는 동안, 루트킷이 자유롭게 입력 데이터에 접근하거나 입력 데이터를 수정할 수 있다.In the illustrated structure of FIG. 8, an
한편, "OCALL"은, Intel SGX SDK에서 제공하는 인터페이스로서, 인클레이브 내부에서 시스템 콜을 처리할 수 없기 때문에, 요청된 서비스(예컨대, read 시스템 콜)을 처리하기 위해 인클레이브 바깥(즉, "O"는 Out의 "O"를 나타냄)으로 나가서 신뢰되지 않은 호스트 프로세스(810)를 사용하여 시스템콜을 대신 요청하여 처리하도록 하는 것을 의미할 수 있다. On the other hand, "OCALL" is an interface provided by the Intel SGX SDK, and because the system call cannot be processed inside the enclave, the outside of the enclave (ie, " “O” indicates “O” of Out) and may mean to request and process a system call instead using the
"Read"는 시스템 콜에 대한 응답이며, Line Discipline 모듈(540)은 입력 데이터가 오기까지 대기하고 있다가(ldisc.read), 키보드 이벤트 핸들러(560)로부터 입력 데이터를 받으면(ldisc.receive_buf) "copy_to_user"를 통해 커널 안에 있는 키보드 입력 데이터를 호스트 프로세스(810)에 전달할 수 있다. "copy_to_user"는 커널 영역에서 사용자 프로세스 영역으로 데이터를 복사하는 것을 나타낼 수 있다. "Read" is a response to a system call, and the
도 8의 우측 블록들(입력 코어 시스템(510), 이벤트 핸들러(560), TTY(540))은 커널 내에서 동작하게 되며, 루트킷은 커널 내부 메모리(좌측에 해당하는 프로세스 내부 메모리 영역을 포함)를 읽을 수 있으므로 해당 블록들(입력 코어 시스템(510), 이벤트 핸들러(560), TTY(540))에서 입력 데이터가 처리되는 동안 입력 데이터를 가로챌 수 있다.The right blocks of FIG. 8 (
도 9를 참조하여 이러한 도 8의 아키텍처의 문제점을 해결할 수 있는 아키텍처에 대해 더 자세하게 설명한다.An architecture capable of solving the problem of the architecture of FIG. 8 will be described in more detail with reference to FIG. 9.
이상, 도 1 내지 도 7을 참조하여 전술된 기술적 특징에 대한 설명은, 도 8에 대해서도 그대로 적용될 수 있으므로 중복되는 설명은 생략한다.In the above, descriptions of the technical features described above with reference to FIGS. 1 to 7 may be applied to FIG. 8 as they are, and thus redundant descriptions will be omitted.
도 9는 일 예에 따른 입력 디바이스를 통해 입력된 데이터에 인클레이브가 I2H의 공유 데이터 영역을 통해 접근하는 방법을 나타낸다.9 illustrates a method in which an enclave accesses data input through an input device through a shared data area of I2H according to an example.
도시된 아키텍처에서, 인클레이브 영역(410)은 I2H(430)에 소정의 명령에 따라 접근할 수 있다. 예컨대, 인클레이브 영역(410)의 인터페이스(412)는 소정의 명령에 따라 I2H(430)의 공유 데이터 영역(432)에 접근할 수 있다(i2h_read(){ copy_from_i2h();}). 이에 따라, 인클레이브 영역(410)은 입력 디바이스(130)를 통해 입력된 데이터에 대해 접근할 수 있다.In the illustrated architecture, the
도 8의 아키텍처에서의 신뢰되지 않은 호스트 프로세스(810)와는 달리, 도 9의 아키텍처에서는 인클레이브 영역(410)의 인터페이스(412) 및 I2H(430)의 공유 데이터 영역(432)과, 공유 데이터 영역(432)에의 접근을 위한 소정의 명령을 사용함으로써, 루트킷은 인클레이브 영역(410)와 I2H(430) 사이에서 (입력된) 데이터가 전달되는 동안 데이터에 접근할 수 없게 될 수 있다. 따라서, 루트킷에 의한 데이터의 탈취 및 수정이 방지될 수 있다. 명령은 예컨대, SGX 명령에 기반한 것(SGX에서 사용되는 명령을 개량한 것)일 수 있다.Unlike the
한편, 전술된 바와 같이 I2H(430)를 생성하는 동작, 생성된 I2H(430)에 대해 구성요소들(510 내지 56)과 같은 콘텐츠(contents)를 부가하는 동작 및 I2H로 진입하는(jump into) 동작은 각각 소정의 명령에 따라 수행될 수 있다. 예컨대, 각 동작에 대해 icreate, iadd 및 ienter와 같은 명령어가 사용될 수 있다.Meanwhile, as described above, the operation of generating the
도 8에서 설명된 것과는 달리, 인클레이브로부터 "OCALL"을 통해 나갈 필요 없이 바로 실행될 수 있는 "i2h_read"는 "copy_from_i2h"를 통해 I2H(430)로부터 인클레이브 내부 영역으로 커널을 거치지 않고 데이터를 바로 전달할 수 있다.Unlike described in FIG. 8, "i2h_read", which can be executed immediately without having to go out from the enclave through "OCALL", directly transfers data from the
도 7에서 설명한 것과 마찬가지로 입력 코어 시스템(510), 이벤트 핸들러(560), TTY(540)가 I2H(430)에 의해 감싸져 있고(즉, I2H(430) 내부에 존재하고), I2H(430)는 일반 커널 메모리와는 달리 루트킷이 접근할 수 없는 고립된 영역이기 때문에 I2H(430) 내부에서 데이터가 처리되는 동안 루트킷은 입력 정보를 탈취할 수 없다. As described in FIG. 7, the
이상, 도 1 내지 도 8을 참조하여 전술된 기술적 특징에 대한 설명은, 도 9에 대해서도 그대로 적용될 수 있으므로 중복되는 설명은 생략한다.In the above, descriptions of the technical features described above with reference to FIGS. 1 to 8 may be applied to FIG. 9 as they are, and thus redundant descriptions will be omitted.
도 10은 일 예에 따른 입력 디바이스를 통한 데이터의 입력에 따른 인터럽트가 발생한 경우의 인터럽트 처리 방법을 나타낸다.10 illustrates an interrupt processing method when an interrupt occurs due to data input through an input device according to an example.
도 10을 참조하여, 입력 디바이스(130)가 키보드인 경우에 있어서, 키보드를 통해 데이터가 입력되어 키보드 컨트롤러(610)에 입력된 데이터에 대응하는 키 스캔코드가 도달되고, 이에 따라 발생된 인터럽트가 처리되는 방법에 대해 설명한다.Referring to FIG. 10, when the
인터럽트가 발생되어 수신된 경우에 있어서(예컨대, 인터럽트 #1의 수신), 프로세서의 커널은 전술된 I2H(430)를 사용하는 플로우 또는 I2H(430)를 사용하지 않는 플로우를 통해 인터럽트를 처리할 수 있다. 커널이 어떠한 플로우에 진입할지(jump into)는 커널에 의해 결정될 수 있다. When an interrupt is generated and received (for example, interrupt #1 is received), the kernel of the processor can process the interrupt through the flow using the
그러나, 예컨대, 하이잭킹 등에 의해 I2H 플로우가 도달되지 않으면, (I2H(430)를 사용하는 플로우를 통해 인터럽트가 처리되지 않으면) 사용자에 의해 이러한 사실이 검출될 수 있다. 예컨대, 잠긴 매체에 대한 접근/미접근이 사용자에 의해 검출될 수 있다.However, if the I2H flow is not reached by hijacking, for example, this fact can be detected by the user (if the interrupt is not processed through the flow using the I2H 430). For example, access/non-access to the locked medium may be detected by the user.
말하자면, 입력 디바이스(130)를 통한 데이터의 입력에 따른 인터럽트가 발생한 경우, I2H(430)와 연관된 플로우가 진행되지 않으면 I2H(430)와 연관된 플로우가 진행되지 않았음을 나타내는 검출 정보가 생성될 수 있다. 이러한 검출 정보는 예컨대, 프로세서와 연관된 출력 장치를 통해(또는, 통신 모듈을 통해), 사용자에게 전달(예컨대, 출력 장치를 통해 출력)될 수 있다. 따라서, 사용자는 I2H(430)의 하이잭킹(hijacking) 또는 변조를 확인할 수 있다. That is, when an interrupt according to data input through the
이상, 도 1 내지 도 9를 참조하여 전술된 기술적 특징에 대한 설명은, 도 10에 대해서도 그대로 적용될 수 있으므로 중복되는 설명은 생략한다.As described above, the description of the technical features described above with reference to FIGS. 1 to 9 may be applied to FIG. 10 as it is, and thus a duplicate description will be omitted.
도 11은 일 실시예에 따른 I2H를 포함하는 프로세서에 의한 입력 디바이스를 통한 데이터 입력에 따른 인터럽트를 처리하는 방법을 나타내는 흐름도이다. 11 is a flowchart illustrating a method of processing an interrupt according to data input through an input device by a processor including I2H according to an exemplary embodiment.
도 11을 참조하여서는, 전술된 프로세서(400)에 의해 수행되는, 입력 디바이스(130)를 통한 데이터 입력에 따른 인터럽트를 처리하는 방법이 보다 구체적으로 설명된다. Referring to FIG. 11, a method of processing an interrupt according to data input through the
단계(1110)에서, 프로세서(400)는 프로세서(400)에 의해 실행되는 어플리케이션(305)과 연관된 인클레이브 영역(410)이 접근 가능하고, 입력 디바이스(130)와의 인터페이스(434)를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)(430)를 생성할 수 있다. I2H(430)는 예컨대, OS(420)와 같은, 프로세서(400)와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성될 수 있다. I2H(430)는 소정의 명령에 따라 프로세서(400)의 내부 공간으로서 생성될 수 있다. In
단계(1120)에서, 프로세서(400)는 소정의 명령(instruction)에 기반하여, 인터페이스(434)로서 I/O 포트를 잠금 또는 잠금 해제로 설정할 수 있다. 즉, 프로세서(400)는 상기 소정의 명령에 따라 I/O 포트를 잠금 또는 잠금 해제할 수 있다. 잠금 명령에 따라, I/O 포트가 잠긴 상태에서는 I/O 포트는 I2H(430)를 통해서만 독점적으로 사용될 수 있다. In
단계(1130)에서, 프로세서(400)는 I2H(430)를 통해 입력 디바이스(130)를 통해 입력된 데이터에 대응하는 코드를 수신할 수 있다. 예컨대, 입력 디바이스(130)가 키보드인 경우 상기 코드는 키 스캔코드 및/또는 키 코드일 수 있다. In
단계(1140)에서, 프로세서(400)는 I/O 포트가 잠긴 상태에서, I2H(430)에 대한 진입 없이, I/O 포트에 대한 접근이 요청되는 경우 해당 요청에 대해서는 쓰레기 값(garbage value)을 반환할 수 있다. 즉, 루트킷과 같은 공격자로부터의 데이터에 대한 접근이나 데이터의 수정이 방지될 수 있다. In
인클레이브 영역(410)은 I2H(430)에 접근하기 위한 인터페이스(412)가 포함되어 구성될 수 있다. I2H(430)는 소정의 공유 데이터 영역(shared data region)(432)을 포함하도록 구성될 수 있다. The
인클레이브 영역(410)은 입력 디바이스(130)를 통해 입력된 데이터를 획득하기 위해 인클레이브 영역(410)의 인터페이스(412)를 통해 공유 데이터 영역(432)에 접근할 수 있으며, 루트킷(rootkit)이 인클레이브 영역(410)과 I2H(430) 사이에서의 데이터의 전달 동안 접근할 수 없도록, 소정의 보안 명령을 사용하여 공유 데이터 영역(432)에 접근할 수 있다. The
따라서, 디바이스(130)를 통해 입력되는(또는 출력) 데이터에 대한 어플리케이션(305)으로의 입력 채널(또는 출력 채널)이 루트킷과 같은 공격자로부터 안전하게 보호될 수 있다.Accordingly, an input channel (or output channel) to the
실시예의 I2H(430)를 사용하는 아키텍처를 통해서는, TCB를 최소화하면서 PAL들에 대한 격리가 안전한 입력(입력 데이터)를 제공하기 위해 선택된 커널 부분들에 대한 격리와 함께 이루어질 수 있다. 이를 위해 제공되는 격리 영역인 I2H(430)는 전술된 바와 같이 배타적인 (입출력) 디바이스(130)의 접근 및 인클레이브 영역(410)의 직접적인 접근을 특징으로 할 수 있다. Through the architecture using the
이러한 I2H(430)를 사용하는 방식으로의 x86 아키텍처의 수정을 통해 SGX의 입력(또는 출력) 데이터 및 입출력 채널에 대한 보안 문제를 해결할 수 있다. By modifying the x86 architecture in such a way that the
이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, 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 can be implemented using one or more general purpose computers 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. In addition, 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), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of these, configuring the processing unit to behave 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. , Or may be permanently or temporarily embodyed in a transmitted signal wave. 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 the 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. The hardware device described above may be configured to operate as one or more software modules to perform the operation of the embodiment, and vice versa.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and drawings as described above, various modifications and variations are possible from the above description to those of ordinary skill in the art. For example, the described techniques are performed in an order different from the described method, and/or components such as a system, structure, device, circuit, 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.
Claims (15)
상기 프로세서에 의해 실행되는 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 상기 어플리케이션에 대해 데이터를 입력하기 위해 사용되는 입력 디바이스와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 포함하고,
상기 I2H는 상기 프로세서와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성되는, 프로세서. In the processor,
An enclave area associated with an application executed by the processor is accessible, and includes an isolated interrupt handler (I2H) including an interface with an input device used to input data for the application, ,
The I2H is configured to be inaccessible from system software associated with the processor.
상기 I2H는 상기 입력 디바이스를 위한 적어도 하나의 보안 드라이버를 제공하는, 프로세서.The method of claim 1,
Wherein the I2H provides at least one secure driver for the input device.
상기 보안 드라이버는 커널(kernel)의 임계 영역(critical region)을 위한 고립된 실행 환경을 제공하기 위해 사용되는, 프로세서.The method of claim 2,
The secure driver is used to provide an isolated execution environment for a critical region of a kernel.
상기 프로세서에 의해 실행되는 복수의 어플리케이션들의 각각과 연관하여 인클레이브 영역이 존재하고,
상기 복수의 어플리케이션들과 연관된 인클레이브 영역들은 상기 보안 드라이버를 공유하여 사용하는, 프로세서.The method of claim 2,
An enclave region exists in association with each of a plurality of applications executed by the processor,
Enclave areas associated with the plurality of applications share and use the security driver.
상기 인클레이브 영역은 상기 I2H에 접근하기 위한 인터페이스를 포함하고,
상기 I2H는 공유 데이터 영역(shared data region)을 포함하고,
상기 인클레이브 영역은 상기 입력 디바이스를 통해 입력된 데이터를 획득하기 위해 상기 인클레이브 영역의 인터페이스를 통해 상기 공유 데이터 영역에 접근하는, 프로세서.The method of claim 1,
The enclave region includes an interface for accessing the I2H,
The I2H includes a shared data region,
Wherein the enclave area accesses the shared data area through an interface of the enclave area to obtain data input through the input device.
상기 인클레이브 영역은, 루트킷(rootkit)이 상기 인클레이브 영역과 상기 I2H 사이에서의 데이터 전달 동안 접근할 수 없도록, 소정의 보안 명령을 사용하여 상기 공유 데이터 영역에 접근하는, 프로세서.The method of claim 5,
Wherein the enclave area accesses the shared data area using a predetermined security command such that a rootkit cannot access during data transfer between the enclave area and the I2H.
상기 인터페이스는 상기 입력 디바이스를 위한 I/O 포트이고,
상기 I/O 포트는 상기 I2H에 대한 소정의 명령(instruction)에 따라 잠금 또는 잠금 해제되고,
상기 I/O 포트가 잠긴 상태에서 상기 I/O 포트는 상기 I2H를 통해서만 독점적으로 사용되는, 프로세서. The method of claim 1,
The interface is an I/O port for the input device,
The I/O port is locked or unlocked according to a predetermined instruction for the I2H,
The I/O port is used exclusively through the I2H while the I/O port is locked.
상기 I/O 포트가 잠긴 상태에서, 상기 I/O 포트에 대한 접근이 요청되는 경우 상기 요청에 대해서는 쓰레기 값(garbage value)이 반환되는, 프로세서.The method of claim 7,
When the I/O port is locked and access to the I/O port is requested, a garbage value is returned for the request.
상기 I2H를 생성하는 동작, 생성된 I2H에 대해 콘텐츠(contents)를 부가하는 동작 및 상기 I2H로 진입하는(jump into) 동작은 각각 소정의 명령에 따라 수행되는, 프로세서. The method of claim 1,
An operation of generating the I2H, adding contents to the generated I2H, and an operation of jumping into the I2H are each performed according to a predetermined instruction.
상기 입력 디바이스를 통한 데이터의 입력에 따른 인터럽트가 발생한 경우, 상기 I2H와 연관된 플로우가 진행되지 않으면 상기 I2H와 연관된 플로우가 진행되지 않았음을 나타내는 검출 정보가 생성되는, 프로세서.The method of claim 1,
When an interrupt according to the input of data through the input device occurs, if the flow associated with the I2H does not proceed, detection information indicating that the flow associated with the I2H does not proceed is generated.
상기 어플리케이션을 실행하기 위해 요구되는 데이터를 적어도 임시적으로 저장하는 메모리
를 포함하고,
상기 프로세서는, 상기 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 상기 어플리케이션에 대해 데이터를 입력하기 위해 사용되는 입력 디바이스와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 포함하고,
상기 I2H는 상기 프로세서와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성되는, 컴퓨터. A processor executing an application; And
Memory for at least temporarily storing data required to execute the application
Including,
The processor includes an Isolated Interrupt Handler (I2H) including an interface with an input device that is accessible to an enclave area associated with the application and is used to input data for the application,
The I2H is configured to be inaccessible from system software associated with the processor.
상기 프로세서에 의해 실행되는 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 상기 입력 디바이스와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 생성하는 단계 - 상기 I2H는 상기 프로세서와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성됨 -;
소정의 명령(instruction)에 기반하여, 상기 인터페이스로서 I/O 포트를 잠금 또는 잠금 해제하는 단계 - 상기 I/O 포트가 잠긴 상태에서 상기 I/O 포트는 상기 I2H를 통해서만 독점적으로 사용됨 -; 및
상기 I2H를 통해 상기 입력 디바이스를 통해 입력된 데이터에 대응하는 코드를 수신하는 단계
를 포함하는, 인터럽트를 처리하는 방법. A method of processing an interrupt according to data input through an input device, performed by a processor,
Generating an Isolated Interrupt Handler (I2H) including an interface with the input device in which an enclave area associated with the application executed by the processor is accessible-The I2H is a system associated with the processor It is configured to be inaccessible from software -;
Locking or unlocking an I/O port as the interface based on a predetermined instruction-the I/O port is exclusively used through the I2H while the I/O port is locked; And
Receiving a code corresponding to the data input through the input device through the I2H
Including, how to handle the interrupt.
상기 I/O 포트가 잠긴 상태에서, 상기 I2H에 대한 진입 없이, 상기 I/O 포트에 대한 접근이 요청되는 경우 상기 요청에 대해서는 쓰레기 값(garbage value)을 반환하는 단계
를 더 포함하는, 인터럽트를 처리하는 방법.The method of claim 12,
When the I/O port is locked and access to the I/O port is requested without entering the I2H, returning a garbage value for the request
Further comprising, a method of handling an interrupt.
상기 인클레이브 영역에는 상기 I2H에 접근하기 위한 인터페이스가 포함되고,
상기 I2H에는 공유 데이터 영역(shared data region)이 포함되고,
상기 인클레이브 영역은 상기 입력 디바이스를 통해 입력된 데이터를 획득하기 위해 상기 인클레이브 영역의 인터페이스를 통해 상기 공유 데이터 영역에 접근하되, 루트킷(rootkit)이 상기 인클레이브 영역과 상기 I2H 사이에서의 데이터 전달 동안 접근할 수 없도록, 소정의 보안 명령을 사용하여 상기 공유 데이터 영역에 접근하는, 인터럽트를 처리하는 방법.The method of claim 12,
The enclave region includes an interface for accessing the I2H,
The I2H includes a shared data region,
The enclave area accesses the shared data area through the interface of the enclave area in order to acquire data input through the input device, but a rootkit transfers data between the enclave area and the I2H A method of handling an interrupt by accessing the shared data area by using a predetermined security command so that the user cannot access it during the period.
상기 프로세서는, 상기 어플리케이션과 연관된 인클레이브 영역이 접근 가능하고, 상기 어플리케이션에 대해 데이터를 입력하기 위해 사용되는 입력 디바이스와의 인터페이스를 포함하는 고립된 인터럽트 핸들러(Isolated Interrupt Handler; I2H)를 포함하고,
상기 I2H는 상기 프로세서와 연관된 시스템 소프트웨어로부터는 접근이 불가능하도록 구성되는, 아키텍처.In the architecture for the processor running the application,
The processor includes an Isolated Interrupt Handler (I2H) including an interface with an input device that is accessible to an enclave area associated with the application and is used to input data for the application,
The I2H is configured to be inaccessible from system software associated with the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190014745A KR102192328B1 (en) | 2019-02-08 | 2019-02-08 | Processor including isolated interrupt handler for securing input channel on sgx and interrupt processing method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190014745A KR102192328B1 (en) | 2019-02-08 | 2019-02-08 | Processor including isolated interrupt handler for securing input channel on sgx and interrupt processing method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20200097416A true KR20200097416A (en) | 2020-08-19 |
KR102192328B1 KR102192328B1 (en) | 2020-12-17 |
Family
ID=72265535
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190014745A KR102192328B1 (en) | 2019-02-08 | 2019-02-08 | Processor including isolated interrupt handler for securing input channel on sgx and interrupt processing method thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102192328B1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003216374A (en) * | 2002-01-25 | 2003-07-31 | Canon Inc | Computer program and device driver setting method and device |
US8397306B1 (en) * | 2009-09-23 | 2013-03-12 | Parallels IP Holdings GmbH | Security domain in virtual environment |
US8627414B1 (en) * | 2009-08-04 | 2014-01-07 | Carnegie Mellon University | Methods and apparatuses for user-verifiable execution of security-sensitive code |
US20170177854A1 (en) * | 2014-05-15 | 2017-06-22 | Carnegie Mellon University | Method and Apparatus for On-Demand Isolated I/O Channels for Secure Applications |
-
2019
- 2019-02-08 KR KR1020190014745A patent/KR102192328B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003216374A (en) * | 2002-01-25 | 2003-07-31 | Canon Inc | Computer program and device driver setting method and device |
US8627414B1 (en) * | 2009-08-04 | 2014-01-07 | Carnegie Mellon University | Methods and apparatuses for user-verifiable execution of security-sensitive code |
US8397306B1 (en) * | 2009-09-23 | 2013-03-12 | Parallels IP Holdings GmbH | Security domain in virtual environment |
US20170177854A1 (en) * | 2014-05-15 | 2017-06-22 | Carnegie Mellon University | Method and Apparatus for On-Demand Isolated I/O Channels for Secure Applications |
Non-Patent Citations (1)
Title |
---|
Hongliang Liang et al, "Aurora: Providing Trusted System Services for Enclaves on an Untrusted System"(2018.02.) * |
Also Published As
Publication number | Publication date |
---|---|
KR102192328B1 (en) | 2020-12-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Pinto et al. | Demystifying arm trustzone: A comprehensive survey | |
US10114958B2 (en) | Protected regions | |
Guan et al. | Trustshadow: Secure execution of unmodified applications with arm trustzone | |
Bahmani et al. | {CURE}: A security architecture with {CUstomizable} and resilient enclaves | |
Sgandurra et al. | Evolution of attacks, threat models, and solutions for virtualized systems | |
Cho et al. | {Hardware-Assisted}{On-Demand} Hypervisor Activation for Efficient Security Critical Code Execution on Mobile Devices | |
CN107667350B (en) | Virtualization-based platform protection technology | |
Criswell et al. | Virtual ghost: Protecting applications from hostile operating systems | |
US8839239B2 (en) | Protection of virtual machines executing on a host device | |
US10095862B2 (en) | System for executing code with blind hypervision mechanism | |
Li et al. | TEEv: Virtualizing trusted execution environments on mobile platforms | |
KR20170095161A (en) | Secure system on chip | |
Nasahl et al. | Hector-v: A heterogeneous cpu architecture for a secure risc-v execution environment | |
Hunt et al. | Confidential computing for OpenPOWER | |
KR102105760B1 (en) | Heterogeneous isolated execution for commodity gpus | |
Sensaoui et al. | An in-depth study of MPU-based isolation techniques | |
Evtyushkin et al. | Flexible hardware-managed isolated execution: Architecture, software support and applications | |
Deng et al. | Strongbox: A gpu tee on arm endpoints | |
Gu et al. | Enclavisor: A hardware-software co-design for enclaves on untrusted cloud | |
EP3646216B1 (en) | Methods and devices for executing trusted applications on processor with support for protected execution environments | |
Van Bulck et al. | Secure resource sharing for embedded protected module architectures | |
Sani et al. | The case for I/O-device-as-a-service | |
KR102192328B1 (en) | Processor including isolated interrupt handler for securing input channel on sgx and interrupt processing method thereof | |
US10938857B2 (en) | Management of a distributed universally secure execution environment | |
Sahita et al. | PROTECTING CRITICAL APPLICATIONS ON MOBILE PLATFORMS. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right |