KR20100048323A - Apparatus for and method of securing keyboard to evade stealth sniffing - Google Patents

Apparatus for and method of securing keyboard to evade stealth sniffing Download PDF

Info

Publication number
KR20100048323A
KR20100048323A KR1020080107421A KR20080107421A KR20100048323A KR 20100048323 A KR20100048323 A KR 20100048323A KR 1020080107421 A KR1020080107421 A KR 1020080107421A KR 20080107421 A KR20080107421 A KR 20080107421A KR 20100048323 A KR20100048323 A KR 20100048323A
Authority
KR
South Korea
Prior art keywords
keyboard
secret key
encryption module
security
scan code
Prior art date
Application number
KR1020080107421A
Other languages
Korean (ko)
Other versions
KR100998214B1 (en
Inventor
임강빈
Original Assignee
비티에스테크놀로지스(주)
임강빈
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 비티에스테크놀로지스(주), 임강빈 filed Critical 비티에스테크놀로지스(주)
Priority to KR1020080107421A priority Critical patent/KR100998214B1/en
Publication of KR20100048323A publication Critical patent/KR20100048323A/en
Application granted granted Critical
Publication of KR100998214B1 publication Critical patent/KR100998214B1/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/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/82Protecting input, output or interconnection devices
    • G06F21/83Protecting input, output or interconnection devices input devices, e.g. keyboards, mice or controllers thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/3017Runtime instruction translation, e.g. macros
    • G06F9/30178Runtime instruction translation, e.g. macros of compressed or encrypted instructions

Abstract

PURPOSE: An apparatus and a method for securing a keyboard to evade stealth sniffing are provided to enhance security by encoding input information through a secret key in a keyboard encryption module and the distribution of a single purpose secret key in a keyboard encryption module. CONSTITUTION: A scan code is transferred to a keyboard encryption module(130) from a keyboard, and the keyboard encryption module encodes the scan cod through the secret key. A keyboard controller(122) creates the secret key, and distributes the secret key to the keyboard encryption module. The keyboard controller receives the secret key from a security application(150), and transfers the encoded scan code to a security application program.

Description

스니핑 방지를 위한 키보드 보안 장치 및 방법{ APPARATUS FOR AND METHOD OF SECURING KEYBOARD TO EVADE STEALTH SNIFFING }Keyboard security device and method for preventing sniffing {APPARATUS FOR AND METHOD OF SECURING KEYBOARD TO EVADE STEALTH SNIFFING}

본 발명은 컴퓨터 보안 기술에 관한 것으로, 더욱 상세하게는 하드웨어를 기반으로 스니핑을 완벽하게 방지하기 위한 키보드 보안 장치 및 방법에 관한 것이다.TECHNICAL FIELD The present invention relates to computer security technology, and more particularly, to a keyboard security device and method for completely preventing sniffing based on hardware.

최근 들어, 전자상거래가 빈번해지면서 전자거래의 안전성을 강화하기 위해 다양한 컴퓨터 보안기술이 사용되고 있으나 사용자 개인정보 수집을 위한 해킹시도가 빈번히 발생하고 있고, 이를 위한 수단으로 사용자 및 관리자 패스워드 수집을 위한 스니핑 공격이 널리 이용되고 있다. 따라서 패스워드 스니핑 방지를 위하여 이미지 기반 패스워드와 같은 다양한 연구가 진행되고 있고, OTP와 같은 일회용 패스워드 방식이 도입되었지만 키보드컨트롤러의 근본적인 취약점 문제와 결부되어 완벽한 해결이 쉽지않다.Recently, various computer security technologies have been used to reinforce the safety of electronic transactions as the e-commerce becomes more frequent, but hacking attempts are frequently made to collect user personal information, and sniffing attacks to collect user and administrator passwords are used as means for this. This is widely used. Therefore, various researches such as image-based passwords have been conducted to prevent password sniffing, and although one-time password schemes such as OTP have been introduced, they are not easy to solve due to the fundamental vulnerability of the keyboard controller.

도 1은 일반적인 키보드컨트롤러와 키보드의 연결을 도시한 개략도로서, 키 보드(10)와 컴퓨터의 플랫폼(20)이 도시되어 있다. 키보드(10)는 스위치들이 행렬형태로 배열되어 있는 키매트릭스(12)와, 입출력포트를 통해 키매트릭스(12)를 스캔하여 눌려진 스위치를 검출하여 대응하는 스캔코드를 생성하는 키보드프로세서(14)로 구성된다.1 is a schematic diagram illustrating a connection between a general keyboard controller and a keyboard, in which a keyboard 10 and a platform 20 of a computer are shown. The keyboard 10 includes a key matrix 12 in which switches are arranged in a matrix form, and a keyboard processor 14 which scans the key matrix 12 through an input / output port and detects a pressed switch to generate a corresponding scan code. It is composed.

키보드(10)로부터의 입력을 처리하기 위한 컴퓨터의 플랫폼(20)은 키보드프로세서(14)와 연결되어 키보드의 스캔코드를 호스트프로세서(24)로 전달하는 키보드컨트롤러(22)와 키보드입력을 처리하기 위한 프로그램을 실행하는 호스트 프로세서(24)로 구성된다. 그리고 키보드(10)와 컴퓨터 본체(20)는 PS/2방식이나 USB방식으로 연결될 수 있는데, PS/2방식의 인터페이스에서는 클럭(clk)과 데이터(Data)선을 포함하고 있다.The platform 20 of the computer for processing input from the keyboard 10 is connected to the keyboard processor 14 to process keyboard input with the keyboard controller 22 which delivers the scan code of the keyboard to the host processor 24. It consists of a host processor 24 for executing a program. The keyboard 10 and the computer main body 20 may be connected by a PS / 2 method or a USB method. The PS / 2 interface includes a clock clk and a data line.

이와 같은 현재의 PC 플랫폼(20)에서 소프트웨어가 키보드 값 즉, 스캔코드를 수집하기 위해서는 스캔코드를 만들어 내는 키보드(10)로부터 스캔코드를 수신하여 소프트웨어에 전달하기 위해 키보드컨트롤러(22)를 거쳐야 한다. 키보드컨트롤러(22)는 키보드(10)와 호스트프로세서(24) 사이에 연결되어 있으며, 키보드 제어 및 호스트프로세서(24)와의 통신을 위하여 내부에 레지스터를 가지고 있다. In order to collect the keyboard value, that is, the scan code, in the current PC platform 20, the software must pass the keyboard controller 22 to receive the scan code from the keyboard 10 generating the scan code and transmit the scan code to the software. . The keyboard controller 22 is connected between the keyboard 10 and the host processor 24 and has a register therein for keyboard control and communication with the host processor 24.

PC의 플랫폼(20)은 키보드컨트롤러 레지스터에의 접근뿐만 아니라 키보드컨트롤러(22)로의 제어코드나 제어인자, 키보드(10)로의 명령코드 등을 전달하거나 키보드컨트롤러(22)로부터의 제어응답, 키보드(10)로부터의 명령응답 및 스캔코드 등을 수수하기 위하여 읽기와 쓰기가 가능한 컨트롤 포트와 데이터 포트의 두 포트를 준비하여 각각 "0x64" 번지와 "0x60" 번지에 할당하고 있다.The platform 20 of the PC not only accesses the keyboard controller registers, but also transmits control codes, control factors, command codes to the keyboard 10, and the like, control responses from the keyboard controller 22, keyboard ( In order to receive command response and scan code from 10), two ports of read and write control port and data port are prepared and assigned to "0x64" and "0x60", respectively.

그리고 제어코드는 키보드컨트롤러(22)에 전달되고 해석되어 다양한 기능을 수행하며 추가적으로 인자를 요구하거나 응답을 제공하는 경우도 있다. 명령코드는 키보드컨트롤러(22)를 통과하여 키보드(10)로 전달되며 인자나 응답을 요구하기도 한다. 스캔코드는 키보드(10)로부터 전달되어 키보드컨트롤러(22)를 통과하여 키보드 문자를 생성하는 데에 활용된다. In addition, the control code is transmitted and interpreted to the keyboard controller 22 to perform various functions, and in some cases, require additional arguments or provide a response. The command code is passed through the keyboard controller 22 to the keyboard 10 and may require arguments or responses. The scan code is transmitted from the keyboard 10 and passed through the keyboard controller 22 to be used to generate keyboard characters.

한편, 키보드(10)로부터 입력된 패스워드가 응용 프로그램으로 전달되는 일련의 과정에서 공격자에게 탈취당할 수 있는 다양한 포인트가 존재하는데, 이러한 탈취 포인트를 크게 나누면 운영체제 커널 수준과 키보드컨트롤러 수준으로 구분할 수 있다.On the other hand, there are a variety of points that can be hijacked by the attacker in the process of passing the password input from the keyboard 10 to the application program, and by dividing the hijacking point can be divided into the operating system kernel level and the keyboard controller level.

도 2는 종래의 키보드를 사용할 경우에 커널모드에서 구간별 취약점을 도시한 도면이고, 도 3은 유저모드에서의 구간별 취약점을 도시한 도면이다.FIG. 2 is a diagram illustrating vulnerabilities in sections in kernel mode when using a conventional keyboard, and FIG. 3 is a diagram showing vulnerabilities in sections in user mode.

도 2를 참조하면, 키보드 입력정보는 키보드 하드웨어(10)에서 키보드컨트롤러의 입출력포트(22a)를 거쳐 i8042prt.sys(34)를 통해 kbdclass.sys(36)로 전달된다. 커널모드에서 키보드 입력정보는 키보드 하드웨어(10)에서 전기적 신호에 의해 입력정보가 키보드 컨트롤러(22)에 전달되면 키보드 컨트롤러(22)는 입출력 포트(22a)에 키보드 스캔코드를 기록하고 인터럽트를 발생시킨다. 따라서 공격자는 도 2의 SP1에서와 같이 키보드 입출력 포트(22a)를 폴링하여 스캔코드를 취득할 수 있거나 SP2에서와 같이 인터럽트 벡터 테이블(32)의 주소를 통하여 인터럽트 오브젝트(33)를 거쳐 자신의 핸들로 치환하여 스캔코드를 취득할 수 있다.Referring to FIG. 2, the keyboard input information is transmitted from the keyboard hardware 10 to the kbdclass.sys 36 via the i8042prt.sys 34 via the input / output port 22a of the keyboard controller. In kernel mode, when the input information is transmitted to the keyboard controller 22 by an electrical signal from the keyboard hardware 10, the keyboard controller 22 writes a keyboard scan code to the input / output port 22a and generates an interrupt. . Therefore, the attacker can acquire the scan code by polling the keyboard input / output port 22a as in SP1 of FIG. 2 or handle his handle via the interrupt object 33 through the address of the interrupt vector table 32 as in SP2. The scan code can be obtained by substituting for.

도 3을 참조하면, 커널모드의 kbdclass.sys(36)로 입력된 정보는 필터드라이 버를 거쳐 시스템 메시지 큐(42)와 쓰레드 메시지 큐(44)를 거쳐 인도우즈 프로세스(46)로 전달된다. 이때 도 3의 SP3에서와 같이, 키보드 하드웨어 장치에 추가적인 기능을 삽입할 수 있는 환경을 제공하기 위한 필터드라이버에 의해 입력정보를 취득할 수 있다. 그리고 도 3의 SP4 및 SP5에 도시된 바와 같이 윈도 메시지 형태의 키보드 입력정보를 처리하는 과정이나 응용 프로그램의 메인함수를 치환하여 키보드 입력정보를 취득할 수 있다. Referring to FIG. 3, information input to kbdclass.sys 36 in kernel mode is transmitted to the in-house process 46 through the filter driver and the system message queue 42 and the thread message queue 44. In this case, as in SP3 of FIG. 3, input information may be acquired by a filter driver for providing an environment in which additional functions may be inserted into the keyboard hardware device. As shown in SP4 and SP5 of FIG. 3, the keyboard input information may be acquired by substituting the main function of the application or the process of processing the keyboard input information in the form of a window message.

그런데 이와 같은 커널 모드와 유저 모드의 각 구간 스니핑 공격은 대부분 소프트웨어적인 방법으로 해결 가능하나 가장 하위레벨에서 이루어지는 키보드 입출력 포트 폴링에 의한 스니핑은 현재 운영체제의 접근 권한 관리의 제한성, 키보드 컨트롤러의 근복적인 취약점 노출 등의 이유 때문에 소프트웨어적인 방법으로 해결할 수 없는 문제점이 있다. 즉, 운영체제 커널 수준에서의 탈취와 관련해서 사용하는 대개의 기술들은 인터럽트 및 예외처리 과정에서의 매우 상식적인 선점(preemption)을 노린 경우이며 탈취 포인트의 선택에 따라 사용자용 인터럽트 처리기를 대체하여 스캔코드를 얻는 방법, IDT 내의 키보드 인터럽트 벡터에 존재하는 게이트 디스크립터의 오프셋을 바꿔 운영체제의 인터럽트 객체를 대체하여 스캔코드를 얻는 방법, 디버그 트랩 등의 예외처리 기구를 이용하는 방법 등이 있으나 이러한 방법들에 대해서는 소프트웨어적인 보안기술로 충분히 해결할 수 있다. 그런데 현재 사용되고 있는 컴퓨터 하드웨어가 설계될 당시 정보보호에 대한 충분한 고려가 부재하였으며 이로부터 기인하는 키보드컨트롤러에서의 취약점에 대해서는 소프트웨어만으로는 효과적으로 해결할 수 있는 방법이 없다.However, such sniffing attacks in each kernel mode and user mode can be solved mostly by software methods. However, sniffing by keyboard I / O port polling at the lowest level is limited to the current operating system's access authority management and the weakness of the keyboard controller. There is a problem that cannot be solved by a software method for reasons such as exposure. In other words, most of the techniques used for operating system kernel level takeover are aimed at very common preemption in the process of interrupts and exceptions, and replace the user's interrupt handler according to the selection of the takeover point. How to obtain the scan code by changing the offset of the gate descriptor in the keyboard interrupt vector in the IDT, replacing the interrupt object of the operating system, and using exception handling mechanisms such as debug traps. It can be fully solved with the security technology. However, when the current computer hardware was designed, there was not enough information security consideration, and there is no effective way to solve the weaknesses in the keyboard controller.

본 발명은 상기와 같은 문제점을 해결하기 위해 제안된 것으로, 본 발명의 목적은 하드웨어를 이용하여 스니핑을 완벽하게 방지할 수 있는 키보드 보안 장치 및 방법을 제공하는 것이다.The present invention has been proposed to solve the above problems, and an object of the present invention is to provide a keyboard security device and method that can completely prevent sniffing using hardware.

상기와 같은 목적을 달성하기 위하여 본 발명의 장치는 키보드로부터 전달받은 스캔코드를 비밀키로 암호화하는 키보드 암호화 모듈과, 컴퓨터 플랫폼에서 실행되어 비밀키를 생성하여 분배하고 상기 비밀키로 암호화된 데이터를 복호하는 보안 응용프로그램으로부터 상기 비밀키를 전달받아 상기 키보드암호화모듈에 전달하고, 상기 키보드암호화모듈로부터 암호화된 스캔코드를 전달받아 상기 보안 응용프로그램에 전달하는 키보드컨트롤러를 포함하여 기존의 키보드 프로토콜과의 호환성을 유지하면서 소프트웨어에서 휘발성 포트를 사용하여 비밀키를 분해하는 것을 특징으로 한다.In order to achieve the above object, the device of the present invention is a keyboard encryption module for encrypting the scan code received from the keyboard with a secret key, and executed on a computer platform to generate and distribute a secret key and decrypt the data encrypted with the secret key. It receives the secret key from the security application program and passes it to the keyboard encryption module, and receives a encrypted scan code from the keyboard encryption module and a keyboard controller for passing to the security application program for compatibility with the existing keyboard protocols While retaining, the software uses the volatile port to decrypt the secret key.

그리고 상기 키보드 암호화모듈은 키보드와 PS/2 연결단자 사이에 탈부착할 수 있는 동글 형태로 구현되거나 PS/2방식과 USB방식을 인터페이스하는 변환 동글 형태로 구현될 수 있다.The keyboard encryption module may be implemented in a dongle form that can be attached and detached between a keyboard and a PS / 2 connection terminal, or in a conversion dongle form that interfaces between a PS / 2 method and a USB method.

상기와 같은 목적을 달성하기 위하여 본 발명의 방법은 보안 응용프로그램이 비밀키를 생성하는 단계; 상기 생성된 비밀키를 키보드컨트롤러의 휘발성 입출력포 트를 통해 키보드 암호화모듈에 전달하는 단계; 상기 키보드 암호화모듈이 상기 일정크기의 데이터를 상기 전달받은 비밀키로 암호화하여 상기 키보드컨트롤러로 전달하는 단계; 상기 키보드컨트롤러가 암호화된 스캔코드를 상기 보안 응용프로그램에 전달하는 단계; 및 상기 보안 응용프로그램이 상기 비밀키를 이용하여 암호화된 스캔코드를 복호화하는 단계를 구비한 것을 특징으로 한다.In order to achieve the above object, the method of the present invention comprises the steps of: generating a secret key by a security application; Transferring the generated secret key to a keyboard encryption module through a volatile input / output port of a keyboard controller; Encrypting, by the keyboard encryption module, the predetermined size of data with the received secret key and transmitting the encrypted data to the keyboard controller; The keyboard controller passing an encrypted scan code to the secure application; And decrypting, by the security application program, the scan code encrypted using the secret key.

그리고 상기 키보드 보안 방법은, 상기 보안 응용프로그램으로부터 전달된 명령에 따라 교란코드를 발생하는 단계를 더 구비할 수 있다.The keyboard security method may further include generating a disturbing code according to a command transmitted from the security application program.

본 발명에 따른 스니핑 방지를 위한 키보드 보안 장치 및 방법은 키보드와 PC 플랫폼의 키보드컨트롤러 사이에 하드웨어적으로 구현된 키보드암호화모듈과, PC 플랫폼상에서 실행되는 보안 응용프로그램을 포함하여 보안 응용프로그램이 키보드 암호화모듈에 일회성 비밀키를 분배하고, 키보드 암호화모듈은 입력정보를 비밀키를 이용하여 암호화한 후 보안 응용프로그램에 전송함으로써 키보드컨트롤러의 구조적인 취약점에 따른 보안 문제를 완벽하게 해결할 수 있다.Keyboard security apparatus and method for preventing sniffing according to the present invention is a keyboard encryption module implemented in hardware between the keyboard and the keyboard controller of the PC platform, and a security application including a security application running on the PC platform keyboard encryption The one-time secret key is distributed to the module, and the keyboard encryption module encrypts the input information using the secret key and transmits it to the security application, thereby completely solving the security problem caused by the structural weakness of the keyboard controller.

특히, 키보드컨트롤러의 휘발성 포트를 이용함으로써 프로토콜을 은닉할 수 있고 비밀키의 안전한 분배가 보장되며, 유휴 코드를 명령코드로 사용하여 기존 키보드와 호환성을 유지할 수 있고, 교란코드를 생성하도록 명령코드를 전달하여 보안을 강화할 수 있으며, 키 분산, 휘발성 비밀키, 모듈 내부정보 갱신 방안 등을 통해 보안성을 강화할 수 있다.In particular, by using the volatile port of the keyboard controller, it is possible to conceal protocols, secure distribution of secret keys, use idle codes as command codes, maintain compatibility with existing keyboards, and generate command codes to generate disturbing codes. Security can be strengthened by passing the key, and security can be strengthened through key distribution, volatile secret keys, and information updates inside the module.

본 발명과 본 발명의 실시에 의해 달성되는 기술적 과제는 다음에서 설명하는 본 발명의 바람직한 실시예들에 의하여 보다 명확해질 것이다. 다음의 실시예들은 단지 본 발명을 설명하기 위하여 예시된 것에 불과하며, 본 발명의 범위를 제한하기 위한 것은 아니다. The technical problems achieved by the present invention and the practice of the present invention will be more clearly understood by the preferred embodiments of the present invention described below. The following examples are merely illustrative of the present invention and are not intended to limit the scope of the present invention.

도 4는 본 발명에 따라 스니핑을 방지하기 위한 키보드 보안 장치를 도시한 개략도이고, 도 5는 본 발명에 따라 스니핑을 방지하기 위한 키보드 보안 절차의 전체 순서를 도시한 순서도이다.4 is a schematic diagram illustrating a keyboard security device for preventing sniffing according to the present invention, and FIG. 5 is a flowchart illustrating the entire sequence of a keyboard security procedure for preventing sniffing according to the present invention.

본 발명에 따른 키보드 보안 장치는 도 4에 도시된 바와 같이, 키보드(110)와 PC 플랫폼(120)의 키보드 컨트롤러(122) 사이에 하드웨어적으로 구현된 키보드 암호화모듈(130)과, PC 플랫폼상에서 실행되는 보안 드라이버(140), 및 보안 응용프로그램(150)으로 구성되어 보안 응용프로그램(150)이 키보드 암호화모듈(130)에 일회성 비밀키를 분배하고, 키보드 암호화모듈(130)은 입력정보를 비밀키를 이용하여 암호화한 후 보안 응용프로그램(150)에 전송하며, 보안 응용프로그램(150)은 암호화된 입력정보를 비밀키를 이용하여 복호화하는 것이다.As shown in FIG. 4, the keyboard security device according to the present invention includes a keyboard encryption module 130 hardware-implemented between the keyboard 110 and the keyboard controller 122 of the PC platform 120 and a PC platform. Security driver 140 to be executed, and the security application 150, the security application 150 distributes the one-time secret key to the keyboard encryption module 130, the keyboard encryption module 130 secrets the input information After encrypting using a key, it is transmitted to the security application 150, and the security application 150 decrypts the encrypted input information using the secret key.

도 4를 참조하면, 키보드(110)는 스위치들이 행렬형태로 배열되어 있는 키매트릭스(112b)와, 입출력포트(112a,112c)를 통해 키매트릭스(112b)를 스캔하여 눌려진 스위치를 검출하여 대응하는 스캔코드를 생성하는 키보드프로세서(114)로 구성된다.Referring to FIG. 4, the keyboard 110 detects a pressed switch by scanning the key matrix 112b in which the switches are arranged in a matrix form, and the key matrix 112b through the input / output ports 112a and 112c. It consists of a keyboard processor 114 for generating a scan code.

키보드 암호화 모듈(130)은 키보드(110)와 컴퓨터 본체(120)의 PS/2 연결단자 사이에 탈부착할 수 있는 동글 형태로 구현되거나 PS/2방식과 USB방식을 인터페이스하는 변환 동글 형태로 구현될 수 있으며, 키보드(110)와 키보드 컨트롤러(122) 사이에서 접지(GND), +5V, 키보드 데이터(KBD Data), 키보드 클럭(KBD Clock), 리셋(Reset) 신호선, 내부정보 갱신을 위한 통신포트(IN/OUT, OUT)로 연결된다. 특히, 상기 통신 포트는 키보드 암호화 모듈의 내부정보 갱신을 위하여 모듈을 분해하지 않고 PS/2 연결단자를 통하여 내부정보 갱신장치(160)와 연결될 수 있다. The keyboard encryption module 130 may be implemented in the form of a dongle detachable between the keyboard 110 and the PS / 2 connection terminal of the computer main body 120 or in the form of a conversion dongle that interfaces between the PS / 2 method and the USB method. Between the keyboard 110 and the keyboard controller 122, ground (GND), + 5V, keyboard data (KBD Data), keyboard clock (KBD Clock), reset signal line, communication port for internal information update Connected to (IN / OUT, OUT). In particular, the communication port may be connected to the internal information updating apparatus 160 through the PS / 2 connection terminal without disassembling the module for updating the internal information of the keyboard encryption module.

키보드 암호화모듈(130)은 보안 응용프로그램(150)으로부터 전달된 비밀키로 스캔코드를 암호화하여 키보드컨트롤러(122)로 전송하고, 키보드컨트롤러(122)와 보안 드라이버(140)를 거쳐 전달된 암호화된 스캔코드는 보안 응용프로그램(150)에서 복호화된 후 해당 응용 프로그램으로 전달된다. 따라서 키보드컨트롤러(122)의 입출력포트(0x60)에서 스캔 코드가 스니핑에 의해 공격당하더라도 암호화되어 복호가 불가능하므로 키보드의 보안 문제를 완전히 해결할 수 있다. 이때 키보드 암호화모듈(130)의 암호화 알고리즘으로는 블럭암호화방식 및 스트림암호화방식을 모두 사용할 수 있다.The keyboard encryption module 130 encrypts the scan code with the secret key transmitted from the security application 150 and transmits the scan code to the keyboard controller 122, and the encrypted scan transmitted through the keyboard controller 122 and the security driver 140. The code is decrypted in the security application 150 and then passed to the application. Therefore, even if a scan code is attacked by sniffing at the input / output port (0x60) of the keyboard controller 122, it is encrypted and cannot be decrypted, thereby completely solving the security problem of the keyboard. In this case, the encryption algorithm of the keyboard encryption module 130 may use both a block encryption method and a stream encryption method.

도 5를 참조하면, 응용 계층(L3)에서 응용 프로그램은 키보드 암호화 모듈이 설치되는 지역 컴퓨터 또는 원격에 위치하고 있는 컴퓨터에 일부 또는 전체가 설치되어 실행되는 경우를 포함하며, 보안 키보드 드라이버를 설치하는 과정을 포함할 수 있다(S1,S2). 보안 응용 프로그램이 활성화되면, 다회성 또는 일회성 비밀키를 생성한다(S3,S4).Referring to FIG. 5, in the application layer L3, an application includes a case in which part or all of the application is installed and executed in a local computer where a keyboard encryption module is installed or a computer located at a remote location. It may include (S1, S2). When the security application is activated, generate a one-time or one-time secret key (S3, S4).

이어 커널계층(L2)을 통해 비밀키를 전송하고, 하드웨어 계층(L1)에서는 공유 세션키를 생성하며 사용자로부터 패스워드를 입력받는다(S5~S7). 사용자로부터 패스워드가 입력되면, 하드웨어계층(L1)에서 패딩을 생성한 후 암호화를 수행한다(S8,S9). 이때, 패스워드 추출 방지 등의 보안성 강화를 위하여 패스워드를 구성하는 문자마다 별도의 비밀키를 할당하여 암호화할 수 있으며, 이러한 경우 응용계층은 별도의 비밀키를 생성하여 키보드 암호화 모듈에 전달하며 키보드로부터 엔터키가 입력될 때까지 암호화 및 결과 전송 과정을 반복한다. Subsequently, the secret key is transmitted through the kernel layer L2, and the hardware layer L1 generates a shared session key and receives a password from the user (S5 to S7). If a password is input from the user, the padding is generated in the hardware layer L1 and then encrypted (S8, S9). In this case, in order to enhance security, such as password extraction prevention, a separate secret key may be assigned and encrypted for each character constituting the password. In this case, the application layer generates a separate secret key and delivers it to the keyboard encryption module. The encryption and the result transmission are repeated until the enter key is entered.

이어 커널계층(L2)을 통해 응용 계층으로 암호정보를 전송하고, 응용계층(L3)에서는 암호정보를 복호 한 후 패스워드를 추출하고, 패스워드를 비교하여 비교결과를 응용 프로그램으로 전송한다(S10~S13). Subsequently, the encryption information is transmitted to the application layer through the kernel layer (L2), and the application layer (L3) decodes the password information, extracts the password, and compares the passwords and transmits the comparison result to the application program (S10 to S13). ).

한편, 비밀키방식의 암호화에서는 비밀키를 안전하게 분배하는 것이 매우 중요한데, 본 발명에 따른 키보드 보안장치는 다음과 같은 방식으로 비밀키를 안전하게 분배한다.On the other hand, in secret key encryption, it is very important to securely distribute the secret key. The keyboard security device according to the present invention distributes the secret key safely in the following manner.

키보드 컨트롤러(122)는 소프트웨어와의 키보드 정보 송수신을 위하여 입력 버퍼와 출력 버퍼를 가지고 있으며, 소프트웨어는 이들 버퍼를 읽고 쓰기 위하여 "0x60(데이터포트)"과 "0x64(컨트롤 포트)"의 입출력 주소를 이용한다. 따라서 본 발명에서는 보안 응용프로그램(150)이 키보드 암호화모듈(130)에 비밀키를 전송하는 과정에서는 해당 비밀키가 누출되지 않도록, 비밀키를 "0x60" 번지의 키보드컨트롤러(122)의 입력 버퍼에 전달한다. "0x60" 포트를 통하여 입력 버퍼에 전달되는 정보는 정보를 전달하는 당사자인 보안 응용프로그램(150)과 키보드컨트롤러(122) 또는 키보드(110) 자체만이 알고 있는 정보이며, 기타 소프트웨어적 입장에서는 휘발성 정보로서 다른 소프트웨어에 의하여 되찾을 수 없는 값이 된다. The keyboard controller 122 has an input buffer and an output buffer for sending and receiving keyboard information with the software, and the software inputs and outputs addresses of "0x60 (data port)" and "0x64 (control port)" to read and write these buffers. I use it. Therefore, in the present invention, in the process of transmitting the secret key to the keyboard encryption module 130 by the security application 150, the secret key is stored in the input buffer of the keyboard controller 122 at "0x60" address so that the secret key does not leak. To pass. The information passed to the input buffer through the "0x60" port is known only by the security application 150 and the keyboard controller 122 or the keyboard 110 itself, which is the party transferring the information, and is volatile for other software. The information becomes a value that cannot be retrieved by other software.

