KR100951397B1 - Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network - Google Patents

Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network Download PDF

Info

Publication number
KR100951397B1
KR100951397B1 KR1020070112152A KR20070112152A KR100951397B1 KR 100951397 B1 KR100951397 B1 KR 100951397B1 KR 1020070112152 A KR1020070112152 A KR 1020070112152A KR 20070112152 A KR20070112152 A KR 20070112152A KR 100951397 B1 KR100951397 B1 KR 100951397B1
Authority
KR
South Korea
Prior art keywords
memory
node
base station
code
sensor
Prior art date
Application number
KR1020070112152A
Other languages
Korean (ko)
Other versions
KR20090046165A (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 KR1020070112152A priority Critical patent/KR100951397B1/en
Publication of KR20090046165A publication Critical patent/KR20090046165A/en
Application granted granted Critical
Publication of KR100951397B1 publication Critical patent/KR100951397B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1458Protection against unauthorised use of memory or access to memory by checking the subject access rights
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Abstract

본 발명은 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법에 관한 것으로서,The present invention relates to a prior code-verification method using memory space deletion in a wireless sensor network.

검증자인 베이스 스테이션이 요청 메시지 헤더(Req), 베이스 스테이션의 아이디(IDBS), 그리고 상기 아이디와 난스(n)를 상기 베이스 스테이션과 센서 노드 간에 분배된 안전키로 암호화한 3가지 메시지를 모두 상기 센서 노드에 전송하는 요청단계; 상기 난스를 시드로 하여 난수를 생성하고, 상기 난수를 상기 센서 노드 내 메모리의 빈 영역에 채우는 연산단계; 상기 센서 노드가 자신의 메모리 전체의 해쉬값을 응답으로 하여 상기 베이스 스테이션으로 전송하는 응답단계; 상기 센서 노드로부터 전송된 상기 해쉬값과 상기 베이스 스테이션이 가지고 있는 상기 센서 노드의 메모리 정보로 계산한 해쉬값을 비교하는 검증단계를 포함하여 구성되어,The sensor, the base station as a verifier, encrypts the request message header (Req), the ID of the base station (ID BS ), and all three messages by encrypting the ID and nonce (n) with a security key distributed between the base station and the sensor node. Requesting to send to the node; Generating a random number using the nonce as a seed and filling the random number with an empty area of a memory in the sensor node; A response step of the sensor node transmitting the hash value of its entire memory to the base station in response; And a verification step of comparing the hash value transmitted from the sensor node with a hash value calculated from memory information of the sensor node owned by the base station.

매우 간단한 방식으로 동작하나 정확한 시간 정보에 의존하지 않고서도 센서 노드 내의 악의적 코드를 발견할 수 있는 효과가 있다.It works in a very simple manner but has the effect of detecting malicious code within the sensor node without relying on accurate time information.

Description

무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법{Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network}Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network

본 발명은 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법에 관한 것이며, 더욱 상세하게는 목표 노드의 메모리 안에 악의적 코드가 동작할 공간을 남기지 못하도록 만든 후 전체 메모리 내용의 값을 전달하는 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법에 관한 것이다.The present invention relates to a method of prior code-validation using memory space deletion in a wireless sensor network, and more particularly, to prevent malicious code from leaving a space in a memory of a target node and to transmit a value of the entire memory contents. A prior code-verification method using memory space deletion in a wireless sensor network.

현재 무선 센서 네트워크에서 보안은 가장 중요한 이슈 중 하나이다. 예를 들어, 군사 감시 용도로 쓰이는 무선 센서 네트워크에서 노드가 적에 의해 포획 당하여 공격 용도로 쓰이게 된다면 이런 노드들은 적의 침입을 감지해낼 수 없고, 심지어는 아군의 패배를 초래하는 거짓 정보를 보고하게 할 수도 있다. 이러한 센서 노드들의 비정상적 행위를 막기 위해, 의심스러운 노드를 증명하는 방법이 필요하 다.Currently, security is one of the most important issues in wireless sensor networks. For example, in a wireless sensor network used for military surveillance, if a node is captured by an enemy and used for attack, these nodes will not be able to detect the enemy's intrusion and may even report false information resulting in an allied defeat. have. In order to prevent abnormal behavior of these sensor nodes, a method of proving suspicious nodes is needed.

불행히도 노드에 대한 물리적 공격은 어떠한 방법으로도 막을 수 없다. 오직 노드 내부의 수정을 물리적으로 강제하는 하드웨어 모듈만이 포획 노드가 다른 노드에게 피해를 주는 악의적 노드로 변하는 것을 방지할 수 있을 뿐이다. 따라서, 지금까지의 연구는 대부분 어떻게 오염된 노드를 발견할 수 있는지에 대해 초점을 두어왔다. 대부분의 이러한 연구에선 오직 오염된 노드가 비정상적 행위를 하고 난 뒤에서야 그 오염된 노드를 발견할 수 있다. 따라서 노드의 비정상행위 전에 악의적 노드를 찾을 방법은 없었다. 이러한 이유 때문에 WSN(wireless sensor network) 은 악의적 노드에 의한 피해에 취약하였다.Unfortunately, physical attacks on nodes cannot be prevented in any way. Only hardware modules that physically force modifications inside a node can prevent the capture node from turning into a malicious node that damages other nodes. Therefore, most of the research so far has focused on how to find contaminated nodes. In most of these studies, the contaminated node can only be found after the contaminated node has behaved abnormally. Therefore, there was no way to find the malicious node before the node's abnormal behavior. For this reason, the WSN (wireless sensor network) is vulnerable to damage by malicious nodes.

따라서, 악의적 노드가 비정상적 행위를 수행하기 전에 코드의 이상 여부를 알아낼 수 있는 사전 탐지 방법이 필요하다. SWATT(SoftWare-based Attestation for embedded device)은 이러한 소프트웨어 기반 증명을 위해 고안되었다. 상기 SWATT는 매우 간단하게 적용될 수 있지만 정확한 시간을 기반으로 동작하기 때문에 예상할 수 없는 네트워크 지연에 민감하고 하드웨어 플랫폼에 의존적이라는 한계가 있다.Therefore, there is a need for a proactive detection method that can detect anomalies in code before a malicious node performs abnormal behavior. SoftWare-based Attestation for embedded device (SWATT) is designed for this software-based proof. The SWATT can be applied very simply, but because it operates based on accurate time, there is a limitation that it is sensitive to unexpected network delay and is dependent on the hardware platform.

즉, 유비쿼터스 환경이 점차 그 영역을 넓혀가고 있는 현 시점에서, 그 응용 분야의 하나인 무선 센서 네트워크 환경에서 공격자가 악의적 목적으로 센서 노드 디바이스를 포획, 수정하였을 때 수반되는 피해에 대한 보안 솔루션이 절대적으로 필요하다. 그러나, 기존의 원격 검증방식은 악의적 코드를 검출하는데 있어서 연산 시간에 대한 면밀한 측정을 필요로 하며, 만약 노드가 더 강력한 마이크로프로세서를 사용한다면 연산 시간의 차이를 증폭시키기 위해서 검증의 더 많은 반복 실행이 필요하다는 문제점이 있다.In other words, at the present time when the ubiquitous environment is gradually expanding its scope, in the wireless sensor network environment, one of the application fields, the security solution against the damages that occur when an attacker captures and modifies the sensor node device for malicious purposes is absolutely absolute. As needed. However, existing remote verification methods require a careful measurement of the computation time in detecting malicious code, and if the node uses a more powerful microprocessor, more iterative execution of verification is required to amplify the difference in computation time. There is a problem that it is necessary.

본 발명은 상기한 바와 같은 종래의 문제점을 개선하기 위한 것으로서, 목표 노드의 메모리 안에 악의적 코드가 동작할 공간을 남기지 못하도록 만든 후 전체 메모리 내용의 값을 전달하여, 목표 노드의 전체 메모리 내용을 검증하고 SWATT와는 달리 정확한 시간 정보에 의지하지 않고서도 악의적 코드가 자신을 은폐시킬 확률을 현저히 떨어뜨릴 수 있는, 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법을 제공하는 데 있다.The present invention is to improve the conventional problems as described above, to prevent the malicious code in the memory of the target node to leave a space for operation, and then pass the value of the entire memory content, to verify the entire memory content of the target node Unlike SWATT, there is provided a prior code-verification method using memory space deletion in a wireless sensor network that can significantly reduce the probability of malicious code concealing itself without relying on accurate time information.

본 발명에 따른 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법은,The preceding code-verification method using memory space deletion in the wireless sensor network according to the present invention,

검증자인 베이스 스테이션이 요청 메시지 헤더(Req), 베이스 스테이션의 아이디(IDBS), 그리고 상기 아이디와 난스(n)를 상기 베이스 스테이션과 센서 노드 간에 분배된 안전키로 암호화한 3가지 메시지를 모두 상기 센서 노드에 전송하는 요 청단계; 상기 난스를 시드로 하여 난수를 생성하고, 상기 난수를 상기 센서 노드 내 메모리의 빈 영역에 채우는 연산단계; 상기 센서 노드가 자신의 메모리 전체의 해쉬값을 응답으로 하여 상기 베이스 스테이션으로 전송하는 응답단계; 상기 센서 노드로부터 전송된 상기 해쉬값과 상기 베이스 스테이션이 가지고 있는 상기 센서 노드의 메모리 정보로 계산한 해쉬값을 비교하는 검증단계를 포함한다.The sensor, the base station as a verifier, encrypts the request message header (Req), the ID of the base station (ID BS ), and all three messages by encrypting the ID and nonce (n) with a security key distributed between the base station and the sensor node. Requesting to send to the node; Generating a random number using the nonce as a seed and filling the random number with an empty area of a memory in the sensor node; A response step of the sensor node transmitting the hash value of its entire memory to the base station in response; And a verification step of comparing the hash value transmitted from the sensor node with a hash value calculated from memory information of the sensor node owned by the base station.

또한, 상기 요청단계는 상기 3가지 메시지를 수신한 후, 상기 암호화된 메시지를 복호화하여 상기 베이스 스테이션의 아이디와 비교하여 상기 메시지의 합법성 여부를 판단하는 과정을 더 포함할 수 있다.The requesting step may further include determining whether the message is legitimate by decrypting the encrypted message and comparing the ID with the ID of the base station after receiving the three messages.

또한, 상기 연산단계에서 상기 메모리의 빈 영역은 메모리 내에서 증명 코드, 펌웨어 코드, 데이터 영역을 제외한 메모리 영역이다.Also, in the operation step, the free area of the memory is a memory area excluding the proof code, the firmware code, and the data area in the memory.

또한, 상기 연산단계는 상기 센서 노드 내 메모리의 빈 영역을 두 개의 난수 값의 XOR 연산으로 채울 수 있다. 바람직하게는, 상기 연산단계는 상기 센서 노드 내 메모리의 빈 영역을 두 개의 난수 값의 XOR 연산으로 채운 후, 반대 방향으로 동작하면서 기존의 난수가 있던 공간을 새롭게 생성된 난수와의 XOR 연산으로 덮어쓰도록 할 수 있다.In addition, the calculating step may fill an empty area of the memory in the sensor node with an XOR operation of two random values. Preferably, the calculating step fills an empty area of the memory in the sensor node with an XOR operation of two random values, and then operates in the opposite direction to cover the space in which the existing random number was located with an XOR operation with the newly generated random number. Can be used.

또한, 상기 해쉬값은 증명 코드, 펌웨어 코드와 빈 영역으로 이루어진 센서 노드의 마이크로 콘트롤러의 램(RAM) 메모리로부터 데이터 영역과 빈 영역으로 이루어진 프로그램 가능한 플래쉬 메모리까지의 모든 해쉬값이다.The hash value is also all hash values from the RAM memory of the microcontroller of the sensor node consisting of the proof code, the firmware code and the blank area to the programmable flash memory of the data area and the blank area.

또한, 상기 검증단계는 상기 센서 노드로부터 전송된 상기 해쉬값과 상기 베 이스 스테이션이 가지고 있는 상기 센서 노드의 메모리 정보로 계산한 해쉬값을 비교한 후, 상기 두 해쉬값이 일치하지 않으면 상기 베이스 스테이션은 상기 센서 노드가 공격자에 의해 오염되거나 불법적으로 수정되었다고 판단하고, 이를 다른 센서 노드들에 공지하는 과정을 더 포함할 수 있다.Further, the verifying step compares the hash value transmitted from the sensor node with a hash value calculated using memory information of the sensor node owned by the base station, and if the two hash values do not match, the base station. The method may further include determining that the sensor node is contaminated or illegally modified by an attacker, and notifying the sensor node to other sensor nodes.

또한, 상기 센서 노드의 응답 시간이 미리 결정된 기준 시간을 초과하는 경우, 상기 베이스 스테이션은 상기 센서 노드가 공격자에 의해 오염되거나 불법적으로 수정되었다고 판단하고, 이를 다른 센서 노드들에 공지하는 과정을 더 포함할 수 있으며, 이때 상기 미리 결정된 기준 시간은 15초인 것이 바람직하다.In addition, when the response time of the sensor node exceeds a predetermined reference time, the base station further determines that the sensor node is contaminated or illegally modified by an attacker, and further including the step of notifying to other sensor nodes. In this case, the predetermined reference time is preferably 15 seconds.

상기한 바와 같은 구성으로 이루어진 본 발명에 따른 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법에 의하면, 매우 간단한 방식으로 동작하나 정확한 시간 정보에 의존하지 않고서도 센서 노드 내의 악의적 코드를 발견할 수 있는 효과가 있다.According to the preceding code-verification method using the memory space deletion in the wireless sensor network according to the present invention having the above-described configuration, it operates in a very simple manner but finds a malicious code in the sensor node without relying on accurate time information. It can work.

이하, 첨부된 도면을 참조하여 본 발명의 실시예를 상세히 설명한다. 우선, 도면들 중 동일한 구성요소 또는 부품들은 가능한 한 동일한 참조부호를 나타내고 있음에 유의해야 한다. 본 발명을 설명함에 있어서 관련된 공지기능 혹은 구성에 대한 구체적인 설명은 본 발명의 요지를 모호하게 하지 않기 위해 생략한다.Hereinafter, with reference to the accompanying drawings will be described an embodiment of the present invention; First, it should be noted that the same components or parts in the drawings represent the same reference numerals as much as possible. In describing the present invention, detailed descriptions of related well-known functions or configurations are omitted in order not to obscure the gist of the present invention.

도 1은 본 발명에서 사용되는 표기에 대한 설명을 도시한 도, 도 2는 센서 노드의 메모리를 개념적으로 도시한 도로서, 여기서 Mem1은 마이크로 콘트롤러의 RAM, Memi는 프로그램 가능한 플래시 메모리를 도시한 도이다. 도 3a 내지 도 3c는 본 발명의 연산단계에서 목표 노드의 빈 메모리 공간을 채우는 과정을 도식적으로 도시한 도, 도 4는 상기 도 3a 내지 도 3c의 과정을 실행하기 위한 Fill_Memory(n) 알고리즘을 도시한 도, 도 5는 SHA-1을 사용하여 MIXED_MEM으로 표현한 혼합화의 일 예를 도시한 도, 도 6은 Fill_Memory(n) 알고리즘 전후의 메모리 내용 변화를 개념적으로 도시한 도, 도 7은 본 발명에 따른 선행 코드-검증 방법을 도식적으로 도시한 도, 도 8은 본 발명에 따른 선행 코드-검증 방법을 도시한 순서도, 도 9는 정상적 검증 방법의 총 연산시간과 공격코드의 총 연산시간의 차를 도시한 그래프이다.1 is a diagram illustrating a notation used in the present invention, FIG. 2 conceptually illustrates a memory of a sensor node, where Mem 1 is a RAM of a microcontroller and Mem i is a programmable flash memory. It is a degree. 3A to 3C schematically show a process of filling an empty memory space of a target node in the operation step of the present invention, and FIG. 4 shows a Fill_Memory (n) algorithm for executing the process of FIGS. 3A to 3C. FIG. 5 is a diagram showing an example of mixing represented by MIXED_MEM using SHA-1, FIG. 6 is a diagram conceptually illustrating changes in memory contents before and after the Fill_Memory (n) algorithm, and FIG. 8 is a flowchart illustrating a preceding code-verification method according to the present invention. FIG. 8 is a flowchart illustrating the preceding code-verification method according to the present invention. FIG. 9 is a difference between the total operation time of a normal verification method and the total operation time of an attack code. Is a graph.

먼저, 본 명세서에서는 검증자가 목표인 센서 노드(이하, 목표 노드)의 메모리 내용의 사본을 가지고 있다고 가정한다. 각각의 엔티티는 서로 간의 안전한 통신 채널을 구축하기 위해 키 쌍을 분배한다. 이 키 쌍은 무작위 키 선-분배 방법 등에 의해 설정될 수 있다. 그리고, 검증자가 원격으로 실행 가능한 증명코드가 목표 노드의 메모리 안에 탑재되어 있다고 가정한다. 공격자는 포획한 노드의 메모리 접근에 대한 모든 권한을 가지고 있다. 하지만 그 외의 하드웨어 구조에 대한 수정 가능성은 공격자가 외부 자원을 이용할 수 있다는 의미가 되므로 본 명세서에선 논외로 한다. 프로그램 가능한 플래쉬 메모리는 특별한 목적이 없는 한, 어떠한 빈 공간도 가지고 있지 않는다고 가정한다. 또한 노드는 가상 메모리를 지원하지 않으며 데이터 스토리지에서는 직접적으로 코드를 실행시킬 수 없다고 가정한다.First, in this specification, it is assumed that the verifier has a copy of the memory contents of a target sensor node (hereinafter, referred to as a target node). Each entity distributes key pairs to establish a secure communication channel between each other. This key pair can be set by a random key pre-distribution method or the like. And, it is assumed that the verification code that can be executed remotely by the verifier is loaded in the memory of the target node. The attacker has full control over the memory access of the captured node. However, the possibility of modification to other hardware structures means that an attacker can use external resources, and thus are not discussed in the present specification. Programmable flash memory is assumed to have no free space unless there is a specific purpose. It also assumes that nodes do not support virtual memory and cannot run code directly on data storage.

검증 방법의 가장 원시적 방법은 검증자가 목표 노드의 실제 메모리 내용과 자신이 알고 있는 메모리 내용을 비교해보는 것이다. 이 방법에서 검증자는 먼저 목표 노드의 증명을 요구하는 메시지를 보낸다. 그러면 목표 노드는 자신의 메모리에 있는 증명코드를 실행한다. 이 증명코드는 노드의 메모리 내용에 접근하여 그 내용을 검증자에게 전송한다. 마지막으로, 검증자는 수신한 내용을 자신이 가지고 있는 복사본과 비교한 후 목표 노드의 감염 여부를 결정한다.The most primitive method of verification is to compare the actual memory contents of the target node with the memory contents that it knows. In this method, the verifier first sends a message requesting the verification of the target node. The target node then executes the attestation code in its memory. This verification code accesses the memory contents of the node and sends the contents to the verifier. Finally, the verifier compares the received content with its own copy and determines whether the target node is infected.

그러나, 공격자는 다음과 같은 공격방법을 사용함으로서, 포획한 노드 내부에서 악의적으로 수정된 펌웨어 코드가 이러한 원시적인 검증 방법에 의해 발견되는 것을 쉽게 피할 수 있다. 우선, 공격자는 원래 메모리 내용에 대한 유효한 정보를 가지고 있는 공격코드를 센서 노드의 빈 공간에 심어 놓는다. 그리고 노드 내의 증명코드가 실제 메모리 내용에 접근하는 대신에 심어 놓은 유효 정보에 접근하도록 수정한다. 그러면 증명코드는 악의적으로 수정된 펌웨어의 정보가 아닌 노드가 공격받기 이전의 유효한 메모리 정보 값을 전송할 것이다. 결과적으로, 검증자는 목표 노드의 감염 여부를 정확히 검증해내지 못한다.However, by using the following attack method, an attacker can easily avoid malicious code modified inside the captured node by this primitive verification method. First, the attacker places an attack code in the free space of the sensor node that contains valid information about the original memory contents. And instead of accessing the actual memory contents, the verification code in the node is modified to access valid information that has been planted. The attestation code would then send the valid memory information before the node was attacked, rather than the information of the maliciously modified firmware. As a result, the verifier cannot accurately verify whether the target node is infected.

이를 해결하기 위해, 본 명세서에서는 소프트웨어 기반 검증 방법에 대한 새로운 방법을 제시한다. 본 발명에 따른 방법의 기본 원리는 검증자의 요청이 있을 때마다 목표 노드의 메모리 안에 악의적 코드가 동작할 공간을 남기지 못하도록 만든 후 전체 메모리 내용의 값을 전달하는 것이다.To solve this problem, the present specification proposes a new method for the software-based verification method. The basic principle of the method according to the present invention is to pass the value of the entire memory contents after preventing the malicious code from leaving space in the target node's memory whenever a validator requests.

WSN(Wireless Sensor Network)은 일반적으로 대규모의 센서들과 몇 개의 베이스 스테이션(Base Station)으로 구성되어 있다. 베이스 스테이션은 여러 업무를 동시에 처리할 수 있을 정도의 충분한 자원을 소유하고 있는 반면에 센서 노드는 작은 메모리 크기, 적은 배터리 용량, 좁은 라디오 범위 등 매우 제한된 자원을 가지고 있다.A WSN (Wireless Sensor Network) typically consists of a large number of sensors and several base stations. Base stations have enough resources to handle multiple tasks simultaneously, while sensor nodes have very limited resources, such as small memory size, low battery capacity, and narrow radio range.

본 명세서에서는 도 1에 도시된 바와 같은 표기를 사용한다.In this specification, notation as shown in FIG. 1 is used.

센서 노드는 여러 종류의 메모리를 가지고 있다. 예를 들어 UC Berkeley에 의해 개발된 MICA mote는 4kB의 고정 RAM, 128kB 프로그램 가능한 플래쉬 메모리와 4Mbit의 외부 플래쉬 메모리를 가지고 있다. 대부분의 센서 노드 구조는 MICA mote와 유사하다. 본 명세서에서는 마이크로 컨트롤러의 SRAM을 Mem1로 표시한다. 그 외 Memi는 플래쉬 프로그램 메모리나 외부 데이터 저장소를 나타낸다. 보통 오직 한 개의 프로그램 가능한 플래쉬 메모리가 센서 노드의 마이크로 콘트롤러 안에 내장되고 외부의 데이터 저장소는 EEPROM 이다. 본 명세서에서는 외부 데이터 저장소를 이용한 공격은 염두 해두지 않는다. 그 이유는 외부 데이터 저장소를 공격 목적으 로 사용하기에는 접근 시간이 너무 길어서 쉽게 발견할 수 있기 때문이다. 센서 노드가 배치된 후에, 증명 코드(V)와 펌웨어 코드(C)는 노드가 동작하는 동안에 Mem1에 상주하게 된다. Mem1은 각각의 데이터 파트(Di)를 가지고 있으므로, 하나의 노드가 가지고 있는 총 데이터는 D = {Di}Λ i=1이다. 여기서 Λ는 하나의 센서 노드가 가지고 있는 모든 메모리 개수를 의미한다. 도 2는 이러한 메모리를 개념적으로 도시한 도이다.Sensor nodes have several types of memory. The MICA mote, developed by UC Berkeley, for example, has 4kB of fixed RAM, 128kB programmable flash memory and 4Mbit external flash memory. Most sensor node structures are similar to the MICA mote. In the present specification, the SRAM of the microcontroller is denoted by Mem 1 . The other Mem i represents flash program memory or external data storage. Usually only one programmable flash memory is built into the sensor node's microcontroller and the external data store is an EEPROM. In this specification, an attack using an external data store is not considered. The reason for this is that the access time is too long to be used for attack purposes and can be easily discovered. After the sensor node is deployed, the proof code V and firmware code C will reside in Mem 1 while the node is operating. Since Mem 1 has each data part D i , the total data of one node is D = {D i } Λ i = 1 . Here, Λ means the total number of memories of one sensor node. 2 conceptually illustrates such a memory.

1. 요청단계(1. Request step ( S10S10 ))

본 발명에 따른 선행 코드-검증 방법은, 먼저 목표 노드의 메모리 내용을 검증하기 위한 요청 단계(S10)에서, 검증자인 베이스 스테이션은 요청 메시지헤더(Req)와 베이스 스테이션의 아이디(IDBS), 그리고 상기 IDBS와 난스(nonce; n)를 상기 베이스 스테이션과 상기 목표 노드 간의 분배된 안전키(KIDBS , mode)로 암호화하여 이 3가지 메시지를 모두 상기 목표 노드에 전송한다.In the preceding code-verification method according to the present invention, first, in the requesting step (S10) for verifying the memory contents of the target node, the base station as the verifier is a request message header (Req) and the ID (ID BS ) of the base station, and The ID BS and a nonce n are encrypted with a secure key (K IDBS , mode ) distributed between the base station and the target node , and all three messages are transmitted to the target node.

그 다음, 상기 목표 노드가 상기 3가지 메시지를 수신하게 상기 암호화된 메시지를 복호화하여 상기 베이스 스테이션의 아이디와 비교하여 상기 메시지의 합법성 여부를 판단한다. 이렇게 함으로써, 공격자가 상기 분배된 안전키(KIDBS , mode)를 알지 못하게 되고, 공격자는 베이스 스테이션으로 위장할 수 없게 되어, 특정 노드에 대한 서비스 거부 공격(Denial of Service)을 방지할 수 있게 된다.Then, the target node decrypts the encrypted message to receive the three messages, and compares the encrypted message with the ID of the base station to determine whether the message is legitimate. By doing so, an attacker may not know the distributed security key (K IDBS , mode ), and the attacker cannot disguise as a base station, thereby preventing a denial of service against a specific node. .

2. 연산단계(2. Calculation step ( S20S20 ))

검증자의 요청 단계에 이어 목표 노드의 연산단계에서, 목표 노드는 난스를 시드로 하여 난수를 생성한다. 그리고 목표 노드 내 메모리의 빈 영역은 상기 생성된 난수를 이용한 특정 알고리즘의 결과값인 비트 열로 채운다(S20). Memi의 빈 공간의 크기인 Si e는 증명코드, 펌웨어 코드, 데이터 영역을 제외한 빈 메모리 영역의 크기를 의미한다. 이는 다음처럼 계산할 수 있다.In the computation of the target node following the requestor's request phase, the target node generates a random number with the nonce as the seed. The empty area of the memory in the target node is filled with a bit string that is a result of a specific algorithm using the generated random number (S20). S i e , the size of the free space of Mem i , means the size of the free memory area excluding the authentication code, firmware code, and data area. This can be calculated as follows.

식(1) : Si e = Si - (Si v + Si c + Si d)Formula (1): S i e = S i -(S i v + S i c + S i d )

본 단계에서 사용하는 알고리즘은 메모리의 빈 공간을 두 개의 난수 값의 XOR연산으로 채우는 기능을 수행하게 된다. 먼저, 난수는 Si e를 채운다. 그리고 이러한 난수열이 빈 메모리 공간을 다 채우게 되면 반대 방향으로 동작하면서 기존의 난수가 있던 공간을 새롭게 생성된 난수와의 XOR 연산으로 덮어쓰게 된다.The algorithm used in this step fills the free space of memory with XOR of two random values. First, the random number fills S i e . When the random sequence fills the empty memory space, it operates in the opposite direction and overwrites the existing random number space with an XOR operation with the newly generated random number.

상기 알고리즘에서 사용하는 해쉬 함수의 입력 값은 이전에 채워진 512-bits의 메모리 값을 사용한다. 도 3a 내지 도 3c에 상기 알고리즘 동작과정의 일 예가 도시되어 있다. 도 3a에는 메모리의 빈 공간에 난수를 채우기 시작하는 과정이 개 념적으로 도시되어 있고, 도 3b에는 난수열이 메모리 공간의 끝을 만났을 때, 반대방향으로 동작하는 과정이 도시되어 있다. 그리고, 도 3c에는 기존의 난수가 있던 공간을 새롭게 생성된 난수와의 XOR 연산으로 덮어 쓰는 과정이 도시되어 있다.The input value of the hash function used in the algorithm uses a previously filled memory value of 512-bits. 3A to 3C illustrate an example of the algorithm operation. 3A conceptually illustrates a process of starting to fill a random number in an empty space of a memory, and FIG. 3B illustrates a process of operating in the opposite direction when the random number sequence meets an end of the memory space. 3C illustrates a process of overwriting an existing random number space with an XOR operation with a newly generated random number.

그러나 이 알고리즘이 4번째 라운드까지 동작하기 이전에는 해시 입력을 위한 512-bits의 메모리 값이 존재하지 않으므로, 첫 번째 라운드에서의 난수 값은 단지 시드 n에서부터 생성되고, 두 번째부터 네 번째 라운드까지의 연산은 메모리 값의 빈 부분을 0으로 채운 값을 입력으로 한다. 이러한 증명단계의 알고리즘은 Fill_Memory(n)은 도 4에 도시된 바와 같다.However, before this algorithm runs until the fourth round, there are no 512-bits of memory value for hash input, so the random number in the first round is generated only from seed n and from the second to fourth rounds. The operation takes as input the value that fills the empty part of the memory value with zero. In this algorithm of the verification step, Fill_Memory (n) is as shown in FIG.

3. 응답단계(3. Response step ( S30S30 ))

그 다음, 목표 노드의 응답단계에서 해당 노드는 자신의 메모리 전체의 해쉬값을 응답으로 하여 검증자인 베이스 스테이션에게 전송하게 된다(S30). 이 해쉬값은 Mem1부터 Memi까지의 h(MIXED_MEM∥D)이다. 여기서 MIXED_MEM은 V∥C∥FMn을 특정 규칙에 의거하여 읽은 메모리 값의 열이다. 또한, 여기서 FMn은 Fill_Memory(n)을 뜻한다. 상기 특정 규칙은 연산단계에서 사용한 난수 생성기의 출력 크기만큼의 블록을 건너뛰며 읽는 방식을 순차적으로 수행한다. MIXED_MEM으로 표현한 이러한 혼합화는 공격자가 포획한 다른 노드를 이용하는 등의 방법으로 FMn 전체의 해쉬 값을 미리 사본으로 저장해 놓는 것을 방지한다. 도 5은 이 점을 설명하는 일 예가 도시되어 있다.Next, in the response step of the target node, the node transmits the hash value of its entire memory as a response to the base station as the verifier (S30). This hash value is h (MIXED_MEM∥D) from Mem 1 to Mem i . Where MIXED_MEM is a column of memory values that read V∥C∥FMn according to certain rules. In addition, FMn here means Fill_Memory (n). The specific rule sequentially executes a reading scheme by skipping blocks corresponding to the output size of the random number generator used in the operation step. This hybridization, expressed as MIXED_MEM, prevents the hash of the entire FMn from being copied in advance, for example by using another node captured by an attacker. 5 shows an example illustrating this point.

베이스 스테이션은 노드가 임시적으로 보관하고 있는 데이터(D)를 모르기 때문에, 일반적으로 노드는 증명 단계 이전에 베이스 스테이션에게 데이터(D)를 보내야 한다. 그리고, 목표 노드의 메모리 안의 증명코드(V)와 펌웨어 코드(C)를 제외한 모든 공간을 난수로 채운 뒤, 메모리의 해쉬값으로 응답한다. 응답 단계가 끝나면 베이스 스테이션은 자신이 보관하고 있던 데이터를 본래의 자리인 노드에게로 되돌려줘야 한다.Since the base station does not know the data D temporarily stored by the node, the node generally has to send the data D to the base station before the proof phase. Then, all spaces except for the verification code (V) and the firmware code (C) in the memory of the target node are filled with random numbers, and the response is made with a hash value of the memory. At the end of the response phase, the base station must return the data it has stored back to its original node.

하지만 이러한 방식은 두 가지 이유로 부담이 되는데, 첫 번째 이유는 노드의 제한된 배터리 용량에 기인한다. 노드는 데이터(D)를 송신, 수신해야하기 때문에 에너지를 두 번 소비하게 된다. 결과적으로 노드는 검증을 위하여 자신이 원래 가지고 있던 데이터(D)를 지우고, 검증이 끝난 후엔 그것을 다시 얻기 위하여 불필요한 에너지 낭비를 하게 되는 것이다. 다른 이유는 불필요한 증명 시간의 증가이다.However, this approach is burdensome for two reasons, the first being due to the limited battery capacity of the node. The node consumes energy twice because it needs to transmit and receive data (D). As a result, the node deletes its original data (D) for verification, and wastes unnecessary energy to get it back after verification. Another reason is the unnecessary increase in proof time.

본 발명에 따른 방법에서는 노드는 데이터(D)를 다시 수신받아야할 필요가 없다. 응답 단계에서 노드는 단지 데이터를 해쉬값과 함께 베이스 스테이션에게 보내기만 하면 된다. 그러면 베이스 스테이션은 이미 자신이 알고 있는 목표 노드의 증명코드(V), 펌웨어 코드(C)와 함께 데이터(D)도 알게 된다.In the method according to the invention the node does not have to receive the data D again. In the response phase, the node only needs to send data to the base station along with the hash value. The base station then knows the data (D) together with the verification code (V) and firmware code (C) of the target node.

4. 검증단계(4. Verification step ( S40S40 ))

마지막으로 검증자의 검증 단계에서 베이스 스테이션은 목표 노드로부터 수 신한 해쉬값과 자신이 가지고 있는 목표 노드의 메모리정보로 계산한 해쉬값을 비교한다(S40). 만일 이 둘이 일치하지 않다면 베이스 스테이션은 목표 노드가 공격자에 의해 오염되었거나 불법적으로 수정되었다고 최종적으로 판단하게 되고, 다른 노드들에게 이를 공지할 것이다.Finally, in the verifying step of the verifier, the base station compares the hash value received from the target node with the hash value calculated by the memory information of the target node (S40). If the two do not match, the base station will finally determine that the target node has been compromised or illegally modified by the attacker, and will notify the other nodes.

또는, 이와는 다르게 목표 노드의 응답 시간이 미리 결정된 기준 시간을 초과하는 경우, 상기 베이스 스테이션은 상기 목표 노드가 공격자에 의해 오염되거나 불법적으로 수정되었다고 판단하고, 이를 다른 센서 노드들에 공지할 수도 있다. 여기서, 상기 미리 결정된 기준 시간은 ATmega128 마이크로 컨트롤러를 사용하는 센서 노드에서 SHA-1을 해쉬 연산기로 사용할 경우 15초인 것이 바람직하다.Alternatively, if the response time of the target node exceeds the predetermined reference time, the base station may determine that the target node has been contaminated or illegally modified by an attacker, and may notify other sensor nodes. Here, the predetermined reference time is preferably 15 seconds when SHA-1 is used as a hash operator in a sensor node using an ATmega128 microcontroller.

도 6은 본 발명에 따른 방법의 연산단계 전후 상황을 간략하게 보여준다. 만일 목표 노드가 오염되지 않았다면 노드는 전체 메모리 이미지를 해쉬한 유효한 값을 전송할 것이며, 목표 노드가 오염되었고 공격자가 유효한 값을 응답하기 위한 공격코드를 심어놓았더라도 난수가 채워짐으로 인하여 공격코드를 덮어쓰게 된다. 결과적으로 오염된 노드는 검증자인 베이스 스테이션에게 유효한 값을 전송할 방법이 사라지게 된다. 도 7은 지금까지 설명한 방법의 4단계에 대한 전체적인 개념도이고, 도 8은 본 발명에 따른 선행 코드-검증 방법의 순서도이다.6 briefly shows the situation before and after the operation step of the method according to the invention. If the target node is not contaminated, the node will send a valid value that hashes the entire memory image, and the attack code will be overwritten because the random number is filled, even if the target node is contaminated and the attacker has planted an attack code to respond to the valid value. do. As a result, the compromised node is no longer able to send valid values to the verifier base station. 7 is an overall conceptual diagram of four steps of the method described so far, and FIG. 8 is a flowchart of a preceding code-verification method according to the present invention.

[본 발명의 기술적 장점][Technical Advantages of the Invention]

1. 시간에 민감하지 않은 검증1. Time insensitive verification

WSN에서 SWATT는 악의적 코드를 검출해 내는 데 있어 연산 시간에 대한 면밀 한 측정을 필요로 한다. 만약 노드가 더 강력한 마이크로 프로세서를 사용한다면 연산 시간의 차이를 증폭시키기 위하여 검증의 더 많은 반복 실행을 필요로 한다.SWATT in WSN requires careful measurement of computation time in detecting malicious code. If a node uses a more powerful microprocessor, it needs more iterations of verification to amplify the difference in computation time.

또한, 이것은 노드가 많은 에너지를 소비하게 될 것이라는 것을 의미한다. 또 SWATT는 예상할 수 없는 시간 지연을 고려하기 힘들다. 만약 네트워크 지연시간 등을 고려하게 된다면, 공격자는 검증자가 공격에 필요한 연산 시간의 증가를 네트워크 지연시간으로 인식하게 만들 수 있다. 따라서 WSN에서의 SWATT는 매우 신중히 사용되어야한다.This also means that the node will consume a lot of energy. SWATT is also hard to account for unforeseen time delays. If the network latency is considered, the attacker can cause the verifier to recognize the increase in computation time required for the attack as the network latency. So SWATT in WSN should be used very carefully.

반면에, 본 발명에 따른 코드-검증 방법은 이러한 연산 시간의 정확한 측정을 필요로 하지 않는다. 대신에 정확한 응답을 위한 메모리 공간을 필요로 하는데, 만약 센서 노드가 많은 메모리 공간을 가지고 있다면, 빈 메모리 공간을 채우기 위한 시간을 필요로 하게 된다. 본 발명에서는 메모리의 크기에 비례하는 검증연산 시간과 네트워크 지연 시간을 합한 적절한 응답한계 시간을 둠으로써 이후에 설명할 여러 가지 공격을 예방할 수 있다. 또한 본 발명에 따른 방법에서 네트워크의 지연 시간이 목표 노드의 감염 여부를 결정하는데 끼치는 영향은 미비하기 때문에 시간에 기반하지 않는 유연성을 제공한다.On the other hand, the code-verification method according to the present invention does not require accurate measurement of this computation time. Instead, it requires memory space for accurate response. If the sensor node has a lot of memory space, it needs time to fill the empty memory space. In the present invention, by providing an appropriate response time limit in which the verification operation time and the network delay time are proportional to the size of the memory, various attacks to be described later can be prevented. In addition, the method according to the present invention provides a time-based flexibility because the effect of network latency on determining whether a target node is infected is insignificant.

2. 재전송 공격 방어2. Replay Attack Defense

공격자에 의하여 오염된 노드는 재전송 공격을 할 수 있다. 이 노드는 이전에 다른 노드의 검증절차에 쓰였던 유효한 메시지를 도청할 수 있다. 그러나, 본 발명에 따른 방법은 기본적으로 challenge-and-response 방식이므로 설령 공격자가 다른 노드와 검증자 사이의 세션 키를 획득하게 되더라도 난스(nonce)의 특성상 재전송 공격은 불가능하다.Nodes contaminated by the attacker can attack again. This node can eavesdrop on valid messages previously used in other nodes' verification procedures. However, since the method according to the present invention is basically a challenge-and-response method, even if an attacker acquires a session key between another node and the verifier, a retransmission attack is impossible due to the nature of the nonce.

challenge-and-response 방식에서 만약 공격자가 두 엔티티 간의 비밀을 알고 있다면 그는 이러한 비밀을 계산한 응답 메시지를 전송함으로써 쉽게 공격을 성공시킬 수 있다. 본 방법에서 비밀은 코드 그 자체이다. 사실상 코드는 공격자에게 쉽게 노출될 수 있기 때문에 본 프로토콜에 대한 공격은 쉬워 보인다. 그러나 본 발명의 방법에서 공격자는 악의적 코드와 정상 코드 모두를 유지할 메모리 공간을 가질 수 없다. 그러므로, 오염된 노드에서 난스를 사용한 유효한 응답을 도출해내는 것은 불가능하다.In the challenge-and-response approach, if an attacker knows a secret between two entities, he can easily succeed by sending a response message that computes this secret. In this method, the secret is the code itself. In fact, attacks on this protocol seem easy because the code can be easily exposed to attackers. However, in the method of the present invention, the attacker cannot have a memory space to hold both malicious code and normal code. Therefore, it is not possible to derive a valid response using nonce at the contaminated node.

3. 필요한 난수 블록을 직접 계산하는 공격과 그 방어3. Attacks and their defenses that calculate the required random number blocks

다른 공격 방법은 증명, 응답단계에서 악의적 코드가 해쉬값을 계산하는데, 필요한 시점에서 랜덤 시퀀스의 블록을 만들어내는 것이다. n을 빈 메모리 블록의 개수라고 본다면, n번째 블록은

Figure 112007079331071-pat00001
이기 때문에 시드로부터
Figure 112007079331071-pat00002
번의 계산 값으로 볼 수 있다. 여기서 Sho는 해쉬 함수의 출력 값의 크기이고 ∥는 특정 메모리의 크기를 나타낸다. (해쉬 함수가 SHA-1이라면 Sho는 160이 되고, MD5라면 128이 된다.) 빈 메모리 영역은 Fill_Memory(n)가 동작하는 동안 난수 값을 두 번 채우게 됨을 상기하라. 또한, 유사하게 (n-1)번째 블록도 생성할 수 있다.Another attack method is to generate a block of random sequences at the time needed for malicious code to compute a hash value in the proof and response phases. Given n is the number of free memory blocks, the nth block
Figure 112007079331071-pat00001
From the seed
Figure 112007079331071-pat00002
It can be seen as the calculated value of times. Where S ho is the size of the output of the hash function and ∥ is the size of a particular memory. (If the hash function is SHA-1, S ho is 160, and if it is MD5, it is 128.) Recall that an empty memory area fills a random number twice during Fill_Memory (n). Similarly, the (n-1) th block can also be generated.

만약, 총 메모리의 길이가 공격코드에 비교하여 월등히 크다고 가정한다면, 공격 코드는 자신이 상주한 메모리 위치에 정상 코드가 검증받을 때와 비교하여 최소한 20배(SHA-1)에서 16배(MD5)의 해쉬 연산을 수행하게 된다. 그러나, 총 메모리 길이 대 공격코드의 길이의 비율은 상기 가정보다 크기 때문에, 보다 많은 시간이 소요됨을 예측할 수 있다.If we assume that the total memory length is significantly larger than the attack code, then the attack code is at least 20 times (SHA-1) to 16 times (MD5) compared to when the normal code is verified in the memory location where it resides. Hash operation will be performed. However, since the ratio of the total memory length to the length of the attack code is larger than the above assumption, it can be predicted that more time is required.

4. 증명메커니즘의 성능분석4. Performance Analysis of the Proof Mechanism

본 발명에 따른 코드-검증 방법에서 총 실행시간 T는 다음과 같이 계산된다.In the code-verification method according to the present invention, the total execution time T is calculated as follows.

식 (2):

Figure 112007079331071-pat00003
Equation (2):
Figure 112007079331071-pat00003

여기서, Tr은 난수 발생에 소요되는 시간이고 Ti a는 Memi의 접근시간이다. 현재 대부분 종류의 센서 노드는 Mem1, Mem2, Mem3 만을 사용하고 있는데 Mem1은 SRAM, Mem2는 프로그램 가능한 플래쉬 메모리, Mem3는 외부 EEPROM이다. 아래 [표 1]은 센서 노드의 하드웨어 플랫폼이다.Here, Tr is the time required for random number generation and T i a is the access time of Mem i . Currently, most types of sensor nodes are Mem 1 , Mem 2 , Mem 3 Mem1 is SRAM, Mem 2 is programmable flash memory, and Mem 3 is external EEPROM. Table 1 below shows the hardware platform of the sensor node.

[표 1] 센서 노드의 하드웨어 플랫폼Table 1. Hardware Platforms for Sensor Nodes

SensorSensor MICA MICA2Dot MICA2MICA MICA2 Dot MICA2 TelosTelos 마이크로프로세서Microprocessor ATmega128ATmega128 MSP430F1611MSP430F1611 워드 크기Word size 8-bit8-bit 16-bit16-bit 클락 주기Clock cycle 16MHz16 MHz 8MHz8 MHz SRAM 크기SRAM size 4kB4kB 10kB10 kB 플래쉬 크기Flash size 128kB128 kB 48kB48 kB MIPSMIPS 1616 88

만약, 우리가 앞서 가정한 바와 같이 관리자가 이미 플래쉬 메모리의 빈 공간을 남겨두지 않았다면 EEPROM의 쓰기시간은 매우 느리기 때문에 본 발명의 방법을 이용할 때 오직 SRAM 만을 랜덤 값으로 채우면 된다. 몇몇 종류의 센서 노드에서는 외부 EEPROM의 크기가 몇 메가비트이다. 그리고, 이러한 EEPROM을 채우려면 수천 초가 소요된다. 예를 들어, EEPROM의 사이즈가 4Mbit이고 쓰기 시간이 1비트당 1ms가 걸릴 경우, 전체 쓰기 시간은 1시간 8분 16초가 소요된다. 그에 반해 SRAM의 쓰기 시간은 무시해도 좋을 만큼 매우 빠르다.If, as we assume earlier, the administrator has not already left empty space in the flash memory, the write time of the EEPROM is very slow, so only the SRAM needs to be filled with random values when using the method of the present invention. In some types of sensor nodes, the external EEPROM is several megabits in size. And it takes thousands of seconds to fill this EEPROM. For example, if the size of the EEPROM is 4Mbit and the write time is 1ms per bit, the total write time is 1 hour 8 minutes 16 seconds. On the other hand, the write time of the SRAM is so fast that it can be ignored.

위에서 언급한 바와 같이, 본 방법의 실행시간은 오로지 해쉬 연산의 횟수로 계산할 수 있으므로 식(2)를 다음과 같이 다시 쓸 수 있다.As mentioned above, the execution time of this method can be calculated only by the number of hash operations, so Equation (2) can be rewritten as follows.

식 (3): T = Th + Tr × S1 E Equation (3): T = T h + T r × S 1 E

Uf를 빈 메모리 공간을 채울 때의 해쉬 라운드 수로 하고, δ를 한 라운드의 실행 시간으로 하면, Tr × S1 E은 Uf×δ로 다시 쓸 수 있다. 또한, Uf는 다음의 식 으로 계산할 수 있다.When U f is the number of hash rounds when filling the empty memory space, and δ is one round of execution time, T r × S 1 E can be rewritten as U f × δ. In addition, U f can be calculated by the following equation.

식 (4): Uf = [|SRAM|/Sho]Equation (4): U f = [| SRAM | / S ho ]

Ur을 응답 단계에서의 해쉬 라운드의 수로 보면,If U r is the number of hash rounds in the response phase,

식 (5): Ur = [(|SRAM|+|Flash|)/Shi] + 1Equation (5): U r = [(| SRAM | + | Flash |) / S hi ] + 1

Shi는 해쉬 함수의 한 라운드에서의 입력 값 크기이다. (보통 Shi는 512이다. +1은 해쉬 함수에서 초기 패딩 연산이 있기 때문에 추가한다.) 따라서 Th도 Uf×δ로 표현할 수 있다. 최종적으로 T는 다음과 같다. 아래 [표 2]는 라운드 시간과 필요한 해쉬 라운드 수(*는 추산 값이다.)S hi is the magnitude of the input value in one round of the hash function. (Usually S hi is 512. +1 is added because there is an initial padding operation in the hash function.) Therefore, T h can also be expressed as U f × δ. Finally, T is Table 2 below shows round times and the number of hash rounds required (* is an estimate).

식 (6): T = Ur×δ+ Uf×δ = (Ur + Uf)×δEquation (6): T = U r × δ + U f × δ = (U r + U f ) × δ

[표 2] 라운드 시간과 필요한 해쉬 라운드 수(*는 추산 값이다.)Table 2. Round time and number of hash rounds required (* is an estimate)

마이크로프로세서Microprocessor 라운드 시간(δ)Round time (δ) 라운드 수(Uf)Number of rounds (U f ) 라운드 수(Ur)Number of rounds (U r ) ATmega128 (SHA-1) (MD5)ATmega128 (SHA-1) (MD5) 3636㎲ 1473㎲ 3636㎲ 1473㎲ 205 256 205 256 2112(+1) 2112(+1) 2112 (+1) 2112 (+1) MSP430F1611 (SHA-1) (MD5)MSP430F1611 (SHA-1) (MD5) *7272㎲ *2946㎲ * 7272㎲ * 2946 512 640 512 640 928(+1) 928(+1) 928 (+1) 928 (+1)

ATmega128에서 라운드의 실행시간 δ는 SHA-1에서 3636㎲, MD5에서 1473㎲임을 Alexander Dean의 논문(P. Ganesan, R Venugopalan, P. Peddabachagari, A. Dean, F. Mueller, M. Sichitiu "Analyzing and Modeling Encryption Overhead for Sensor Network Nodes." In WSNA'03, September 19, 2003, San Diego, California, USA. ACM Press) 내 실험결과에서 언급하였다. 각각의 MIPS를 비교해봄으로써 ATmega128의 값으로 ATmega163과 MSP430F1611의 δ를 추산하였다.The run time δ of the round at ATmega128 was 3636 ms in SHA-1 and 1473 ms in MD5 (P. Ganesan, R Venugopalan, P. Peddabachagari, A. Dean, F. Mueller, M. Sichitiu "Analyzing and Modeling Encryption Overhead for Sensor Network Nodes. "In WSNA'03, September 19, 2003, San Diego, California, USA. ACM Press). By comparing the respective MIPS, δ of ATmega163 and MSP430F1611 was estimated by the value of ATmega128.

표 3은 각각의 마이크로프로세서에서의 실행시간을 보여주고 있다. 이 표에서 나타나다시피 실행시간은 마이크로프로세서에 따라 약 1초부터 10초에 이르기까지 큰 차이를 보이고 있다. 따라서 노드로부터의 응답 대기시간을 설정할 때, 네트워크 지연시간과 더불어 이러한 추정 실행시간을 충분히 반영하여야 할 것이다.Table 3 shows the runtime on each microprocessor. As shown in this table, execution time varies greatly from about 1 to 10 seconds depending on the microprocessor. Therefore, when setting the response latency from the node, this estimated execution time should be fully reflected along with the network delay time.

[표 3] 해쉬 연산에 필요한 시간[Table 3] Time required for hash operation

마이크로프로세서Microprocessor 시간(Uf×δ)Time (U f × δ) 시간(Ur×δ)Time (U r × δ) 총 시간(T)Total time (T) ATmega128 (SHA-1) (MD5)ATmega128 (SHA-1) (MD5) 0.745s 0.377s 0.745s 0.377s 7.863s 3.112s 7.863s 3.112s 8.428s 3.489s 8.428s 3.489s MSP430F1611 (SHA-1) (MD5)MSP430F1611 (SHA-1) (MD5) 3.723s 1.855s 3.723s 1.855s 6.756s 2.737s 6.756s 2.737s 10.479s 4.622s 10.479 s 4.622 s

5. 공격 모델의 성능분석5. Performance Analysis of Attack Model

상기 3.에서 언급된 공격 모델에 대한 분석을 한다. 공격자는 응답단계에서 해쉬 함수가 필요로 할 때, 난수 값으로 구성된 블록 값을 생성해야 함을 상기하라. 공격자가 자신의 코드를 숨기기 위해 수행해야 할 총 연산시간은 다음과 같다.The attack model mentioned in 3 above is analyzed. Recall that an attacker must generate a block value consisting of random values when the hash function requires it in the response phase. The total computation time an attacker must perform to hide his code is as follows:

식 (7): Ta = T'+ Ua×δEquation (7): Ta = T '+ U a × δ

Ua는 공격자가 유효한 응답을 생성하기 위해 필요한 총 해쉬 라운드의 수이다. 공격 코드의 총 길이를 20-블록으로 가정하면, 아래의 [표 4]는 공격 모델의 총 실행시간의 근사치이다.U a is the total number of hash rounds an attacker needs to generate a valid response. Assuming the total length of the attack code is 20-block, Table 4 below is an approximation of the total execution time of the attack model.

[표 4] 공격 코드가 해쉬 연산에 필요한 시간[Table 4] Time required for attack code hash operation

마이크로프로세서Microprocessor 라운드(Ua)Round (U a ) 시간(Ua×δ)Time (U a × δ) 공격 코드의 총 시간(T')Total time of attack code (T ') ATmega128 (SHA-1) (MD5)ATmega128 (SHA-1) (MD5) 3600 2800 3600 2800 13.089s 4.242s 13.089 s 4.242 s 22.262s 8.128s 22.262s 8.128s MSP430F1611 (SHA-1) (MD5)MSP430F1611 (SHA-1) (MD5) 3600 2800 3600 2800 26.179s 8.484s 26.179s 8.484s 40.381s 14.991s 40.381s 14.991s

도 9는 정상적 검증기법의 총 연산시간과 공격 코드의 총 연산시간의 격차를 보여준다. 도 9에서 공격 코드의 시간은 정상의 그것에 최소한 두 배를 상회한다는 것을 알 수 있다. 이것은 검증자가 네트워크 트래픽등의 예상치 못한 시간 지연에도 불구하고 정상노드와 악의적 노드를 구분하기에 충분한 시간차를 얻을 수 있음을 의미한다.9 shows the difference between the total operation time of the normal verification method and the total operation time of the attack code. In Figure 9 it can be seen that the time of attack code is at least twice that of normal. This means that the verifier can get enough time difference to distinguish the normal node from the malicious node despite the unexpected time delay such as network traffic.

본 발명의 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법에 의하면, 매우 간단한 방식으로 동작하나 정확한 시간 정보에 의존하지 않고서도 센서 노드 내의 악의적 코드를 발견해내는데 있어 효과적이다. 이 방법의 특성상 증명자와 목표 노드간의 시도-응답 방식을 노드와 노드가 서로 증명자와 목표 노드의 역할을 수행하는 방식으로 쉽게 변환할 수 있다. 본 발명은 이러한 노드-대-노드 증명방법을 제시하고 있으며, 특히 노드-대-노드 증명방법은 베이스 스테이션의 중계 없이 각각의 노드가 연계하여 포획된 노드를 네트워크 내에서 제외시키는 기능을 수행하도록 확장할 수 있다. 본 방법을 노드-대-노드 방법까지 확장할 경우 베이스 스테이션이 없는 환경에서도 공격자에 의해 악의적으로 수정되었다고 의심되는 노드를 선행 검증하고 네트워크에 피해를 주는 행동을 하기 전에 적절히 제거할 수 있을 것이다. 또한 본 방법의 적절한 수정을 통하여 특정 그룹 내 노드들의 코드를 증명하는 그룹 코드-증명 방법을 고안할 수 있을 것이다.According to the preceding code-verification method using memory space deletion in the wireless sensor network of the present invention, it operates in a very simple manner but is effective in detecting malicious code in the sensor node without relying on accurate time information. Due to the nature of this method, the challenge-response method between the prover and the target node can be easily converted into a manner in which the node and the node play the roles of the prover and the target node. The present invention proposes such a node-to-node authentication method, and in particular, the node-to-node authentication method is extended to perform a function of excluding a captured node in a network by linking each node without relaying a base station. can do. Extending the method to the node-to-node method, even in the absence of a base station, it is possible to pre-verify nodes suspected to have been modified by an attacker and properly remove them before taking action to damage the network. It is also possible to devise a group code-verification method that proves the code of nodes in a particular group through appropriate modification of the method.

이상과 같이 본 발명에 따른 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법을 예시한 도면을 참조로 하여 설명하였으나, 본 명세 서에 개시된 실시예와 도면에 의해 본 발명이 한정되는 것은 아니며, 본 발명의 기술사상 범위내에서 당업자에 의해 다양한 변형이 이루어질 수 있음은 물론이다.As described above with reference to the drawings illustrating a preceding code-verification method using memory space deletion in the wireless sensor network according to the present invention, the present invention is limited by the embodiments and drawings disclosed in this specification. Of course, various modifications may be made by those skilled in the art within the technical scope of the present invention.

도 1은 본 발명에서 사용되는 표기에 대한 설명을 도시한 도,1 is a view showing a description of the notation used in the present invention,

도 2는 센서 노드의 메모리를 개념적으로 도시한 도로서, 여기서 Mem1은 마이크로 콘트롤러의 RAM, Memi는 프로그램 가능한 플래시 메모리를 도시한 도이다.2 is a diagram conceptually illustrating a memory of a sensor node, where Mem 1 is a RAM of a microcontroller and Mem i is a programmable flash memory.

도 3a 내지 도 3c는 본 발명의 연산단계에서 목표 노드의 빈 메모리 공간을 채우는 과정을 도식적으로 도시한 도,3A to 3C are schematic diagrams illustrating a process of filling an empty memory space of a target node in an operation step of the present invention;

도 4는 상기 도 3a 내지 도 3c의 과정을 실행하기 위한 Fill_Memory(n) 알고리즘을 도시한 도,FIG. 4 is a diagram illustrating a Fill_Memory (n) algorithm for executing the process of FIGS. 3A to 3C.

도 5는 SHA-1을 사용하여 MIXED_MEM으로 표현한 혼합화의 일 예를 도시한 도,FIG. 5 is a diagram illustrating an example of mixing represented by MIXED_MEM using SHA-1; FIG.

도 6은 Fill_Memory(n) 알고리즘 전후의 메모리 내용 변화를 개념적으로 도시한 도,6 conceptually illustrates changes in memory contents before and after the Fill_Memory (n) algorithm;

도 7은 본 발명에 따른 선행 코드-검증 방법을 도식적으로 도시한 도,7 shows diagrammatically a preceding code-verification method according to the invention,

도 8은 본 발명에 따른 선행 코드-검증 방법을 도시한 순서도,8 is a flowchart illustrating a preceding code-verification method according to the present invention;

도 9는 정상적 검증 방법의 총 연산시간과 공격코드의 총 연산시간의 차를 도시한 그래프이다.9 is a graph showing the difference between the total operation time of the normal verification method and the total operation time of the attack code.

Claims (9)

검증자인 베이스 스테이션이 요청 메시지 헤더(Req), 베이스 스테이션의 아이디(IDBS), 그리고 상기 아이디와 난스(n)를 상기 베이스 스테이션과 센서 노드 간에 분배된 안전키로 암호화한 3가지 메시지를 모두 상기 센서 노드에 전송하는 요청단계;The sensor, the base station as a verifier, encrypts the request message header (Req), the ID of the base station (ID BS ), and all three messages by encrypting the ID and nonce (n) with a security key distributed between the base station and the sensor node. Requesting to send to the node; 상기 난스를 시드로 하여 난수를 생성하고, 상기 난수를 상기 센서 노드 내 메모리의 빈 영역에 채우는 연산단계;Generating a random number using the nonce as a seed and filling the random number with an empty area of a memory in the sensor node; 상기 센서 노드가 자신의 메모리 전체의 해쉬값을 응답으로 하여 상기 베이스 스테이션으로 전송하는 응답단계;A response step of the sensor node transmitting the hash value of its entire memory to the base station in response; 상기 센서 노드로부터 전송된 상기 해쉬값과 상기 베이스 스테이션이 가지고 있는 상기 센서 노드의 메모리 정보로 계산한 해쉬값을 비교하는 검증단계를 포함하며,And a verification step of comparing the hash value transmitted from the sensor node with a hash value calculated from memory information of the sensor node owned by the base station. 상기 요청단계는 상기 3가지 메시지를 수신한 후, 상기 암호화된 메시지를 복호화하여 상기 베이스 스테이션의 아이디와 비교하여 상기 메시지의 합법성 여부를 판단하는 과정을 더 포함하는 것을 특징으로 하는 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법.The requesting step may further include determining whether the message is legitimate by comparing the ID of the base station by decrypting the encrypted message after receiving the three messages. A preceding code-verification method using memory space deletion. 삭제delete 제 1 항에 있어서,The method of claim 1, 상기 메모리의 빈 영역은 메모리 내에서 증명 코드, 펌웨어 코드, 데이터 영역을 제외한 메모리 영역인 것을 특징으로 하는 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법.And a free area of the memory is a memory area excluding a proof code, a firmware code, and a data area in the memory. 제 1 항에 있어서,The method of claim 1, 상기 연산단계는 상기 센서 노드 내 메모리의 빈 영역을 두 개의 난수 값의 XOR 연산으로 채우는 것을 특징으로 하는 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법.And wherein said calculating step fills a free area of memory in said sensor node with an XOR operation of two random values. 제 4 항에 있어서,The method of claim 4, wherein 상기 연산단계는 상기 센서 노드 내 메모리의 빈 영역을 두 개의 난수 값의 XOR 연산으로 채운 후, 반대 방향으로 동작하면서 기존의 난수가 있던 공간을 새롭게 생성된 난수와의 XOR 연산으로 덮어쓰는 것을 특징으로 하는 무선 센서 네트워 크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법.The calculating step may include filling an empty area of the memory in the sensor node with an XOR operation of two random values, and then operating in the opposite direction, overwriting the existing random number space with an XOR operation with the newly generated random number. A code-verification method using memory space deletion in a wireless sensor network. 제 1 항에 있어서,The method of claim 1, 상기 해쉬값은 증명 코드, 펌웨어 코드와 빈 영역으로 이루어진 센서 노드의 마이크로 콘트롤러의 램(RAM) 메모리로부터 데이터 영역과 빈 영역으로 이루어진 프로그램 가능한 플래쉬 메모리까지의 모든 해쉬값인 것인 것을 특징으로 하는 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법.The hash value is a wireless value, characterized in that all the hash value from the RAM (RAM) memory of the microcontroller of the sensor node consisting of the authentication code, firmware code and the free area to the programmable flash memory consisting of the data area and the blank area. A preceding code-verification method using memory space deletion in sensor network. 제 1 항에 있어서,The method of claim 1, 상기 검증단계는 상기 센서 노드로부터 전송된 상기 해쉬값과 상기 베이스 스테이션이 가지고 있는 상기 센서 노드의 메모리 정보로 계산한 해쉬값을 비교한 후, 상기 두 해쉬값이 일치하지 않으면 상기 베이스 스테이션은 상기 센서 노드가 공격자에 의해 오염되거나 불법적으로 수정되었다고 판단하고, 이를 다른 센서 노드들에 공지하는 과정을 더 포함하는 것을 특징으로 하는 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법.The verifying step compares the hash value transmitted from the sensor node with a hash value calculated using memory information of the sensor node owned by the base station, and if the two hash values do not match, the base station determines the sensor. And determining that the node has been contaminated or illegally modified by an attacker and notifying the other sensor nodes to the other sensor nodes. 제 1 항에 있어서,The method of claim 1, 상기 센서 노드의 응답 시간이 미리 결정된 기준 시간을 초과하는 경우, 상기 베이스 스테이션은 상기 센서 노드가 공격자에 의해 오염되거나 불법적으로 수정되었다고 판단하고, 이를 다른 센서 노드들에 공지하는 과정을 더 포함하는 것을 특징으로 하는 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법.If the response time of the sensor node exceeds a predetermined reference time, the base station further determines that the sensor node is contaminated or illegally modified by an attacker, and further comprising the step of notifying to other sensor nodes A code-verification method using memory space deletion in a wireless sensor network. 제 8 항에 있어서,The method of claim 8, 상기 미리 결정된 기준 시간은 15초인 것을 특징으로 하는 무선 센서 네트워크에서의 메모리 공간 삭제를 이용한 선행 코드-검증 방법.The predetermined reference time is 15 seconds. The preceding code-verification method using memory space deletion in a wireless sensor network.
KR1020070112152A 2007-11-05 2007-11-05 Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network KR100951397B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070112152A KR100951397B1 (en) 2007-11-05 2007-11-05 Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070112152A KR100951397B1 (en) 2007-11-05 2007-11-05 Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network

Publications (2)

Publication Number Publication Date
KR20090046165A KR20090046165A (en) 2009-05-11
KR100951397B1 true KR100951397B1 (en) 2010-04-08

Family

ID=40856084

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070112152A KR100951397B1 (en) 2007-11-05 2007-11-05 Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network

Country Status (1)

Country Link
KR (1) KR100951397B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003005172A2 (en) 2001-07-06 2003-01-16 Ncipher Corporation Limited Firmware validation
KR20060094171A (en) * 2005-02-23 2006-08-29 삼성전자주식회사 Apparatus for verifying memory integrity remotely for mobile platform and system thereof and method for verifying integrity
KR20060094174A (en) * 2005-02-23 2006-08-29 삼성전자주식회사 Apparatus for verifying integrity of device memory remotely and system thereof and method for verifying integrity
JP2008070719A (en) * 2006-09-15 2008-03-27 Fuji Xerox Co Ltd Toner for electrostatic latent image development, image forming apparatus and process cartridge

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003005172A2 (en) 2001-07-06 2003-01-16 Ncipher Corporation Limited Firmware validation
KR20060094171A (en) * 2005-02-23 2006-08-29 삼성전자주식회사 Apparatus for verifying memory integrity remotely for mobile platform and system thereof and method for verifying integrity
KR20060094174A (en) * 2005-02-23 2006-08-29 삼성전자주식회사 Apparatus for verifying integrity of device memory remotely and system thereof and method for verifying integrity
JP2008070719A (en) * 2006-09-15 2008-03-27 Fuji Xerox Co Ltd Toner for electrostatic latent image development, image forming apparatus and process cartridge

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
논문(2007.07.19)*

Also Published As

Publication number Publication date
KR20090046165A (en) 2009-05-11

Similar Documents

Publication Publication Date Title
Perito et al. Secure code update for embedded devices via proofs of secure erasure
Dutta et al. Securing the deluge network programming system
Park et al. Soft tamper-proofing via program integrity verification in wireless sensor networks
Steiner et al. Attestation in wireless sensor networks: A survey
Ibrahim et al. Darpa: Device attestation resilient to physical attacks
Lanigan et al. Sluice: Secure dissemination of code updates in sensor networks
Seshadri et al. SCUBA: Secure code update by attestation in sensor networks
Yang et al. Distributed software-based attestation for node compromise detection in sensor networks
Agrawal et al. Detection of node capture attack in wireless sensor networks
AbuHmed et al. Software-based remote code attestation in wireless sensor network
Tan et al. MTRA: Multiple-tier remote attestation in IoT networks
Krauß et al. Detecting node compromise in hybrid wireless sensor networks using attestation techniques
Chikouche et al. A privacy-preserving code-based authentication protocol for Internet of Things
Choi et al. Proactive code verification protocol in wireless sensor network
Tan et al. A remote attestation protocol with Trusted Platform Modules (TPMs) in wireless sensor networks.
Huth et al. Secure software update and IP protection for untrusted devices in the Internet of Things via physically unclonable functions
Mohindru et al. Securing wireless sensor networks from node clone attack: a lightweight message authentication algorithm
Fu et al. TPM-based remote attestation for Wireless Sensor Networks
KR101074062B1 (en) Entity authentication method in usn
US20160315963A1 (en) A method and apparatus for detecting that an attacker has sent one or more messages to a receiver node
Qian et al. ACSP: A novel security protocol against counting attack for UHF RFID systems
Ashrif et al. Survey on the authentication and key agreement of 6LoWPAN: Open issues and future direction
Seshadri et al. Using FIRE & ICE for detecting and recovering compromised nodes in sensor networks
Makhdoom et al. A novel code attestation scheme against Sybil Attack in Wireless Sensor Networks
KR100951397B1 (en) Proactive Code Verification Protocol Using Empty Memory Deletion in Wireless Sensor Network

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130313

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20131217

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20141204

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20160113

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20161220

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee