Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6529033B2 - INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM - Google Patents
[go: Go Back, main page]

JP6529033B2 - INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM - Google Patents

INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM Download PDF

Info

Publication number
JP6529033B2
JP6529033B2 JP2015195713A JP2015195713A JP6529033B2 JP 6529033 B2 JP6529033 B2 JP 6529033B2 JP 2015195713 A JP2015195713 A JP 2015195713A JP 2015195713 A JP2015195713 A JP 2015195713A JP 6529033 B2 JP6529033 B2 JP 6529033B2
Authority
JP
Japan
Prior art keywords
data
content
inspection
buffer
destination
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.)
Active
Application number
JP2015195713A
Other languages
Japanese (ja)
Other versions
JP2017069856A (en
Inventor
山田 直樹
直樹 山田
Original Assignee
株式会社エヴリカ
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社エヴリカ filed Critical 株式会社エヴリカ
Priority to JP2015195713A priority Critical patent/JP6529033B2/en
Publication of JP2017069856A publication Critical patent/JP2017069856A/en
Application granted granted Critical
Publication of JP6529033B2 publication Critical patent/JP6529033B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

本開示は、ネットワーク上でデータを検査するための技術に関する。   The present disclosure relates to techniques for inspecting data on a network.

従来、データパケットの境界で分割されたパターンを検索するためにコンピュータネットワーク上でデータパケットストリームを検査するための方法として、2つ以上のデータパケットがデータパケットストリームにおいて連続するか否かを判断し、連続するデータパケットからのペイロードを結合し、連続するデータパケットからの結合したペイロードを解析し、文字の組み合わせからなる複数のパターンを検索する方法、および、データパケットが所定時間以上システム中にあるときに、所定の判断基準に基づきデータパケットを出力データストリームに戻す方法、が提案されている(特許文献1を参照)。   Conventionally, as a method for inspecting a data packet stream on a computer network to search for patterns divided at data packet boundaries, it is determined whether two or more data packets are continuous in the data packet stream. , Combining payloads from consecutive data packets, analyzing combined payloads from consecutive data packets, and searching for a plurality of patterns of character combinations, and the data packets are in the system for a predetermined time or more At the same time, a method has been proposed in which data packets are returned to the output data stream based on predetermined judgment criteria (see Patent Document 1).

また、従来、インターネットへ接続する複数の加入者端末を収容するグループセンター局に接続されているゾーンセンター局内に、各加入者端末のユーザーID毎に、インターネットとの間で転送されるパケットデータを一時記憶する記憶装置と、記憶装置に記憶された複数のパケットデータをインターネット内のIPアドレスとネットワーク内の地域IPアドレスに対応させてファイルデータに組み立てて、組み立てたデータ内にコンピュータウイルスが存在するか否かを判定し、コンピュータウイルスが存在しないと判定したデータを加入者端末へ転送する機能とを備えるゲートウェイが提案されている(特許文献2を参照)。   Also, conventionally, packet data transferred between the user terminal of each subscriber terminal and the Internet is stored in a zone center station connected to a group center station accommodating a plurality of subscriber terminals connected to the Internet. A computer virus exists in the assembled data by assembling a storage device for temporary storage and a plurality of packet data stored in the storage device corresponding to an IP address in the Internet and a regional IP address in the network into file data There is proposed a gateway having a function of determining whether or not there is a computer virus and transferring data determined to have no computer virus to a subscriber terminal (see Patent Document 2).

特表2009−510815号公報JP 2009-510815 gazette 特開2001−256045号公報JP 2001-256045 A

従来、ネットワーク上のデータを検査するために、データが宛先に到達する前にデータを取り込んで検査し、検査が終了した後に当該宛先に転送する技術がある。しかし、このような技術では、データ全体の検査が完了するまでデータをバッファしておく必要があるため、大きな記憶領域が必要である。   Conventionally, in order to inspect data on a network, there is a technique of capturing and inspecting data before the data reaches the destination, and transferring the data to the destination after the inspection is completed. However, such a technique requires a large storage area because it is necessary to buffer data until the examination of the entire data is completed.

本開示は、上記した問題に鑑み、ネットワーク上のデータを取得して検査する際に、検査対象のデータのバッファに必要な記憶領域のサイズを低減させることを課題とする。   In view of the above-described problems, the present disclosure has an object to reduce the size of a storage area required for a buffer of data to be inspected when acquiring and inspecting data on a network.

本開示の一例は、ネットワークを流れる、コンテンツを含むデータを、宛先に到達する前に取得するデータ取得手段と、所定のサイズを有するバッファ領域に、取得された前記データをバッファするバッファ手段と、前記バッファ手段によってバッファされたデータを、前記宛先で組み立てられることで得られるファイルの前方から後方への順に相当する順序で参照することで、前記コンテンツを検査する検査手段と、前記バッファ手段によってバッファされたデータのうち、前記検査手段による参照が完了した部分を、前記コンテンツ全体の検査が終了する前に、前記宛先に転送する転送手段と、を備える情報処理装置である。   An example of the present disclosure includes data acquisition means for acquiring data including content, which flows through a network, before reaching a destination, and buffer means for buffering the acquired data in a buffer area having a predetermined size; Inspection means for inspecting the content by referring to the data buffered by the buffer means in the order corresponding to the order from front to back of the file obtained by being assembled at the destination, and buffer by the buffer means An information processing apparatus comprising: transfer means for transferring a portion of the data that has been referred to by the inspection means to the destination before the inspection of the entire content is completed.

本開示は、情報処理装置、システム、コンピューターによって実行される方法またはコンピューターに実行させるプログラムとして把握することが可能である。また、本開示は、そのようなプログラムをコンピューターその他の装置、機械等が読み取り可能な記録媒体に記録したものとしても把握できる。ここで、コンピューター等が読み取り可能な記録媒体とは、データやプログラム等の情報を電気的、磁気的、光学的、機械的または化学的作用によって蓄積し、コンピューター等から読み取ることができる記録媒体をいう。   The present disclosure can be understood as an information processing apparatus, a system, a method executed by a computer, or a program executed by a computer. The present disclosure can also be grasped as recording of such a program on a recording medium readable by a computer or other device, machine or the like. Here, a recording medium readable by a computer etc. means a recording medium which can store information such as data and programs by electrical, magnetic, optical, mechanical or chemical action and read from a computer etc. Say.

本開示によれば、ネットワーク上のデータを取得して検査する際に、検査対象のデータのバッファに必要な記憶領域のサイズを低減させることが可能となる。   According to the present disclosure, when acquiring and inspecting data on a network, it is possible to reduce the size of a storage area required for a buffer of data to be inspected.

実施形態に係るシステムの構成を示す概略図である。It is a schematic diagram showing composition of a system concerning an embodiment. 実施形態に係る通信検査装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the communication test | inspection apparatus which concerns on embodiment. 実施形態に係る通信検査装置の機能構成の概略を示す図である。It is a figure showing an outline of functional composition of a communication inspection device concerning an embodiment. 実施形態に係るパケット処理の流れの概要を示すフローチャートAである。It is the flowchart A which shows the outline | summary of the flow of the packet processing which concerns on embodiment. 実施形態に係るパケット処理の流れの概要を示すフローチャートBである。It is the flowchart B which shows the outline | summary of the flow of the packet processing which concerns on embodiment. 実施形態に係るパケット処理が実行された場合のコンテンツ全体におけるバッファ処理およびコンテンツの検査の様子を示す図である。It is a figure which shows the mode of the buffer process in the whole content at the time of the packet process which concerns on embodiment being performed, and the test | inspection of a content. 実施形態に係るヘッダー送信処理の流れの概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the flow of the header transmission process which concerns on embodiment. 実施形態において、パケット処理およびヘッダー送信処理を実行した場合のパケットの流れを示す図である。FIG. 6 is a diagram showing a flow of packets when packet processing and header transmission processing are performed in the embodiment. 実施形態において、パケット処理およびヘッダー送信処理を実行した場合のパケットの流れのバリエーションを示す図である。FIG. 7 is a diagram showing a variation of packet flow when packet processing and header transmission processing are performed in the embodiment.

以下、本開示に係る情報処理装置、方法およびプログラムの実施の形態を、図面に基づいて説明する。但し、以下に説明する実施の形態は、実施形態を例示するものであって、本開示に係る情報処理装置、方法およびプログラムを以下に説明する具体的構成に限定するものではない。実施にあたっては、実施の態様に応じた具体的構成が適宜採用され、また、種々の改良や変形が行われてよい。   Hereinafter, embodiments of an information processing apparatus, method, and program according to the present disclosure will be described based on the drawings. However, the embodiments to be described below exemplify the embodiments, and the information processing apparatus, method, and program according to the present disclosure are not limited to the specific configurations described below. In the implementation, a specific configuration according to the embodiment is adopted as appropriate, and various improvements and modifications may be performed.

本実施形態では、本開示に係る情報処理装置、方法およびプログラムを、通信検査装置において実施した場合の実施の形態について説明する。但し、本開示に係る情報処理装置、方法およびプログラムは、ネットワーク上のデータを検査するための技術について広く用いることが可能であり、本開示の適用対象は、本実施形態において示した例に限定されない。   In the present embodiment, an information processing apparatus, method, and program according to the present disclosure will be described in an embodiment in which the communication inspection apparatus is implemented. However, the information processing apparatus, method, and program according to the present disclosure can be widely used for techniques for inspecting data on a network, and the application target of the present disclosure is limited to the example shown in the present embodiment. I will not.

<システムの構成>
図1は、本実施形態に係るシステム1の構成を示す概略図である。本実施形態に係るシステム1は、複数の情報処理端末90(以下、「クライアント90」と称する)が接続されるネットワークセグメント2と、クライアント90に係る通信を中継するための通信検査装置20と、を備える。また、ネットワークセグメント2内のクライアント90は、インターネットや広域ネットワークを介して遠隔地において接続された各種のサーバーと、通信検査装置20を介して通信可能である。本実施形態において、通信検査装置20は、ネットワークセグメント2において、クライアント90とインターネットとの間に接続されることで、通過するパケットを取得する。そして、通信検査装置20は、取得したパケットのうち、検査対象でないパケット、および検査の結果転送してもよいと判定されたパケットを転送する。
<System configuration>
FIG. 1 is a schematic view showing the configuration of a system 1 according to the present embodiment. A system 1 according to the present embodiment includes a network segment 2 to which a plurality of information processing terminals 90 (hereinafter referred to as “clients 90”) are connected, and a communication inspection apparatus 20 for relaying communication related to the clients 90, Equipped with The client 90 in the network segment 2 can communicate with various servers connected at a remote location via the Internet or a wide area network via the communication inspection device 20. In the present embodiment, the communication inspection apparatus 20 is connected between the client 90 and the Internet in the network segment 2 to acquire passing packets. Then, the communication inspection apparatus 20 transfers, among the acquired packets, a packet not to be inspected and a packet determined to be transferred as a result of the inspection.

図2は、本実施形態に係る通信検査装置20のハードウェア構成を示す図である。通信検査装置20は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、EEPROM(Electrically Erasable and Programmable Read Only Memory)やHDD(Hard Disk Drive)等の記憶装置14、NIC(Network Interface Card)15等の通信ユニット、等を備えるコンピューターである。但し、通信検査装置20の具体的なハードウェア構成に関しては、実施の態様に応じて適宜省略や置換、追加が可能である。また、通信検査装置20は、単一の装置に限定されない。通信検査装置20は、所謂クラウドや分散コンピューティングの技術等を用いた、複数の装置によって実現されてよい。   FIG. 2 is a diagram showing a hardware configuration of the communication inspection apparatus 20 according to the present embodiment. The communication inspection apparatus 20 includes a central processing unit (CPU) 11, a read only memory (ROM) 12, a random access memory (RAM) 13, and a memory such as an electrically erasable and programmable read only memory (EEPROM) or a hard disk drive (HDD). It is a computer provided with an apparatus 14, a communication unit such as a NIC (Network Interface Card) 15, and the like. However, with regard to the specific hardware configuration of the communication inspection apparatus 20, omission, replacement, or addition can be appropriately made according to the embodiment. Also, the communication inspection device 20 is not limited to a single device. The communication inspection device 20 may be realized by a plurality of devices using so-called cloud, distributed computing technology or the like.

図3は、本実施形態に係る通信検査装置20の機能構成の概略を示す図である。通信検査装置20は、記憶装置14に記録されているプログラムが、RAM13に読み出され、CPU11によって実行されることで、コンテンツ要求検知部21、データ取得部22、送信回数予測部23、抽出部24、ヘッダー生成部25、検査部26、検査中送信部27、転送部28、中止部29、検査結果通知部30、バッファ部31および判定部32を備える情報処理装置として機能する。なお、本実施形態では、通信検査装置20の備える各機能は、汎用プロセッサであるCPU11によって実行されるが、これらの機能の一部または全部は、1または複数の専用プロセッサによって実行されてもよい。また、これらの機能の一部または全部は、クラウド技術等を用いて、遠隔値に設置された装置や、分散設置された複数の装置によって実行されてもよい。   FIG. 3 is a diagram showing an outline of a functional configuration of the communication inspection apparatus 20 according to the present embodiment. In the communication inspection apparatus 20, the program recorded in the storage device 14 is read out to the RAM 13 and executed by the CPU 11, whereby the content request detection unit 21, the data acquisition unit 22, the transmission number prediction unit 23, the extraction unit 24 functions as an information processing apparatus including a header generation unit 25, an inspection unit 26, an inspection transmission unit 27, a transfer unit 28, a cancellation unit 29, an inspection result notification unit 30, a buffer unit 31, and a determination unit 32. In the present embodiment, each function provided in the communication inspection apparatus 20 is executed by the CPU 11 which is a general-purpose processor, but some or all of these functions may be executed by one or more dedicated processors. . Also, some or all of these functions may be executed by a device installed at a remote value or a plurality of devices installed in a distributed manner using cloud technology or the like.

コンテンツ要求検知部21は、送信元、宛先および要求コンテンツの種類の少なくとも何れかが所定の条件に合致するコンテンツ要求(接続要求)を検知する。   The content request detection unit 21 detects a content request (connection request) in which at least one of the transmission source, the destination, and the type of requested content meets a predetermined condition.

データ取得部22は、ネットワークに接続された端末によって送受信される通信に係る、ヘッダーとコンテンツを含むデータを、宛先に到達する前に取得する。なお、本実施形態において、通信検査装置20は、ネットワークセグメント2に接続されたクライアント90による通信の他、通信検査装置20を介する全ての通信を、検査の対象とすることが出来る。   The data acquisition unit 22 acquires data including a header and content according to communication transmitted and received by a terminal connected to the network before reaching the destination. In the present embodiment, the communication inspection apparatus 20 can set all communication via the communication inspection apparatus 20 as an inspection target in addition to the communication by the client 90 connected to the network segment 2.

バッファ部31は、所定のサイズを有するRAM13上のコンテンツバッファ領域に、取得されたデータをバッファする。ここで、バッファ部31は、データが複数のパケットに分割されて順次取得される場合、データのうち新たに取得したパケットに含まれる部分を、未転送のデータがバッファされている領域を除く領域にバッファする。換言すれば、バッファ部31は、データのうち新たに取得したパケットに含まれる部分を、データがバッファされていない領域または転送済のデータがバッファされている領域にバッファする。以下、未転送のデータがバッファされている領域を除く領域を、「空き領域」と称する。なお、本実施形態において、バッファ部31によって所定のサイズを有するコンテンツバッファ領域にバッファされるのはデータのうちコンテンツの部分であり、コンテンツのヘッダーについては、RAM13上の別の領域にバッファされる。   The buffer unit 31 buffers the acquired data in the content buffer area on the RAM 13 having a predetermined size. Here, when the data is divided into a plurality of packets and sequentially acquired, the buffer unit 31 excludes the portion included in the newly acquired packet of the data except the region in which the untransferred data is buffered. Buffer in In other words, the buffer unit 31 buffers the portion included in the newly acquired packet of the data in the area in which the data is not buffered or the area in which the transferred data is buffered. Hereinafter, the area excluding the area in which the untransferred data is buffered is referred to as “empty area”. In the present embodiment, what is buffered in the content buffer area having a predetermined size by the buffer unit 31 is the content portion of the data, and the header of the content is buffered in another area on the RAM 13 .

判定部32は、コンテンツバッファ領域において、データのうち新たに取得するパケットに含まれる部分をバッファするための空き領域が足りているか否かを判定する。具体的には、判定部32は、データのうち新たに取得するパケットに含まれる部分のサイズと、コンテンツバッファ領域の空き領域のサイズとを比較することで、コンテンツバッファ領域において空き領域が足りているか否かを判定する。ここで、空き領域が足りていないと判定された場合、転送部28に、バッファ部31によってバッファされたデータのうち、検査部26による参照が完了した部分を転送させることで、コンテンツバッファ領域を確保する。   The determination unit 32 determines whether or not there is enough free space in the content buffer area to buffer a portion included in a newly acquired packet of data. Specifically, the determination unit 32 compares the size of the part included in the newly acquired packet of the data with the size of the free area of the content buffer area, and the free area is sufficient in the content buffer area. Determine if there is. Here, when it is determined that the free space is not sufficient, the transfer unit 28 transfers the part of the data buffered by the buffer unit 31 to which the reference by the inspection unit 26 is completed, thereby making the content buffer area available. Secure.

送信回数予測部23は、データ取得部22によって取得されるコンテンツの検査に必要な検査時間を予測し、予測された検査時間に基づいて、検査中送信部27による送信回数を予測する。より具体的には、送信回数予測部23は、検査部26による検査が開始されてから転送部28によるコンテンツ部分の先頭部分の転送が開始されるまでの時間を予測する。   The transmission number prediction unit 23 predicts the inspection time required for the inspection of the content acquired by the data acquisition unit 22, and predicts the number of transmissions by the transmission unit 27 during inspection based on the predicted inspection time. More specifically, the number-of-transmissions prediction unit 23 predicts the time from when inspection by the inspection unit 26 is started to when transfer of the head portion of the content part by the transfer unit 28 is started.

抽出部24は、データ取得部22によって取得されたデータに含まれるヘッダーから、宛先に受信されるコンテンツを確定させないヘッダーを抽出する。   The extraction unit 24 extracts, from the header included in the data acquired by the data acquisition unit 22, the header in which the content to be received by the destination is not determined.

ヘッダー生成部25は、宛先に受信されるコンテンツを確定させないヘッダーを生成する。   The header generation unit 25 generates a header that does not allow the destination to determine the content to be received.

検査部26は、データ取得部22によって取得されたコンテンツが、当該データに設定された宛先への転送が許可されるコンテンツであるか否かを、予め定められた検査項目に従って検査する。例えば、検査部26は、コンテンツにマルウェアが含まれているか否か、コンテンツに望ましくない表現が含まれているか否か、等を検査する。但し、本開示に係る検査において採用され得る具体的な検査項目や検査手法は、本実施形態における例示に限定されない。具体的な検査項目や検査手法には、既知の、または将来開発される様々な検査項目および検査手法が採用されてよい。   The inspection unit 26 inspects, in accordance with a predetermined inspection item, whether the content acquired by the data acquisition unit 22 is the content permitted to be transferred to the destination set in the data. For example, the inspection unit 26 inspects whether the content includes malware, whether the content includes an undesirable expression, and the like. However, specific inspection items and inspection methods that can be adopted in the inspection according to the present disclosure are not limited to the examples in the present embodiment. Specific inspection items and inspection methods may employ various inspection items and inspection methods that are known or developed in the future.

なお、検査部26は、データ取得部22によるコンテンツ全体の取得が完了する前に、当該コンテンツの検査を開始する。そして、検査部26は、バッファ部31によってバッファされたデータを、宛先で組み立てられることで得られるファイルの前方から後方への順に相当する順序で参照することで、コンテンツを検査する。より具体的には、検査部26は、コンテンツバッファ領域の参照ポイントを示すポインターを、当該コンテンツバッファ領域におけるデータの並びに関係なく、宛先で組み立てられることで得られるファイルの前方から後方への順に相当する順序で制御して、バッファされたデータを参照する。   The inspection unit 26 starts inspection of the content before the acquisition of the entire content by the data acquisition unit 22 is completed. Then, the inspection unit 26 inspects the content by referring to the data buffered by the buffer unit 31 in the order corresponding to the order from the front to the back of the file obtained by being assembled at the destination. More specifically, the inspection unit 26 sets the pointer indicating the reference point of the content buffer area in the order from the front to the back of the file obtained by being assembled at the destination regardless of the order of the data in the content buffer area. Control in the order you want to refer to the buffered data.

即ち、本実施形態に係る検査部26は、RAM13のコンテンツバッファ領域に、コンテンツ全体が保持されていない状態でコンテンツの検査を行う。上述の通り、検査部26は、バッファ部31によってバッファされたデータを、宛先で組み立てられることで得られるファイルの前方から後方への順に相当する順序で参照するが、この際、検査部26は、検査経過をRAM13上において管理し、コンテンツを前方から後方へ参照しながら検査を行い、検査経過を逐次更新する。例えば、検査がパターンマッチングによって行われている場合、検査経過には、パターンマッチングによるマッチングの有無が記録され、検査がハッシュ演算等によって行われている場合、検査経過には、コンテンツにおける参照が完了した位置までのハッシュ演算結果が記録される。   That is, the inspection unit 26 according to the present embodiment inspects the content in a state where the entire content is not held in the content buffer area of the RAM 13. As described above, the inspection unit 26 refers to the data buffered by the buffer unit 31 in the order corresponding to the order from the front to the back of the file obtained by being assembled at the destination. The examination progress is managed on the RAM 13, the examination is performed while referring to the content from the front to the back, and the examination progress is sequentially updated. For example, when the inspection is performed by pattern matching, the presence or absence of the matching by pattern matching is recorded in the inspection progress, and when the inspection is performed by hash calculation or the like, the reference in the content is completed as the inspection progress. The result of the hash operation up to the specified position is recorded.

検査中送信部27は、検査部26による検査が開始されてから転送部28によるコンテンツ部分の先頭部分の転送が開始されるまでの間、宛先におけるデータの受信待ち時間がタイムアウトしない間隔で、データに含まれるヘッダーの少なくとも一部を当該データの宛先に送信する。なお、本実施形態では、タイムアウト防止のために送信されるデータとして、ヘッダーを送信することとしているが、タイムアウト防止のために送信されるデータは、クライアント90に受信される後続データの種類やサイズ等を確定させないものであればよく、ヘッダーに限定されない。   During the inspection, the transmission unit 27 transmits data at intervals at which the reception waiting time of the data at the destination does not time out from the start of the inspection by the inspection unit 26 to the start of transfer of the head portion of the content by the transfer unit 28 Send at least part of the header contained in the data to the destination of the data. In the present embodiment, the header is transmitted as data to be transmitted for preventing time out, but the data to be transmitted for preventing time out is the type and size of the subsequent data to be received by the client 90. The header is not limited as long as it does not determine the etc.

転送部28は、バッファ部31によってバッファされたデータのうち、検査部26による参照が完了した部分を、コンテンツ全体の検査が終了する前に、当該データの宛先に転送する。なお、判定部32の説明において上述した通り、この転送は、判定部32によって空き領域が足りていないと判定された場合に行われてもよい。また、転送部28は、検査部26によるコンテンツ全体の検査が完了した後、検査結果が、該コンテンツが宛先への転送が許可されるコンテンツであるという検査結果であった場合に、該コンテンツを含むデータのうち送信済みの部分を除くデータを、当該データの宛先に転送する。   The transfer unit 28 transfers the portion of the data buffered by the buffer unit 31 that has been referred to by the inspection unit 26 to the destination of the data before the inspection of the entire content is completed. Note that, as described above in the description of the determination unit 32, this transfer may be performed when the determination unit 32 determines that the free space is not sufficient. In addition, when the examination of the entire content by the examination unit 26 is completed, the transfer unit 28 determines that the examination result indicates that the content is a content for which transfer to the destination is permitted. Transfer the data excluding the transmitted part of the included data to the destination of the data.

中止部29は、検査部26による検査結果が、当該コンテンツが当該データの宛先への転送が許可されるコンテンツではないという検査結果であった場合に、転送部28による転送を中止する。   The cancellation unit 29 cancels the transfer by the transfer unit 28 when the inspection result by the inspection unit 26 is an inspection result that the content is not the content for which transfer of the data to the destination is permitted.

検査結果通知部30は、検査部26による検査結果が、当該コンテンツが当該データの宛先への転送が許可されるコンテンツではないという検査結果であった場合に、当該検査結果をデータの宛先に通知するための情報を、検査中送信部27または転送部28によって送信済みの部分に続くデータの一部として、当該宛先に送信する。   When the inspection result by the inspection unit 26 is an inspection result that the content is not content for which transfer of the data is permitted, the inspection result notification unit 30 notifies the data destination of the inspection result. The information to be transmitted is transmitted to the destination as a part of the data following the portion already transmitted by the transmitting unit 27 or the transferring unit 28 during inspection.

<処理の流れ>
次に、本実施形態に係るシステム1によって実行される処理の流れを、フローチャートを用いて説明する。なお、以下に説明するフローチャートに示された処理の具体的な内容および処理順序は、本開示を実施するための一例である。具体的な処理内容および処理順序は、本開示の実施の形態に応じて適宜選択されてよい。
<Flow of processing>
Next, the flow of processing executed by the system 1 according to the present embodiment will be described using a flowchart. The specific contents and the processing order of the processing illustrated in the flowchart described below are an example for implementing the present disclosure. The specific processing content and the processing order may be appropriately selected according to the embodiment of the present disclosure.

図4および図5は、本実施形態に係るパケット処理の流れの概要を示すフローチャートである。本実施形態に係るパケット処理は、通信検査装置20によって、ネットワーク上を流れる接続要求パケット(例えば、TCPのSYNパケット)が受信されたことを契機として実行される。   4 and 5 are flowcharts showing an outline of the flow of packet processing according to the present embodiment. The packet processing according to the present embodiment is executed by the communication inspection apparatus 20 when a connection request packet (for example, a TCP SYN packet) flowing on the network is received.

ステップS101では、接続要求が取り込まれる。コンテンツ要求検知部21は、受信されたパケットのヘッダーに設定されている送信元および宛先を参照して、取り込みの対象となるパケット(例えば、クライアント90からサーバーへの接続要求パケット)であるか否かを判定し、取り込みの対象となるパケットを取り込み、RAM12に記憶する(所謂フック処理)。取り込みの対象でないと判定されたパケットは、通信検査装置20に取り込まれることなく、宛先に転送される(図示は省略する)。取り込みの対象であるか否かは、パケットの送信元および宛先が、予め設定された送信元IPアドレスおよび宛先IPアドレスのリストに登録されているか否かを照合することによって判定される。この照合に用いられるリストは、ホワイトリストであってもブラックリストであってもよい。また、パケットが取り込みの対象であるか否かの判定には、本開示とは異なる手法が採用されてもよい。その後、処理はステップS102へ進む。   In step S101, a connection request is fetched. The content request detection unit 21 refers to the transmission source and destination set in the header of the received packet, and determines whether the packet is a packet to be captured (for example, a connection request packet from the client 90 to the server). The packet to be captured is fetched and stored in the RAM 12 (so-called hook process). The packets determined not to be captured are transferred to the destination without being captured by the communication inspection device 20 (not shown). Whether or not the packet is to be captured is determined by checking whether the source and destination of the packet are registered in a list of preset source IP addresses and destination IP addresses. The list used for this matching may be a white list or a black list. In addition, a method different from that of the present disclosure may be employed to determine whether a packet is a target of capture. Thereafter, the process proceeds to step S102.

ステップS102では、クライアント90の要求に係るコンテンツを検査対象とするか否かが判定される。コンテンツ要求検知部21は、ステップS101で取り込まれた接続要求に係るコネクションに属するパケットを受信し、当該パケットのリクエストラインおよびヘッダーを参照して、当該パケットが、検査部26による検査対象となる所定の種類のコンテンツを要求するパケットであるか否かを判定する。検査対象コンテンツを要求するパケットであるか否かは、パケットのリクエストラインおよびヘッダーが、予め設定された検査対象リストに登録されている情報と合致または近似するか否かを照合することによって判定される。   In step S102, it is determined whether the content relating to the request of the client 90 is to be checked. The content request detection unit 21 receives a packet belonging to the connection related to the connection request fetched in step S101, refers to the request line and the header of the packet, and the packet becomes an inspection target of the inspection unit 26. It is determined whether it is a packet requesting content of type Whether or not the packet is for a request for content to be checked is determined by checking whether the request line and the header of the packet match or approximate information registered in a predetermined list of data to be checked. Ru.

例えば、HTTPパケットが、以下に示されたリクエストラインおよびヘッダーを有する場合、当該パケットは、検査対象のコンテンツを要求するものであると判定される。
GET / HTTP/1.1
Host: sample.site
Accept: */*
User-Agent: UserAgent 1.0
Accept-Language: ja
Accept-Encoding: gzip, deflate
Connection: keep-alive
パケットが検査対象コンテンツを要求するパケットではないと判定された場合、当該パケットによって要求されたコンテンツは検査対象とはならず、パケットは転送され(ステップS119)、本フローチャートに示された処理は終了する。一方、パケットが検査対象コンテンツを要求するパケットであると判定された場合、当該パケットによって要求されたコンテンツは、後述するステップS113における検査の対象として設定され、処理はステップS103へ進む。
For example, if the HTTP packet has the request line and header shown below, it is determined that the packet is for requesting the content to be examined.
GET / HTTP / 1.1
Host: sample.site
Accept: * / *
User-Agent: UserAgent 1.0
Accept-Language: en
Accept-Encoding: gzip, deflate
Connection: keep-alive
If it is determined that the packet is not a packet requiring inspection target content, the content requested by the packet is not inspected, and the packet is transferred (step S119), and the processing illustrated in this flowchart ends. Do. On the other hand, when it is determined that the packet is a packet requesting inspection target content, the content requested by the packet is set as an inspection target in step S113 described later, and the process proceeds to step S103.

ステップS103およびステップS104では、接続要求およびコンテンツ要求が送信される。通信検査装置20は、ステップS101の接続要求に係るサーバーに接続し、ステップS102のコンテンツ要求に係るコンテンツを、当該サーバーに要求する。この際、通信検査装置20は、ステップS101およびステップS102で受信されたパケットをそのままサーバーに転送してもよいし、必要に応じて送信元IPアドレスをアドレス変換してからサーバーに送信してもよい。その後、処理はステップS105へ進む。   In steps S103 and S104, a connection request and a content request are transmitted. The communication inspection device 20 connects to the server related to the connection request in step S101, and requests the content related to the content request in step S102 to the server. At this time, the communication inspection apparatus 20 may directly transfer the packet received in step S101 and step S102 to the server, or may transmit the IP address of the transmission source to the server after converting it as necessary. Good. Thereafter, the process proceeds to step S105.

ステップS105では、レスポンスステータスおよび/またはヘッダーを含むパケットが受信される。データ取得部22は、ステップS104で送信されたコンテンツ要求パケットへの応答パケットとしてサーバーから送信された、レスポンスステータスまたはヘッダーを含むデータを、クライアント90に到達する前に取得する。ここで、データが複数のパケットに分割されて送信されている場合には、データ取得部22は、複数のパケットを組み立てることで、レスポンスステータスまたはヘッダーを含むデータを取得する。また、通信検査装置20は、ヘッダーの内容を参照して、当該ヘッダーに続くコンテンツを、検査部26による検査対象とするか否かを判定する。この判定は、例えば、ヘッダーの内容から特定されたコンテンツの種類を、検査対象とする(または、検査対象としない)コンテンツの種類のリストと照合することで行われる。また、この判定は、ヘッダーの内容から特定されたコンテンツのサイズと、検査対象とするサイズの上限とを比較することによって行われてもよい。   In step S105, a packet including response status and / or header is received. The data acquisition unit 22 acquires data including a response status or a header transmitted from the server as a response packet to the content request packet transmitted in step S104 before reaching the client 90. Here, when the data is divided into a plurality of packets and transmitted, the data acquisition unit 22 assembles the plurality of packets to acquire data including a response status or a header. Further, the communication inspection apparatus 20 refers to the content of the header to determine whether the content following the header is to be inspected by the inspection unit 26 or not. This determination is performed, for example, by collating the type of content specified from the content of the header with the list of types of content to be inspected (or not inspected). Also, this determination may be performed by comparing the size of the content specified from the content of the header with the upper limit of the size to be examined.

例えば、HTTPデータが、以下に示されたレスポンスステータスおよびヘッダーを有する場合、後続コンテンツが検査対象であると判定される。
HTTP/1.1 200 OK
Server: Apache
Date: xxxxxxxx GMT
Content-Type: application/octet-stream
Content-Length: 108
Connection: keep-alive
Cache-Control: max-age=0, no-cache
Pragma: no-cache
判定の結果、コンテンツを検査対象としないと判定された場合、当該パケットに係るコネクションは検査の対象外に設定され、本フローチャートに示された処理は終了する(図示は省略する)。一方、コンテンツを検査対象とする場合、処理はステップS106へ進む。
For example, if the HTTP data has the response status and header shown below, it is determined that the subsequent content is to be inspected.
HTTP / 1.1 200 OK
Server: Apache
Date: xxxxxxxx GMT
Content-Type: application / octet-stream
Content-Length: 108
Connection: keep-alive
Cache-Control: max-age = 0, no-cache
Pragma: no-cache
As a result of the determination, when it is determined that the content is not to be inspected, the connection relating to the packet is set to be not to be inspected, and the processing illustrated in this flowchart ends (illustration is omitted). On the other hand, when the content is to be inspected, the process proceeds to step S106.

ステップS106では、後述するヘッダー送信処理による送信回数が予測される。送信回数予測部23は、はじめに、ステップS105で受信されたパケットのヘッダーを参照してヘッダーおよびコンテンツの先頭部分(コンテンツを含む1つ目のパケットに含まれるコンテンツ部分)のサイズを把握し、これを、検査部26による処理能力(例えば、所定時間あたりに検査可能なデータサイズ)で除算することで、ヘッダーの検査およびコンテンツの先頭部分の検査が完了し、コンテンツの先頭部分の転送が開始されるまでに必要な検査時間を予測する。そして、送信回数予測部23は、予測された検査時間を、検査中送信部27による送信間隔で除算することで、送信回数を予測する。ここで、検査中送信部27による送信間隔には、コンテンツを受信するクライアント90において、コンテンツに係るパケット受信の待ち時間がタイムアウトしない間隔が予め設定される。その後、処理はステップS107へ進む。   In step S106, the number of transmissions by header transmission processing described later is predicted. First, the number-of-transmissions prediction unit 23 refers to the header of the packet received in step S105 to grasp the size of the header and the head portion of the content (the content portion included in the first packet including the content). Is divided by the processing capacity of the inspection unit 26 (for example, the data size that can be inspected per predetermined time), the inspection of the header and the inspection of the head portion of the content are completed, and the transfer of the head portion of the content is started. Estimate the inspection time required to Then, the transmission number prediction unit 23 predicts the number of transmissions by dividing the predicted inspection time by the transmission interval by the transmission unit 27 during inspection. Here, in the transmission interval by the transmission unit 27 during inspection, an interval at which the waiting time for packet reception related to the content does not time out is set in advance in the client 90 that receives the content. Thereafter, the process proceeds to step S107.

ステップS107では、検査中に送信可能なヘッダーの部分が抽出される。抽出部24は、ステップS105において受信されたヘッダーから、宛先に受信されるコンテンツを確定させないヘッダー部分を抽出する。換言すれば、抽出部24は、検査中送信部27によって送信済みの部分に続くデータの一部として、仮にサーバーから送信されたデータ以外のデータ(例えば、検査結果)が宛先に送信された場合に、該宛先による該データの処理に不都合(例えば、データサイズの矛盾や、コンテンツの種類の矛盾)が生じるヘッダー部分を除外することで、宛先に受信されるコンテンツを確定させないヘッダーを抽出する。   In step S107, a portion of the transmittable header is extracted during inspection. The extraction unit 24 extracts, from the header received in step S105, a header portion in which the content to be received by the destination is not determined. In other words, the extraction unit 24 transmits data other than the data transmitted from the server (for example, inspection result) to the destination as part of the data following the portion transmitted by the transmission unit 27 during inspection. Then, by excluding the header portion that causes inconvenience (for example, data size inconsistency or content type inconsistency) in the processing of the data by the destination, a header which does not make the content to be received by the destination be extracted.

例えば、ステップS105の説明において例示したヘッダーのうち、以下に示す部分は、コンテンツの種類およびサイズを限定するヘッダー部分であり、その後に送信可能なデータを限定してしまうヘッダー部分である。
Content-Type: application/octet-stream
Content-Length: 108
このため、抽出部24は、上記したヘッダー部分を除いた部分を、コンテンツを確定させないヘッダーとして抽出する。
For example, among the headers exemplified in the description of step S105, the following portions are header portions that limit the type and size of content, and are header portions that limit data that can be transmitted thereafter.
Content-Type: application / octet-stream
Content-Length: 108
Therefore, the extraction unit 24 extracts the part excluding the above-described header part as a header that does not determine the content.

なお、本実施形態では、コンテンツの送受信にHTTP(Hypertext Transfer Protocol)が用いられる場合を例に挙げて説明しているが、本開示は、その他のプロトコルにも適用可能である。例えば、コンテンツの送受信に用いられるプロトコルがPOP3(Post Office Protocol Version 3)である場合には、ヘッダー中のFromフィールド、Toフィールド、CcフィールドおよびSubjectフィールド等が、コンテンツの種類およびサイズを限定するヘッダーであるため、抽出部24は、これらの部分を除くヘッダーを抽出する。   Although the case where HTTP (Hypertext Transfer Protocol) is used for transmission and reception of content is described as an example in the present embodiment, the present disclosure is applicable to other protocols. For example, if the protocol used to transmit and receive content is POP3 (Post Office Protocol Version 3), the From field, To field, Cc field, Subject field, etc. in the header will limit the type and size of the content. Therefore, the extraction unit 24 extracts the header excluding these parts.

また、抽出部24は、データ取得部22によって取得されたデータに含まれるヘッダーから、宛先に受信されるコンテンツを確定させないヘッダーを、ステップS106で予測された送信回数に応じて決定された量だけ抽出することとしてもよい。具体的には、抽出部24は、ステップS106で予測された送信回数に分けて送信可能な量、ヘッダー部分を抽出してもよい。なお、抽出可能なヘッダー部分の量が、送信回数分に満たない場合、抽出部24は、コンテンツを確定させないヘッダー部分を全て抽出する。その後、処理はステップS108へ進む。   In addition, the extraction unit 24 determines from the header included in the data acquired by the data acquisition unit 22 the header that does not determine the content to be received at the destination by the amount determined according to the number of transmissions predicted in step S106. It may be extracted. Specifically, the extraction unit 24 may extract a transmittable amount and a header portion by dividing the number of transmissions predicted in step S106. When the amount of extractable header portions is less than the number of transmissions, the extraction unit 24 extracts all header portions whose content is not determined. Thereafter, the process proceeds to step S108.

ステップS108およびステップS109では、コンテンツを含むパケットが受信され、コンテンツバッファの空き領域が足りているか否かが判定される。データ取得部22は、ステップS104で送信されたコンテンツ要求パケットへの応答パケットとしてサーバーから送信された、コンテンツを含むパケットを受信する(ステップS108)。そして、判定部32は、コンテンツバッファの空き領域のサイズと、次にバッファされるデータのサイズとを比較することで、受信されたパケットに含まれるコンテンツをバッファするための空き領域が有るか否かを判定する(ステップS109)。   In steps S108 and S109, a packet including content is received, and it is determined whether or not the free space of the content buffer is sufficient. The data acquisition unit 22 receives the packet including the content transmitted from the server as a response packet to the content request packet transmitted in step S104 (step S108). Then, the determination unit 32 compares the size of the free space of the content buffer with the size of the next buffered data to determine whether there is a free space for buffering the content included in the received packet. It is determined (step S109).

具体的には、判定部32は、コンテンツバッファの空き領域のサイズが、受信されたパケットに含まれるコンテンツ部分のサイズよりも大きい場合には、受信されたコンテンツをバッファするための空き領域が足りていると判定する。空き領域が足りていると判定された場合、空き領域の確保は不要であるため、処理はステップS112へ進む。一方、判定部32は、コンテンツバッファの空き領域のサイズが、受信されたコンテンツのサイズよりも小さい場合には、受信されたコンテンツをバッファするための空き領域が不足していると判定する。空き領域が不足していると判定された場合、空き領域の確保が必要であるため、処理はステップS110へ進む。   Specifically, when the size of the free space of the content buffer is larger than the size of the content portion included in the received packet, the determination unit 32 has enough free space for buffering the received content. It is determined that If it is determined that the free space is sufficient, securing of the free space is unnecessary, so the process proceeds to step S112. On the other hand, when the size of the free space of the content buffer is smaller than the size of the received content, the determination unit 32 determines that the free space for buffering the received content is insufficient. If it is determined that the free space is insufficient, it is necessary to secure the free space, so the process proceeds to step S110.

ステップS110およびステップS111では、コンテンツバッファの空き領域が確保される。転送部28は、バッファされたデータのうち、最も古い時点でバッファされたデータから順に(FIFO:First In, First Out)、当該データの宛先であるクライアント90に転送(送信)する(ステップS110)。また、バッファ部31は、ステップS109で転送されたデータを、コンテンツバッファから削除する(ステップS111)。なお、ここでいうコンテンツバッファからの削除は、転送済みのデータが記録されていた領域に次に受信されるパケットのデータを記録可能なようにすることであり、データの完全な消去(ゼロクリア等)を意味するものではない。その後、処理はステップS112へ進む。   In steps S110 and S111, a free area of the content buffer is secured. The transfer unit 28 transfers (sends) the buffered data at the oldest point in time (FIFO: First In, First Out) to the client 90 that is the destination of the data (step S110). . Also, the buffer unit 31 deletes the data transferred in step S109 from the content buffer (step S111). Note that deletion from the content buffer mentioned here is to make it possible to record the data of the packet to be received next in the area in which the transferred data has been recorded, and complete deletion of the data (zero clear etc. Does not mean). Thereafter, the process proceeds to step S112.

ステップS112からステップS115では、受信されたコンテンツが検査される。データ取得部22は、コンテンツを含むデータを、クライアント90に到達する前に取得し、取得したデータをコンテンツバッファに記録することで、当該データに含まれるコンテンツのうち、少なくとも当該データに係る部分の検査が完了するまで、宛先クライアント90への転送を保留する(ステップS112)。   In steps S112 to S115, the received content is inspected. The data acquisition unit 22 acquires data including content before reaching the client 90, and records the acquired data in the content buffer to obtain at least a portion related to the data among the content included in the data. The transfer to the destination client 90 is suspended until the examination is completed (step S112).

そして、データの転送が保留されている間に、検査部26は、取得されたコンテンツが、クライアント90への転送が許可されるコンテンツであるか否かを、予め定められた検査項目に従って検査する(ステップS113)。ここで、データが複数のパケットに分割されて送信されている場合には、検査部26は、複数のパケットの夫々がデータ取得部22によって取得される毎に、パケットからデータを取り出してバッファし、順次検査を行う。コンテンツ全体の検査が完了する前に、即ち検査の途中で、当該コンテンツが、クライアント90への転送が許可されないコンテンツであると判定された場合(ステップS114)、コンテンツの検査は中断され、処理はステップS118へ進む。検査が中断されない場合、ステップS108からステップS115の処理はコンテンツ全体の検査が完了するまで繰り返され、コンテンツ全体の検査が完了すると(ステップS115)、処理はステップS116へ進む。   Then, while transfer of data is suspended, the inspection unit 26 inspects according to a predetermined inspection item whether the acquired content is content permitted to be transferred to the client 90. (Step S113). Here, when the data is divided into a plurality of packets and transmitted, the inspection unit 26 extracts and buffers data from the packets each time the plurality of packets are acquired by the data acquisition unit 22. Perform inspections one after another. If it is determined that the content is not permitted to be transferred to the client 90 before the inspection of the entire content is completed, ie, in the middle of the inspection (step S114), the content inspection is interrupted, and the process The process proceeds to step S118. If the examination is not interrupted, the processes from step S108 to step S115 are repeated until the examination of the entire content is completed, and when the examination of the entire content is completed (step S115), the process proceeds to step S116.

なお、ステップS108からステップS115におけるコンテンツの受信および検査が行われている間、通信検査装置20は、クライアント90における受信待ち時間のタイムアウトを防止するため、ヘッダー送信処理を実行する。ヘッダー送信処理の詳細については、図7を用いて後述する。   In addition, while the reception and inspection of the content from step S108 to step S115 are performed, the communication inspection apparatus 20 executes the header transmission process in order to prevent timeout of the reception waiting time in the client 90. The details of the header transmission process will be described later with reference to FIG.

ステップS116では、検査結果が判定される。ステップS108からステップS115における検査の結果、コンテンツが、クライアント90への転送が許可されるコンテンツであると判定された場合、処理はステップS117へ進む。一方、コンテンツが、クライアント90への転送が許可されないコンテンツであると判定された場合、処理はステップS118へ進む。   In step S116, the inspection result is determined. If it is determined that the content is content permitted to be transferred to the client 90 as a result of the check in steps S108 to S115, the process proceeds to step S117. On the other hand, if it is determined that the content is content that is not permitted to be transferred to the client 90, the process proceeds to step S118.

ステップS117では、データが転送される。転送部28は、コンテンツを含むデータのうち、既に送信済みの部分を除くデータ、即ち、バッファされているデータを、当該データの宛先であるクライアント90に転送(送信)する。その後、本フローチャートに示された処理は終了する。   At step S117, data is transferred. The transfer unit 28 transfers (sends) the data excluding the already transmitted portion of the data including the content, that is, the buffered data to the client 90 which is the destination of the data. Thereafter, the process shown in the present flowchart ends.

ステップS118では、データの転送が中止され、検査結果情報が通知される。中止部29は、検査部26による検査結果が、当該コンテンツが当該データの宛先への転送が許可されるコンテンツではないという検査結果であった場合に、転送部28による転送を中止する。このため、本実施形態に係るシステムによれば、望ましくないコンテンツが、クライアント90に対して送信されてしまうことを防止することが出来る。そして、検査結果通知部30は、当該検査結果をデータの宛先に通知するための情報を、検査中送信部27によって送信済みの部分に続くデータの一部(ヘッダーおよびコンテンツ等)として、当該宛先に送信する。具体的には、検査結果通知部30は、クライアント90が要求したコンテンツに、マルウェアや望ましくない表現等が含まれていることを、クライアント90のユーザーに通知するためのコンテンツ(例えば、Webページ)と、当該コンテンツに適したヘッダー(例えば、コンテンツの種類およびサイズを限定するヘッダー)とを生成し、クライアント90に対して送信する。その後、本フローチャートに示された処理は終了する。   In step S118, the transfer of data is stopped, and inspection result information is notified. The cancellation unit 29 cancels the transfer by the transfer unit 28 when the inspection result by the inspection unit 26 is an inspection result that the content is not the content for which transfer of the data to the destination is permitted. Therefore, according to the system of the present embodiment, it is possible to prevent undesired content from being transmitted to the client 90. Then, the inspection result notification unit 30 sets the information for notifying the destination of the data of the inspection result as the part of the data (header, content, etc.) following the portion already transmitted by the transmitting unit 27 during inspection. Send to Specifically, the inspection result notification unit 30 notifies the user of the client 90 that the content requested by the client 90 includes malware or an undesirable expression (for example, a Web page). And a header suitable for the content (for example, a header that limits the type and size of the content), and sends it to the client 90. Thereafter, the process shown in the present flowchart ends.

図6は、本実施形態に係るパケット処理が実行された場合のコンテンツ全体におけるバッファ処理およびコンテンツの検査の様子を示す図である。ここで、コンテンツの検査とは、コンテンツ全体を1つのまとまりとした検査であり、単に順次送信されてくるパケットを検査するパケット検査とは異なる。本実施形態において、コンテンツ検査は、コンテンツ全体を1つのファイルとして、先頭から順に検査を行う。   FIG. 6 is a diagram showing how buffer processing and content inspection are performed on the entire content when packet processing according to the present embodiment is performed. Here, the inspection of the content is an inspection in which the entire content is integrated into one, and is different from a packet inspection which inspects packets transmitted in sequence. In the present embodiment, in the content inspection, the entire content is inspected as one file, sequentially from the top.

検査の内容は、例えば、パターンマッチングやハッシュ演算等であるが、このような処理は、コンテンツ(ファイル)全体がRAM13上にロードされていることを必ずしも必要としない。即ち、これらの検査は、コンテンツの内容を先頭から順に参照することができれば可能なものであるため、本実施形態に係る通信検査装置20は、コンテンツ(ファイル)全体をRAM13(コンテンツバッファ)に蓄積することなく、コンテンツの先頭からFIFO方式でバッファされている部分を順に参照することで、検査を行う。検査が終了した部分については、コンテンツバッファの空き容量に応じてFIFO方式で転送され、コンテンツバッファから削除されていくため、コンテンツの先頭から順に「転送済」となる。また、バッファされている部分よりも後方のコンテンツは、サーバーから「未受信」である。但し、コンテンツバッファに余裕がある場合には、コンテンツ(ファイル)全体をRAM13(コンテンツバッファ)に蓄積してもよい。   The content of the inspection is, for example, pattern matching or hash operation, but such processing does not necessarily require that the entire content (file) be loaded on the RAM 13. That is, since these inspections are possible if the contents of the content can be referred to in order from the top, the communication inspection apparatus 20 according to the present embodiment stores the entire content (file) in the RAM 13 (content buffer). The inspection is performed by sequentially referring to the portion buffered by the FIFO method from the beginning of the content without doing so. The portion where the inspection is completed is transferred by the FIFO method according to the free space of the content buffer and is deleted from the content buffer, so it becomes “transferred” in order from the top of the content. Also, content behind the buffered portion is "not received" from the server. However, when there is room in the content buffer, the entire content (file) may be stored in the RAM 13 (content buffer).

図7は、本実施形態に係るヘッダー送信処理の流れの概要を示すフローチャートである。本実施形態に係るヘッダー送信処理は、図4および図5に示されたパケット処理において、ステップS108からステップS115に示されたコンテンツ検査が開始されたことを契機として実行される。   FIG. 7 is a flowchart showing an outline of the flow of header transmission processing according to the present embodiment. The header transmission process according to the present embodiment is executed when the content inspection shown in step S108 to step S115 is started in the packet processing shown in FIG. 4 and FIG.

ステップS201では、ヘッダーの一部が送信される。検査中送信部27は、データに含まれるヘッダーの少なくとも一部を、当該データの宛先であるクライアント90に送信する。なお、本実施形態では、タイムアウト防止のために送信されるデータとして、抽出部24によって抽出されたヘッダーの一部、または、ヘッダー生成部25によって生成されたヘッダーが用いられているが、タイムアウト防止のために送信されるデータは、クライアント90に受信される後続データの種類やサイズ等を確定させないものであればよく、ヘッダーに限定されない。その後、処理はステップS202へ進む。   In step S201, part of the header is transmitted. The in-inspection transmission unit 27 transmits at least a part of the header included in the data to the client 90 which is the destination of the data. In the present embodiment, a part of the header extracted by the extraction unit 24 or the header generated by the header generation unit 25 is used as data to be transmitted for the timeout prevention, but the timeout is prevented. The data to be transmitted is not limited to the header as long as it does not allow the client 90 to determine the type, size, etc. of the subsequent data to be received. Thereafter, the processing proceeds to step S202.

ステップS202では、検査の終了またはデータ転送の開始がされたか否かが判定される。検査中送信部27は、上述したパケット処理のステップS108からステップS115に示されたコンテンツ検査が終了したか否か、およびコンテンツバッファの空き領域確保のためのデータ転送が開始されたか否かを判定する。コンテンツ検査が終了していないと判定された場合、処理はステップS203へ進む。一方、コンテンツ検査が終了したと判定された場合、本フローチャートに示された処理は終了する。なお、本実施形態では、検査部26によるコンテンツ検査が終了したか否かを確認して、ヘッダー送信処理を継続するか否かを決定することとしているが、ヘッダー送信処理の継続/終了の判定は、検査開始から検査時間(ステップS106で算出)が経過したか否かに基づいて判定されてもよい。   In step S202, it is determined whether the end of the examination or the start of data transfer has been made. The in-inspection transmission section 27 determines whether the content inspection shown in step S108 to step S115 of the packet processing described above is completed and whether data transfer for securing a free area of the content buffer is started or not. Do. If it is determined that the content inspection has not ended, the process proceeds to step S203. On the other hand, if it is determined that the content inspection has ended, the processing shown in this flowchart ends. In the present embodiment, it is determined whether the content inspection by the inspection unit 26 is completed to determine whether to continue the header transmission process, but the determination of the continuation / end of the header transmission process May be determined based on whether or not the examination time (calculated in step S106) has elapsed from the start of the examination.

ステップS203およびステップS204では、未送信のヘッダーが無い場合に、タイムアウト防止用のヘッダーが生成される。ヘッダー生成部25は、ステップS107で抽出されたヘッダーが全てクライアント90に対して送信され、送信可能なヘッダーが尽きた場合(ステップS203のNO)、タイムアウト防止用のヘッダーを生成する(ステップS204)。ここで生成されるヘッダーは、ステップS107で抽出されたヘッダーと同様、宛先に受信されるコンテンツを確定させないヘッダーである。また、ヘッダー生成部25は、宛先に受信されるコンテンツを確定させないヘッダーとして、例えば、名称が「X−」から始まるオリジナルヘッダーを生成してよい。   In steps S203 and S204, when there is no unsent header, a header for preventing time-out is generated. When all the headers extracted in step S107 are transmitted to the client 90 and the transmittable headers are exhausted (NO in step S203), the header generation unit 25 generates a header for time-out prevention (step S204). . The header generated here is, like the header extracted in step S107, a header that does not allow the destination to determine the content to be received. In addition, the header generation unit 25 may generate, for example, an original header whose name starts with "X-" as a header that does not allow the destination to determine the content to be received.

なお、本実施形態では、抽出されたヘッダーが尽きた場合に、ヘッダー生成部25にタイムアウト防止用のヘッダーを生成させ、検査中送信部27に送信させることとしているが、このような構成に代えて、検査中送信部27に、サーバーから受信されたデータ中のヘッダー以外の部分(例えば、コンテンツ中の、クライアント90に送信してよい部分)を少しずつ送信させる構成が採用されてもよい。   In the present embodiment, when the extracted header is exhausted, the header generation unit 25 generates a header for time-out prevention and transmits it to the transmission unit 27 during inspection. However, instead of such a configuration, Alternatively, a configuration may be adopted in which the transmitting unit 27 transmits a portion other than the header in the data received from the server (for example, a portion in the content that may be transmitted to the client 90) little by little.

ステップS205では、送信間隔の経過が待たれる。検査中送信部27は、予め設定された送信間隔の経過を待つ。上述の通り、送信間隔には、コンテンツを受信するクライアント90において、コンテンツに係るパケット受信の待ち時間がタイムアウトしない間隔が予め設定される。送信間隔が経過すると、処理はステップS201へ進み、ヘッダーの続きが一部送信される(ステップS201)。即ち、本実施形態に係るシステムによれば、検査中送信部27は、検査部26による検査が行われている間、宛先におけるデータの受信待ち時間がタイムアウトしない間隔で、データに含まれるヘッダーを一部ずつ当該データの宛先に送信する。   In step S205, the elapse of the transmission interval is awaited. During the examination, the transmission unit 27 waits for a preset transmission interval to elapse. As described above, in the transmission interval, in the client 90 that receives the content, an interval in which the waiting time for packet reception related to the content does not time out is set in advance. When the transmission interval has elapsed, the process proceeds to step S201, and a part of the continuation of the header is transmitted (step S201). That is, according to the system according to the present embodiment, the transmission unit 27 during inspection checks the headers included in the data at intervals at which the reception waiting time of the data at the destination does not time out while the inspection by the inspection unit 26 is performed. Send part of the data to the destination.

図8および図9は、本実施形態において、パケット処理およびヘッダー送信処理を実行した場合のパケットの流れを示す図である。本実施形態に係る情報処理装置、方法およびプログラムによれば、コンテンツ要求に応じてサーバーから送信されたデータを通信検査装置20が検査している間、データのうちコンテンツを確定させない部分(ヘッダー等)を分割してクライアント90に送信することで、コンテンツ検査中のタイムアウトを防止することが出来る。   FIG. 8 and FIG. 9 are diagrams showing flows of packets when packet processing and header transmission processing are performed in the present embodiment. According to the information processing apparatus, the method, and the program according to the present embodiment, while the communication inspection apparatus 20 inspects the data transmitted from the server in response to the content request, the portion (the header Can be divided and sent to the client 90 to prevent timeout during content inspection.

また、図9は、コンテンツのサイズがコンテンツバッファのサイズよりも大きいために、検査中にバッファされているデータがクライアントに転送される場合のパケットの流れが示されている。例えば、1のコネクションまたはクライアントに割り当てられるコンテンツバッファのサイズがパケット2つ分相当であった場合、分割されたコンテンツの3つ目が含まれるパケットをバッファする前に、先頭のコンテンツから順にクライアントへの転送およびコンテンツバッファからの削除が開始される。このコンテンツバッファからの転送・削除の処理は、先述の通りFIFO方式で行われる。   Also, FIG. 9 shows the flow of packets when the data buffered during inspection is transferred to the client because the size of the content is larger than the size of the content buffer. For example, when the size of the content buffer allocated to one connection or client is equivalent to two packets, the head content is sequentially distributed to the client before buffering the packet including the third of the divided content Transfer and removal from the content buffer are initiated. The processing of transfer / deletion from the content buffer is performed by the FIFO method as described above.

なお、受信待ち時間のタイムアウトを防止するための技術として、従来、空のパケットを一定時間毎に送信することで、TCP(Transmission Control Protocol)層等の下位層でのタイムアウトを防止する技術(例えば、TCPにおけるkeep-alive)が用いられることがあるが、これは、アプリケーション層でのタイムアウトを防止するものではなかった。本実施形態に示された情報処理装置、方法およびプログラムによれば、TCP層のような下位層におけるタイムアウトのみならず、アプリケーション層におけるタイムアウトも防止することが出来る。   As a technique for preventing timeout of reception waiting time, conventionally, a technique for preventing timeout in a lower layer such as a TCP (Transmission Control Protocol) layer by transmitting an empty packet at regular intervals (for example, Although, keep-alive in TCP may be used, this did not prevent timeout in the application layer. According to the information processing apparatus, method, and program described in the present embodiment, not only timeout in the lower layer such as the TCP layer but also timeout in the application layer can be prevented.

また、本実施形態に係る情報処理装置、方法およびプログラムによれば、クライアント90において受信待ち時間のタイムアウトを起こさせずに、コンテンツ全体の検査が終了するまでクライアント90にコンテンツを受信させないようにすることが出来る。更に、不適切なコンテンツが検出された場合には、専用のアプリケーション等を用いることなく、クライアント90のコンテンツ要求に対する応答データとして、ユーザーに通知することが出来る。   Further, according to the information processing apparatus, method, and program according to the present embodiment, the client 90 is prevented from receiving the content until the examination of the entire content is completed without causing the client 90 to time out the reception waiting time. I can do it. Furthermore, when inappropriate content is detected, the user can be notified as response data to the content request of the client 90 without using a dedicated application or the like.

なお、本実施形態では、本発明をHTTP1.1において用いる例について説明したが、本発明を適用可能なプロトコルは、本実施形態における開示に限定されない。例えば、本発明は、同一セッション内でリクエストに対して返信されるコンテンツを含むパケットの順序が制限されないようなプロトコル(例えば、HTTP2.0)にも適用することが可能である。   In the present embodiment, an example in which the present invention is used in HTTP 1.1 has been described, but a protocol to which the present invention can be applied is not limited to the disclosure in the present embodiment. For example, the present invention can be applied to a protocol (e.g., HTTP 2.0) in which the order of packets including content returned for a request in the same session is not limited.

1 システム
20 通信検査装置
90 クライアント
1 system 20 communication inspection device 90 client

Claims (9)

ネットワークを流れる、コンテンツを含むデータを、宛先に到達する前に取得するデータ取得手段と、
所定のサイズを有するバッファ領域に、取得された前記データをバッファするバッファ手段と、
前記バッファ手段によってバッファされたデータを、前記宛先で組み立てられることで得られるファイルの前方から後方への順に相当する順序で参照することで、前記コンテンツを検査する検査手段と、
前記バッファ手段によってバッファされたデータのうち、前記検査手段による参照が完了した部分を、前記コンテンツ全体の検査が終了する前に、前記宛先に転送する転送手段と、
前記バッファ領域において、前記データのうち新たに取得するパケットに含まれる部分をバッファするための空き領域が足りているか否かを判定する判定手段と、を備え
前記転送手段は、前記判定手段によって空き領域が足りていないと判定された場合に、前記バッファ手段によってバッファされたデータのうち、前記検査手段による参照が完了した部分を転送する、
情報処理装置。
Data acquisition means for acquiring data including content, which flows through the network, before reaching the destination;
Buffer means for buffering the acquired data in a buffer area having a predetermined size;
An inspection unit that inspects the content by referring to the data buffered by the buffer unit in the order corresponding to the order from front to back of the file obtained by being assembled at the destination;
Transfer means for transferring a part of the data buffered by the buffer means, to which the reference by the inspection means is completed, to the destination before the inspection of the entire content is completed;
Determining means for determining whether or not an empty area for buffering a portion included in a newly acquired packet of the data in the buffer area is sufficient ;
The transfer means transfers the portion of the data buffered by the buffer means, which has been referred to by the inspection means, when it is determined by the determination means that the free space is insufficient.
Information processing device.
前記バッファ手段は、前記データが複数のパケットに分割されて順次取得される場合、前記データのうち新たに取得したパケットに含まれる部分を、未転送のデータがバッファされている領域を除く領域にバッファする、
請求項1に記載の情報処理装置。
When the data is divided into a plurality of packets and sequentially acquired, the buffer means sets a portion included in the newly acquired packet of the data to an area excluding an area where untransferred data is buffered. Buffer,
An information processing apparatus according to claim 1.
前記検査手段は、前記バッファ領域の参照ポイントを示すポインターを、宛先で組み立てられることで得られるファイルの前方から後方への順に相当する順序で制御することで、バッファされたデータを前記順序で参照する、
請求項2に記載の情報処理装置。
The inspection means refers to the buffered data in the above order by controlling the pointer indicating the reference point of the buffer area in the order corresponding to the order from front to back of the file obtained by being assembled at the destination Do,
The information processing apparatus according to claim 2.
前記判定手段は、前記データのうち新たに取得するパケットに含まれる部分のサイズと、前記バッファ領域の空き領域のサイズとを比較することで、前記バッファ領域において空き領域が足りているか否かを判定する、
請求項1から3の何れか一項に記載の情報処理装置。
The determination means compares the size of the part included in the newly acquired packet of the data with the size of the free area of the buffer area to determine whether the free area is sufficient in the buffer area. judge,
The information processing apparatus according to any one of claims 1 to 3 .
前記検査手段は、前記データ取得手段による前記コンテンツ全体の取得が完了する前に、該コンテンツの検査を開始する、
請求項1から4の何れか一項に記載の情報処理装置。
The inspection unit starts inspection of the content before acquisition of the entire content by the data acquisition unit is completed.
The information processing apparatus according to any one of claims 1 to 4 .
前記検査手段は、該コンテンツが前記宛先への転送が許可されるコンテンツであるか否かを検査し、
前記転送手段は、前記検査手段による検査結果が、該コンテンツが前記宛先への転送が許可されるコンテンツであるという検査結果であった場合に、該コンテンツを含むデータのうち送信済みの部分を除く前記データを、前記宛先に転送する、
請求項1から5の何れか一項に記載の情報処理装置。
The inspection unit inspects whether the content is content permitted to be transferred to the destination.
When the inspection result by the inspection means is the inspection result that the content is the content permitted to be transferred to the destination, the transfer means excludes the transmitted portion of the data including the content Forwarding the data to the destination;
The information processing apparatus according to any one of claims 1 to 5 .
前記検査手段による検査結果が、該コンテンツが前記宛先への転送が許可されるコンテンツではないという検査結果であった場合に、前記転送手段による転送を中止する中止手段を更に備える、
請求項6に記載の情報処理装置。
The information processing apparatus further comprises abortion means for aborting the transfer by the transfer means when the check result by the check means is a check result that the content is not the content permitted to be transferred to the destination.
The information processing apparatus according to claim 6 .
コンピューターが、
ネットワークを流れる、コンテンツを含むデータを、宛先に到達する前に取得するデータ取得ステップと、
所定のサイズを有するバッファ領域に、取得された前記データをバッファするバッファステップと、
前記バッファステップでバッファされたデータを、前記宛先で組み立てられることで得られるファイルの前方から後方への順に相当する順序で参照することで、前記コンテンツを検査する検査ステップと、
前記バッファステップでバッファされたデータのうち、前記検査ステップにおける参照が完了した部分を、前記コンテンツ全体の検査が終了する前に、前記宛先に転送する転送ステップと、
前記バッファ領域において、前記データのうち新たに取得するパケットに含まれる部分をバッファするための空き領域が足りているか否かを判定する判定ステップと、を実行し、
前記転送ステップでは、前記判定ステップにおいて空き領域が足りていないと判定された場合に、前記バッファステップでバッファされたデータのうち、前記検査ステップにおける参照が完了した部分を転送する、
方法。
The computer is
A data acquisition step of acquiring data including content, which flows through the network, before reaching the destination;
Buffering the acquired data in a buffer area having a predetermined size;
Examining the content by referring to the data buffered in the buffer step in the order corresponding to the order from front to back of the file obtained by being assembled at the destination;
Transferring the portion of the data buffered in the buffer step, for which the reference in the inspection step is completed, to the destination before the inspection of the entire content is completed;
A determination step of determining whether or not an empty area for buffering a portion included in the newly acquired packet of the data is sufficient in the buffer area ;
In the transfer step, when it is determined in the determination step that the free space is not sufficient, a portion of the data buffered in the buffer step, for which the reference in the inspection step is completed, is transferred.
Method.
コンピューターを、
ネットワークを流れる、コンテンツを含むデータを、宛先に到達する前に取得するデータ取得手段と、
所定のサイズを有するバッファ領域に、取得された前記データをバッファするバッファ手段と、
前記バッファ手段によってバッファされたデータを、前記宛先で組み立てられることで得られるファイルの前方から後方への順に相当する順序で参照することで、前記コンテンツを検査する検査手段と、
前記バッファ手段によってバッファされたデータのうち、前記検査手段による参照が完了した部分を、前記コンテンツ全体の検査が終了する前に、前記宛先に転送する転送手段と、
前記バッファ領域において、前記データのうち新たに取得するパケットに含まれる部分をバッファするための空き領域が足りているか否かを判定する判定手段と、として機能させ
前記転送手段は、前記判定手段によって空き領域が足りていないと判定された場合に、前記バッファ手段によってバッファされたデータのうち、前記検査手段による参照が完了した部分を転送する、
プログラム。
Computer,
Data acquisition means for acquiring data including content, which flows through the network, before reaching the destination;
Buffer means for buffering the acquired data in a buffer area having a predetermined size;
An inspection unit that inspects the content by referring to the data buffered by the buffer unit in the order corresponding to the order from front to back of the file obtained by being assembled at the destination;
Transfer means for transferring a part of the data buffered by the buffer means, to which the reference by the inspection means is completed, to the destination before the inspection of the entire content is completed;
In the buffer area, it functions as a determination unit that determines whether a free area for buffering a portion included in a newly acquired packet of the data is sufficient ,
The transfer means transfers the portion of the data buffered by the buffer means, which has been referred to by the inspection means, when it is determined by the determination means that the free space is insufficient.
program.
JP2015195713A 2015-10-01 2015-10-01 INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM Active JP6529033B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015195713A JP6529033B2 (en) 2015-10-01 2015-10-01 INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015195713A JP6529033B2 (en) 2015-10-01 2015-10-01 INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2017069856A JP2017069856A (en) 2017-04-06
JP6529033B2 true JP6529033B2 (en) 2019-06-12

Family

ID=58495316

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015195713A Active JP6529033B2 (en) 2015-10-01 2015-10-01 INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP6529033B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050149720A1 (en) * 2004-01-07 2005-07-07 Shimon Gruper Method for speeding up the pass time of an executable through a checkpoint
JP4418302B2 (en) * 2004-05-31 2010-02-17 独立行政法人科学技術振興機構 Relay device, packet filtering method, and packet filtering program
EP3117363B1 (en) * 2014-03-11 2020-07-29 Vectra AI, Inc. Method and system for detecting bot behavior

Also Published As

Publication number Publication date
JP2017069856A (en) 2017-04-06

Similar Documents

Publication Publication Date Title
JP5280436B2 (en) Antivirus scanning of partially available content
US10645145B2 (en) Method and apparatus for accelerating data transmission in a network communication system
US8595327B2 (en) Obtaining instrumentation data
CN113364804B (en) Method and device for processing flow data
CN101877710A (en) Proxy gateway antivirus implementation method, pre-classifier and proxy gateway
US20230275924A1 (en) Network security protection method and protection device
JP6598188B2 (en) Information processing apparatus, method, and program
US8490173B2 (en) Unauthorized communication detection method
US10791135B2 (en) Inspection of network traffic in a security device at object level
US20200296189A1 (en) Packet analysis apparatus, packet analysis method, and storage medium
KR101375133B1 (en) Mobile sns intergrated gateway
CN108605039B (en) Detect malware on SPDY connections
US20120236705A1 (en) Management apparatus, communication system, and communication method
JP2007272628A (en) Information detection processing method and apparatus
JP6529033B2 (en) INFORMATION PROCESSING APPARATUS, METHOD, AND PROGRAM
JP5948111B2 (en) Packet communication apparatus and method
JP5925287B1 (en) Information processing apparatus, method, and program
US20160143082A1 (en) Method for detecting a message from a group of packets transmitted in a connection
JP5630070B2 (en) Relay device, program and method
CN106161339B (en) Obtain the method and device of IP access relations
WO2013180255A1 (en) Communication devices and method
WO2017005118A1 (en) Method, device, terminal and server for maintaining communication connection
CN111611584A (en) Malicious file detection method, device, storage medium and firewall
CN118093284B (en) A test method and device for airborne intelligent display
KR101230001B1 (en) Apparatus for detecting the servers of file sharing solution provider based on flow information analysis and method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180313

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190122

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190322

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190409

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190508

R150 Certificate of patent or registration of utility model

Ref document number: 6529033

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350