따라서 본 발명에서 제안한 안전한 비밀키 분배는 보안 응용프로그램(150)에서 비밀키를 생성하고, 키보드 컨트롤러(122)의 입출력 포트 "0x60"을 통하여 키보드 암호화모듈(130)로 안전하게 전송한다. 여기서, 입력정보는 사용자로부터 입력받은 패스워드와 난수 패딩을 더하여 구성할 수 있다. 보다 안전한 정보를 만들기 위하여 추가되는 패딩의 위치도 임의 선택 가능하도록 할 수 있다. 다만, 복호시 패딩 추출을 위하여 실제 패딩의 위치정보를 상호 협의된 방법으로 전달할 수 있다.Therefore, the secure secret key distribution proposed in the present invention is secure The application 150 generates a secret key and securely transmits it to the keyboard encryption module 130 through the input / output port "0x60" of the keyboard controller 122. Here, the input information may be configured by adding a password input from the user and random number padding. In order to make the information more secure, the padding position to be added may be arbitrarily selected. However, in order to extract the padding during decoding, the position information of the actual padding may be transmitted in a mutually negotiated manner.

또한, 상기 보안 응용프로그램(150)과 키보드 암호화 모듈(130)은 상호 협약된 방법으로 비밀키를 분산하여 공유하거나 별도의 내부정보갱신장치(160)를 통해 발급받아 관리하면서 분산된 비밀키 일부에 대하여 생성 방법을 공유하고, 상호 별도로 생성한 일부 분산 비밀키를 포함하여 암호화하고 복호화함으로써 분산된 일부 비밀키를 상호 교환하지 않고, 키보드 스캔코드를 보호할 수도 있다.In addition, the security application 150 and the keyboard encryption module 130 is distributed to share the secret key in a mutually agreed method or by receiving and managing through a separate internal information updater 160 to a part of the distributed secret key It is possible to protect the keyboard scan code without mutually exchanging some of the distributed secret keys by sharing the generation method and encrypting and decrypting some distributed secret keys generated separately from each other.

이와 같이 본 발명에 따르면 난수 패딩을 이용하여 같은 비밀키와 패스워드가 입력되더라도 출력된 암호정보는 상이하며, 입력정보와 암호정보를 알고 있는 공격자의 선택된 평문 공격(Chosen-plaintext attack)에도 안전하다. Thus, according to the present invention, even if the same secret key and password are input using random number padding, the output cipher information is different, and it is safe even in a selected plaintext attack of an attacker who knows the input information and the cipher information.

복호화 과정은 암호화 과정과 같이 공유한 비밀키를 이용하여 이루어지며, 복호 된 데이터에서 패딩을 찾아 제외하여 입력정보를 추출한다. The decryption process is performed using the shared secret key as in the encryption process, and the input information is extracted by excluding the padding from the decrypted data.

[실험예][Experimental Example]

본 발명에 따라 제작한 키보드 보안장치를 널리 사용되고 있던 사용 제품과 비교 검증한 결과 다음 표1과 같다.As a result of comparing and verifying a keyboard security device manufactured according to the present invention with a widely used product, the following Table 1 is provided.

스니핑 구간Sniffing Segment 스니핑 방법Sniffing method 기존 보안방법Existing Security Method 보안 키보드Security keyboard 윈도우 메시지 후킹Windows message hooking Keylogger을 이용한 스니핑Sniffing with Keylogger 가상 스캔코드로 인한 실제 입력정보 판별 불가Unable to determine actual input information due to virtual scan code Null 정보 취득Get Null Information 인터럽트 벡터테이블 후킹Hooking Interrupt Vector Tables 인터럽트 벡터 테이블을 자체 제작한 스니핑 핸들로 치환Replace interrupt vector table with your own sniffing handle 가상 스캔코드로 인한 실제 입력정보 판별 불가Unable to determine actual input information due to virtual scan code 암호 정보 취득Get Password Information 단순 포트 폴링Simple Port Polling 키보드 컨트롤러 입출력포트를 단순 폴링하여 스캔코드 취득Acquire scan codes by simply polling the keyboard controller I / O ports 가상 스캔코드로 인한 실제 입력정보 판별 불가Unable to determine actual input information due to virtual scan code 암호 정보 취득Get Password Information 하드웨어 취약점을 이용한 포트 폴링Port Polling Using Hardware Vulnerabilities 하드웨어 취약점을 이용하여 키보드로부터 입력된 스캔 코드만 취득Acquire only scan code input from keyboard using hardware vulnerability 입력정보 노출Input exposure 암호 정보 취득Get Password Information

상기 표1은 비교 검증결과로서 실험결과 기존 보안방법은 대부분의 스니핑 구간에서 입력정보에 대하여 보호가 되었지만 키보드 컨트롤러의 하드웨어 취약점을 이용한 포트 폴링에서는 입력정보가 노출되었다. 그러나 본 발명에 따른 보안 키보드 프로토콜은 기존 보안방법에 비해 우수한 성능을 보임을 검증하였다. Table 1 shows the comparison verification results. As a result of the experiment, the existing security method is protected against input information in most sniffing sections, but the input information is exposed in port polling using a hardware vulnerability of the keyboard controller. However, it has been verified that the secure keyboard protocol according to the present invention shows superior performance compared to the existing security method.

이상에서 본 발명은 도면에 도시된 일 실시예를 참고로 설명되었으나, 본 기술분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. The present invention has been described above with reference to one embodiment shown in the drawings, but those skilled in the art will understand that various modifications and equivalent other embodiments are possible therefrom.

도 1은 일반적인 키보드컨트롤러와 키보드의 연결을 도시한 개략도,1 is a schematic diagram illustrating a connection between a general keyboard controller and a keyboard;

도 2는 종래의 키보드를 사용할 경우에 커널모드에서 구간별 취약점을 도시한 도면, 2 is a diagram showing the vulnerability of each section in the kernel mode when using a conventional keyboard,

