JP2006345268A - Packet filter circuit and packet filter method - Google Patents

Packet filter circuit and packet filter method Download PDF

Info

Publication number
JP2006345268A
JP2006345268A JP2005169502A JP2005169502A JP2006345268A JP 2006345268 A JP2006345268 A JP 2006345268A JP 2005169502 A JP2005169502 A JP 2005169502A JP 2005169502 A JP2005169502 A JP 2005169502A JP 2006345268 A JP2006345268 A JP 2006345268A
Authority
JP
Japan
Prior art keywords
packet
passage
pass
synack
entry
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
JP2005169502A
Other languages
Japanese (ja)
Inventor
Akihito Inoshita
明史 井ノ下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005169502A priority Critical patent/JP2006345268A/en
Publication of JP2006345268A publication Critical patent/JP2006345268A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a packet filter circuit capable of passing only a packet of a normal access and capable of omitting unnecessary repeating processing. <P>SOLUTION: A packet filter circuit part 200 comprises: a passage setting table 220 for registering the header information of a packet to be passed as an entry; a passage determination part 210 for determining whether the packet is allowed to pass or not by referring to the passage setting table 220; a SYNACK proxy response part 230 for performing the proxy response of an SYNACK packet to a SYN packet when a packet prohibited to pass is the SYN packet; a passage setting entry adding part 250 for adding the header information of the ACK packet to the entry in the passage setting table when the packet prohibited to pass is the ACK packet; and a connection cutting part 240 for informing a transmission source of the ACK packet of disconnection in the case of adding the entry by the passage setting entry adding part 250. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、通過設定テーブルに登録されているヘッダ情報を元にパケットを通過させるパケットフィルタ回路及びパケットフィルタ方法に関する。   The present invention relates to a packet filter circuit and a packet filter method for passing a packet based on header information registered in a passage setting table.

インターネットなどのオープンなネットワークは、誰もが自由に接続することが可能である。ネットワークを介した様々なサービスが提供されその利便性が増す一方で、悪意を持った第三者がサービスを提供する装置に大量のパケットを送信して、一般ユーザの利用を妨げる分散サービス拒否(Distributed Denial of Service:DDoS)攻撃が問題となっている。DDoS攻撃は、多種多様なパターンが確認されており、攻撃対象装置に対して許容量を超える接続要求を行い一般ユーザが新たな接続を確立できなくなるSynFlood攻撃や、不要なICMPパケットを意図的に攻撃対象装置に大量に送信することで帯域を占有するsmurf攻撃などがある。なかでもSynFlood攻撃は簡単な方法で効率よく攻撃対象装置を接続拒否状態に陥らせることができるため、現在最も多く横行しており、DoS攻撃の多くを占めるというカリフォルニア大学の調査報告もある(例えば、非特許文献1参照)。   Any open network such as the Internet can be freely connected. While various services are provided via the network and its convenience is increased, a distributed service refusal (a malicious third party sends a large number of packets to the device providing the service to prevent the use of general users) Distributed Denial of Service (DDoS) attacks are a problem. A wide variety of patterns have been confirmed in DDoS attacks. SynFlood attacks that prevent general users from establishing new connections by making connection requests exceeding the allowable amount to attack target devices, and unnecessary ICMP packets are intentionally performed. There is a smurf attack that occupies the bandwidth by sending a large amount to the attack target device. Among them, the SynFlood attack can efficiently put the attack target device into a connection rejection state by a simple method, so there is a research report by the University of California that it is currently the most common and accounts for many DoS attacks (for example, Non-Patent Document 1).

SynFlood攻撃とは、TCPの3Way Handshakeを悪用する攻撃方法である。TCPによるコネクション確立は、(1)クライアント側から「確立要求(SYN)」を送信すると、(2)サーバ側が「確立要求の確認応答(ACK)と「確立要求(SYN)」を同時に送信し、(3)更にクライアント側からの「確認応答(ACK)」の送信、という手順を踏む。   SynFlood attack is an attack method that exploits TCP's 3-way handshake. Connection establishment by TCP is as follows: (1) When a “establishment request (SYN)” is sent from the client side, (2) the server side sends “acknowledgment request acknowledgment (ACK) and“ establishment request (SYN) ”at the same time. (3) Further, a procedure of “acknowledgment (ACK)” transmission from the client side is taken.

SYNやACKはTCPのヘッダフォーマットのフラグで識別できる。SYNフラグがONになっていると、当該パケットは確立要求パケットとなる。ここで、悪意の第三者は送信元情報を詐称したSYNパケットを攻撃対象装置に送信する。攻撃対象装置はSYNACKを送信するが、詐称された装置は存在しないことが多いためACKパケットが返信されず、攻撃対象装置は待機状態となる。実装に依存するが、タイムアウトでプロセスを修了するまでの通常60秒ほどの待ち時間に大量の確立要求(SYN)パケットを送信することでプロセスを多発させ、リソースを不正に消費させて他装置との通信を困難にさせる。   SYN and ACK can be identified by TCP header format flags. If the SYN flag is ON, the packet is an establishment request packet. Here, the malicious third party transmits a SYN packet spoofing the transmission source information to the attack target device. The attack target device transmits SYNACK, but since there is often no spoofed device, an ACK packet is not returned and the attack target device enters a standby state. Depending on the implementation, the process frequently occurs by sending a large number of establishment request (SYN) packets with a waiting time of about 60 seconds until the process is completed due to a timeout, and resources are illegally consumed and other devices. Make communication difficult.

しかし、SynFlood攻撃に用いられるパケットは、送信元アドレスが詐称されていることを除けば通常のTCP SYNパケットと相違がないため、攻撃対象装置において正常アクセスのSYNパケットと攻撃パケットを区別することは困難である。   However, the packet used for the SynFlood attack is the same as a normal TCP SYN packet except that the source address is spoofed. Therefore, it is not possible to distinguish a normal access SYN packet from an attack packet in the attack target device. Have difficulty.

従来、SynFlood攻撃を防御する仕組みとして、TCP Proxyという技術がある。主にファイアウォールに実装される技術で、正常アクセスのパケットと攻撃パケットを正しく区別する最も確実な方法である。TCP Proxyは、ファイアウォールにおいて、各TCPコネクション毎に状態を保持し、3WayHandshakeが完了した正常なTCPフローのパケットのみを送信先ホストに渡す方法である。ファイアウォールがSYNパケットを受信すると送信先ホストの代理でSYNACKパケットを返送し、そのACKを受信したパケットに限定してサーバへ実際のSYNパケットを届けることで攻撃を軽減させる。   Conventionally, there is a technology called TCP Proxy as a mechanism to defend against SynFlood attacks. This technology is mainly implemented in firewalls and is the most reliable way to correctly distinguish between normally accessed packets and attack packets. TCP Proxy is a method in which a firewall maintains a state for each TCP connection and passes only a packet of a normal TCP flow for which three-way handshake has been completed to the destination host. When the firewall receives the SYN packet, it sends back a SYNACK packet on behalf of the destination host, and reduces the attack by delivering the actual SYN packet only to the packet that received the ACK.

図9は、従来技術であるTCP Proxyの動作を説明するシーケンスチャートである。図において、攻撃元ホストとは、悪意の第三者が大量のSYNパケットを送信するために使用するホストを示す。尚、図では攻撃元ホストは1つしか記載していないが、DDoS攻撃においては攻撃元ホストが複数存在することも想定される。   FIG. 9 is a sequence chart for explaining the operation of the conventional TCP Proxy. In the figure, the attack source host indicates a host used by a malicious third party to transmit a large number of SYN packets. Although only one attack source host is shown in the figure, it is assumed that there are a plurality of attack source hosts in the DDoS attack.

はじめに、攻撃元ホストより送信元IPアドレスを詐称したSYNパケットが防御対象に向けて送信される(ステップS501)。TCP Proxy機能部は、SYNパケットを受信すると、SYNACKパケットを送信する(ステップS502)。SYNACKパケットの確認応答番号は該SYNパケットのシーケンス番号+1の値が入る。SYNACKのシーケンス番号は任意の値が挿入される。ここで攻撃元ホストが送信するSYNパケットは送信元IPアドレスが詐称されているため、SYNACKパケットは詐称されたIPアドレスを持つホストに送信される。詐称されたIPアドレスを持つホストは、存在しないか存在したとしても正常な3WayHandshakeの手順を踏んでいないためRSTパケットを送信してコネクションを切断するという処理を行うためACKパケットは返送されない。このようにTCP Proxyが攻撃パケットの防御壁になることで防御対象の負荷を低減することができる。   First, a SYN packet in which the source IP address is spoofed is transmitted from the attack source host toward the defense target (step S501). When receiving the SYN packet, the TCP Proxy function unit transmits a SYNACK packet (step S502). The acknowledgment number of the SYNACK packet contains the value of the SYN packet sequence number + 1. An arbitrary value is inserted into the sequence number of SYNACK. Here, since the source IP address of the SYN packet transmitted by the attack source host is spoofed, the SYNACK packet is transmitted to the host having the spoofed IP address. Since the host with the spoofed IP address does not exist or does not follow the normal 3-way handshake procedure, the ACK packet is not returned because the RST packet is sent and the connection is disconnected. In this way, the load of the protection target can be reduced by using TCP Proxy as a defense wall for attack packets.

