KR101269552B1 - Method and apparatus for denial of service detection against incomplete get request of http - Google Patents
Method and apparatus for denial of service detection against incomplete get request of http Download PDFInfo
- Publication number
- KR101269552B1 KR101269552B1 KR1020090105112A KR20090105112A KR101269552B1 KR 101269552 B1 KR101269552 B1 KR 101269552B1 KR 1020090105112 A KR1020090105112 A KR 1020090105112A KR 20090105112 A KR20090105112 A KR 20090105112A KR 101269552 B1 KR101269552 B1 KR 101269552B1
- Authority
- KR
- South Korea
- Prior art keywords
- request
- request message
- server
- denial
- packet
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1408—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
- H04L63/1416—Event detection, e.g. attack signature detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1441—Countermeasures against malicious traffic
- H04L63/1458—Denial of Service
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer And Data Communications (AREA)
Abstract
HTTP를 이용한 서버와 클라이언트 간의 통신에서, 클라이언트로부터 서버로 전송되는 불완전한 GET 요청 메시지에 의한 서비스 거부(DoS) 공격을 탐지하는 방법이 제공된다. 상기 클라이언트가 전송하는 하나의 GET 요청 메시지의 GET 요청 패킷 개수를 카운팅하는 과정을 포함한다. 만약 클라이언트가 전송하는 하나의 GET 요청 메시지가 TCP(Transmission Control Protocol)에서 설정된 MSS값(Maximum Segment Size)보다 클 경우 GET 요청 메시지를 MSS값에 따라 분할하여, 상기 서버로 전송하는 분할된 GET 요청 패킷 개수를 카운팅하는 과정 또한 포함하고, 상기 MSS값을 이용하여 상기 클라이언트가 상기 서버로 하나의 GET 요청 메시지를 분할하여 전송 할 수 있는 패킷의 최대 개수(이하 분할된 GET 요청 최대 패킷 개수)를 계산하는 과정 및 상기 분할된 GET 요청 패킷의 카운팅 된 개수와 상기 분할된 GET 요청 최대 패킷 개수를 비교하여 상기 GET 요청 메시지의 정상 여부를 판단하는 과정을 포함한다.In communication between a server and a client using HTTP, a method for detecting a denial of service (DoS) attack by an incomplete GET request message sent from a client to a server is provided. And counting the number of GET request packets of one GET request message transmitted by the client. If one GET request message sent by the client is larger than the MSS value (Maximum Segment Size) set in Transmission Control Protocol (TCP), the GET request message is divided according to the MSS value and transmitted to the server. And counting the number, and calculating the maximum number of packets (hereinafter, the maximum number of divided GET request packets) that the client can transmit by dividing one GET request message to the server using the MSS value. And determining whether the GET request message is normal by comparing the counted number of the divided GET request packets with the maximum number of divided GET request packets.
Description
본 발명은 HTTP를 이용한 통신에서 불완전한 GET 요청 메시지에 의한 서비스 거부 공격을 탐지하는 방법 및 그 장치에 관한 것으로서, 클라이언트가 불완전한 GET 요청 메시지를 서버에게 요청하는 경우, 서버는 open connection을 유지하고, 완전한 GET 요청 메시지를 기다리는 특성을 이용하여 발생시키는 서비스 거부 공격을 탐지하기 위한 방법 및 그 장치에 관한 것이다.The present invention relates to a method and apparatus for detecting a denial of service attack by an incomplete GET request message in communication using HTTP. When a client requests an incomplete GET request message to a server, the server maintains an open connection, A method and apparatus for detecting a denial of service attack generated by using a characteristic of waiting for a GET request message.
본 발명은 지식경제부의 IT성장동력기술개발사업의 일환으로 수행한 연구로부터 도출된 것이다. [과제관리번호: 2009-S-038-01, 과제명: 분산서비스거부(DDoS) 공격 대응 기술 개발]The present invention is derived from research conducted as part of the IT growth engine technology development project of the Ministry of Knowledge Economy. [Task Management Number: 2009-S-038-01, Task Name: Development of Response Service for Distributed Service Denial (DDoS) Attack]
최근 HTTP 프로토콜의 구조적인 취약성을 이용한 공격으로서 웹 서비스가 서비스 거부(Denial of Service: DoS) 상태로 만들게 하는 "Slowloris"라는 공격 도구가 공개된바 있다. Recently, an attack tool called "Slowloris" has been disclosed that allows a web service to enter a Denial of Service (DoS) state as an attack using a structural vulnerability of the HTTP protocol.
이 공격 도구에 의한 공격은 HTTP 클라이언트가 하나의 GET 요청 메시지를HTTP 서버에게 전송하는데 메시지의 끝임을 알 수 있는 데이터를 포함하지 않는다. The attack by this attack tool does not include data that the HTTP client sends a GET request message to the HTTP server, indicating the end of the message.
HTTP 서버는 GET 요청 메시지를 전송받았으나 완전하지 않은 메시지이므로 완전한 GET 요청 메시지가 전송될 때까지 요청을 계속 기다리게 된다. 그러나 HTTP 서버는 클라이언트의 메시지를 계속 기다리는 것이 아니라 설정된 일정 시간 동안 메시지가 들어오지 않으면 연결을 끊는다. 그러므로 공격 도구는 연결이 끊기기 전에 메시지의 끝임을 알 수 있는 데이터 대신 의미없는 데이터를 전송하여 지속적인 연결을 유지한다. The HTTP server receives a GET request message but is incomplete, so it will continue to wait for the request until a complete GET request message is sent. However, the HTTP server does not wait for a message from the client, but disconnects if no message comes in for a set amount of time. Therefore, the attacker maintains a persistent connection by sending meaningless data instead of data that indicates the end of the message before disconnecting.
만일 HTTP 서버에 기 설정된 한계치만큼 세션이 접속되면, 다른 클라이언트가 더 이상 상기 HTTP 서버에 접속을 할 수 없다. 여기서, 세션이란 서로 다른 두 호스트 즉, 클라이언트와 서버 간에 네트워크 연결(connection)이 지속적으로 유지되고 있는 상태를 말한다. If the session is connected to the HTTP server by the preset limit, other clients can no longer connect to the HTTP server. Here, the session refers to a state in which a network connection is continuously maintained between two different hosts, that is, a client and a server.
최근의 공격들은 기존의 디도스(Distribute Denial of Service: DDoS) 공격과는 다르게 대량의 트래픽을 전달하지 않고, 아주 적은 트래픽으로 HTTP 서버에 서비스 거부 상태를 만들 수 있다. 이러한 대표적인 공격이 HTTP 서버에게 불완전한 HTTP GET 요청 메시지를 전송하는 공격이다.Recent attacks, unlike traditional Distributed Denial of Service (DDoS) attacks, do not carry large amounts of traffic and can create a denial of service on an HTTP server with very little traffic. This typical attack is an attack that sends an incomplete HTTP GET request message to an HTTP server.
현재 불완전한 HTTP GET 요청 메시지에 의한 공격 패턴은 HTTP 서버와의 연결을 끊지 않기 위해서 반복적인 페이로드를 전달하므로, 이에 대한 시그니처(signature)로 공격 패턴을 차단하고 있다. 그러나 공격 패턴이 지능화되면, 시그니처에 의한 공격 패턴 차단에는 한계가 있다.Currently, the attack pattern caused by an incomplete HTTP GET request message delivers a repetitive payload in order not to disconnect from the HTTP server, thus blocking the attack pattern as a signature. However, if the attack pattern is intelligent, there is a limit to blocking the attack pattern by signature.
따라서 본 발명의 목적은 HTTP 서버의 리소스를 소모시키는 서비스 거부 공격(예를 들어 Slowloris)을 방어하기 위하여 불완전한 GET 요청 메시지를 이용한 서비스 거부 공격을 탐지하는 방법을 제공하는 것이다. Accordingly, an object of the present invention is to provide a method for detecting a denial of service attack using an incomplete GET request message in order to defend against a denial of service attack (for example, Slowloris) that consumes resources of an HTTP server.
본 발명의 다른 목적은 상기 방법을 이용한 장치를 제공하는 것이다.Another object of the present invention is to provide an apparatus using the method.
상술한 본 발명의 목적을 달성하기 위한 본 발명의 일면에 따른 불완전한 GET 요청 메시지를 이용한 서비스 거부 공격을 탐지하는 방법은, 상기 클라이언트가 웹 서비스를 제공 받기 위하여 GET 요청 메시지를 전송하는데 이때 전송되는 하나의 GET 요청 메시지를 카운팅하는 과정을 포함한다. 만일 하나의 GET 요청 메시지가 TCP(Transmission Control Protocol)에서 설정된 MSS값(Maximum Segment Size) 보다 커서 여러 개의 패킷으로 분할되어 상기 서버로 전송 될 때에는 분할되어, 상기 서버로 전송되는 패킷 개수(이하, 분할된 GET 요청 패킷 개수)를 카운팅하는 과정을 포함하고, 상기 GET 요청 메시지의 URL 길이 제한과 MSS 값을 이용하여 하나의 GET 요청 메시지가 MSS에 의해서 분할되어 상기 서버로 전송 될 때의 분할되어 보내 질 수 있는 패킷의 최대 개수(이하, 분할된 GET 요청 최대 패킷 개수)를 계산하는 과정 및 상기 분할된 GET 요청 패킷 개수와 분할된 GET 요청 패킷 최대 개수를 비교하여 상기 GET 요청 메시지의 서비스 거부 공격 여부를 판단하는 과정을 포함한다. Method for detecting a denial of service attack using an incomplete GET request message according to an aspect of the present invention for achieving the above object of the present invention, the client sends a GET request message to receive a web service is transmitted at this time Counting the GET request message. If one GET request message is larger than MSS value (Maximum Segment Size) set in Transmission Control Protocol (TCP) and is divided into several packets and transmitted to the server, the GET request message is divided and transmitted to the server. Counting the number of GET request packets), and using the URL length restriction of the GET request message and the MSS value, a single GET request message is divided by MSS and transmitted to the server. Calculating a maximum number of packets (hereinafter, referred to as the maximum number of divided GET request packets) and comparing the number of divided GET request packets with the maximum number of divided GET request packets to determine whether the GET request message is a denial of service attack. It includes the process of judging.
본 발명의 다른 일면에 따른 불완전한 GET 요청 메시지를 이용한 서비스 거부공격을 탐지하는 장치는 클라이언트와 서버 간의 세션 연결이 설정되고, 상기 세션 연결이 설정된 이후에 상기 클라이언트로부터 상기 서버로 전송되는 불완전한 GET 요청 메시지를 이용한 서비스 거부공격을 탐지하는 탐지 서버로서, 상기 탐지 서버는 상기 클라이언트와 상기 서버 사이에 연결되어 상기 클라이언트와 상기 서버 간의 세션 연결이 완료되었음을 알리는 세션 연결 신호를 생성하고, TCP(Transmission Control Protocol)에서 설정된 MSS값(Maximum Segment Size)을 이용하여 상기 클라이언트가 상기 서버로 전송할 수 있는 상기 분할된 GET 요청 최대 패킷 개수를 계산하는 세션 관리부와, 상기 분할된 GET 요청 패킷을 수신하고, 상기 세션 연결 신호에 응답하여 상기 MSS값(Maximum Segment Size)에 따라 분할되어 상기 서버로 전송되는 상기 분할된 GET 요청 패킷의 개수를 카운팅하는 카운팅부 및 상기 클라이언트로부터 상기 서버로 송신되는 상기 분할된 GET 요청 패킷을 수신하고, 카운팅된 상기 분할된 GET 요청 패킷의 개수와 상기 분할된 GET 요청 최대 패킷 개수를 비교한 결과에 따라 GET 요청 메시지에 의한 서비스 거부 공격을 판단하는 공격 판단부를 포함한다.An apparatus for detecting a denial of service attack using an incomplete GET request message according to another aspect of the present invention is an incomplete GET request message transmitted from the client to the server after a session connection is established between the client and the server is established A detection server for detecting a denial of service attack using a detection server, the detection server is connected between the client and the server to generate a session connection signal indicating that the session connection between the client and the server is completed, TCP (Transmission Control Protocol) A session manager configured to calculate the maximum number of the divided GET request packets that the client can transmit to the server using an MSS value (Maximum Segment Size) set in the step of receiving the divided GET request packets, and receiving the session connection signal In response to the MSS value (Maximum Segment) A counting unit counting the number of the divided GET request packets which are divided and transmitted to the server, and receives the divided GET request packet transmitted from the client to the server, and counts the divided GET request. And an attack determination unit that determines a denial of service attack by the GET request message according to a result of comparing the number of packets and the maximum number of divided GET requests.
본 발명의 또 다른 일면에 따른 불완전한 GET 요청 메시지를 이용한 서비스 거부공격을 탐지 방법은 상기 세션 연결이 완료된 이후, 상기 클라이언트가 상기 서버로 전송되는 GET 요청 메시지의 페이로드 바이트 수 또는 패킷 수를 누적하는 과정 및 상기 클라이언트가 상기 누적된 GET 요청 메시지의 페이로드 바이트 수 또는 패킷 수가 기 설정된 임계치에 도달하는 시점에서, 상기 서버로부터 HTTP 응답 메시지의 수신 여부를 확인하여, 상기 GET 요청 메시지에 의한 서비스 거부 공격을 판단하는 공격 판단부를 포함한다. According to another aspect of the present invention, a method of detecting a denial of service attack using an incomplete GET request message includes accumulating payload bytes or packets of a GET request message transmitted to the server after the session connection is completed. Process and the denial of service attack by the GET request message by checking whether the HTTP response message is received from the server when the payload byte number or the packet count of the accumulated GET request message reaches a preset threshold The attack determination unit to determine the.
본 발명에 의하면, GET 요청 메시지를 전송할 시, GET 요청 메시지 URL의 최대 길이 제한과 HTTP 클라이언트가 한번에 전송할 수 있는 MSS(Maximum Segment Size)를 이용하여, 하나의 GET 요청 패킷이 MSS에 의해서 분할될 경우 분할된 GET 요청 패킷의 최대 개수를 계산함으로써, 불완전한 GET 메소드 요청 패킷을 이용한 서비스 거부 공격을 정확히 판단할 수 있다. 즉, 본 발명은 정상적인 GET 요청 메시지와 불완전한 GET 요청 메시지를 정확하게 구분함으로써, HTTP 클라이언트가 open connection 상태로 HTTP 서버와 세션을 계속 유지하여 적은 트래픽으로 HTTP 서버의 리소스를 소모시키는 서비스 거부 공격을 탐지할 수 있다.According to the present invention, when transmitting a GET request message, when one GET request packet is divided by the MSS using the maximum length limit of the GET request message URL and the maximum segment size (MSS) that the HTTP client can transmit at once. By calculating the maximum number of split GET request packets, a denial of service attack using an incomplete GET method request packet can be accurately determined. That is, the present invention accurately distinguishes between a normal GET request message and an incomplete GET request message, thereby detecting a denial of service attack in which the HTTP client maintains a session with the HTTP server in an open connection state and consumes resources of the HTTP server with less traffic. Can be.
이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다. 먼저, 본 발명의 바람직한 실시예를 설명하기에 앞서, 본 발명의 이해를 돕기 위해 HTTP 웹 서버와 HTTP 클라이언트 시스템으로 구성된 일반적인 시스템에 대해 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. First, prior to describing the preferred embodiment of the present invention, a general system composed of an HTTP web server and an HTTP client system will be described for better understanding of the present invention.
도 1은 일반적인 HTTP을 이용한 서버와 클라이언트 간의 신호 흐름도이다.1 is a signal flow diagram between a server and a client using a general HTTP.
도 1을 참조하면, 먼저 HTTP 클라이언트 시스템(100)(이하, HTTP 클라이언트)은 HTTP 웹 서버(300)에 서비스를 요청하기 위해서 SYN 패킷(10)을 전송하여 세션 연결을 요청한다. 이때 HTTP 웹 서버(300)는 자원이 허용되면 SYN+ACK(12) 패킷 으로 응답한다. SYN+ACK 패킷(12)을 수신한 HTTP 클라이언트(100)는 ACK 패킷(14)을 HTTP 웹 서버(300)로 전송함으로써, 하나의 새로운 세션이 생성된다. Referring to FIG. 1, first, an HTTP client system 100 (hereinafter, referred to as an HTTP client) requests a session connection by transmitting a
이와 같이 3 단계의 연결과정을 통해 세션이 구성되는 것을 통상 3 way handshake 과정이라 불리며, 모든 TCP 통신에서 적용된다. 이후 HTTP 클라이언트(100)는 GET 패킷(16)을 통해 원하는 페이지를 HTTP 웹 서버(300)에 요청하고, GET 패킷(16)에 대한 응답 패킷(18)을 HTTP 웹 서버(300)로부터 전송받고, 전송받은 응답 패킷을 통해 원하는 페이지를 제공받는다. As such, establishing a session through a three-stage connection process is commonly referred to as a three-way handshake process and is applied to all TCP communications. Thereafter, the HTTP
이상 HTTP 클라이언트(100)가 HTTP 웹 서버(300)로부터 일반적인 웹 서비스를 제공받기 위한 과정이 기술되었다. In the above, the process for the
일반 HTML 문서 및 이미지, 동영상 등을 HTTP 서버에 요청하는 경우, GET 메소드가 사용된다. 따라서 HTTP 클라이언트는 원하는 페이지를 요구하기 위해서는 도 1에 도시된 바와 같은 GET 요청 메시지(16)를 전송하고, 이 메시지 구조는 도 2에 도시된 바와 같다. When requesting a plain HTML document, image, video, etc. to an HTTP server, the GET method is used. Therefore, the HTTP client sends a
도 2는 도 1에 도시된 GET 요청 메시지의 구조를 보여주는 도면이다.FIG. 2 is a diagram illustrating the structure of a GET request message shown in FIG. 1.
도 2를 참조하면, GET 요청 메시지는 요청 라인(22), 메시지 헤더(24), 공백 라인(26) 및 메시지 본문(28)으로 구성된다. 각 구성의 끝은 항상 CRLF(Carriage Return and Line Feed)(0x0d, 0x0a)로 표시된다.Referring to FIG. 2, the GET request message consists of a
HTTP 클라이언트(100)의 브라우저가 요청을 보내는 경우, 요청 라인(22)(Request-Line)이 표현된다. 요청 라인(22)에는 3가지 정보 즉, 요청 방식(REQUEST METHOD), 웹 문서 경로(URI) 및 HTTP 버전이 포함된다. 요청 방식은 HTTP 요청 방식이라고 하며, 주요 방식은 'GET', 'POST', 'HEAD', 'PUT', 'CONNECT' 등이 있다. 도 2에서는 'GET'으로 지정된 요청 방식이 나타난다. When the browser of the
메시지 헤더(24)에는 수행날짜, 'Accept', 'Accept-Language', 'Host' 'Connection', 프로그램 이름, 버전, 쿠키(Cookie) 등 HTTP 메시지에 대한 부가적인 정보에 해당하는 헤더 정보들이 표현된다. 각 헤더 정보의 마지막 부분에는 항상 CRLF(0x0d, 0x0a)가 표현되며, CRLF(0x0d, 0x0a)은 하나의 헤더 정보의 끝을 표시한다.The
여기서 'Accept'는 HTTP 클라이언트의 브라우저가 수용할 수 있는 MIME(Multi-Purpose Internet Mail Extensions) content-types을 HTTP 서버에게 알려주는 헤더 정보이고, 'Accept-Language'는 브라우저가 사용할 언어를 알려주는 헤더 정보이고, 'Host'는 URL에 있는 호스트와 포트를 나타내는 헤더 정보이다. 'Connection'은 HTTP 클라이언트와 HTTP 서버 간의 지속적인(persistent) 연결을 유지하고자 하는 경우에 사용되는 헤더 정보이다. HTTP 1.1을 지정하는 요청 라인과 지속적인 연결을 의미하는 'Keep-Alive' 값을 통해 HTTP 클라이언트와 HTTP 서버 간의 지속적인(persistent) 연결이 유지된다. 이것은 그림이나 애플릿이 사용된 웹 페이지에서 다시 열 필요가 없게 되므로 많은 시간이 절약된다. Where 'Accept' is header information that tells the HTTP server which Multi-Purpose Internet Mail Extensions (MIME) content-types the HTTP client's browser can accept, and 'Accept-Language' is a header that indicates the language the browser will use. Information, and 'Host' is header information indicating the host and port in the URL. 'Connection' is header information used in case of maintaining persistent connection between HTTP client and HTTP server. Persistent connections between HTTP clients and HTTP servers are maintained through request lines specifying HTTP 1.1 and 'Keep-Alive' values for persistent connections. This saves a lot of time because you don't have to reopen the picture or applet in a Web page.
공백 라인(26)은 메시지 헤더(24)의 끝을 의미하며, 마찬가지로 CRLF(0x0d, 0x0a)로 표현된다.The
메시지 본문(28)은 메소드가 POST가 아니면 항상 비어있는 상태로 HTTP 서버로 전달된다.The
도 3은 도 2에 도시된 GET 요청 메시지 구조의 일례를 나타내는 도면이다.FIG. 3 is a diagram illustrating an example of a GET request message structure shown in FIG. 2.
도 3을 참조하면, 'GET/HTTP/1.1(CRLF)'는 도 2의 요청 라인(22)에 해당하고, 'Accept: */*(CRLF) ~ Connection: Keep-Alive'는 도 2의 메시지 헤더(24)에 해당하고, '(CRLF)'(36)은 도 2의 공백 라인(26)에 해당한다. 도 3에 도시된 GET 요청 메시지는 GET 메소드 요청이므로, 도 2에 도시된 메시지 본문 부분에 해당하는 부분은 비어있다.Referring to FIG. 3, 'GET / HTTP / 1.1 (CRLF)' corresponds to the
도 3에서 주목해야 될 부분은 메시지 헤더(34)의 끝과 공백 라인(36)이다. 메시지 헤더(34)에 포함된 모든 헤더 정보들의 끝에는 CRLF(0x0d, 0x0a)가 표현된다. 따라서 메시지 헤더(34)에 포함된 헤더 정보들 중 마지막 헤더 정보의 끝 부분에도 CRLF(0x0d, 0x0a)(34A)가 표현되며, CRLF(0x0d, 0x0a)(34A)의 뒤에는 도 3에 도시된 바와 같이 공백 라인(36A)이 연속적으로 표현된다. 이때, GET 요청 메시지의 경우, 메시지 본문이 없으므로 HTTP 서버에서는 공백 라인(36)을 요청의 끝이라고 인식하므로, 공백 라인(36)은 GET 요청 메시지를 전송하는 경우 반드시 포함되어야 한다. Note in FIG. 3 are the end of the
따라서 완전한 GET 메소드 요청에서는, 메시지 헤더(34)가 끝날 때 CRLF(0x0d, 0x0a)(34A)가 표현되고, 뒤이어 공백 라인(36)에 의해서 CRLF(0x0d, 0x0a) (36A)가 표현되므로, 두 개의 CRLF((0x0d, 0x0a)(0x0d, 0x0a))가 연속적으로 표현된다. Thus, in a complete GET method request, CRLF (0x0d, 0x0a) 34A is represented at the end of the
그러나 불완전한 GET 메소드 요청의 경우, GET 요청 메시지를 전송 시, 메시지 헤더(34)의 끝을 의미하는 CRLF(34A)와 공백 라인(36)에서 표현되는 CRLF(36A) 가 연속적으로 나타나지 않는다. 따라서 HTTP 웹 서버에서는 요청의 끝을 인식하지 못하므로, HTTP 웹 서버는 HTTP 클라이언트로부터 계속된 요청을 기다린 후, 결국 타임아웃(timeout)에 도달하거나, HTTP 클라이언트는 요청의 끝을 나타내는 CRLF(0x0d, 0x0a) 대신에 무의미한 헤더를 지속적으로 전송하여 HTTP 웹 서버의 리소스를 고갈시킬 뿐만 아니라 이러한 HTTP 웹 서버는 버퍼 오버플로우(buffer overflow) 공격에도 취약하다. 이와 같이, 공백 라인(36A)이 표현되지 않은 GET 요청 메시지는 HTTP 구조 형식을 이용한 서비스 거부(Denial of Service: DoS) 공격으로 판단한다. However, in the case of an incomplete GET method request, when transmitting a GET request message, the
따라서 본 발명의 실시예에서는 불완전한 GET 요청 메시지로 인한 서비스 거부 공격을 사전에 탐지하기 위한 두 가지 방법이 제시된다. Therefore, in the embodiment of the present invention, two methods for proactively detecting a denial of service attack due to an incomplete GET request message are presented.
본 실시예에서 제안하는 두 가지 방법은 모두 URL 길이와 관련된다. Both methods proposed in this embodiment are related to URL length.
HTTP 프로토콜 표준에서는 URL 길이의 최대값이 정의되어 있지 않으나, 실질적으로 HTTP 클라이언트나 HTTP 서버에 의해 URL의 길이는 다음과 같이 제한되고 있다.Although the maximum value of the URL length is not defined in the HTTP protocol standard, the URL length is substantially limited by the HTTP client or the HTTP server as follows.
HTTP 클라이언트에 의한 URL의 길이는 사용되는 브라우저에 따라 다음과 같이 제한된다. 인터넷 익스플로러(Internet Explorer)의 경우, 2048자까지의 URL 입력이 가능하며, 이 이상의 URL을 입력하면, 오류 화면이 표시된다. 파이어폭스(FireFox)의 경우, 65536자 URL 입력이 가능하다. 사파리(Safari)에서는 80000자 이상의 URL 입력이 가능하며, 오페라(Opera)에서는 190000자 이상의 URL 입력이 가능하다. The length of the URL by the HTTP client is limited as follows depending on the browser used. In the case of Internet Explorer, you can enter a URL up to 2048 characters long. If you enter more URLs, an error screen is displayed. For Firefox, you can enter a 65536-character URL. In Safari, you can enter URLs of more than 80000 characters, and in Opera, you can enter URLs of 190,000 characters or more.
HTTP 서버에 의한 URL의 길이의 제한을 살펴보면, Apache 서버에서는 HTTP 클라이언트로부터 대략 4000자의 URL 입력에 대응하는 요청이 있는 경우, 413 오류 화면이 표시되고, IIS 서버에서는 HTTP 클라이언트로부터 16384자의 URL 입력에 대응하는 요청이 기본으로 설정되어 있다.Looking at the limitations of the length of URLs by the HTTP server, the Apache server displays a 413 error screen when a request corresponding to a URL input of approximately 4000 characters is received from an HTTP client, and the IIS server responds to a URL input of 16384 characters from an HTTP client. The request is set by default.
웹 프로그래머는 사용자가 어떤 브라우저를 사용하는지 또는 어떤 HTTP 서버를 사용하는지 모르기 때문에 모든 곳에서 사용할 수 있는 최소 길이의 URL을 기준으로 웹 프로그래밍을 할 것이므로 현재의 웹 프로그래머는 인터넷 익스플로러의 URL 길이의 제한에 따라 웹 프로그래밍을 할 것이다. Since web programmers do not know which browser they are using or which HTTP server they are using, they will do web programming based on the minimum length of URLs available everywhere. I will do some web programming.
현재 마이크로소프트사에서 인터넷 익스플로러의 주소 창에 입력되는 문자 수를 2,083자로 설정하고, GET 방식을 사용하는 경우를 가정하면, 실제 action 주소를 뺀 2,048자의 문자 수가 적용된다. 하나의 문자는 1 바이트로 표현되므로, GET 요청 메시지의 크기는 2,048 바이트보다 크지 않다.If Microsoft sets the number of characters entered in the address bar of Internet Explorer to 2,083 characters and uses the GET method, 2,048 characters minus the actual action address is applied. Since one character is represented by 1 byte, the size of the GET request message is not larger than 2,048 bytes.
또한 TCP에서 전송할 수 있는 데이터의 최대 크기(size)는 MSS(Maximum Segment Size)로 정의되고, 이 MSS 값은 아래와 같이 최대 전송 단위(Maximum Transmission Unit: MTU) 값에 의해 결정된다.In addition, the maximum size of data that can be transmitted in TCP is defined as the Maximum Segment Size (MSS), and this MSS value is determined by the Maximum Transmission Unit (MTU) value as follows.
MSS = MTU - (IP header 크기) - (TCP header 크기)MSS = MTU-(IP header size)-(TCP header size)
그러므로 이더넷(Ethernet)의 경우, MTU 1500, IP 헤더 크기 20 byte, TCP 헤더 크기 20 byte를 제외하면 1460 byte가 MSS로 결정된다. 이것은 웹 서비스를 하기 위해 도 1에 도시된 바와 같은 3 way handshake 과정에서 HTTP 클라이언트와 HTTP 서버는 도 1의 SYN(10)과 SYN+ACK(12)을 전송하는 과정에서 상대방에게 자신 의 MSS 값을 TCP 헤더의 옵션(option) 필드를 통해 알려준다. Therefore, in case of Ethernet, 1460 bytes are determined as MSS except for
도 4는 결정된 MSS에 따라 HTTP 클라이언트와 HTTP 서버 간에 서로 주고받는 신호의 흐름을 보여주는 도면이다. 4 is a diagram illustrating a signal flow between an HTTP client and an HTTP server according to the determined MSS.
도 4에 도시된 바와 같이, HTTP 클라이언트(300)와 HTTP 서버(400)가 주고받는 신호들(40, 42, 44)에 의해 세션이 성립되면, HTTP 클라이언트(300)는 GET 요청 메시지(46)를 통해 원하는 페이지를 HTTP 서버(400)에게 요청한다. 이때 하나의 GET 요청 메시지의 URL 길이가 MSS 크기 이상이면, 여러 개의 패킷으로 나뉘어 전송된다. 따라서 하나의 GET 요청 메시지가 2,048byte를 초과할 수 없는 원칙과, 세션 연결 후 MSS 크기(size) 이상의 메시지를 전송할 수 없는 원칙을 고려하면, MSS 크기를 초과하는 하나의 GET 요청 메시지는 한번에 전송되지 못하고, 여러 번 나누어 전송된다. 즉, 분할된 GET 요청 패킷 최대 개수는 2,048byte/MSS의 올림 값이 된다. 예를 들면, HTTP 클라이언트(300)의 MSS가 1460인 경우, 하나의 GET 요청 메시지가 나누어져서 전송 가능한 최대 패킷 개수는 1.4(2,048/1460)가 되고, 1.4를 올림 하면, 2가 된다. 따라서 HTTP 클라이언트가 가장 긴 2,048 byte의 하나의 GET 요청 메시지를 HTTP 서버에 전송하는 경우, 세션이 성립된 이후, 첫 번째 패킷 페이로드가 1460byte가 전송되고, 바로 그 다음의 두 번째 GET 요청 패킷 페이로드 588byte가 마지막 패킷이 된다. 다시 말해, 도 3에 도시된 바와 같이 최대 2개의 분할된 GET 요청 패킷 안에는 메시지 헤더(34)의 마지막 헤더의 끝을 나타내는 CRLF(0x0d, 0x0a)(34A)와 공백 라인(36)을 나타내는 CRLF(0x0d, 0x0a)(36A)가 포함되어 있어야 한다.As shown in FIG. 4, when a session is established by
URL 길이에 따라 제한되는 하나의 GET 요청 메시지는 URL의 최대 길이가 2,048 byte이므로, 분할된 GET 요청 최대 패킷 개수를 2,048 byte/MSS의 올림값이라 설명되고 있다. 이는 현재 URL 길이 제한이 HTTP 클라이언트와 HTTP 서버의 URL 길이 제한 중의 인터넷 익스플로러에서 가장 작은 크기로 URL 길이를 제한하고 있어서 2,048 byte/MSS의 올림값이라고 하고 있으나 이는 추후 HTTP 클라이언트나 HTTP 서버에 의해서 실질적인 URL 길이 제한이 변경됨에 따라서 유동적으로 변화 할 수 있다. Since a maximum length of a URL is 2,048 bytes, one GET request message limited according to the URL length is described as the maximum number of divided GET request packets as a rounded up value of 2,048 bytes / MSS. This is called the roundup of 2,048 byte / MSS because the URL length limit is the smallest size in Internet Explorer among the URL length limits of HTTP clients and HTTP servers. As the length limit changes, it can change fluidly.
이하, 지금까지 상술한 특성을 이용한 본 발명의 일실시예에 따른 불완전한 GET 요청 메시지에 의한 서비스 거부 공격 탐지 방법에 대해 설명하기로 한다.Hereinafter, a denial of service attack detection method by an incomplete GET request message according to an embodiment of the present invention using the above-described characteristics will be described.
도 5 및 도 6은 본 발명의 일실시예에 따른 불완전한 GET 요청 메시지를 이용한 서비스 거부 공격을 탐지하는 과정을 설명하는 흐름도이다.5 and 6 are flowcharts illustrating a process of detecting a denial of service attack using an incomplete GET request message according to an embodiment of the present invention.
도 5 및 도 6을 참조하면, 본 발명의 일실시예에 따른 불완전한 GET 요청 메시지에 의한 서비스 거부 공격 탐지 과정은 HTTP 클라이언트로부터 GET 요청 메시지를 수신하는 서버에서 수행되는 것으로 가정하여 기술된다. 그러나, HTTP 클라이언트와 HTTP 서버 사이에 서비스 거부 공격 탐지 서버가 구비되고, 상기 탐지 서버에서 본 발명의 일실시예에 따른 불완전한 GET 요청 메시지에 의한 서비스 거부 공격의 탐지 과정이 수행될 수도 있다.5 and 6, a denial of service attack detection process by an incomplete GET request message according to an embodiment of the present invention is described assuming that the server receives a GET request message from an HTTP client. However, a denial of service attack detection server may be provided between the HTTP client and the HTTP server, and a detection process of the denial of service attack by an incomplete GET request message according to an embodiment of the present invention may be performed in the detection server.
먼저, HTTP 서버가 HTTP 클라이언트로부터의 패킷을 입력받는다(S510). 여기서 패킷은 헤더 및 페이로드(payload)를 포함한다. 헤더는 패킷을 라우팅 및 해석하기 위해 필요한 데이터를 포함하며, 페이로드는 수신되는 실제 데이터를 포함한 다.First, the HTTP server receives a packet from an HTTP client (S510). Here, the packet includes a header and a payload. The header contains the data needed to route and interpret the packet, and the payload contains the actual data received.
이어, HTTP 서버는 ACK 패킷의 수신 여부 즉, 3 way handshake 과정이 완료 여부에 따라 현재의 세션 연결(Session Connect) 상태를 확인한다(S512). Subsequently, the HTTP server checks the current session connect state according to whether the ACK packet is received, that is, the 3 way handshake process is completed (S512).
세션 연결이 완료되지 않은 경우, HTTP 서버는 세션 연결이 완료될 때까지 GET 요청 패킷의 개수를 '0'으로 초기화한다(S514). If the session connection is not completed, the HTTP server initializes the number of GET request packets to '0' until the session connection is completed (S514).
세션 연결이 완료되면, HTTP 서버는 세션 연결 완료 후에 HTTP 클라이언트로부터 지금까지 수신된 GET 요청 패킷 개수를 확인한다. 만약 메시지가 길어서 분할되어 전송되었다면 분할된 GET 요청 패킷의 개수를 확인한다(S516). 수신된 패킷의 개수가 '0'이면, 즉, 아직 수신된 GET 요청 패킷이 없으며, 현재의 세션에서 적용되는 MSS값을 추출하고(S518), 세션 연결 완료 후에 HTTP 클라이언트로부터 수신되는 GET 요청 패킷의 페이로드 길이(L)값을 추출한다(S520).When the session connection is completed, the HTTP server checks the number of GET request packets received so far from the HTTP client after the session connection is completed. If the message is long and divided and transmitted, the number of split GET request packets is checked (S516). If the number of received packets is '0', that is, no GET request packet has been received yet, the MSS value applied in the current session is extracted (S518), and the GET request packet received from the HTTP client after the session connection is completed. The payload length L value is extracted (S520).
상기 과정(S516)에서, 확인된 GET 요청 패킷의 개수가 '0'이 아니면, 즉, 현재 수신된 GET 요청 패킷이 최초가 아니면 하나의 GET 요청 메시지가 MSS보다 커서 분할되어 전송되는 패킷으므로, 상기 과정(S518)을 거치지 않고, 현재 수신된 패킷의 페이로드 길이값을 추출하는 과정이 수행된다(S520). In step S516, if the number of confirmed GET request packets is not '0', that is, if a currently received GET request packet is not the first one GET request message is larger than the MSS, the packet is divided and transmitted. The process of extracting the payload length value of the currently received packet is performed without going through step S518 (S520).
이어, 세션 연결 후, 현재까지 하나의 GET 요청 메시지가 분할되어 전송된 패킷의 개수 즉, 분할된 GET 요청 패킷 개수를 카운팅하고(S522), 카운팅된 패킷의 개수(CNT)와 URL 길이에 따라 HTTP 클라이언트에서 HTTP 서버로 하나의 GET 요청 메시지를 분할하여 송신할 수 있는 패킷의 기 설정된 최대 개수(MAX_CNT) 즉, 분할된 GET 요청 최대 패킷 개수를 비교한다(S524). 여기서, 기 설정된 최대 개 수(MAX_CNT)는 HTTP 클라이언트와 HTTP 서버의 URL 길이 제한에 따라서 달라질 수 있으며, 예컨대, URL 길이가 2048 byte로 제한되는 익스플로러가 다른 HTTP 클라이언트나 HTTP 서버의 URL 길이 제한 중 가장 짧은 경우, MSS가 1460인 경우, 기 설정된 최대 개수는 2(2048/MSS의 올림값)로 설정될 수 있다.Subsequently, after the session connection, one GET request message is divided so far to count the number of transmitted packets, that is, the number of divided GET request packets (S522), and HTTP according to the number of counted packets (CNT) and the URL length. The GET request message is divided from the client to the HTTP server and the preset maximum number of packets that can be transmitted (MAX_CNT), that is, the maximum number of divided GET request packets are compared (S524). Here, the preset maximum number MAX_CNT may vary according to the URL length limitation of the HTTP client and the HTTP server. For example, the explorer whose URL length is limited to 2048 bytes is the most among the URL length limitations of other HTTP clients or HTTP servers. In the short case, when the MSS is 1460, the preset maximum number may be set to 2 (a rounding value of 2048 / MSS).
상기 분할된 GET 요청 패킷 개수(CNT)와 상기 기 설정된 분할된 GET 요청 최대 패킷 개수(MAX_CNT)를 비교한 결과, 'CNT > MAX_CNT' 이면, HTTP 서버가 현재의 세션에서 수신되는 GET 요청 패킷을 불완전한 GET 요청 메시지 즉, 서비스 거부 공격으로 탐지한다(S532). 탐지된 결과는 시스템 관리자에 의해 모니터링되고, 해당 패킷의 접속을 차단하는 후속 조치가 수행될 수 있다. 만일, 상기 카운팅된 분할된 GET 요청 패킷 개수(CNT)와 상기 기 설정된 분할된 GET 요청 최대 패킷 개수(MAX_CNT)를 비교한 결과, 'CNT < MAX_CNT' 이면, HTTP 서버가 현재 수신된 패킷의 맨 마지막에 2개의 연속된 CRLF가 포함되어 있는지를 판단한다(S526). As a result of comparing the divided GET request packet count (CNT) and the preset divided GET request maximum packet count (MAX_CNT), if 'CNT> MAX_CNT', the HTTP server may not complete the GET request packet received in the current session. The GET request message, that is, detected as a denial of service attack (S532). The detected result is monitored by the system administrator, and subsequent actions to block the access of the packet can be performed. If the counted divided GET request packet number (CNT) is compared with the preset divided GET request maximum packet number (MAX_CNT), and if 'CNT <MAX_CNT', the HTTP server is the last of the currently received packet. It is determined whether two consecutive CRLFs are included in S526.
패킷이 2개의 연속된 CRLF을 포함하면, HTTP 서버는 현재의 세션에서 수신된 GET 요청 메시지를 정상 패킷으로 판단한다(S528).If the packet includes two consecutive CRLFs, the HTTP server determines that the GET request message received in the current session is a normal packet (S528).
2개의 연속된 CRLF을 포함하지 않은 경우, HTTP 서버는 상기 과정(S518)에서 추출된 MSS값과 상기 과정(S520)에서 추출된 패킷의 페이로드 길이(L)값을 비교한다(S530). When not including two consecutive CRLFs, the HTTP server compares the MSS value extracted in step S518 with the payload length L value of the packet extracted in step S520 (S530).
비교 결과, 'L < MSS' 이면, 불완전한 GET 요청 메시지 즉, 서비스 거부 공격으로 판단한다(S532). 'L > MSS'일 수는 없으므로, 'L = MSS' 이면, 상기 카운팅된 분할된 GET 요청 패킷의 개수(CNT)와 상기 기 설정된 분할된 GET 요청 최대 패킷 개수(MAX_CNT)가 동일한지 여부를 판단하고(S534), 'CNT == MAX_CNT'이면, 현재 세션에서 수신되는 GET 요청 메시지를 불완전한 GET 요청 메시지에 의한 서비스 거부 공격으로 판단하고(S532), 'CNT ≠ MAX_CNT'이면, 다음 분할된 GET 요청 패킷이 수신될 때까지 대기한다(S536). 즉, 'CNT ≠ MAX_CNT'인 경우는 하나의 GET 요청 메시지가 다수개의 패킷으로 분할되어 아직 수신되지 않은 경우이므로, HTTP 서버는 다음 패킷을 기다린다. HTTP 서버에서는 하나의 GET 요청 메시지가 분할되어 전송된 경우 마지막 패킷이 수신될 때까지 상기 일련 과정들(S526, S528, S530, S532, S534)이 계속 수행된다. As a result of the comparison, if L <MSS, it is determined as an incomplete GET request message, that is, a denial of service attack (S532). Cannot be 'L>MSS', If 'L = MSS ' , it is determined whether the counted divided GET request packets (CNT) and the preset divided GET request maximum packet count (MAX_CNT) are the same (S534), and 'CNT == MAX_CNT ', The GET request message received in the current session is determined to be a denial of service attack by an incomplete GET request message (S532). If' CNT ≠ MAX_CNT ', it waits until the next divided GET request packet is received (S536). ). That is, in the case of 'CNT ≠ MAX_CNT', since one GET request message is divided into a plurality of packets and not yet received, the HTTP server waits for the next packet. In the HTTP server, when one GET request message is divided and transmitted, the serial processes S526, S528, S530, S532, and S534 are continued until the last packet is received.
도 7은 본 발명의 일실시예에 따른 불완전한 GET 요청 메시지를 이용한 서비스 거부 공격을 탐지하는 전체 시스템 구성 블록도이다.7 is a block diagram illustrating an overall system configuration for detecting a denial of service attack using an incomplete GET request message according to an embodiment of the present invention.
도 7을 참조하면, 전체 시스템은 HTTP 클라이언트(100), 유무선 네트워크(150)를 통해 상기 HTTP 클라이언트(100)와 네트워크 통신을 수행하는 HTTP 서버(300) 및 상기 네트워크(150)와 상기 HTTP 서버 사이에 구비되어 불완전한 GET 요청 메시지를 이용한 서비스 거부 공격을 탐지하는 탐지 서버(200)를 포함한다. Referring to FIG. 7, the entire system includes an
HTTP 클라이언트(100)와 HTTP 서버(300)는 기본적으로 3 way handshake 과정에 의해 세션을 구성한다. 세션이 구성되면, HTTP 클라이언트(100)가 기본적으로 GET 메소드에 따라 HTTP 서버(300)로 GET 요청 메시지를 전송한다. 이때, 탐지 서버(200)는 URL 최대 길이 제한과 HTTP 클라이언트가 한번에 전송할 수 있는 패킷 크기 제한 MSS을 이용하여, HTTP 클라이언트(100)가 하나의 GET 요청메시지를 전송하면서 MSS에 의해 나누어서 보낼 수 있는 GET 요청 최대 패킷 개수를 계산한다. The
탐지 서버(200)는 계산된 최대 개수에 근거하여 완전한 GET 요청 메시지와 불완전한 GET 요청 메시지를 구분함으로써 서비스 거부 공격을 탐지 한다. The
이하, 상기 탐지 서버에 대해 상세히 설명하기로 한다. Hereinafter, the detection server will be described in detail.
도 8은 도 7에 도시된 탐지 서버의 내부 구성의 일례를 보여주는 블록도이다.FIG. 8 is a block diagram illustrating an example of an internal configuration of the detection server illustrated in FIG. 7.
도 8을 참조하면, 탐지 서버(200)는 서비스 거부 공격 해당하는 GET 요청 패킷과 정상적인 사용자의 GET 요청 패킷을 구분하기 위하여, 세션 관리부(210), 카운팅부(220), 제1 비교부(230), 패킷 분석부(240) 및 제2 비교부(250)를 포함한다. Referring to FIG. 8, the
세션 관리부(210)는 세션 연결을 위해 HTTP 서버(100)와 HTTP 클라이언트(300)가 서로 주고 받는 패킷들(도 4의 40, 42)로부터 MSS값을 추출한다. 세션 관리부(210)는 현재 브라우저와 웹 서버에서 제한하고 있는 URL 최대 길이값 중의 제일 작은 URL 길이 제한값과 상기 추출된 MSS값을 이용하여 최대 개수(MAX_CNT)([URL의 길이 제한값 / MSS값]을 올림한 개수)를 계산한다. 또한 HTTP 서버(300) 와 HTTP 클라이언트(100) 간에 세션 연결이 완료되면, 세션 연결이 완료된 이후에 HTTP 클라이언트(100)로부터 HTTP 서버(300)로 전송되는 GET 요청 패킷의 페이로드 길이(L) 값을 추출한다. 이때, GET 요청 패킷의 페이로드 길이(L)값이 상기 MSS값을 초과하여, 하나의 GET 요청 메시지가 여러 개로 분할되어 전송되는 경우, 분할된 GET 요청 패킷들의 페이로드 길이(L) 값을 각각 추출한다. 또한 세션 관리부(210)는 세션 연결이 완료되었음 알리는 세션 연결 신호(S1)를 생성하며, 일 례로, HTTP 클라이언트(100)로부터 HTTP 서버(300)로 전송되는 ACK 패킷(도 4의 44)에 응답하여 상기 세션 연결 신호(S1)를 생성할 수 있다. 생성된 세션 연결 신호(S1)는 카운팅부(220)로 전달한다.The
카운팅부(220)는 상기 세션 연결 신호(S1)에 응답하여 세션 연결 후에 상기 HTTP 클라이언트(100)로부터 HTTP 서버(300)로 전송되는 분할된 GET 요청 패킷 개수(CNT)를 카운팅한다. 즉, 수신되는 하나의 GET 요청 메시지가 분할되어 전송된 패킷의 개수(CNT)를 카운팅하고, 카운팅된 결과치를 제1 비교부(230)로 전달한다.The
제1 비교부(230)는 상기 카운팅부(220)로부터의 상기 카운팅된 분할된 GET 요청 패킷 개수(CNT)와 상기 세션 관리부(210)로부터의 분할된 GET 요청 패킷 최대 개수(MAX_CNT)를 비교하고, 비교 결과에 따라 제1 비교 신호(C1-1) 및 제2 비교 신호(C1-2) 중 어느 하나의 신호를 출력한다. 여기서, 제1 비교 신호(C1-1)는 상기 카운팅된 분할된 GET 요청 패킷의 개수(CNT)가 분할된 GET 요청 패킷 최대 개수(MAX_CNT)보다 큰 경우를 나타내는 신호이고, 제2 비교 신호(C1-2)는 상기 카운팅된 분할된 GET 요청 패킷의 개수(CNT)가 분할된 GET 요청 패킷 최대개수 (MAX_CNT)보다 작거나 같은 경우 나타내는 신호이다. The
공격 판단부(240)는 상기 신호(C1-1 또는 C1-2)를 전달받는 시점에서 HTTP 서버(300)로 전달되는 GET 요청 패킷을 분석한다. 공격 판단부(240)가 제1 비교 신호(C1-1)를 전달받으면, 현재 세션에서의 GET 요청 패킷을 불완전한 GET 요청 메시지에 의한 공격 패킷 즉, 서비스 거부 공격으로 판단하고, 제2 비교 신호(C1-2)를 전달받으면, 현재 HTTP 서버(300)로 전달되는 패킷의 끝 부분에 연속된 2개의 CRLF(도 3의 34A, 36A)가 포함되어 있는지를 판단한다. 패킷의 끝 부분에 연속된 2개의 CRLF(도 3의 34A, 36A)가 포함되어 있으면, HTTP 클라이언트로부터 HTTP 서버(300)로 전달되는 현재의 GET 요청 패킷을 정상적인 패킷으로 판단한다. 한편, 공격 판단부(240)는 GET 요청 패킷의 끝 부분에 연속된 2개의 CRLF가 존재하지 않으면, 제2 비교부(250)를 구동시키는 구동신호(D1)를 생성한다. The
제2 비교부(250)는 상기 구동 신호(D1)에 응답하여 GET 요청 패킷의 페이로드 길이(L)값과 MSS값을 비교하고, 비교 결과를 제3 비교 신호(C2-1) 또는 제4 비교 신호(C2-2)로서 출력한다. 출력되는 제3 비교 신호(C2-1) 또는 제4 비교 신호(C2-2)는 공격 판단부(240)로 전달된다. 여기서, 제3 비교 신호(C2-1)는 GET 요청 패킷의 페이로드 길이(L)값이 MSS값보다 작을 때 제2 비교부(250)로부터 출력되는 신호이고, 제4 비교 신호(C2-2)는 패킷의 페이로드 길이(L)값이 MSS값보다 크거나 같을 때 제2 비교부(250)로부터 출력되는 신호이다.The
공격 판단부(240)는 패킷의 페이로드 길이(L)값이 MSS값보다 작은 경우, 제2 비교부(250)로부터 전달되는 제3 비교 신호(C2-1)를 전달받으면, 현재 세션에서 전달되는 GET 요청 메시지를 불완전한 패킷 즉, 서비스 거부 공격으로 판단한다. 만일 공격 판단부(240)가 패킷의 페이로드 길이(L)값이 MSS값보다 크거나 같은 경우, 제2 비교부로부터 전달되는 제4 비교 신호(C2-2)를 전달받고, 상기 카운팅된 분할된 GET 요청 패킷의 개수(CNT)와 분할된 Get 요청 최대 패킷 개수(MAX_CNT)가 동일한 경우, 현재 세션에서 전달되는 GET 요청 패킷을 불완전한 패킷 즉, 서비스 거부 공격으로 판단한다. When the payload length L value of the packet is smaller than the MSS value, the
도 9 내지 도 10은 본 발명의 다른 실시예에 따른 불완전한 GET 요청 메시지를 탐지하는 방법을 설명하기 위한 서버와 클라이언트 간의 신호 흐름도이다.9 to 10 are signal flows between a server and a client for explaining a method of detecting an incomplete GET request message according to another embodiment of the present invention.
도 9 내지 도 10을 참조하면, 본 발명의 다른 실시예에 따른 불완전한 GET 요청 메시지를 이용한 서비스 거부 공격을 탐지하는 방법에서는 도 5 및 도 6에서 설명한 탐지 방법과 같은 원리가 이용된다. 다만, 도 5 및 도 6의 설명에서는, 하나의 GET 요청 메시지의 마지막 부분에 연속된 2개의 CRLF가 존재하는 지를 판별하여 GET 요청 메시지를 이용한 서비스 거부 공격 여부가 판별되었으나, 본 발명의 다른 실시예에서는, 연속된 2개의 CRLF의 존재 여부를 확인하지 않고도 하나의 GET 요청 메시지의 마지막 부분에 연속된 2개의 CRLF의 존재 여부가 확인된다. 9 to 10, in the method for detecting a denial of service attack using an incomplete GET request message according to another embodiment of the present invention, the same principle as the detection method described with reference to FIGS. 5 and 6 is used. In the description of FIGS. 5 and 6, it is determined whether a denial of service attack using a GET request message is determined by determining whether two consecutive CRLFs exist at the end of one GET request message. In, the existence of two consecutive CRLFs is confirmed at the end of one GET request message without checking whether two consecutive CRLFs exist.
본 발명의 다른 실시예에서는 HTTP 응답 패킷을 통해 연속된 2개의 CRLF의 존재 여부가 확인된다.In another embodiment of the present invention, the presence of two consecutive CRLFs is confirmed through an HTTP response packet.
정상적인 GET 요청 메시지는 도 9에 도시된 바와 같이, 클라이언트가 전송하는 하나의 GET 요청 메시지의 URL 길이가 MSS값을 초과하여 2개의 패킷(52, 54)으로 분할되어 서버로 전송되는 경우, 정상적인 GET 요청 패킷이 서버에 전송되면, 클라이언트는 서버로부터 "HTTP/1.1 200 OK"와 같은 HTTP 응답 메시지를 수신 받게 된다. 이러한 HTTP 응답 메시지는 표준 문서의 HTTP status code를 포함하는 모든 형태의 패킷을 포함한다. As shown in FIG. 9, the normal GET request message is divided into two
한편, 불완전한 GET 요청 메시지는 도 10에 도시된 바와 같이, 하나의 GET 요청 메시지의 URL 길이가 MSS값을 초과하여 여러 개의 패킷으로 분할되어 클라이언트로부터 서버로 전송될지라도, 클라이언트는 상기 분할된 하나의 GET 요청 메시 지(62)에 대한 HTTP 응답 메시지를 서버로부터 전송 받지 못한다.On the other hand, the incomplete GET request message is shown in Figure 10, even if the URL length of one GET request message exceeds the MSS value is divided into several packets and transmitted from the client to the server, the client is the one The HTTP response message for the
따라서 세션 연결이 완료된 이후, 클라이언트는 GET 요청 메시지의 페이로드 바이트 수 또는 패킷 수를 누적하고, 기 설정된 임계치 이상의 GET 요청 메시지의 페이로드 바이트 수 또는 패킷 수를 전송하였음에도 불구하고, 서버로부터 HTTP 응답 메시지를 전송받지 못하면, 전송한 GET 요청 메시지를 불완전한 GET 요청 메시지 즉, 서비스 거부 공격으로 판단한다. 일례로, 상기 기 설정된 임계치는 누적된 패킷 수가 5로 설정되거나, 누적된 바이트 수가 2000 byte로 설정될 수 있다.Therefore, after the session connection is completed, the client accumulates the payload byte number or the packet number of the GET request message, and sends the HTTP response message from the server even though the payload byte number or the packet number of the GET request message is transmitted over the preset threshold. If not received, the transmitted GET request message is determined to be an incomplete GET request message, that is, a denial of service attack. For example, the preset threshold may be set to 5 accumulated packets or 2000 bytes.
이제까지 본 발명에 대하여 바람직한 실시 예를 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 본 발명을 구현할 수 있음을 이해할 것이다. 예컨대, 도 7에 도시된 탐지 서버가 클라이언트와 서버 사이에 구비된 것으로 기술하였으나, 상기 탐지 서버에 구비된 구성들은 상기 서버에 구비될 수도 있다. 그러므로 상기 개시된 실시 예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 한다.The present invention has been described above with reference to preferred embodiments. It will be understood by those skilled in the art that the present invention may be embodied in various other forms without departing from the spirit or essential characteristics thereof. For example, although the detection server illustrated in FIG. 7 is described as being provided between the client and the server, the components provided in the detection server may be provided in the server. Therefore, the above-described embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is shown not in the above description but in the claims, and all differences within the scope should be construed as being included in the present invention.
도 1은 일반적인 HTTP를 이용한 서버와 클라이언트 간의 신호 흐름도이다.1 is a signal flow diagram between a server and a client using a general HTTP.
도 2는 도 1에 도시된 GET 요청 메시지의 구조를 보여주는 도면이다.FIG. 2 is a diagram illustrating the structure of a GET request message shown in FIG. 1.
도 3은 도 2에 도시된 GET 요청 메시지 구성의 일례를 나타내는 도면이다.FIG. 3 is a diagram illustrating an example of a configuration of a GET request message shown in FIG. 2.
도 4는 기 설정된 MSS에 따라 클라이언트와 서버 간의 신호 흐름도이다.4 is a signal flow diagram between a client and a server according to a preset MSS.
도 5 및 도 6은 본 발명의 일실시예에 따른 불완전한 GET 요청 메시지에 의한 서비스 거부 공격의 탐지 과정을 보여주는 순서도이다.5 and 6 are flowcharts illustrating a process of detecting a denial of service attack by an incomplete GET request message according to an embodiment of the present invention.
도 7은 본 발명의 일실시예에 따른 불완전한 GET 요청 메시지를 이용한 서비스 거부 공격을 탐지하는 전체 시스템 구성 블록도이다.7 is a block diagram illustrating an overall system configuration for detecting a denial of service attack using an incomplete GET request message according to an embodiment of the present invention.
도 8은 도 7에 도시된 탐지 서버의 내부 구성의 일례를 보여주는 블록도이다.FIG. 8 is a block diagram illustrating an example of an internal configuration of the detection server illustrated in FIG. 7.
도 9 및 도 10은 본 발명의 다른 실시예에 따른 불완전한 GET 요청 메시지에 의한 서비스 거부 공격의 탐지하는 방법을 설명하기 위한 서버와 클라이언트 간의 신호 흐름도이다.9 and 10 are signal flows illustrating a server and a client for explaining a method of detecting a denial of service attack by an incomplete GET request message according to another embodiment of the present invention.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020090105112A KR101269552B1 (en) | 2009-11-02 | 2009-11-02 | Method and apparatus for denial of service detection against incomplete get request of http |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020090105112A KR101269552B1 (en) | 2009-11-02 | 2009-11-02 | Method and apparatus for denial of service detection against incomplete get request of http |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20110048349A KR20110048349A (en) | 2011-05-11 |
KR101269552B1 true KR101269552B1 (en) | 2013-06-04 |
Family
ID=44239512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020090105112A KR101269552B1 (en) | 2009-11-02 | 2009-11-02 | Method and apparatus for denial of service detection against incomplete get request of http |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101269552B1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101598187B1 (en) * | 2014-12-23 | 2016-02-26 | 주식회사 시큐아이 | Method and apparatus for blocking distributed denial of service |
KR102016461B1 (en) | 2017-11-10 | 2019-08-30 | 고려대학교 산학협력단 | System of defensing against Slow HTTP DDoS attack based on SDN and method thereof |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080037909A (en) * | 2006-10-27 | 2008-05-02 | 한국전자통신연구원 | A method and a device for network-based internet worm detection with the vulnerability analysis and attack modeling |
-
2009
- 2009-11-02 KR KR1020090105112A patent/KR101269552B1/en not_active IP Right Cessation
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080037909A (en) * | 2006-10-27 | 2008-05-02 | 한국전자통신연구원 | A method and a device for network-based internet worm detection with the vulnerability analysis and attack modeling |
Also Published As
Publication number | Publication date |
---|---|
KR20110048349A (en) | 2011-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4759389B2 (en) | Packet communication device | |
US8095789B2 (en) | Unauthorized communication detection method | |
KR101424490B1 (en) | Reverse access detecting system and method based on latency | |
US10931711B2 (en) | System of defending against HTTP DDoS attack based on SDN and method thereof | |
US10693908B2 (en) | Apparatus and method for detecting distributed reflection denial of service attack | |
WO2016106592A1 (en) | Method and device for feature information analysis | |
KR20090014334A (en) | Systems and methods of improving performance of transport protocols | |
KR20130017333A (en) | Attack decision system of slow distributed denial of service based application layer and method of the same | |
US20110016523A1 (en) | Apparatus and method for detecting distributed denial of service attack | |
US20140304817A1 (en) | APPARATUS AND METHOD FOR DETECTING SLOW READ DoS ATTACK | |
RU2635220C2 (en) | Two-way communication system in real time, using http protocol | |
JP6502902B2 (en) | Attack detection device, attack detection system and attack detection method | |
WO2010099754A1 (en) | Log information transmission method and apparatus | |
US8490173B2 (en) | Unauthorized communication detection method | |
Limmer et al. | Improving the performance of intrusion detection using dialog-based payload aggregation | |
KR20110022141A (en) | Apparatus for detecting and preventing application layer distribute denial of service attack and method | |
KR101269552B1 (en) | Method and apparatus for denial of service detection against incomplete get request of http | |
WO2011012004A1 (en) | Method and system for realizing network flow cleaning | |
JP2006164038A (en) | Method for coping with dos attack or ddos attack, network device and analysis device | |
CN115664833B (en) | Network hijacking detection method based on local area network safety equipment | |
CN108449280B (en) | Method and device for avoiding ping-pong of TCP (Transmission control protocol) messages | |
Rajaboevich et al. | Analysis of methods for measuring available bandwidth and classification of network traffic | |
JP2009049972A (en) | Method of controlling communication apparatus, and communication apparatus | |
KR101424504B1 (en) | Integrated security control system using positive way | |
KR101196325B1 (en) | Distributed denial of service attack search apparatus and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20160427 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20170427 Year of fee payment: 5 |
|
LAPS | Lapse due to unpaid annual fee |