도 3은 유저모드에서의 구간별 취약점을 도시한 도면,3 is a diagram showing the vulnerability of each section in the user mode,

도 4는 본 발명에 따라 스니핑을 방지하기 위한 키보드 보안 장치를 도시한 개략도, 4 is a schematic diagram illustrating a keyboard security device for preventing sniffing according to the present invention;

도 5는 본 발명에 따라 스니핑을 방지하기 위한 키보드 보안 절차의 전체 순서를 도시한 순서도이다. 5 is a flow chart illustrating the entire sequence of a keyboard security procedure for preventing sniffing in accordance with the present invention.

*도면의 주요부분에 대한 부호의 설명DESCRIPTION OF THE REFERENCE NUMERALS

110: 키보드 114: 키보드프로세서110: keyboard 114: keyboard processor

120: PC 플랫폼 122: 키보드컨트롤러120: PC platform 122: keyboard controller

130: 키보드 암호화모듈 140: 보안 드라이버130: keyboard encryption module 140: security driver

150: 보안 응용프로그램150: security application

Claims (7)

키보드로부터 전달받은 스캔코드를 비밀키로 암호화하는 키보드 암호화 모듈; 및A keyboard encryption module for encrypting the scan code received from the keyboard with a secret key; And 컴퓨터 플랫폼에서 실행되어 비밀키를 생성하여 분배하고 상기 비밀키로 암호화된 데이터를 복호하는 보안 응용프로그램으로부터 상기 비밀키를 전달받아 상기 키보드암호화모듈에 전달하고, 상기 키보드암호화모듈로부터 암호화된 스캔코드를 전달받아 상기 보안 응용프로그램에 전달하는 키보드컨트롤러를 포함하는 것을 특징으로 하는 스니핑 방지를 위한 키보드 보안 장치.It is executed on a computer platform to generate and distribute a secret key and receive the secret key from a security application that decrypts the data encrypted with the secret key to the keyboard encryption module, and transmits the encrypted scan code from the keyboard encryption module. A keyboard security device for sniffing prevention, characterized in that it comprises a keyboard controller for receiving and delivering to the security application. 제1항에 있어서, 상기 키보드컨트롤러는The method of claim 1, wherein the keyboard controller 데이터입출력포트와 컨트롤입출력포트를 구비하고, 상기 비밀키를 휘발성포트인 상기 데이터입출력포트를 통해 상기 보안 응용프로그램으로부터 전달받아 비밀키 분배의 안전성을 확보할 수 있도록 된 것을 특징으로 하는 스니핑 방지를 위한 키보드 보안 장치.And a data input / output port and a control input / output port, wherein the secret key is transmitted from the security application through the data input / output port, which is a volatile port, to secure the secret key distribution. Keyboard security device. 제1항에 있어서, 상기 키보드 암호화모듈은The method of claim 1, wherein the keyboard encryption module 보다 안전한 정보를 만들기 위하여 추가되는 패딩의 위치도 임의 선택 가능하도록 된 것을 특징으로 하는 스니핑 방지를 위한 키보드 보안 장치.Keyboard security device for sniffing prevention, characterized in that the position of the padding added to make more secure information can be arbitrarily selected. 제1항에 있어서, 상기 키보드 암호화모듈은The method of claim 1, wherein the keyboard encryption module 상기 키보드와 PS/2 연결단자 사이에 탈부착할 수 있는 동글 형태로 구현되거나 PS/2방식과 USB방식을 인터페이스하는 변환 동글 형태로 구현될 수 있는 것을 특징으로 하는 스니핑 방지를 위한 키보드 보안 장치.Keyboard security device for sniffing prevention, it may be implemented in the form of a dongle detachable between the keyboard and the PS / 2 connection terminal or in the form of a conversion dongle interface between the PS / 2 method and the USB method. 보안 응용프로그램이 비밀키를 생성하는 단계;Generating a secret key by the security application; 상기 생성된 비밀키를 키보드컨트롤러의 휘발성 입출력포트를 통해 키보드 암호화모듈에 전달하는 단계;Transferring the generated secret key to a keyboard encryption module through a volatile input / output port of a keyboard controller; 상기 키보드 암호화모듈이 상기 일정크기의 데이터를 상기 전달받은 비밀키로 암호화하여 상기 키보드컨트롤러로 전달하는 단계;Encrypting, by the keyboard encryption module, the predetermined size of data with the received secret key and transmitting the encrypted data to the keyboard controller; 상기 키보드컨트롤러가 암호화된 스캔코드를 상기 보안 응용프로그램에 전달하는 단계; 및The keyboard controller passing an encrypted scan code to the secure application; And 상기 보안 응용프로그램이 상기 비밀키를 이용하여 암호화된 스캔코드를 복호화하는 단계를 구비한 것을 특징으로 하는 스니핑 방지를 위한 키보드 보안 방법.And decrypting, by the security application, the scan code encrypted using the secret key. 제5항에 있어서, 상기 키보드 보안 방법은,The method of claim 5, wherein the keyboard security method, 상기 보안 응용프로그램으로부터 전달된 명령에 따라 교란코드를 발생하는 단계를 더 구비한 것을 특징으로 하는 스니핑 방지를 위한 키보드 보안 방법.And generating a disturbing code according to a command transmitted from the security application program. 제5항에 있어서, 상기 보안 응용프로그램과 상기 키보드 암호화 모듈은The method of claim 5, wherein the security application and the keyboard encryption module 상호 협약된 방법으로 비밀키를 분산하여 관리하면서 분산된 일부 비밀키에 대하여 생성 방법을 공유하고, 상호 별도로 생성한 분산 비밀키를 이용하여 암호화하고 복호화함으로써 분산된 일부 비밀키를 상호 교환하지 않고, 키보드 스캔코드를 보호할 수 있는 것을 특징으로 하는 스니핑 방지를 위한 키보드 보안 방법.By distributing and managing secret keys in a mutually negotiated manner, sharing the generation method for some of the distributed secret keys, and encrypting and decrypting the distributed secret keys generated separately from each other without exchanging some of the distributed secret keys, A keyboard security method for sniffing prevention, characterized in that the keyboard scan code can be protected.
KR1020080107421A 2008-10-30 2008-10-30 Apparatus for and method of securing keyboard to evade stealth sniffing KR100998214B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080107421A KR100998214B1 (en) 2008-10-30 2008-10-30 Apparatus for and method of securing keyboard to evade stealth sniffing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080107421A KR100998214B1 (en) 2008-10-30 2008-10-30 Apparatus for and method of securing keyboard to evade stealth sniffing