また、TCP Proxy機能部が、正常なホストからのSYNパケット送信(ステップS503)に対してSYNACKパケットを代理応答すると(ステップS504)、ACKパケットが返送される(ステップS505)。このように3WayHandshakeが完了した正常なTCPフローのパケットのみを防御対象に中継することで、正常なアクセスは正しく防御対象に届けることができる(ステップS506からステップS508)。   Further, when the TCP Proxy function unit makes a proxy response to the SYNACK packet in response to the SYN packet transmission from the normal host (step S503) (step S504), the ACK packet is returned (step S505). In this way, by relaying only packets of normal TCP flows for which 3 WayHandshake has been completed to the protection target, normal access can be correctly delivered to the protection target (from step S506 to step S508).

また、その他のSynFlood攻撃を防御する仕組みとして、攻撃対象における受信パケットの流量を監視し、予め決められた閾値を上回った場合、パケットバッファに蓄積するパケットを間引くという方法がある(例えば、特許文献1参照)。これはシステムダウンさせない仕組みとして有効である。
特開2004−248198号公報(第7頁−第13頁、図1) "Inferring Internet Denial-of-Service Activity", David Moore, M.Voelker and Stefan Savage,San Diego Supercomputer Center University of California,San Diego
In addition, as a mechanism for preventing other SynFlood attacks, there is a method of monitoring the flow rate of received packets in the attack target and thinning out the packets accumulated in the packet buffer when the predetermined threshold is exceeded (for example, Patent Document 1). This is effective as a mechanism that prevents the system from going down.
JP-A-2004-248198 (page 7 to page 13, FIG. 1) "Inferring Internet Denial-of-Service Activity", David Moore, M. Voelker and Stefan Savage, San Diego Supercomputer Center University of California, San Diego

今後、家電や携帯端末といった端末装置がオープンなネットワークに接続される機会が増えることが予想されるが、端末装置は低コスト化への要求が強いためSynFlood攻撃防御機能を搭載しても、コストアップとなる高価な高性能CPUや追加メモリを使わないようにすることが求められる。TCP Proxy機能を端末装置に搭載した場合、OSに取り込まれているTCP/IPプロトコルスタックとの間でTCPフローの中継処理が必要となる。このTCPフローを中継する際には、TCPフロー毎のセッションの情報(送信元ポート番号や宛先ポート番号、シーケンス番号、確認応答番号等)を保持する必要があり、SYNが到達する都度、記憶領域を確保しなければならず、メモリ量(即ち、回路規模)が増大する。   In the future, it is expected that terminal devices such as home appliances and mobile terminals will be connected to open networks, but the demand for cost reduction is strong for terminal devices, so even if the SynFlood attack defense function is installed, the cost It is required not to use expensive high-performance CPU and additional memory. When the TCP Proxy function is installed in a terminal device, it is necessary to relay the TCP flow with the TCP / IP protocol stack incorporated in the OS. When relaying this TCP flow, it is necessary to hold session information (source port number, destination port number, sequence number, confirmation response number, etc.) for each TCP flow. Must be ensured, and the amount of memory (that is, the circuit scale) increases.

また、特許文献1に開示されたDos攻撃防御方法のように、受信パケット流量を監視して、予め決められた閾値を上回った場合にパケットバッファに蓄積するパケットを間引くという方式は、端末装置のシステムダウンを回避する方式としては有効である。しかし、セッション情報を確認することなくパケットを間引くため、正常アクセスにもかかわらずデータが間引かれてしまう。   Further, as in the Dos attack prevention method disclosed in Patent Document 1, the method of monitoring the received packet flow rate and thinning out the packets stored in the packet buffer when the predetermined threshold value is exceeded is as follows. It is effective as a method to avoid system down. However, since packets are thinned out without confirming session information, data is thinned out despite normal access.

本発明は、上記従来の事情に鑑みてなされたものであって、正常アクセスのパケットのみを通過させ、不要な中継処理を省くことができるパケットフィルタ回路及びパケットフィルタ方法を提供することを目的とする。   The present invention has been made in view of the above-described conventional circumstances, and it is an object of the present invention to provide a packet filter circuit and a packet filter method that allow only normal access packets to pass through and eliminate unnecessary relay processing. To do.

本発明のパケットフィルタ回路は、通過設定テーブルに登録されているヘッダ情報を元にパケットを通過させるパケットフィルタ回路であって、前記通過設定テーブルを参照して、パケットを通過させるか否かを判断する通過判定手段と、通過不可と判断されたパケットがSYNパケットである場合、該SYNパケットに対するSYNACKパケットを代理応答するSYNACK代理応答手段と、通過不可と判断されたパケットがACKパケットである場合、該ACKパケットのヘッダ情報を前記通過設定テーブルのエントリに追加する通過設定エントリ追加手段と、前記通過設定エントリ追加手段がエントリを追加する際、前記ACKパケットの送信元に対してコネクション切断を通知するコネクション切断手段と、を備える。   The packet filter circuit of the present invention is a packet filter circuit that allows a packet to pass based on header information registered in the passage setting table, and determines whether or not to allow the packet to pass by referring to the passage setting table. If the packet is determined to be non-passable when the packet is determined to be non-passable, the SYNACK proxy response unit that proxy-responses the SYNACK packet for the SYN packet, and the packet that is determined to be non-passable is an ACK packet. Pass setting entry adding means for adding header information of the ACK packet to the entry of the pass setting table, and when the pass setting entry adding means adds an entry, it notifies the source of the ACK packet of disconnection Connection cutting means.

上記構成によれば、代理応答したSYNACKパケットに対してACK応答を返送する送信元ホストからのパケットのみ通過させることにより、SYNパケットだけを送りつける攻撃元ホストからのパケットを廃棄することができるため、正常アクセスのパケットのみを通過させ、不正アクセス等に関わる不要な処理を省くことができる。また、TCPフロー毎のセッション情報を保持することなく、ACK応答を返送する送信元ホストにRST(リセット)を送り、再送されるSYNパケット以降のパケットを防御対象へ通過させる。したがって、フィルタの通過設定処理とコネクションの切断処理のみでTCPフローの中継処理を行わないため、TCP Proxyを端末装置に実装した場合にTCP ProxyがOSとの3WayHandshake中継処理のために必要とするTCPフロー毎の状態保存用記憶領域が不要となり、メモリを削減することができる。   According to the above configuration, the packet from the attack source host that sends only the SYN packet can be discarded by passing only the packet from the source host that sends back the ACK response to the SYNACK packet that is the proxy response. Therefore, it is possible to pass only normal access packets and eliminate unnecessary processing related to unauthorized access. Also, without holding session information for each TCP flow, an RST (reset) is sent to the source host that sends back the ACK response, and the packets after the retransmitted SYN packet are passed to the protection target. Therefore, TCP flow relay processing is not performed only by filter pass setting processing and connection disconnection processing, so when TCP Proxy is installed in a terminal device, TCP Proxy requires TCP for 3 Way Handshake relay processing with the OS. A state storage area for each flow is not required, and the memory can be reduced.

また、本発明のパケットフィルタ回路は、パケット流量が所定の閾値未満であるか否かを監視するパケット流量監視手段を備え、前記通過判定手段が、パケット流量が前記閾値未満の場合、全てのパケットを通過させるものである。   In addition, the packet filter circuit of the present invention includes a packet flow rate monitoring unit that monitors whether or not the packet flow rate is less than a predetermined threshold value. When the packet flow rate is less than the threshold value, Pass through.

上記構成によれば、防御対象のパケット処理能力を超えない場合は全てのパケットを通過させ、防御対象のパケット処理能力を超過するSynFlood攻撃等を受けた場合に、代理応答したSYNACKパケットに対してACK応答を返送する送信元ホストからのパケットを通過させ、再送されるSYNパケット以降のパケットを防御対象へ通過させる。従って、防御対象のパケット処理能力を超過するようなSynFlood攻撃を受けた際に、SYNパケットのみを送りつける攻撃元ホストからのパケットを廃棄することができ、SynFlood攻撃によるシステムダウンを防止できる。   According to the above configuration, if the packet processing capability of the protection target is not exceeded, all packets are allowed to pass, and if a SYNFlood attack that exceeds the packet processing capability of the protection target is received, The packet from the transmission source host that sends back the ACK response is passed, and the packets after the retransmitted SYN packet are passed to the protection target. Therefore, when a SynFlood attack that exceeds the packet processing capacity to be protected is received, packets from the attacking host that sends only SYN packets can be discarded, and system down due to the SynFlood attack can be prevented.

また、本発明のパケットフィルタ回路は、TCPフロー情報をキーとして所定の計算式に基づいて32ビットの番号を算出する番号算出手段を備え、前記SYNACK代理応答手段が、受信したSYNパケットのTCPフロー情報から前記番号算出手段で算出した番号をシーケンス番号として付与したSYNACKパケットを送信し、前記通過設定エントリ追加手段が、受信したACKパケットのTCPフロー情報から前記番号算出手段で算出した番号に1を加えた値が、受信したACKパケットのTCPヘッダに含まれる確認応答番号と一致する場合のみ、前記ACKパケットを前記通過設定テーブルに登録するものである。   The packet filter circuit of the present invention further comprises number calculation means for calculating a 32-bit number based on a predetermined calculation formula using TCP flow information as a key, and the SYNACK proxy response means receives the TCP flow of the received SYN packet. A SYNACK packet with the number calculated by the number calculation means as a sequence number is transmitted from the information, and the passage setting entry addition means sets 1 to the number calculated by the number calculation means from the TCP flow information of the received ACK packet. Only when the added value matches the acknowledgment number included in the TCP header of the received ACK packet, the ACK packet is registered in the passage setting table.

上記構成によれば、TCPフロー情報をキーとして特定の計算式で算出した番号を初期シーケンス番号として付与したSYNACKパケットを代理応答し、同じ計算式でTCPフロー情報から番号を算出し、その値に1を加えた値がACKパケットの確認応答番号と一致するか否かを確認することで、ACKパケットの偽装の有無を確認できる。これにより、偽装ACKパケットが不正に通過設定テーブルに追加されることを防止できる。   According to the above configuration, a SYNACK packet with a number calculated by a specific calculation formula using TCP flow information as a key as an initial sequence number is sent as a proxy response, a number is calculated from the TCP flow information using the same calculation formula, and the value is By checking whether or not the value obtained by adding 1 matches the confirmation response number of the ACK packet, it is possible to check whether or not the ACK packet is camouflaged. As a result, it is possible to prevent a forged ACK packet from being added to the passage setting table illegally.

また、本発明のパケットフィルタ方法は、通過設定テーブルに登録されているヘッダ情報を元にパケットを通過させるパケットフィルタ方法であって、前記通過設定テーブルを参照して、パケットを通過させるか否かを判断する通過判定ステップと、通過不可と判断されたパケットがSYNパケットである場合、該SYNパケットに対するSYNACKパケットを代理応答するSYNACK代理応答ステップと、通過不可と判断されたパケットがACKパケットである場合、該ACKパケットのヘッダ情報を前記通過設定テーブルのエントリに追加する通過設定エントリ追加ステップと、前記通過設定エントリ追加ステップにおいてエントリを追加する際、前記ACKパケットの送信元に対してコネクション切断を通知するコネクション切断ステップと、を有する。   The packet filter method of the present invention is a packet filter method that allows a packet to pass based on header information registered in the passage setting table, and whether or not to allow the packet to pass by referring to the passage setting table. If the packet is determined to be non-passable, and if the packet is determined to be non-passable, the SYNACK proxy response step is a proxy response of the SYNACK packet for the SYN packet, and the packet is determined to be non-passable is the ACK packet. In this case, when adding an entry in the pass setting entry adding step for adding the header information of the ACK packet to the entry of the pass setting table, and adding the entry in the pass setting entry adding step, the connection is disconnected to the transmission source of the ACK packet. And a connection disconnection step to be notified.

また、本発明のパケットフィルタ方法は、前記通過判定ステップが、パケット流量が所定の閾値未満である場合、全てのパケットを通過させるものである。   In the packet filter method of the present invention, the passage determining step allows all packets to pass when the packet flow rate is less than a predetermined threshold.

さらに、本発明のパケットフィルタ方法は、前記SYNACK代理応答ステップが、受信したSYNパケットのTCPフロー情報をキーとして所定の計算式に基づいて算出した32ビットの番号をシーケンス番号として付与したSYNACKパケットを送信し、前記通過設定エントリ追加ステップが、受信したACKパケットのTCPフロー情報をキーとして所定の計算式に基づいて算出した32ビットの番号に1を加えた値が、受信したACKパケットのTCPヘッダに含まれる確認応答番号と一致する場合のみ、前記ACKパケットを前記通過設定テーブルに登録するものである。   Furthermore, in the packet filter method of the present invention, the SYNACK proxy response step includes a SYNACK packet to which a sequence number is assigned as a 32-bit number calculated based on a predetermined formula using the TCP flow information of the received SYN packet as a key. A value obtained by adding 1 to the 32-bit number calculated based on a predetermined calculation formula using the TCP flow information of the received ACK packet as a key in the transmission setting entry adding step is the TCP header of the received ACK packet The ACK packet is registered in the passage setting table only when it matches the confirmation response number included in.

本発明のパケットフィルタ回路によれば、代理応答したSYNACKパケットに対してACK応答を返送する送信元ホストからのパケットのみ通過させることにより、SYNパケットだけを送りつける攻撃元ホストからのパケットを廃棄することができるため、正常アクセスのパケットのみを通過させ、不正アクセス等に関わる不要な処理を省くことができる。   According to the packet filter circuit of the present invention, a packet from an attack source host that sends only a SYN packet is discarded by passing only a packet from a source host that sends back an ACK response to a SYNACK packet that is a proxy response. Therefore, only normal access packets can be passed and unnecessary processing related to unauthorized access can be omitted.

以下、添付図面を参照しながら本発明の実施形態に係るパケットフィルタ回路について詳細に説明する。   Hereinafter, a packet filter circuit according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

[実施の形態1]
図1は、本発明の実施の形態1におけるパケット処理装置の構成を示す図である。パケット処理装置100は、ネットワークからのパケットを受信するパケット受信部110、ネットワークへパケットを送信するパケット送信部120、通過設定テーブル(後述)に登録されている送信元からのパケットを通過させるパケットフィルタ回路部200、防御対象300を備える。ここで、パケット処理装置100は、ネット家電や携帯端末等のネットワークに接続される端末装置を表している。
[Embodiment 1]
FIG. 1 is a diagram showing a configuration of a packet processing device according to Embodiment 1 of the present invention. The packet processing apparatus 100 includes a packet receiving unit 110 that receives packets from the network, a packet transmission unit 120 that transmits packets to the network, and a packet filter that allows packets from a transmission source registered in a passage setting table (described later) to pass. A circuit unit 200 and a defense target 300 are provided. Here, the packet processing device 100 represents a terminal device connected to a network such as an Internet home appliance or a portable terminal.

パケットフィルタ回路部200は、更に、通過させたいパケットのヘッダ情報のうち少なくとも送信元情報を含むものをエントリとして登録する通過設定テーブル220、通過設定テーブル220を参照して、パケットを通過させるか否かを判断する通過判定部210、通過不可と判断されたパケットがSYNパケットである場合、該SYNパケットに対するSYNACKパケットを代理応答するSYNACK代理応答部230、通過不可と判断されたパケットがACKパケットである場合、該ACKパケットのヘッダ情報を前記通過設定テーブルのエントリに追加する通過設定エントリ追加部250、通過設定エントリ追加部250がエントリを追加する際、前記ACKパケットの送信元に対してコネクション切断を通知するコネクション切断部240を有する。   Further, the packet filter circuit unit 200 refers to the passage setting table 220 and the passage setting table 220 for registering, as an entry, header information of the packet to be passed, including at least the transmission source information. A passage determining unit 210 that determines whether or not a packet is determined not to pass, a SYNACK proxy responding unit 230 that performs a proxy response to the SYNACK packet for the SYN packet, and a packet that is determined not to pass is an ACK packet. If there is a pass setting entry adding unit 250 for adding the header information of the ACK packet to the entry of the pass setting table, and the pass setting entry adding unit 250 adds the entry, the connection is disconnected with respect to the transmission source of the ACK packet. The connection disconnection unit 240 is notified.

パケット処理装置100のパケット受信部110がパケットを受信すると、パケットフィルタ回路部200の通過判定部210は、パケットを通過させるか否かを判断する。防御対象300は、ネットワーク機能を含め、パケット処理装置100の主たる機能を実行する機能ブロックでパケット処理部となる。CPUやメモリ、OS、各種プロトコルスタック、アプリケーションソフトウェア等から成る。   When the packet receiving unit 110 of the packet processing device 100 receives a packet, the passage determining unit 210 of the packet filter circuit unit 200 determines whether or not to allow the packet to pass. The protection target 300 is a functional block that executes the main functions of the packet processing apparatus 100 including the network function and serves as a packet processing unit. Consists of CPU, memory, OS, various protocol stacks, application software, etc.

通過判定部210は、パケットのヘッダ情報から少なくとも送信元情報を含むヘッダ情報を抽出し、通過設定テーブル220のエントリと一致比較を行い、エントリに一致する場合、通過指示信号を通過判定部210に通知する。   The passage determination unit 210 extracts header information including at least transmission source information from the header information of the packet, performs a match comparison with the entry of the passage setting table 220, and if it matches the entry, passes the passage instruction signal to the passage determination unit 210. Notice.

一方、一致するエントリがない場合、次の2種類の処理が行われる。まず、受信パケットがSYNパケットである場合、通過判定部210はSYNACK代理応答部230へヘッダ情報を通知し、SYNACK代理応答部230が当該SYNパケットに対応するSYNACKパケットを生成してネットワークに対して送信する。次に、受信パケットがACKパケットである場合、通過判定部210はヘッダ情報を通過設定エントリ追加部250に通知させ、通過設定エントリ追加部250がヘッダ情報から少なくとも送信元情報を含むヘッダ情報を抽出し、通過設定テーブル220に新しくエントリを追加すると同時に、コネクション切断部240にヘッダ情報を通知して、当該ACKパケットの送信元に対してRSTパケットを生成して送信する。   On the other hand, when there is no matching entry, the following two types of processing are performed. First, when the received packet is a SYN packet, the passage determination unit 210 notifies the SYNACK proxy response unit 230 of the header information, and the SYNACK proxy response unit 230 generates a SYNACK packet corresponding to the SYN packet to the network. Send. Next, when the received packet is an ACK packet, the passage determination unit 210 notifies the header setting entry adding unit 250 of the header information, and the passage setting entry adding unit 250 extracts header information including at least transmission source information from the header information. At the same time, a new entry is added to the passage setting table 220, and at the same time, header information is notified to the connection disconnection unit 240, and an RST packet is generated and transmitted to the transmission source of the ACK packet.

通過設定テーブル220に設定するヘッダ情報には送信元IPアドレス、送信元ポート番号、TCPシーケンス番号の少なくとも1つを含み、単独または複数の組合わせによってエントリを構成することが可能である。   The header information set in the passage setting table 220 includes at least one of a transmission source IP address, a transmission source port number, and a TCP sequence number, and an entry can be configured by one or a plurality of combinations.

ネットワークへのパケットの送信はパケット送信部120を介して行う。尚、パケット送信部120は、防御装置300からの送信パケットを多重化して送信する仕組みとしてもよい。   The packet transmission to the network is performed via the packet transmission unit 120. Note that the packet transmission unit 120 may be configured to multiplex and transmit transmission packets from the defense device 300.

図2は、本発明の実施の形態1におけるパケット処理装置の処理手順を示すフローチャートである。はじめに、パケット受信部110がパケットを受信すると(ステップS101)、パケットフィルタ回路部200の通過判定部210は、通過設定テーブル220の検索を行って(ステップS102)、通過設定テーブル220に一致するエントリがあるか否かを解析する(ステップS103)。一致するエントリがある場合は受信パケットを通過させる(ステップS104)。一方、通過設定テーブル220に一致するエントリがない場合は次の処理手順で受信パケットの廃棄を行う。   FIG. 2 is a flowchart showing a processing procedure of the packet processing apparatus according to Embodiment 1 of the present invention. First, when the packet receiving unit 110 receives a packet (step S101), the passage determination unit 210 of the packet filter circuit unit 200 searches the passage setting table 220 (step S102), and the entry matches the passage setting table 220. It is analyzed whether or not there is (step S103). If there is a matching entry, the received packet is passed (step S104). On the other hand, if there is no matching entry in the passage setting table 220, the received packet is discarded by the following processing procedure.

通過判定部210は、受信したパケットがTCPのSYNパケットであるか否かを解析し(ステップS105)、SYNパケットである場合、通過判定部210はSYNACK代理応答部230へヘッダ情報を通知し、SYNACK代理応答部230は、受信したSYNパケットに対応するSYNACKパケットを生成してネットワークへ送信する(ステップS106)。   The passage determination unit 210 analyzes whether or not the received packet is a TCP SYN packet (step S105). If the packet is a SYN packet, the passage determination unit 210 notifies the SYNACK proxy response unit 230 of the header information, The SYNACK proxy response unit 230 generates a SYNACK packet corresponding to the received SYN packet and transmits it to the network (step S106).

一方、受信したパケットがTCPのSYNパケットでない場合、通過判定部210は更に、受信したパケットがTCPのACKパケットであるか否かを解析する(ステップS107)。ACKパケットである場合、通過判定部210は受信したACKパケットの送信元情報を通過設定テーブル220に登録する(ステップS108)。尚、ここでは送信元情報を送信元IPアドレスのみとした例について説明している。通過判定部210は、同時に、コネクション切断部240にヘッダ情報を通知し、コネクション切断部240は、受信したACKパケットの送信元に対してRSTパケットを送信しコネクションを切断する(ステップS109)。   On the other hand, if the received packet is not a TCP SYN packet, the passage determination unit 210 further analyzes whether or not the received packet is a TCP ACK packet (step S107). If the packet is an ACK packet, the passage determination unit 210 registers the transmission source information of the received ACK packet in the passage setting table 220 (step S108). Here, an example in which the transmission source information is only the transmission source IP address is described. The passage determination unit 210 simultaneously notifies the connection disconnection unit 240 of the header information, and the connection disconnection unit 240 transmits an RST packet to the transmission source of the received ACK packet and disconnects the connection (step S109).

RSTパケットの送信後、及びステップS107の解析においてACKパケットでないと判定された場合、ステップS106でSYNACKパケットを送信した後に、通過判定部210は受信パケットを廃棄する(ステップS110)。以上の受信パケットの通過または廃棄を行った後、パケット処理が終了する(ステップS111)。   After the transmission of the RST packet and if it is determined in step S107 that the packet is not an ACK packet, the passage determination unit 210 discards the received packet after transmitting the SYNACK packet in step S106 (step S110). After passing or discarding the received packet as described above, the packet processing ends (step S111).

図3は、本発明の実施の形態1におけるパケット処理装置の動作例を示すシーケンスチャートである。攻撃元ホストとは悪意の第三者が大量のSYNパケットを送信するために使用するホストであり、図では便宜上攻撃元ホストを1つしか記載していないが複数存在することも想定される。攻撃元ホストより送信元IPアドレスを詐称したSYNパケットが防御対象に向けて送信されると(ステップS201)、パケットフィルタ回路部200がSYNパケットに対するSYNACKパケットを代理応答する(ステップS202)。SYNACKパケットの確認応答番号は当該SYNパケットのシーケンス番号+1の値が入る。SYNACKのシーケンス番号は任意の値を付与する。攻撃元ホストが送信するSYNパケットは送信元IPアドレスが詐称されているため、SYNACKパケットは詐称されたIPアドレスを持つホストに送信される。詐称されたIPアドレスを持つホストは、存在しないか存在したとしても正常な3WayHandshakeの手順を踏んでいないため、RSTパケットを送信してコネクションを切断し、そのためACKパケットは返送されない。このようにパケットフィルタ回路部200が攻撃パケットからの防御壁になることで防御対象の負荷を低減することができる。   FIG. 3 is a sequence chart showing an operation example of the packet processing apparatus according to Embodiment 1 of the present invention. The attack source host is a host used by a malicious third party to transmit a large amount of SYN packets. Although only one attack source host is shown in the figure for convenience, it is assumed that there are a plurality of attack source hosts. When the SYN packet spoofing the transmission source IP address is transmitted from the attack source host to the defense target (step S201), the packet filter circuit unit 200 makes a proxy response to the SYNACK packet for the SYN packet (step S202). The acknowledgment number of the SYNACK packet contains the value of the sequence number + 1 of the SYN packet. An arbitrary value is assigned to the sequence number of SYNACK. Since the source IP address of the SYN packet transmitted by the attacking source host is spoofed, the SYNACK packet is transmitted to the host having the spoofed IP address. Since the host with the spoofed IP address does not exist or does not follow the normal 3WayHandshake procedure, even if it exists, the RST packet is sent and the connection is disconnected, so the ACK packet is not returned. In this way, the load on the protection target can be reduced by the packet filter circuit unit 200 becoming a defense wall against attack packets.

また、正常なホストからのSYNパケットに対して(ステップS203)、パケットフィルタ回路部200がSYNACKパケットを代理応答すると(ステップS204)、ACKパケットが返送される(ステップS205)。3WayHandshakeが完了した正常なTCPフローのパケットの送信元は信頼できると判断することができる。   In response to a SYN packet from a normal host (step S203), when the packet filter circuit unit 200 makes a proxy response to the SYNACK packet (step S204), an ACK packet is returned (step S205). It can be determined that the source of the packet of the normal TCP flow for which 3 WayHandshake has been completed is reliable.

パケットフィルタ回路部200は、当該ACKパケットのヘッダ情報から少なくとも送信元情報を含む情報を抽出し、通過設定テーブルのエントリに登録すると同時に、ACKパケットの送信元に対してRSTパケットを送信してコネクションを切断する(ステップS206)。正常なホストはコネクションが切断されると、新たなコネクションの再接続を試みる。例えば、LinuxカーネルVer2.4においてはSYNの再送回数はデフォルトで5回となっている。再接続を試みる正常ホストからのパケットは、通過設定テーブル220にエントリを登録しているのでパケットフィルタ回路部200を通過して防御対象300へ送られる(ステップS207)。そして、正常なホストと防御対象との間で3WayHandshakeが完了すると、コネクションを確立することができる(ステップS208からステップS209)。   The packet filter circuit unit 200 extracts information including at least transmission source information from the header information of the ACK packet, registers it in the entry of the passage setting table, and simultaneously transmits an RST packet to the transmission source of the ACK packet to establish a connection. Is cut (step S206). A normal host attempts to reconnect a new connection when the connection is disconnected. For example, in the Linux kernel Ver2.4, the number of SYN retransmissions is 5 by default. Since a packet from a normal host attempting reconnection has registered an entry in the passage setting table 220, the packet passes through the packet filter circuit unit 200 and is sent to the protection target 300 (step S207). When 3WayHandshake is completed between the normal host and the protection target, a connection can be established (from step S208 to step S209).

図4は、本発明の実施の形態1におけるパケット処理装置の通過設定テーブルを概念的に示す図である。通過設定テーブルは、少なくとも送信元情報を含むヘッダ情報をエントリに登録する。図では、検索対象パラメータを送信元IPアドレスのみとした場合の例を示しているが、MACヘッダからTCPヘッダまでのヘッダ情報について単独または複数組み合わせてテーブルを構成することも可能である。その他のヘッダ情報としては、宛先MACアドレス、送信元MACアドレス、イーサタイプ、TOSフィールと、フラグメント情報、プロトコル番号、宛先IPアドレス、送信元ポート番号、宛先ポート番号、などを用いてよい。Actionはエントリにヒットしたときの処理を示している。ここでは通過を設定するテーブルであるためACTIONは“通過”としているが、単なる通過だけではなく、パケット処理装置内の各種内部処理ブロックを指定して送信するように設定することも可能である。   FIG. 4 is a diagram conceptually showing a passage setting table of the packet processing device according to Embodiment 1 of the present invention. The passage setting table registers header information including at least transmission source information in an entry. In the figure, an example in which the search target parameter is only the source IP address is shown, but the header information from the MAC header to the TCP header can be configured singly or in combination. As other header information, a destination MAC address, a source MAC address, an ether type, a TOS field, fragment information, a protocol number, a destination IP address, a source port number, a destination port number, and the like may be used. Action indicates the processing when an entry is hit. Here, since it is a table for setting passage, ACTION is set to “pass”. However, not only simple passage but also various internal processing blocks in the packet processing device can be designated and transmitted.

ところで、通過設定テーブル220のエントリ数は有限である。従って、追加情報で全てのエントリが消費された場合は、古いエントリから上書きするといった処理が必要となる。エントリの上書きのほか、エントリ毎にエージングタイマを持ち一定時間経過すると登録情報を削除するといった処理も可能である。また、防御対象300からクリア信号を通知することでエントリ単体やテーブル全体の初期化を行うことも可能である。   By the way, the number of entries in the passage setting table 220 is finite. Therefore, when all entries are consumed with the additional information, a process of overwriting from the old entry is required. In addition to overwriting entries, it is possible to have an aging timer for each entry and delete registration information after a certain period of time. It is also possible to initialize a single entry or the entire table by notifying a clear signal from the defense target 300.

[実施の形態2]
図5は、本発明の実施の形態2におけるパケット処理装置の構成を示す図である。図5に示すパケット処理装置101は、実施の形態1のパケット処理装置100と比較して、パケットフィルタ回路部201内にパケット流量監視部260が付加された点が異なる。パケット処理装置101のその他の構成は、実施の形態1のパケット処理装置100と同じであるため説明を省略する。
[Embodiment 2]
FIG. 5 is a diagram showing a configuration of the packet processing apparatus according to Embodiment 2 of the present invention. The packet processing device 101 shown in FIG. 5 is different from the packet processing device 100 according to the first embodiment in that a packet flow rate monitoring unit 260 is added in the packet filter circuit unit 201. The other configuration of the packet processing apparatus 101 is the same as that of the packet processing apparatus 100 according to the first embodiment, and a description thereof will be omitted.

パケット流量監視部260は、パケット受信部110からパケットフィルタ回路部201へ送信されるパケット量を監視し、その流量が防御対象300の処理能力の限界を超過しないように設定された所定の閾値未満であるか否かを判定する。   The packet flow rate monitoring unit 260 monitors the amount of packets transmitted from the packet receiving unit 110 to the packet filter circuit unit 201 and is less than a predetermined threshold set so that the flow rate does not exceed the limit of the processing capability of the protection target 300. It is determined whether or not.

パケット流量が所定の閾値未満のとき、パケット流量監視部260は通過判定部210に通過指示信号を通知する。通過判定部210は、通過指示信号が入力されると、通過設定テーブルの検索をせずに全ての受信パケットを通過させる。パケット流量を監視する方法としては、単位時間当たりのパケット数、または単位時間当たりのデータ量(Byte数)を監視する方法や、防御対象300が処理するためのパケットを一時的に蓄積するパケットバッファのパケット滞留量を監視する方法などを用いてよい。   When the packet flow rate is less than a predetermined threshold, the packet flow monitoring unit 260 notifies the passage determining unit 210 of a passage instruction signal. When a passage instruction signal is input, the passage determination unit 210 passes all received packets without searching the passage setting table. As a method for monitoring the packet flow rate, a method for monitoring the number of packets per unit time or the amount of data (byte number) per unit time, or a packet buffer for temporarily storing packets to be processed by the defense target 300 For example, a method for monitoring the amount of packet retention may be used.

また、パケット流量の閾値は、所定の値を予め設定しておいてもよいし、防御対象300にCPU負荷を監視する機能を付与し、防御対象から動的に閾値を制御できるようにしてもよい。パケット流量監視部260が、防御対象300のパケット処理能力を超過するパケットが流入したと判断した場合、通過判定部210は通過設定テーブル220の検索を行う。通過設定テーブルに一致したエントリがない場合は、SYNACK代理応答部230がSYNパケットに対するSYNACKパケットを代理応答し、ACKパケットが返送されたものに対して当該ACKパケットの送信元情報を持つパケットを通過させる。上記構成により、パケット処理装置101の処理限界を超えない場合は全てのパケットを通過させ、パケット処理装置101の処理限界を超過するSynFlood攻撃を受けた際、防御対象300のシステムダウンを未然に防止することができる。   The packet flow rate threshold value may be set in advance, or the protection target 300 may be provided with a function of monitoring the CPU load so that the threshold value can be dynamically controlled from the protection target. Good. When the packet flow monitoring unit 260 determines that a packet that exceeds the packet processing capability of the protection target 300 has flowed, the passage determination unit 210 searches the passage setting table 220. When there is no matching entry in the passage setting table, the SYNACK proxy response unit 230 sends a SYNACK packet as a proxy response to the SYN packet, and passes the packet having the source information of the ACK packet for the one to which the ACK packet is returned. Let With the above configuration, when the processing limit of the packet processing device 101 is not exceeded, all packets are allowed to pass, and when a SynFlood attack exceeding the processing limit of the packet processing device 101 is received, the system of the defense target 300 is prevented from being down. can do.

尚、通過設定テーブル220に登録された設定情報の初期化は、電源投入時に初期化する方法の他に、パケット流量監視部260が出力する通過指示信号を用いて初期化してもよい。また、防御対象300のソフトウェアからの指示により初期化してもよい。   The setting information registered in the passage setting table 220 may be initialized by using a passage instruction signal output from the packet flow rate monitoring unit 260 in addition to the method of initializing at power-on. Further, it may be initialized by an instruction from the software of the defense target 300.

図6は、本発明の実施の形態2におけるパケット処理装置の処理手順を示すフローチャートである。はじめに、パケット受信部110がパケットを受信すると(ステップS301)、パケットフィルタ回路部201のパケット流量監視部260は、パケット受信部から送信されるパケットの流量が所定の閾値未満であるか否かを解析する(ステップS302)。パケット流量が閾値未満である場合は受信パケットを通過させる(ステップS303)。   FIG. 6 is a flowchart showing a processing procedure of the packet processing device according to the second embodiment of the present invention. First, when the packet receiving unit 110 receives a packet (step S301), the packet flow rate monitoring unit 260 of the packet filter circuit unit 201 determines whether or not the flow rate of the packet transmitted from the packet receiving unit is less than a predetermined threshold value. Analysis is performed (step S302). If the packet flow rate is less than the threshold value, the received packet is passed (step S303).

パケット流量が閾値を超過する場合、次に、パケットフィルタ回路部201の通過判定部210は、通過設定テーブル220の検索を行って(ステップS304)、通過設定テーブル220に一致するエントリがあるか否かを解析する(ステップS305)。一致するエントリがある場合は受信パケットを通過させる(ステップS303)。一方、通過設定テーブル220に一致するエントリがない場合は次の処理手順で受信パケットの廃棄を行う。   If the packet flow rate exceeds the threshold value, then the passage determination unit 210 of the packet filter circuit unit 201 searches the passage setting table 220 (step S304) and determines whether there is a matching entry in the passage setting table 220. Is analyzed (step S305). If there is a matching entry, the received packet is passed (step S303). On the other hand, if there is no matching entry in the passage setting table 220, the received packet is discarded by the following processing procedure.

通過判定部210は、受信したパケットがTCPのSYNパケットであるか否かを解析し(ステップS306)、SYNパケットである場合、通過判定部210はSYNACK代理応答部230へヘッダ情報を通知し、SYNACK代理応答部230は、受信したSYNパケットに対応するSYNACKパケットを生成してネットワークへ送信する(ステップS307)。   The passage determination unit 210 analyzes whether or not the received packet is a TCP SYN packet (step S306). If the packet is a SYN packet, the passage determination unit 210 notifies the SYNACK proxy response unit 230 of the header information, The SYNACK proxy response unit 230 generates a SYNACK packet corresponding to the received SYN packet and transmits the SYNACK packet to the network (step S307).

一方、受信したパケットがTCPのSYNパケットでない場合、通過判定部210は更に、受信したパケットがTCPのACKパケットであるか否かを解析する(ステップS308)。ACKパケットである場合、通過判定部210は受信したACKパケットの送信元情報を通過設定テーブル220に登録する(ステップS309)。尚、ここでは送信元情報を送信元IPアドレスのみとした例について説明している。通過判定部210は、同時に、コネクション切断部240にヘッダ情報を通知し、コネクション切断部240は、受信したACKパケットの送信元に対してRSTパケットを送信しコネクションを切断する(ステップS310)。   On the other hand, if the received packet is not a TCP SYN packet, the passage determination unit 210 further analyzes whether or not the received packet is a TCP ACK packet (step S308). If it is an ACK packet, the passage determining unit 210 registers the transmission source information of the received ACK packet in the passage setting table 220 (step S309). Here, an example in which the transmission source information is only the transmission source IP address is described. The passage determination unit 210 simultaneously notifies the connection disconnection unit 240 of the header information, and the connection disconnection unit 240 transmits an RST packet to the transmission source of the received ACK packet and disconnects the connection (step S310).

RSTパケットの送信後、及びステップS308の解析においてACKパケットでないと判定された場合、ステップS307でSYNACKパケットを送信した後に、通過判定部210は受信パケットを廃棄する(ステップS311)。以上の受信パケットの通過または廃棄を行った後、パケット処理が終了する(ステップS312)。   After the transmission of the RST packet and when it is determined in step S308 that the packet is not an ACK packet, the passage determination unit 210 discards the received packet after transmitting the SYNACK packet in step S307 (step S311). After the above reception packet is passed or discarded, the packet processing ends (step S312).

[実施の形態3]
図7は、本発明の実施の形態3におけるパケット処理装置の構成を示す図である。図7に示すパケット処理装置102は、実施の形態2のパケット処理装置101と比較して、パケットフィルタ回路部202のSYNACK代理応答部231及び通過設定エントリ追加部251の内部に、番号算出部270が付加された点が異なる。パケット処理装置102のその他の構成は、実施の形態2のパケット処理装置101と同じであるため説明を省略する。
[Embodiment 3]
FIG. 7 is a diagram showing the configuration of the packet processing apparatus according to Embodiment 3 of the present invention. Compared with the packet processing device 101 of the second embodiment, the packet processing device 102 shown in FIG. 7 includes a number calculation unit 270 inside the SYNACK proxy response unit 231 and the passage setting entry addition unit 251 of the packet filter circuit unit 202. The point that is added is different. The other configuration of the packet processing apparatus 102 is the same as that of the packet processing apparatus 101 according to the second embodiment, and a description thereof will be omitted.

番号算出部270は、受信したパケットのTCPフロー情報からSYNACKパケットに付与するシーケンス番号を算出する。ここでTCPフローの情報とは、送信元IPアドレス、宛先IPアドレス、送信元ポート番号、宛先ポート番号、TCP初期シーケンス番号を指す。算出式についてはハッシュ関数を用いる方法や、パラメータ値をバイト単位で分割して加算するというような簡易方法を用いてもよい。   The number calculation unit 270 calculates a sequence number to be given to the SYNACK packet from the TCP flow information of the received packet. Here, the TCP flow information indicates a source IP address, a destination IP address, a source port number, a destination port number, and a TCP initial sequence number. For the calculation formula, a method using a hash function or a simple method of dividing and adding parameter values in units of bytes may be used.

番号算出部270は、SYNACK代理応答部231と通過設定エントリ追加部251において、同一の計算式によりTCPフロー情報をキーとして番号を算出する。SYNACK代理応答部231においては、受信したSYNパケットのTCPフロー情報から番号が算出され、SYNACKパケットのシーケンス番号として付与して送出される。通過設定エントリ追加部251においては、受信したACKパケットのTCPフロー情報から番号を算出し、ACKパケットのヘッダに含まれる確認応答番号と比較される。尚、TCP初期シーケンス番号はACKパケットのシーケンス番号−1となる。3WayHandshakeの一連の処理では同一のTCPフロー情報を持つSYNパケットとSYNACKパケットとACKパケットが送受信される。このため、ACKパケットのTCPフロー情報から番号算出部270により算出された番号に1を加えた値が、ACKパケットの確認応答番号に一致すれば正常な3WayHandshakeのパケットと認証することができる。偽造されたACKパケットであった場合、番号算出部270が算出した値+1と、実際にACKパケットのTCPヘッダに含まれる確認応答番号は異なるものとなるので、これを不正なACKパケットとみなし、受信したACKパケットが廃棄される。   In the SYNACK proxy response unit 231 and the pass setting entry addition unit 251, the number calculation unit 270 calculates a number using the TCP flow information as a key with the same calculation formula. In the SYNACK proxy response unit 231, a number is calculated from the TCP flow information of the received SYN packet, and is sent as a sequence number of the SYNACK packet. The passage setting entry adding unit 251 calculates a number from the TCP flow information of the received ACK packet and compares it with the confirmation response number included in the header of the ACK packet. The TCP initial sequence number is the ACK packet sequence number-1. In a series of 3-way handshake processes, SYN packets, SYNACK packets, and ACK packets having the same TCP flow information are transmitted and received. Therefore, if the value obtained by adding 1 to the number calculated by the number calculation unit 270 from the TCP flow information of the ACK packet matches the acknowledgment number of the ACK packet, it can be authenticated as a normal 3-way Handshake packet. In the case of a forged ACK packet, the value +1 calculated by the number calculation unit 270 is different from the confirmation response number actually included in the TCP header of the ACK packet, so this is regarded as an illegal ACK packet, The received ACK packet is discarded.

次に、図8は、本発明の実施の形態3におけるパケット処理装置の処理手順を示すフローチャートである。はじめに、パケット受信部110がパケットを受信すると(ステップS401)、パケットフィルタ回路部202のパケット流量監視部260は、パケット受信部から送られるパケットの流量が所定の閾値未満であるか否かを解析する(ステップS402)。パケット流量が閾値未満である場合は受信パケットを通過させる(ステップS403)。   Next, FIG. 8 is a flowchart showing a processing procedure of the packet processing device according to the third embodiment of the present invention. First, when the packet receiving unit 110 receives a packet (step S401), the packet flow rate monitoring unit 260 of the packet filter circuit unit 202 analyzes whether or not the flow rate of the packet sent from the packet receiving unit is less than a predetermined threshold. (Step S402). If the packet flow rate is less than the threshold value, the received packet is passed (step S403).

パケット流量が閾値を超過する場合、次に、パケットフィルタ回路部202の通過判定部210は、通過設定テーブル220の検索を行って(ステップS404)、通過設定テーブル220に一致するエントリがあるか否かを解析する(ステップS405)。一致するエントリがある場合は受信パケットを通過させる(ステップS403)。一方、通過設定テーブル220に一致するエントリがない場合は次の処理手順で受信パケットの廃棄を行う。   If the packet flow rate exceeds the threshold value, then the passage determination unit 210 of the packet filter circuit unit 202 searches the passage setting table 220 (step S404), and whether there is a matching entry in the passage setting table 220. This is analyzed (step S405). If there is a matching entry, the received packet is passed (step S403). On the other hand, if there is no matching entry in the passage setting table 220, the received packet is discarded by the following processing procedure.

通過判定部210は、受信したパケットがTCPのSYNパケットであるか否かを解析し(ステップS406)、SYNパケットである場合、SYNACK代理応答部231において、受信したSYNパケットのTCPフロー情報から特定の計算式によりSYNACKパケットに付与するシーケンス番号を算出する(ステップS407)。そして、算出したシーケンス番号をSYNACKのシーケンス番号として、SYNACK代理応答部231は、受信したSYNパケットに対応するSYNACKパケットを生成してネットワークへ送信する(ステップS408)。   The passage determination unit 210 analyzes whether or not the received packet is a TCP SYN packet (step S406). If the packet is a SYN packet, the SYNACK proxy response unit 231 identifies the received SYN packet from the TCP flow information. The sequence number to be given to the SYNACK packet is calculated by the following formula (step S407). Then, using the calculated sequence number as the SYNACK sequence number, the SYNACK proxy response unit 231 generates a SYNACK packet corresponding to the received SYN packet and transmits it to the network (step S408).

一方、受信したパケットがTCPのSYNパケットでない場合、通過判定部210は更に、受信したパケットがTCPのACKパケットであるか否かを解析する(ステップS409)。ACKパケットである場合、通過設定エントリ追加部251において、受信したACKパケットのTCPフロー情報から特定の計算式により番号を算出する(ステップS410)。この特定の計算式は、ステップS407の計算と同一の計算式を用いる必要がある。   On the other hand, if the received packet is not a TCP SYN packet, the passage determination unit 210 further analyzes whether or not the received packet is a TCP ACK packet (step S409). If the packet is an ACK packet, the pass setting entry adding unit 251 calculates a number from the TCP flow information of the received ACK packet using a specific calculation formula (step S410). As this specific calculation formula, it is necessary to use the same calculation formula as the calculation in step S407.

次に、通過設定エントリ追加部251は、算出した番号に1を加えた値と、実際のACKパケットのTCPヘッダに含まれる確認応答番号が一致しているか否かを確認し(ステップS411)、一致している場合、通過判定部210は受信したACKパケットの送信元情報を通過設定テーブル220に登録する(ステップS412)。尚、ここでは送信元情報を送信元IPアドレスのみとした例について説明している。通過判定部210は、同時に、コネクション切断部240にヘッダ情報を通知し、コネクション切断部240は、受信したACKパケットの送信元に対してRSTパケットを送信しコネクションを切断する(ステップS413)。   Next, the passage setting entry adding unit 251 confirms whether the value obtained by adding 1 to the calculated number matches the confirmation response number included in the TCP header of the actual ACK packet (step S411). If they match, the passage determination unit 210 registers the transmission source information of the received ACK packet in the passage setting table 220 (step S412). Here, an example in which the transmission source information is only the transmission source IP address is described. The passage determination unit 210 simultaneously notifies the connection disconnection unit 240 of the header information, and the connection disconnection unit 240 transmits an RST packet to the transmission source of the received ACK packet to disconnect the connection (step S413).

RSTパケットの送信後、及びステップS411において算出番号に1を加えた値と実際のACKパケットのTCPヘッダに含まれる確認応答番号が一致していない場合、またステップS409の解析においてACKパケットでないと判定された場合、更にステップS408でSYNACKパケットを送信した後に、通過判定部210は受信パケットを廃棄する(ステップS414)。受信パケットの通過または廃棄を行った後、パケット処理が終了する(ステップS415)。   After the transmission of the RST packet and when the value obtained by adding 1 to the calculated number in step S411 does not match the confirmation response number included in the TCP header of the actual ACK packet, it is determined that the packet is not an ACK packet in the analysis of step S409 If so, after transmitting a SYNACK packet in step S408, the passage determination unit 210 discards the received packet (step S414). After passing or discarding the received packet, the packet processing ends (step S415).

尚、以上説明したパケットフィルタ回路及びパケットフィルタ方法は、ネットワークインターフェースを備えたネット家電や携帯端末など、オープンなネットワークに接続する端末装置やルータやファイアウォールなどの中継装置において有用である。また、従来よりもメモリ量を削減できるため、半導体チップに内蔵することにより、半導体チップ製造におけるコスト低減にも有用である。   The packet filter circuit and the packet filter method described above are useful in terminal devices connected to an open network, such as network home appliances and mobile terminals having a network interface, and relay devices such as routers and firewalls. Further, since the amount of memory can be reduced as compared with the prior art, the incorporation in a semiconductor chip is useful for reducing the cost in manufacturing the semiconductor chip.

本発明は、代理応答したSYNACKパケットに対してACK応答を返送する送信元ホストからのパケットのみ通過させることにより、SYNパケットだけを送りつける攻撃元ホストからのパケットを廃棄することができるため、正常アクセスのパケットのみを通過させ、不正アクセス等に関わる不要な処理を省くことができる効果を有し、通過設定テーブルに登録されているヘッダ情報を元にパケットを通過させるパケットフィルタ回路及びパケットフィルタ方法等に有用である。   In the present invention, since only the packet from the transmission source host that sends back the ACK response to the SYNACK packet that has responded as a proxy is passed, the packet from the attack source host that sends only the SYN packet can be discarded. A packet filter circuit and a packet filter method that have the effect of allowing only an access packet to pass and omit unnecessary processing related to unauthorized access, etc., and allow the packet to pass based on header information registered in the passage setting table Etc. are useful.

本発明の実施の形態1におけるパケット処理装置の構成を示す図The figure which shows the structure of the packet processing apparatus in Embodiment 1 of this invention. 本発明の実施の形態1におけるパケット処理装置の処理手順を示すフローチャートThe flowchart which shows the process sequence of the packet processing apparatus in Embodiment 1 of this invention. 本発明の実施の形態1におけるパケット処理装置の動作例を示すシーケンスチャートThe sequence chart which shows the operation example of the packet processing apparatus in Embodiment 1 of this invention 本発明の実施の形態1におけるパケット処理装置の通過設定テーブルを概念的に示す図The figure which shows notionally the passage setting table of the packet processing apparatus in Embodiment 1 of this invention 本発明の実施の形態2におけるパケット処理装置の構成を示す図The figure which shows the structure of the packet processing apparatus in Embodiment 2 of this invention. 本発明の実施の形態2におけるパケット処理装置の処理手順を示すフローチャートThe flowchart which shows the process sequence of the packet processing apparatus in Embodiment 2 of this invention. 本発明の実施の形態3におけるパケット処理装置の構成を示す図The figure which shows the structure of the packet processing apparatus in Embodiment 3 of this invention. 本発明の実施の形態3におけるパケット処理装置の処理手順を示すフローチャートThe flowchart which shows the process sequence of the packet processing apparatus in Embodiment 3 of this invention. 従来技術であるTCP Proxyの動作を説明するシーケンスチャートSequence chart explaining the operation of the conventional TCP Proxy

符号の説明Explanation of symbols

100、101、102 パケット処理装置
110 パケット受信部
120 パケット送信部
200、201、202 フィルタ機能部
210 通過判定部
220 通過設定テーブル
230、231 SYNACK代理応答部
240 コネクション切断部
250、251 通過設定エントリ追加部
260 パケット流量監視部
270 番号算出部
300 防御対象
100, 101, 102 Packet processing device 110 Packet receiving unit 120 Packet transmitting unit 200, 201, 202 Filter function unit 210 Passing judgment unit 220 Passing setting table 230, 231 SYNACK proxy response unit 240 Connection disconnecting unit 250, 251 Passing setting entry addition Unit 260 packet flow rate monitoring unit 270 number calculation unit 300 protection target

Claims (6)

通過設定テーブルに登録されているヘッダ情報を元にパケットを通過させるパケットフィルタ回路であって、
前記通過設定テーブルを参照して、パケットを通過させるか否かを判断する通過判定手段と、
通過不可と判断されたパケットがSYNパケットである場合、該SYNパケットに対するSYNACKパケットを代理応答するSYNACK代理応答手段と、
通過不可と判断されたパケットがACKパケットである場合、該ACKパケットのヘッダ情報を前記通過設定テーブルのエントリに追加する通過設定エントリ追加手段と、
前記通過設定エントリ追加手段がエントリを追加する際、前記ACKパケットの送信元に対してコネクション切断を通知するコネクション切断手段と、
を備えるパケットフィルタ回路。
A packet filter circuit that allows packets to pass based on header information registered in the passage setting table,
A passage determination means for referring to the passage setting table to determine whether or not to allow the packet to pass;
When the packet determined not to pass is a SYN packet, a SYNACK proxy response means for proxy response of a SYNACK packet for the SYN packet;
When the packet determined not to pass is an ACK packet, passage setting entry adding means for adding header information of the ACK packet to the entry of the passage setting table;
When the pass setting entry adding means adds an entry, a connection disconnecting means for notifying a connection disconnection to the transmission source of the ACK packet;
A packet filter circuit comprising:
パケット流量が所定の閾値未満であるか否かを監視するパケット流量監視手段を備え、
前記通過判定手段は、パケット流量が前記閾値未満の場合、全てのパケットを通過させる請求項1記載のパケットフィルタ回路。
A packet flow rate monitoring means for monitoring whether the packet flow rate is less than a predetermined threshold;
The packet filter circuit according to claim 1, wherein when the packet flow rate is less than the threshold, the passage determination unit passes all packets.
TCPフロー情報をキーとして所定の計算式に基づいて32ビットの番号を算出する番号算出手段を備え、
前記SYNACK代理応答手段は、受信したSYNパケットのTCPフロー情報から前記番号算出手段で算出した番号をシーケンス番号として付与したSYNACKパケットを送信し、
前記通過設定エントリ追加手段は、受信したACKパケットのTCPフロー情報から前記番号算出手段で算出した番号に1を加えた値が、受信したACKパケットのTCPヘッダに含まれる確認応答番号と一致する場合のみ、前記ACKパケットを前記通過設定テーブルに登録する請求項1又は2記載のパケットフィルタ回路。
Number calculation means for calculating a 32-bit number based on a predetermined calculation formula using TCP flow information as a key,
The SYNACK proxy response means transmits a SYNACK packet to which the number calculated by the number calculation means is assigned as a sequence number from the TCP flow information of the received SYN packet,
The passage setting entry adding unit is configured such that a value obtained by adding 1 to the number calculated by the number calculating unit from the TCP flow information of the received ACK packet matches an acknowledgment number included in the TCP header of the received ACK packet. 3. The packet filter circuit according to claim 1, wherein only the ACK packet is registered in the passage setting table.
通過設定テーブルに登録されているヘッダ情報を元にパケットを通過させるパケットフィルタ方法であって、
前記通過設定テーブルを参照して、パケットを通過させるか否かを判断する通過判定ステップと、
通過不可と判断されたパケットがSYNパケットである場合、該SYNパケットに対するSYNACKパケットを代理応答するSYNACK代理応答ステップと、
通過不可と判断されたパケットがACKパケットである場合、該ACKパケットのヘッダ情報を前記通過設定テーブルのエントリに追加する通過設定エントリ追加ステップと、
前記通過設定エントリ追加ステップにおいてエントリを追加する際、前記ACKパケットの送信元に対してコネクション切断を通知するコネクション切断ステップと、
を有するパケットフィルタ方法。
A packet filtering method for passing a packet based on header information registered in a passage setting table,
A passage determination step of referring to the passage setting table to determine whether or not to allow the packet to pass;
When the packet determined not to pass is a SYN packet, a SYNACK proxy response step of proxying a SYNACK packet for the SYN packet;
A pass setting entry adding step of adding header information of the ACK packet to the entry of the pass setting table when the packet determined not to pass is an ACK packet;
When adding an entry in the passing setting entry adding step, a connection disconnecting step for notifying the transmission source of the ACK packet of a connection disconnection;
A packet filtering method comprising:
前記通過判定ステップは、パケット流量が所定の閾値未満である場合、全てのパケットを通過させる請求項4記載のパケットフィルタ方法。   The packet filtering method according to claim 4, wherein when the packet flow rate is less than a predetermined threshold, the passage determination step allows all packets to pass. 前記SYNACK代理応答ステップは、受信したSYNパケットのTCPフロー情報をキーとして所定の計算式に基づいて算出した32ビットの番号をシーケンス番号として付与したSYNACKパケットを送信し、
前記通過設定エントリ追加ステップは、受信したACKパケットのTCPフロー情報をキーとして所定の計算式に基づいて算出した32ビットの番号に1を加えた値が、受信したACKパケットのTCPヘッダに含まれる確認応答番号と一致する場合のみ、前記ACKパケットを前記通過設定テーブルに登録する請求項4又は5記載のパケットフィルタ方法。
The SYNACK proxy response step transmits a SYNACK packet with a 32-bit number calculated as a sequence number calculated based on a predetermined calculation formula using the TCP flow information of the received SYN packet as a key,
In the pass setting entry adding step, a value obtained by adding 1 to a 32-bit number calculated based on a predetermined calculation formula using the TCP flow information of the received ACK packet as a key is included in the TCP header of the received ACK packet. The packet filter method according to claim 4 or 5, wherein the ACK packet is registered in the passage setting table only when it matches with an acknowledgment number.
JP2005169502A 2005-06-09 2005-06-09 Packet filter circuit and packet filter method Withdrawn JP2006345268A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005169502A JP2006345268A (en) 2005-06-09 2005-06-09 Packet filter circuit and packet filter method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005169502A JP2006345268A (en) 2005-06-09 2005-06-09 Packet filter circuit and packet filter method

Publications (1)

Publication Number Publication Date
JP2006345268A true JP2006345268A (en) 2006-12-21

Family

ID=37641883

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005169502A Withdrawn JP2006345268A (en) 2005-06-09 2005-06-09 Packet filter circuit and packet filter method

Country Status (1)

Country Link
JP (1) JP2006345268A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008244726A (en) * 2007-03-27 2008-10-09 Murata Mach Ltd Network multifunction machine
JP2010538508A (en) * 2007-09-03 2010-12-09 エアバス・オペレーションズ ACARS message transmission method via IP network
JP2011507453A (en) * 2007-12-18 2011-03-03 ソーラーウィンズ ワールドワイド、エルエルシー ACL configuration method of network device based on flow information
JP2022160511A (en) * 2021-03-05 2022-10-19 Necプラットフォームズ株式会社 End terminal, relay device, PLC device, and communication system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008244726A (en) * 2007-03-27 2008-10-09 Murata Mach Ltd Network multifunction machine
JP2010538508A (en) * 2007-09-03 2010-12-09 エアバス・オペレーションズ ACARS message transmission method via IP network
JP2011507453A (en) * 2007-12-18 2011-03-03 ソーラーウィンズ ワールドワイド、エルエルシー ACL configuration method of network device based on flow information
JP2022160511A (en) * 2021-03-05 2022-10-19 Necプラットフォームズ株式会社 End terminal, relay device, PLC device, and communication system

Similar Documents

Publication Publication Date Title
CN101202742B (en) Method and system for preventing refusal service attack
US7301899B2 (en) Prevention of bandwidth congestion in a denial of service or other internet-based attack
US7930740B2 (en) System and method for detection and mitigation of distributed denial of service attacks
US8499146B2 (en) Method and device for preventing network attacks
US7836498B2 (en) Device to protect victim sites during denial of service attacks
EP2464079A1 (en) Method for authenticating communication traffic, communication system and protection apparatus
CN110198293B (en) Attack protection method and device for server, storage medium and electronic device
JP5392507B2 (en) System for preventing interruption of normal user to web service for NAT network and control method thereof
US7818795B1 (en) Per-port protection against denial-of-service and distributed denial-of-service attacks
US20110131646A1 (en) Apparatus and method for preventing network attacks, and packet transmission and reception processing apparatus and method using the same
EP2543170B1 (en) Method for secure connection initiation with hosts behind firewalls
US20020035683A1 (en) Architecture to thwart denial of service attacks
KR20120060655A (en) Routing Method And Apparatus For Detecting Server Attacking And Network Using Method Thereof
CN110266678B (en) Security attack detection method and device, computer equipment and storage medium
WO2004010259A2 (en) Denial of service defense by proxy
JP4373306B2 (en) Method and apparatus for preventing distributed service denial attack against TCP server by TCP stateless hog
US9641485B1 (en) System and method for out-of-band network firewall
CN100420197C (en) Method for guarding against attack realized for networked devices
Kavisankar et al. A mitigation model for TCP SYN flooding with IP spoofing
US8973143B2 (en) Method and system for defeating denial of service attacks
Nagai et al. Design and implementation of an openflow-based tcp syn flood mitigation
JP2006345268A (en) Packet filter circuit and packet filter method
Kumarasamy et al. An active defense mechanism for TCP SYN flooding attacks
WO2019096104A1 (en) Attack prevention
Dulik Network attack using TCP protocol for performing DoS and DDoS attacks

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071113

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071120

A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080902