Publications (2)

Publication Number Publication Date
KR20100048323A true KR20100048323A (en) 2010-05-11
KR100998214B1 KR100998214B1 (en) 2010-12-17

Family

ID=42275098

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080107421A KR100998214B1 (en) 2008-10-30 2008-10-30 Apparatus for and method of securing keyboard to evade stealth sniffing

Country Status (1)

Country Link
KR (1) KR100998214B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101219664B1 (en) * 2011-03-15 2013-01-21 한국전자통신연구원 Apparatus and method for encrypting input on keyboard
KR101302362B1 (en) * 2012-02-06 2013-09-06 소프트포럼 주식회사 Key input security system and method using the same
KR101368772B1 (en) * 2012-05-25 2014-02-28 이성만 Method and Device for Protecting Key Input
KR20180075987A (en) 2016-12-27 2018-07-05 (주)아모레퍼시픽 Oral composition comprising fermented green tea extract having excellent antibacterial effect on oral bacteria and anti-inflammatory effect
US20230013844A1 (en) * 2021-07-09 2023-01-19 New Millennium Technologies Llc System and method for securing keyboard input to a computing device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101219664B1 (en) * 2011-03-15 2013-01-21 한국전자통신연구원 Apparatus and method for encrypting input on keyboard
KR101302362B1 (en) * 2012-02-06 2013-09-06 소프트포럼 주식회사 Key input security system and method using the same
KR101368772B1 (en) * 2012-05-25 2014-02-28 이성만 Method and Device for Protecting Key Input
KR20180075987A (en) 2016-12-27 2018-07-05 (주)아모레퍼시픽 Oral composition comprising fermented green tea extract having excellent antibacterial effect on oral bacteria and anti-inflammatory effect
US20230013844A1 (en) * 2021-07-09 2023-01-19 New Millennium Technologies Llc System and method for securing keyboard input to a computing device

Also Published As

Publication number Publication date
KR100998214B1 (en) 2010-12-17

Similar Documents

Publication Publication Date Title
KR100334720B1 (en) Adapter Having Secure Function and Computer Secure System Using It
US9954826B2 (en) Scalable and secure key management for cryptographic data processing
CN107567630B (en) Isolation of trusted input/output devices
EP2672673B1 (en) Apparatus and method for secure data processing
US20060195907A1 (en) Data processing device
US20100023750A1 (en) System and Method for Controllably Concealing Data from Spying Application
US20150178515A1 (en) Device-based pin authentication process to protect encrypted data
CN103930899B (en) Method for the management public data of input and private data at equipment
JP2010092485A6 (en) Data processing apparatus, communication terminal device, and data processing method using data processing apparatus
CN104335549A (en) Secure data processing
US20050154890A1 (en) Method for secure key exchange
KR100998214B1 (en) Apparatus for and method of securing keyboard to evade stealth sniffing
US20100031040A1 (en) Information Communication System
US20200242235A1 (en) Virus immune computer system and method
Neugschwandtner et al. A transparent defense against USB eavesdropping attacks
Zhang et al. Trusttokenf: A generic security framework for mobile two-factor authentication using trustzone
US20230409700A1 (en) Systems and methods for managing state
CN111868724A (en) Virus immunization computer system and method
CN110740036A (en) Anti-attack data confidentiality method based on cloud computing
Horsch et al. CoKey: fast token-based cooperative cryptography
US11625498B2 (en) Cloud-based whitebox node locking
EP2202661B1 (en) Apparatus and method for protecting asset in computer system
WO2023069060A1 (en) Input encryption

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application
AMND Amendment
J201 Request for trial against refusal decision
B701 Decision to grant
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20131129

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20151117

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20161212

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20171227

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee