JP2009182574A - Method for analyzing setting of firewall - Google Patents

Method for analyzing setting of firewall Download PDF

Info

Publication number
JP2009182574A
JP2009182574A JP2008018839A JP2008018839A JP2009182574A JP 2009182574 A JP2009182574 A JP 2009182574A JP 2008018839 A JP2008018839 A JP 2008018839A JP 2008018839 A JP2008018839 A JP 2008018839A JP 2009182574 A JP2009182574 A JP 2009182574A
Authority
JP
Japan
Prior art keywords
filter
stateful
setting
firewall
stateless
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.)
Pending
Application number
JP2008018839A
Other languages
Japanese (ja)
Inventor
Naohisa Takahashi
直久 高橋
Yoshiaki Katayama
片山喜章
Kazuaki Hida
肥田和明
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.)
Nagoya Institute of Technology NUC
Original Assignee
Nagoya Institute of Technology NUC
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 Nagoya Institute of Technology NUC filed Critical Nagoya Institute of Technology NUC
Priority to JP2008018839A priority Critical patent/JP2009182574A/en
Publication of JP2009182574A publication Critical patent/JP2009182574A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a system analyzing the setting of a stateful firewall changing an operation by a communication status in the stateful fire wall controlling the communication status according to a state table or the like and determining the operation such as the passage and disuse of a packet according to the communication status at the time of the arrival of the packet. <P>SOLUTION: The system analyzing the setting of the stateful firewall uses a setting conversion function converting the setting of the stateful firewall changing the operation by the communication status into the selection of the stateful firewall consisting of only a filter changing no operation according to the communication status, by using the log of the communication status. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は,コンピュータネットワークのファイアウォール設定解析方式に関するものである. The present invention relates to a computer network firewall setting analysis method.

近年,ネットワークに配置されるホストやサーバの増加,ネットワークセキュリティに対する意識の高まりによって,ファイアウォールに設定するルール(以下フィルタ)数は増加している.また,サーバの追加や削除などのネットワーク構成を変更することにより,ファイアウォールの設定を実際のネットワークに合わせて変更する必要がある.このような状況においてファイアウォールの設定にフィルタを追加や削除などを行うには設定を詳細に把握した上で行う必要がある.
昨今では,実際の通信の状態を監視し,それをもとに通過や遮断を判断する機能を持つ
ステートフルファイアウォールが用いられることがある.ステートフルファイアウォールでは,通信の通過や遮断の判断にかかわるフィルタが通信の状態によって変わるという特徴があるため,より詳細なアクセス制御が可能となるが,それらの設定の把握は難しくなる.
また,ネットワークセキュリティを高めるために,ファイアウォールを多段に用いることがある.多段のファイアウォールでは,ネットワークの構成を考慮した上で,ファイアウォール設定を行う必要がある.
ファイアウォールの設定ミスにより,通過すべき通信を通過させていないというような状況が発生する場合が多くあることが報告されている.このような場合はネットワーク利用者にとって不便であり,また,本来通過させてはいけない通信を通過させる設定などのファイアウォールの設定の間違いは不正アクセスやコンピュータウィルスの発生の原因となる.それらの原因を探すためにファイアウォールの解析を行う際にはファイアウォールの設定をなるべく早く把握し,原因となっているフィルタを探し出す必要がある.
このような問題を解決する従来技術には以下のようなファイアウォール設定解析方式がある.
1.1又は複数のパケットヘッダ情報を指定されたときに,ステートレス設定を用いて,そのパケットヘッダ情報を持つパケットに対してアクションを施すステートレスフィルタを,ステートレス設定の中から検出するフィルタ逆引き機能がある(非特許文献1参照.).
「複数ネットワークアクセス検査装置を有するLANのためのフィルタ逆引きシステムの実現」,マルチメディア,分散,協調とモバイル(DICOMO 2006)シンポジウム,2006年,Vol.2006p.905-908,July 2006」 2.ステートレス設定を解析し,冗長,矛盾があるフィルタを自動で検出する方式がある(非特許文献2参照.). 「Inferring the Impact of Firewall Policy Changes by Analyzing Spatial Relations between Packet Filters」,Proc. of 2006 IEEE International Conference on Communication Technology,p.203-208,27-30 Nov 2006. これらの技術により,コンピュータネットワークのセキュリティを向上させることができる. ここでは,以降の説明で用いる用語,ステートレスファイアウォールとステートフルファイアウォールの動作の概要を示す.・用語 protocol,src,dst,sport,dportはそれぞれ次の意味を持つ. protocol:プロトコルを示す src:送信元アドレスを示す dst:送信先アドレスを示す sport:送信元アドレスを示す dport:送信先アドレスを示す action:動作を示す フィルタfのprotocolフィールドを指定するには,f.protocolのように”.”を用いて表す. ・ステートレスファイアウォール ここでは,ステートレスファイアウォールの例として,iptablesの動作の概要を示す.図1にステートレスファイアウォールのモデルを示す.ステートレスファイアウォールでは,ステートレス設定を用いてパケットの通過や廃棄を決定する.図2にステートレス設定の例を示す.ステートレス設定とはステートレスフィルタの集合である.ここでは,ステートレスフィルタとしてiptablesの次のような形式を用いる.ここで,-p,-s,-d,--sport,--dportの組をヘッダ条件と呼ぶ.また,-jのフィールドをフィルタのアクションと呼ぶ.fi:iptables -A FORWARD -p protocol -s src -d dst -sport sport -dport dport -j action fi:フィルタを識別するためのidである. -p:このフィルタが対象とするプロトコルを指定するフィールドである. tcpまたはudpを指定する.明示しない場合は任意のプロトコルを表す. -s:このフィルタが対象とする送信元アドレスを指定する.ここでは133.68.13.1 のようなIPアドレスの指定と,133.68.13.0/24のようなネットワークアドレス による指定を扱う.ネットワークアドレスを指定した場合は領域として扱い, 133.68.13.0/24の例では[133.68.13.0,133.68.13.255]が指定する領域になる. 明示しない場合は任意のアドレスを表す. -d:このフィルタが対象とする送信先アドレスを指定する.指定の方式は-sの フィールドと同様である. --sport:このフィルタが対象とする送信元ポート番号を指定する.ここでは,“80” のように単一のポートを指定する.明示しない場合は任意ポート番号を表す. --dport:このフィルタが対象とする送信先ポート番号を指定する.指定の方式は-s のフィールドと同様である. -j:このフィルタのヘッダ条件と照合に成功するパケットの処理を指定する. ACCEPTであればパケットはファイアウォールを通過するが,DROPであればパ ケットは廃棄される. このとき,キーk(protocol,src,dst,sport,dport)とフィルタfiが与えられたとき,次の条件を満たす場合にkはフィルタfiと照合に成功するという. fi.protocol=k.protocol ∧ fi.srcが領域の時min(fi.src) <= k.src <= max(fi.src), fi.srcがIPアドレスの時fi.src=k.src ∧ fi.dstが領域の時min(fi.dst) <= k.dst <= max(fi.dst), fi.dstがIPアドレスの時fi.dst=k.dst ∧ fi.sport = k.sport ∧ fi.dport = k.dport ここで,min(),max()はそれぞれ,領域の最小値と最大値を表す. ただし,fiのフィールドがフィルタで明示されていない場合は該当するフィールド の真偽はパケットのヘッダの値にかかわらず真となる. パケットがファイアウォールに到着した場合のステートレスファイアウォールの動作は次の通りである.STEP1.ファイアウォールはパケットのヘッダをキーとして,ステートレス設定f1〜fnと照合を行う.成功するフィルタfiをfmとする.パケットのヘッダを次のように定義する. パケットpのヘッダ:protocol src dst sport dport protocol:上位層のプロトコルを示す.ここでは,tcpまたはudpとする.STEP2.fmが空でなければ,fmに示されているアクションを元に通過や廃棄を決定する. fmが空ならば,どのフィルタとも照合に成功しなかった場合に行われるファイア ウォールのデフォルト動作を元に通過や廃棄が決定する. ・ ステートフルファイアウォール ここでは,ステートフルファイアウォールの例として,iptablesの動作の概要を示す.図3にステートフルファイアウォールのモデルを示す.ステートフルファイアウォールでは,ステートフル設定とステートテーブルを用いてパケットの通過や廃棄を決定する.また,図4にステートフル設定の例を示す. ステートフル設定とはステートフルフィルタの集合である.ここでは,ステートフルフィルタとしてiptablesの次のような形式を用いる.fi:iptables -A FORWARD-p protocol -s src -d dst -sport sport -dport dport -m state --state state -j action fi:フィルタを識別するためのidである. -p,-s,-d,--sport,--dport:ステートレスフィルタと同様である. --state:このフィルタが対象とする接続の状態を指定する.ここでは, ESTABLISHEDの指定を扱う.ESTABLISHEDの指定では,双方向のパケット を検出していることを指定することを示す. -j:ステートレスフィルタと同様である.図3のステートテーブルはパケットを監視するために用いるテーブルである.ステートテーブルはステートエントリの集合であり,ステートエントリは主に次の項目で構成される. ステートエントリ:protocol timeout src1 dst1 sport1 dport1 flag src2 dst2 sport2 dport2 timeout:このステートエントリがステートテーブルに存在できる時間を秒数で表 す.1秒ごとに減少していき,0になるとステートテーブルからこのステートエン トリが削除される. flag:UNREPLIEDでは,srcからdstの通信を検出した状態である.UNREPLIED フラグがセットされていなければ,双方向のパケットを検出済みである. パケットがステートフルファイアウォールに到着した場合の動作概要を次に示す.STEP1.パケットのヘッダをもとにステートテーブルの書き換えが行われる.パケットのヘッダのp.proto,p.src,p.dst,p.sport,p.dportとステートテーブルの各ステートエントリのprotocol,src1,dst1,sport1,dport1,をそれぞれ比較し,一致するステートエントリが存在する場合はそのエントリのtimeoutの値を増加させる.また,protocol,src2,dst2,sport2,dport2,とも比較し,一致するエントリが存在すればtimeoutの値を増加させ,UNREPLIEDフラグが設定されていればそれを取り除く.どれにも一致しなければ新しい通信の組として,ステートテーブルにステートエントリを次の形式で追加する.protocol=p.proto timeout=30 src1=p.src dst1=p.dst sport1=p.sport dport1=p.dport flag=UNREPLIED src2=p.dst dst2=p.src sport2=p.dport dport2=p.sport(ここでは,初期のタイムアウトとして30秒を例とする)STEP2. フィルタリストFmを空集合とする.STEP3.パケットのヘッダをキーとして,ステートフル設定の中のステートフルフィルタf1〜fnを順に調べ,ヘッダ条件の照合に成功するものをフィルタリストFmとする.STEP4. Fm が空集合であればSTEP7へ.そうでなければ,Fmの初めのフィルタfを取り出す.STEP5. fがステートレスフィルタであればfm=fとし,STEP6へ. fがステートフルフィルタであれば,パケットのヘッダのp.proto,p.src,p.dst, p.sport,p.dportとステートテーブルの各ステートエントリeのe.protocol1,e.src1, e.dst1,e.sport1,e.dport1,をそれぞれ比較し,一致するものがあり,そのエン トリにUNREPLIEDフラグがなければfm=fとして,STEP6へ. パケットのヘッダのp.proto,p.src,p.dst,p.sport,p.dportとステートテーブル の各ステートエントリeのe.protocol,e.src2,e.dst2,e.sport2,e.dport2をそれ ぞれ比較し一致するエントリがあればfm=fとしてSTEP6へ. ステートエントリに一致するものがない場合はSTEP4へ.STEP6.fmで指定されたフィルタのアクションを実行する.廃棄のときは,パケットのヘッダp.proto,p.src,p.dst,p.sport,p.dportとステートテーブルの各ステートエントリのe.protocol,e.src1,e.dst1,e.sport1,e.dport1,をそれぞれ比較し,一致するものがある場合はそのステートエントリを削除する.STEP7.ファイアウォールのデフォルト動作を元に通過や廃棄が決定する.
In recent years, the number of rules (hereinafter referred to as filters) set in firewalls has increased due to the increase in the number of hosts and servers placed on the network and the increased awareness of network security. In addition, it is necessary to change the firewall settings to match the actual network by changing the network configuration such as adding or deleting servers. In such a situation, it is necessary to understand the settings in detail in order to add or delete filters in the firewall settings.
Nowadays, stateful firewalls that have the function of monitoring the actual communication state and judging whether to pass or block based on it are sometimes used. A stateful firewall is characterized by the fact that the filter involved in determining whether to pass or block communication changes depending on the state of communication, so more detailed access control is possible, but it is difficult to understand their settings.
In order to increase network security, firewalls are sometimes used in multiple stages. In a multistage firewall, it is necessary to set the firewall in consideration of the network configuration.
It has been reported that there are many cases in which the communication that should be passed does not pass due to a misconfiguration of the firewall. In such cases, it is inconvenient for network users, and mistakes in firewall settings, such as settings that allow communications that should not be allowed to pass, can cause unauthorized access and computer viruses. When analyzing firewalls to find the cause, it is necessary to grasp the firewall settings as soon as possible and to find the cause filter.
There are the following firewall setting analysis methods in the prior art to solve such problems.
1. Filter reverse lookup function that detects a stateless filter that performs an action on a packet having the packet header information using the stateless setting when one or more pieces of packet header information are specified. (See Non-Patent Document 1).
“Realization of a reverse filter system for LAN with multiple network access inspection devices”, Multimedia, Distributed, Collaboration and Mobile (DICOMO 2006) Symposium, 2006, Vol. 905-908, July 2006 ” There is a method that analyzes stateless settings and automatically detects redundant and inconsistent filters (see Non-Patent Document 2). “Inferring the Impact of Firewall Policy Changes by Analyzing Spatial Relations between Packet Filters”, Proc. Of 2006 IEEE International Conference on Communication Technology, p.203-208, 27-30 Nov 2006. These technologies can improve the security of computer networks. This section gives an overview of the terminology and stateful firewall operations used in the following description.・ The terms protocol, src, dst, sport, and dport have the following meanings. protocol: Indicates the protocol src: Indicates the source address dst: Indicates the destination address sport: Indicates the source address dport: Indicates the destination address action: Indicates the action To specify the protocol field of the filter f, specify f It is expressed using “.” like .protocol.・ Stateless firewall Here, as an example of a stateless firewall, an overview of the operation of iptables is shown. Figure 1 shows the stateless firewall model. A stateless firewall uses stateless settings to determine whether packets should pass or be discarded. Figure 2 shows an example of stateless setting. A stateless configuration is a set of stateless filters. Here, the following iptables format is used as a stateless filter. Here, a set of -p, -s, -d, --sport, and --dport is called a header condition. The -j field is called the filter action. fi: iptables -A FORWARD -p protocol -s src -d dst -sport sport -dport dport -j action fi: id for identifying the filter. -p: This field specifies the target protocol for this filter. Specify tcp or udp. If not specified, it represents an arbitrary protocol. -s: Specifies the source address targeted by this filter. Here, IP address specification such as 133.68.13.1 and network address specification such as 133.68.13.0/24 are handled. When a network address is specified, it is treated as an area. In the example of 133.68.13.0/24, [133.68.13.0, 133.68.13.255] is the specified area. If not specified, it represents an arbitrary address. -d: Specifies the destination address for this filter. The specification method is the same as for the -s field. --sport: Specifies the source port number that this filter is intended for. Here, specify a single port such as “80”. If not specified, it represents an arbitrary port number. --dport: Specify the destination port number for this filter. The specification method is the same as for the -s field. -j: Specifies the processing of the packet that succeeds in matching with the header condition of this filter. If it is ACCEPT, the packet passes through the firewall, but if it is DROP, the packet is discarded. At this time, given the key k (protocol, src, dst, sport, dport) and the filter fi, k is said to succeed in matching with the filter fi if the following conditions are satisfied. fi.protocol = k.protocol 時 When fi.src is an area min (fi.src) <= k.src <= max (fi.src), when fi.src is an IP address fi.src = k.src ∧ When fi.dst is an area min (fi.dst) <= k.dst <= max (fi.dst), when fi.dst is an IP address fi.dst = k.dst ∧ fi.sport = k. sport ∧ fi.dport = k.dport where min () and max () represent the minimum and maximum values of the region, respectively. However, if the field of fi is not specified by the filter, the truth of the corresponding field is true regardless of the value of the packet header. The behavior of the stateless firewall when a packet arrives at the firewall is as follows. STEP1. The firewall checks the stateless settings f1 to fn using the packet header as a key. Let fm be a successful filter fi. The packet header is defined as follows. Packet p header: protocol src dst sport dport protocol: Indicates the upper layer protocol. Here, tcp or udp. STEP2. If fm is not empty, it decides to pass or discard based on the action shown in fm. If fm is empty, passing or discarding is determined based on the default action of the firewall that is performed when no filter is successfully matched.・ Stateful firewall Here, as an example of a stateful firewall, an overview of the operation of iptables is shown. Figure 3 shows the stateful firewall model. A stateful firewall uses a stateful setting and a state table to decide whether to pass or discard a packet. Figure 4 shows an example of stateful settings. A stateful setting is a set of stateful filters. Here, the following iptables format is used as a stateful filter. fi: iptables -A FORWARD-p protocol -s src -d dst -sport sport -dport dport -m state --state state -j action fi: id for identifying the filter. -p, -s, -d, --sport, --dport: Same as stateless filter. --state: Specifies the state of the connection targeted by this filter. Here, ESTABLISHED specification is handled. Specifying ESTABLISHED indicates that bidirectional packets are being detected. -j: Same as stateless filter. The state table in FIG. 3 is a table used for monitoring packets. The state table is a set of state entries, and the state entries mainly consist of the following items. State entry: protocol timeout src1 dst1 sport1 dport1 flag src2 dst2 sport2 dport2 timeout: Indicates the time in seconds that this state entry can exist in the state table. It decreases every second, and when it reaches 0, this state entry is deleted from the state table. In flag: UNREPLIED, communication from src to dst is detected. If the UNREPLIED flag is not set, a bidirectional packet has been detected. The outline of operation when a packet arrives at the stateful firewall is as follows. STEP1. The state table is rewritten based on the packet header. The packet header p.proto, p.src, p.dst, p.sport, p.dport and the state entry protocol, src1, dst1, sport1, dport1 of the state table are compared, and the matching state entries If exists, increase the timeout value of the entry. Also, compare protocol, src2, dst2, sport2, and dport2, and if there is a matching entry, increase the value of timeout, and if the UNREPLIED flag is set, remove it. If none of them match, a state entry is added to the state table as a new communication pair in the following format. protocol = p.proto timeout = 30 src1 = p.src dst1 = p.dst sport1 = p.sport dport1 = p.dport flag = UNREPLIED src2 = p.dst dst2 = p.src sport2 = p.dport dport2 = p. sport (in this example, 30 seconds as the initial timeout) STEP 2. Filter list Fm is an empty set. STEP 3. Using the packet header as a key, check the stateful filters f1 to fn in the stateful settings in order, and the filter list Fm is the one that succeeds in matching the header conditions. STEP 4. If Fm is an empty set, go to STEP 7. Otherwise, the first filter f of Fm is taken out. STEP 5. If f is a stateless filter, set fm = f and go to STEP 6. If f is a stateful filter, p.proto, p.src, p.dst, p.sport, p.dport in the packet header and e.protocol1, e.src1, e. of each state entry e in the state table If dst1, e.sport1, e.dport1 are compared, and there is a match, if there is no UNREPLIED flag in that entry, set fm = f and go to STEP6. E.protocol, e.src2, e.dst2, e.sport2, e. Of p.proto, p.src, p.dst, p.sport, p.dport of packet header and state entry e of state table Compare dport2 and if there is a matching entry, set fm = f and go to STEP6. If there is no match in the state entry, go to STEP4. STEP6. Executes the filter action specified by fm. When discarding, packet headers p.proto, p.src, p.dst, p.sport, p.dport and e.protocol, e.src1, e.dst1, e.sport1 of each state entry in the state table , E.dport1 are compared, and if there is a match, the state entry is deleted. STEP7. Pass or discard is determined based on the default behavior of the firewall.

従来のコンピュータネットワークのファイアウォール設定解析方式には,以下の問題がある.
1.ステートフルファイアウォールでは,通信の状況を保持するステートテーブルとステートフル設定によって,パケットの通過や廃棄を判断する.したがって,ステートフル設定を見ただけでは過去のあるホスト宛のパケットがどのフィルタによって通過や廃棄が決定されたのかがわからない.ステートテーブルのログを人手により解析し,通信の状態を把握することによりステートフル設定の中からパケットの通過や廃棄に影響を与えたフィルタを見つけるのは容易ではない.
2.非特許文献1の方式は,ステートレス設定が対象であり,ステートフル設定に対してそれらを直接適用することが不可能である.このためステートフル設定の確認を行うには,ファイアウォールの設定をそれぞれ見る必要がある.つまり,ネットワーク管理者が注目したいホスト(IPアドレス)やポート番号に限定して設定を解析することができないため,ある特定のホストを宛先とするパケットに対するフィルタなどというように.条件を絞って確認することができない.これらはネットワークトラブル時にステートフル設定の確認や修正を行う負担も増加させる.
3.ステートレス設定が対象であり,ステートフル設定における冗長フィルタを検出することができない(非特許文献2).
4. 非特許文献1で示されている実効フィルタ検出の方式は,ステートレス設定を対象としており,ステートフルファイアウォールが多段に設置されたネットワークにおいて,ネットワーク内のどのファイアウォールのどのフィルタによって特定のヘッダ情報を持つパケットの通過や廃棄が判断されたのかを即座に把握することができない.
5.ステートフルファイアウォールが多段に設置されているネットワークにおいて,特定のパケットが,あるファイアウォールにおいては通過するようになっているが,他のファイアウォールでは廃棄するような矛盾を検出することができない.
The conventional computer network firewall analysis method has the following problems.
1. In a stateful firewall, packet passage and discard are judged by a state table that holds the communication status and stateful settings. Therefore, only by looking at the stateful setting, it is not possible to determine which filter was used to determine whether a packet addressed to a host in the past was passed or discarded. It is not easy to find a filter that affects packet passing and discarding from among stateful settings by manually analyzing the state table log and grasping the state of communication.
2. The method of Non-Patent Document 1 is intended for stateless settings, and it is impossible to apply them directly to stateful settings. For this reason, to check the stateful settings, you need to look at each firewall setting. In other words, because the settings cannot be analyzed only for the host (IP address) or port number that the network administrator wants to pay attention to, a filter for packets destined for a specific host, etc. It is not possible to confirm by narrowing down the conditions. These also increase the burden of checking and correcting stateful settings in case of network problems.
3. Stateless setting is the target, and redundant filters in the stateful setting cannot be detected (Non-patent Document 2).
4). The effective filter detection method shown in Non-Patent Document 1 is intended for stateless setting, and in a network in which stateful firewalls are installed in multiple stages, a packet having specific header information by which filter of which firewall in the network It is not possible to immediately know whether the passage or disposal of the product has been determined.
5. In a network in which stateful firewalls are installed in multiple stages, specific packets pass through one firewall, but other firewalls cannot detect inconsistencies that are discarded.

第1の発明のファイアウォール設定解析方式は,状態テーブルなどにより通信状況を管理し,パケット到着時の通信状況に従ってパケットの通過や廃棄などの動作を決定するステートフルファイアウォールにおいて,通信状況により動作を変化させるフィルタ(ステートフルフィルタと呼ぶ)を含むステートフルファイアウォールの設定(ステートフル設定と呼ぶ)を,時刻tの通信状況を用いて,動作が通信状況に依存しないフィルタ(ステートレスフィルタと呼ぶ)だけからなるステートレスファイアウォールの設定(時刻tのステートレス設定と呼ぶ)に変換する設定変換機能を有することを特徴とする.
第2の発明のファイアウォール設定解析方式は,状態テーブルなどにより通信状況を管理し,パケット到着時の通信状況に従ってパケットの通過や廃棄などの動作を決定するステートフルファイアウォールにおいて,通信状況により動作を変化させるフィルタ(ステートフルフィルタと呼ぶ)を含むステートフルファイアウォールの設定(ステートフル設定と呼ぶ)を,時刻tの通信状況を用いて,動作が通信状況に依存しないフィルタ(ステートレスフィルタと呼ぶ)だけからなるステートレスファイアウォールの設定(時刻tのステートレス設定と呼ぶ)に変換する設定変換機能,及び,1又は複数のパケットヘッダ情報と時刻tを指定されたときに,時刻tのステートレス設定を用いて,そのパケットヘッダ情報を持つパケットに対してアクションを施すステートフルフィルタを,ステートフル設定の中から検出するフィルタ逆引き機能を有することを特徴とする.
第3の発明のファイアウォール設定解析方式は,状態テーブルなどにより通信状況を管理し,パケット到着時の通信状況に従ってパケットの通過や廃棄などの動作を決定するステートフルファイアウォールにおいて,通信状況により動作を変化させるフィルタ(ステートフルフィルタと呼ぶ)を含むステートフルファイアウォールの設定(ステートフル設定と呼ぶ)を,時刻tの通信状況を用いて,動作が通信状況に依存しないフィルタ(ステートレスフィルタと呼ぶ)だけからなるステートレスファイアウォールの設定(時刻tのステートレス設定と呼ぶ)に変換する設定変換機能,及び,時刻tのステートレス設定において,どのようなパケットが到着しても決してアクションを施すことのないフィルタを検出する冗長フィルタ検出機能を有することを特徴とする.
第4の発明のファイアウォール設定解析方式は,状態テーブルなどにより通信状況を管理し,パケット到着時の通信状況に従ってパケットの通過や廃棄などの動作を決定するステートフルファイアウォールにおいて,通信状況により動作を変化させるフィルタ(ステートフルフィルタと呼ぶ)を含むステートフルファイアウォールの設定(ステートフル設定と呼ぶ)を,時刻tの通信状況を用いて,動作が通信状況に依存しないフィルタ(ステートレスフィルタと呼ぶ)だけからなるステートレスファイアウォールの設定(時刻tのステートレス設定と呼ぶ)に変換する設定変換機能,及び,複数のファイアウォールが多段に接続されたネットワークにおいて,1又は複数のパケットヘッダ情報と時刻tを指定されたときに,各ファイアウォールの時刻tのステートレス設定を用いて,そのパケットヘッダ情報を持つパケットに対して実際にアクションを施すステートフルフィルタ(実効フィルタと呼ぶ)を検出する実効フィルタ検出機能を有することを特徴とする.
The firewall setting analysis method according to the first aspect of the present invention changes the operation according to the communication status in the stateful firewall that manages the communication status by a state table or the like and determines the operation such as packet passing or discarding according to the communication status when the packet arrives. A stateless firewall setting (called a stateful filter) that includes a filter (called a stateful filter) is called a stateless firewall that uses only the communication status at time t, and whose operation does not depend on the communication status (called a stateless filter). It is characterized by having a setting conversion function for converting into settings (referred to as stateless settings at time t).
The firewall setting analysis method according to the second aspect of the present invention changes the operation according to the communication status in the stateful firewall that manages the communication status by a state table or the like and determines the operation such as packet passing or discarding according to the communication status when the packet arrives. A stateless firewall setting (called a stateful filter) that includes a filter (called a stateful filter) is called a stateless firewall that uses only the communication status at time t, and whose operation does not depend on the communication status (called a stateless filter). When a setting conversion function for converting to a setting (referred to as stateless setting at time t) and one or more packet header information and time t are specified, the packet header information is converted using the stateless setting at time t. For packets Stateful filters for performing actions, and having a filter reverse function of detecting from the stateful configuration.
The firewall setting analysis method according to the third aspect of the present invention changes the operation depending on the communication status in the stateful firewall that manages the communication status by a state table and determines the operation such as packet passing or discarding according to the communication status at the time of packet arrival. A stateless firewall setting (called a stateful filter) that includes a filter (called a stateful filter) is called a stateless firewall that uses only the communication status at time t, and whose operation does not depend on the communication status (called a stateless filter). A setting conversion function that converts to a setting (referred to as a stateless setting at time t), and a redundant filter detection function that detects a filter that never takes an action no matter what packets arrive in the stateless setting at time t Characterized in that it has.
The firewall setting analysis method according to the fourth aspect of the present invention changes the operation according to the communication status in the stateful firewall that manages the communication status by a state table or the like and determines the operation such as packet passing or discarding according to the communication status when the packet arrives. A stateless firewall setting (called a stateful filter) that includes a filter (called a stateful filter) is called a stateless firewall that uses only the communication status at time t, and whose operation does not depend on the communication status (called a stateless filter). In a setting conversion function for converting to a setting (referred to as stateless setting at time t) and a network in which a plurality of firewalls are connected in multiple stages, when one or more packet header information and time t are specified, each firewall Wo Using stateless setting Le of time t, characterized in that it has an effective filtering Detection function stateful filter (referred to as an effective filter) for performing actual actions on packets with the packet header information.

本発明のコンピュータネットワークのファイアウォール設定解析方式は,コンピュータネットワークの利用時に生じる異常の原因究明を容易にする方式である.また,ファイアウォールの設定誤りを容易にし,セキュリティを向上させる方式である.
・ 異常の原因究明を容易にする
異常が起きた場合に、その異常が起こっているホストやサーバのIPアドレスなどを元に
調べるべきフィルタを絞り込むことが可能となる.
2.ファイアウォールの設定誤りを少なくする
ネットワーク内に存在するファイアウォールにおいて、同一のヘッダ情報を持つパケットに対して、通過と廃棄が指定されているなどを検出することが容易になる.
The computer network firewall setting analysis method of the present invention is a method that facilitates investigation of the cause of anomalies that occur when a computer network is used. In addition, it is a method that facilitates setting errors of the firewall and improves security.
-When an abnormality occurs that makes it easy to investigate the cause of the abnormality, it is possible to narrow down the filter to be examined based on the IP address of the host or server where the abnormality occurs.
2. It is easy to detect passing and discarding of packets with the same header information in a firewall that exists in a network that reduces firewall setting errors.

第1の発明の実施例を図5に示す.設定変換機能では,ステートフル設定,ステートテーブルログ,時刻tを入力として受付け,時刻tにおけるステートレス設定とステートフル設定の中のどのフィルタがステートレスフィルタに変換されたかを記録する変換表を出力する.
ここで,時刻tの任意のパケットに対する,変換前のステートフル設定とステートテーブルログを用いたステートフルファイアウォールの通過や廃棄の判断と,変換後のステートレス設定を用いたステートレスファイアウォールの同じパケットに対する通過や遮断の判断が同じになるように変換する.このモデルを図6に示す.図6上部のステートフルFWでは,時刻tのステートテーブルの内容を S(t),また,時刻tに到達したパケットを P(t)と表す.ここでステートフルFW設定はネットワーク管理者が書き換えない限り不変であるためSFC(Stateful Firewall Configuration)と表す.
ここで,パケット P(t)の通過・遮断の判断の結果R_1(t)とそれの判断の元となったフィルタf1はSFC,S(t),P(t)により決定される.次に,図6下部のステートレスFWではパケットの通過・遮断の判断はSLC(Stateless Firewall Configuration)を用いて行われるため,結果R_2(t)と判断の元となったフィルタf2はSLC(t),P(t)により決定される.したがって,R_1(t)=R_2(t)となるように,SFC,S(t)からSLC(t)を定める.また, f1と f2の対を表すデータとして記録しておくことで,SLC(t)の解析を行った結果をもとにSFCの時刻tの解析結果を得ることが可能となる.

設定変換機能の説明を次に示す.図5の入力例として,図4に示したiptablesを用いたステートフル設定の例,図7にステートテーブルログの例を用いる.また,時刻tとして2007/01/10 10:11:00を入力したものとする.
ここで,ステートテーブルのログのエントリは次の通りである.
ステートテーブルのログエントリ:id timestamp operation protocol src1 dst1 sport1 dport1 flag src2 dst2 sport2 dport2
id:ログを識別するidであり,ログのエントリが記録された順番に付けられる.
timestamp:このエントリが記録された時間を示す.
operation:ログが記録された際に行われた動作を示す.ADD,CHANGE,DELETE
があり,それぞれ次の通りである.
ADD:ステートテーブルにエントリが追加された場合である.
CHANGE:エントリのフラグに変化が起きた場合である.
DELETE:ステートテーブルからエントリが削除された場合である.
flag:UNREPLIEDでは,src1からdst1の通信を検出した状態である.
UNREPLIEDフラグがセットされていなければ,双方向のパケットを検出済みで
ある.
設定変換機能の全体の動作概要を述べる.
STEP1.フィルタ判別機能によってステートレスフィルタとステートフルフィルタを分け,ステートレスフィルタはそのまま設定変換機能の出力とし,ステートフルフィルタはフィルタ検索機能に渡す.
STEP2.ステートテーブル復元機能が,時刻tにおけるステートテーブルの内容をステートテーブルのログから復元する.
STEP3.フィルタ条件候補出力機能が,時刻tにおけるステートテーブルの内容からフィルタ条件候補集合を求め,出力する.
STEP4.フィルタ検索機能が,フィルタ条件候補集合のそれぞれについて,ステートフルフィルタのパケットヘッダ条件との照合を行い,照合に成功した組についてフィルタ候補集合として出力する.
STEP5.ステートレスフィルタ出力機能が,フィルタ候補集合を用いてステートレスフィルタを出力する.

各機能の詳細な説明を次に述べる.
フィルタ判別機能は入力されたステートフル設定のなかのステートフルフィルタとステートレスフィルタを分ける機能であり,ステートフル設定中のステートレスフィルタはそのまま設定変換機能の出力とする.ステートフルフィルタについては条件部を判別するため,条件部検索機能に渡す.動作手順を次に示す.
STEP1−1.ステートフルフィルタf1〜fnのfi(i=1〜n)に対して次の動作を行う.
STEP1−2.fiに-stateフィールドがなければ,それを設定変換機能の出力とする.
fiに-stateフィールドがあれば,それを条件部検索機能に渡す.
動作例として,図4に示すステートフル設定では,フィルタf1がステートフルフィルタの形式に当てはまるため,フィルタf1を条件部検索機能に渡す.f2,f3,f4,f5,f6はステートレスフィルタの形式であるため,そのまま出力する.

次に,ステートテーブル復元機能が,指定された時刻tにおけるステートテーブルの内容をステートテーブルのログから復元する.復元する動作手順は次の通りである.
STEP2−1.ステートテーブルのログの中の時刻t以前のすべてのエントリを取得し,それらのリストをL1とする.
STEP2−2.L1において,各エントリのoperationフィールドがDELETEであるすべてのエントリのリストをL2とする.
STEP2−3.L2の各エントリei(i=1〜n)に対して次の動作を行う.
STEP2−4.L1の各エントリej(j=1〜m)において次の条件を満たすエントリejをL1から削除する.
ei.timestamp >= ej.timestamp
∧ ei.src1=ej.src1 ∧ ei.dst1=ej.dst1∧ ei.sport1=ej.sport1∧ ei.dport1=ej.dport1
∧ ei.src2=ej.src2 ∧ ei.dst2=ej.dst2∧ ei.sport2=ej.sport2∧ ei.dport2=ej.dport2
ただし,ei.timestamp > =ej.timestampはeiのタイムスタンプがejのタイムスタンプと同時かそれよりも後かを表す.
STEP2−5.L1において,オペレーションを示すフィールドがCHANGEであるすべてのエントリをリストL3とする.
STEP2−6.L3の各エントリek(k=1〜m)に対して次の動作を行う.
STEP2−7.L1の各エントリej(j=1〜m)において次の条件を満たすエントリejをL1から削除する.
ek.timestamp >= ej.timestamp
∧ ek.src1=ej.src1 ∧ ek.dst1=ej.dst1∧ ek.sport1=ej.sport1∧ ek.dport1=ej.dport1
∧ ek.src2=ej.src2 ∧ ek.dst2=ej.dst2∧ ek.sport2=ej.sport2∧ ek.dport2=ej.dport2
ただし,ek.timestamp >= ej.timestampはeiのタイムスタンプがejのタイムスタンプと同時かそれよりも後かを表す.
STEP2−8.L1の各エントリeからtimestamp,operationのフィールドを取り除く.
これによって,L1に時刻tのステートテーブルの内容S(t)が復元できる.

動作例を次に示す.ここでは入力として,図7に示したステートテーブルのログを用いる.手順を次に示し,結果を図8に示す.
STEP2−1. 各エントリのタイムスタンプが2007/01/10 10:11:00以前のものをL1とする.
L1={e1,e2,e3,e4,e5,e6,e7,e8,e9}
STEP2−2.L1において,operationフィールドがDELETEであるすべてのエントリをL2とする.
L2={e3,e6}
STEP2−3.L2の各エントリe3,e6に対して次の動作を行う.
STEP2−4(e3).L1の各エントリej(j=1〜m)において次の条件を満たすエントリejをL1から削除する.
e3.timestamp >= ej.timestamp
∧ e3.src1=ej.src1 ∧ e3.dst1=ej.dst1∧ e3.sport1=ej.sport1∧ e3.dport1=ej.dport1
∧ e3.src2=ej.src2 ∧ e3.dst2=ej.dst2∧ e3.sport2=ej.sport2∧ e3.dport2=ej.dport2
この条件にe1,e2,e3が該当し,それらをL1から削除する.
L1={ e4,e5,e6,e7,e8,e9}
STEP2−4(e6).L1の各エントリej(j=1〜m)において次の条件を満たすエントリejをL1から削除する.
e6.timestamp >= ej.timestamp
∧ e6.src1=ej.src1 ∧ e6.dst1=ej.dst1∧ e6.sport1=ej.sport1∧ e6.dport1=ej.dport1
∧ e6.src2=ej.src2 ∧ e6.dst2=ej.dst2∧ e6.sport2=ej.sport2∧ e6.dport2=ej.dport2
この条件にe4,e5,e6が該当し,それらをL1から削除する.
L1={ e7,e8,e9}
STEP2−5.L1において,オペレーションを示すフィールドがCHANGEであるすべてのエントリをリストL3とする.
L3={e9}
STEP2−6.L3のe9に対して次の動作を行う.
STEP2−7.L1の各エントリej(j=1〜m)において次の条件を満たすエントリejをL1から削除する.
e9.timestamp >= ej.timestamp
∧ e9.src1=ej.src1 ∧ e9.dst1=ej.dst1 ∧ e9.sport1=ej.sport1 ∧ e9.dport1=ej.dport1
∧ e9.src2=ej.src2 ∧ e9.dst2=ej.dst2 ∧ e9.sport2=ej.sport2 ∧ e9.dport2=ej.dport2
ここでは,e7が該当し,それらをL1から削除する.
L1={ e8,e9}
STEP2−8.L1の各エントリeからtimestamp,operationのフィールドを取り除く.

フィルタ条件候補出力機能では,時刻tのステートテーブルの内容を元に,フィルタ条件候補集合を出力する.フィルタ条件候補cは次の通りである.
フィルタ条件候補c:id protocol src dst sport dport flag
id:フィルタ条件候補を識別するidである.
flag:UNREPLIEDでは,srcからdstの通信を検出した状態である.UNREPLIED
フラグがセットされていなければ,双方向のパケットを検出済みである.
動作手順を次に示す.
STEP3−1.時刻tのステートテーブルの内容の各エントリeについて次の動作を行う.
STEP3−2.e.protocol,e.src1,e.dst1,e.sport1,e.dport1,e.flagの組に対してid
を”e.id”+”-f”としてフィルタ条件候補c1を出力する.
e.protocol,e.src2,e.dst2,e.sport2,e.dport2の組に対してidを”e.id”+”-b”と
してフィルタ条件候補c2を出力する.


図8のステートテーブルの内容についての動作例を次に示し,その結果を図9に示す.
STEP3−1.e8,e9に対してそれぞれ次の動作を行う.
STEP3−2(e8).e8.protocol,e8.src1,e8.dst1,e8.sport1,e8.dport1,e8.flagの組に対
してe8-fをつけてフィルタ条件候補c1を出力する.
c1=(e8-f tcp src=133.68.13.41 dst=133.68.21.4 sport=2210 dport=8080
UNREPLIED)
e8のprotocol,src2,dst2,sport2,dport2の組に対してidをつけてフィルタ条件候補を出力する.
c2=(e8-b:tcp src=133.68.21.4 dst=133.68.13.41 sport=8080 dport=2210)
STEP3−2 (e9).e9.protocol,e9.src1,e9.dst1,e9.sport1,e9.dport1,e9.flagの組に
対してidをつけてフィルタ条件候補を出力する.
c1=(e9-f: tcp src=133.68.13.32 dst=133.68.13.41 sport=1474 dport=3389)
e9のprotocol,src2,dst2,sport2,dport2の組に対してidをつけてフィルタ条
件候補を出力する.
c2=(e9-b:tcp src=133.68.13.41 dst =133.68.13.32 sport=3389 dport=1474)

フィルタ検索機能では,フィルタ条件候補集合とステートフルフィルタで指定されている条件を照合し,照合に成功するペアをステートレスフィルタ出力機能に渡す.動作手順は次の通りである.
STEP4−1.フィルタ候補集合FCを空集合とする.
STEP4−2.フィルタ条件候補集合のそれぞれをcとしてSTEP4−3を行う.
STEP4−3.フィルタ条件候補cのc.protocol,c.src,c.dst,c.sport,c.dportをキーと
して,ステートフルフィルタ集合の各フィルタとの照合を行い,照合
に成功する場合はそのフィルタとフィルタ条件候補の組をフィルタ候補集合FC
に加え,STEP4−3.を抜ける.
STEP4−4.フィルタ候補集合FCをステートレスフィルタ出力機能に渡す.

動作例を次に示す.入力は図4のf1と図9に示すフィルタ候補集合とする.
STEP4−1.フィルタ候補集合FCを空集合とする.
FC={}
STEP4−2.e8-f,e8-b,e9-f,e9-bに対して次を行う.
STEP4−3a.フィルタ条件候補e8-fとステートフルフィルタ集合の各フィルタとの照合
* = tcp ∧ *=133.68.13.41 ∧ *= 133.68.21.4 ∧*=2210 ∧*=8080
各要素がフィルタで明示されていないため,それぞれが真となり,照合に成功する.
したがって,次の組をFCに加える.
{f1,e8-f}
STEP4−3b.フィルタ条件候補e8-bとステートフルフィルタ集合の各フィルタとの照合
* = tcp ∧*= 133.68.21.4 ∧*=133.68.13.41 ∧ *=8080 ∧ *=2210
各要素がフィルタで明示されていないため,それぞれが真となり,照合に成功する.
したがって,次の組をFCに加える.
{f1,e8-b}
STEP4−3c.経過は省略するが,e9-f はf1との照合に成功し,次の組をFCに加える.
{f1,e9-f}
STEP4−3d.経過は省略するが,e9-b はf1との照合に成功し,次の組をFCに加える.
{f1,e9-b}
STEP4−4.フィルタ候補集合FCをステートレスフィルタ出力機能に渡す.
FC={{f1,e8-f},{f1,e8-b},{f1,e9-f},{f1,e9-b}}

ステートレスフィルタ出力機能では,フィルタ候補集合を元に,ステートレスフィルタを生成する.また,ステートレスフィルタ出力機能では,変換に使用したステートフルフィルタとステートエントリ,出力したステートレスフィルタの変換表を出力する.動作手順を次に示す.
STEP5−1.フィルタ候補集合の各要素cについて次の動作を行う.
STEP5−2.cのフィルタをf, cのフィルタ候補条件をccとする.
ccにUNREPLIEDフラグがなければ,次のフィルタを生成gする.
g.protocol=cc.protocol,g.src=cc.src,g.dst=cc.dst,g.sport=cc.sport,g.dport=cc.dport,g.action=f.action
また,ステートフルフィルタidのfiを元に新しいフィルタidを生成し,新しいフィルタid,変換に使用したステートエントリid,ステートフルフィルタidの組を変換表に加える.

動作例を次に示す.入力としては,FC={{f1,e8-f},{f1,e8-b},{f1,e9-f},{f1,e9-b}}が与えられたものとする.

STEP5−1.FC={{f1,e8-f},{f1,e8-b},{f1,e9-f},{f1,e9-b}}に対してそれぞれ次の動作を
行う.
STEP5−2{f1,e8-f}.f=f1,cc=e8-f.UNREPLIEDフラグが存在するため,フィルタを生
成しない.
STEP5−2{f1,e8-b} .f=f1,cc=e8-b.e8-bではUNREPLIEDがないため,次のフィル
タを出力する.
g.protocol =tcp,g.src=133.68.21.4,g.dst=133.68.13.41,g.sport=8080,
g.dport=2210,g.action)=ACCEPT
f1-1:iptables -A FORWARD -p tcp -s 133.68.21.4 --sport 8080 -d 133.68.13.41
--dport 2210 -j ACCEPT
また,変換表にf1-1とe8,f1のエントリを追加する.
STEP5−2{f1,e9-f} .e9-fではUNREPLIEDがないため,次のフィルタを出力する.
g.protocol =tcp,g.src =133.68.13.32,g.dst=133.68.13.41,g.sport=1474,
g.dport=3389,g.action=ACCEPT
f1-2:iptables -A FORWARD -p tcp -s 133.68.13.32 --sport 1474 -d 133.68.13.41 --dport 3389 -j ACCEPT
また,変換表にf1-2とe9,f1のエントリを追加する.
STEP5−2{f1,e9-b} .e9-bではUNREPLIEDがないため,次のフィルタを出力する.
f1-3:iptables -A FORWARD -p tcp -s 133.68.13.41 -sport 3389 -d 133.68.13.32 --dport 1474 -j ACCEPT
また,変換表にf1-3とe9,f1のエントリを追加する.
この機能の出力は図10のf1-1,f1-2,f1-3となり,変換されずに出力されるフィルタf2,f3,f4,f5,f6と合わせて設定変換機能の出力となる.図11に変換表を示す.

第2の発明の実施例を図12に示す.ステートフル逆引き機能の動作手順を次に示す.
STEP1.ステートフル設定,状態テーブルのログ,時刻tを用いて,ステートレス設定と変換表を得る.
STEP2.ステートレス逆引き機能によって,指定されたパケットヘッダ情報に一致するステートレスフィルタの集合(ステートレス逆引き結果と呼ぶ)を出力する.
STEP3.逆変換機能がステートレス逆引き結果の中のidを検索し,ステートフル設定から変換されたステートレス設定をステートフルなものに逆変換し,時刻tにおけるステートフル逆引き結果を出力する.

動作例を次に示す.ここでは,各入力は次の通りとする.
時刻t:2007/01/10 10:11:00
ステートフル設定:図4に示すステートフル設定
状態テーブルのログ:図7に示した状態テーブルのログ
パケットヘッダ情報:プロトコル:tcp,送信元IPアドレス:指定しない
宛先IPアドレス:133.68.13.41,送信元ポート番号:指定しない,
宛先ポート番号:3389
STEP1.ステートフル設定,状態テーブルのログ,時刻tを用いて,ステートレス設定と変換表を得る.実施例1で示した入力と同じであるので,図10に示すステートレス設定と図11に示す変換表を得る.
STEP2.ステートレス逆引き機能が,ステートレス設定から,入力したパケットヘッダ情報にかかわるフィルタ集合を出力する.この機能の詳細は非特許文献1を参照されたい.
ステートレス逆引き結果を図13に示す.
STEP3.逆変換機能がステートレス逆引き結果の中のidを検索し,ステートフル設定から変換されたステートレス設定をステートフルなものに逆変換し,時刻tにおけるステートフル逆引き結果を出力する.ここでは,f1-2が変換表の変換後idに存在する.そのエントリの変換前idのf1を取得し,f1-2をf1で置き換える.この結果を図14に示す.

第3の発明の実施例を図15に示す.時刻tにおける冗長フィルタを検出する動作手順を次に示す.
STEP1.設定変換機能が,時刻tにおけるステートレス設定に変換する.
STEP2.ステートレス設定の冗長フィルタを検出するシステムが変換の結果であるステートレス設定の冗長フィルタを検出する.この結果が,時刻tにおける冗長フィルタである.

ここで,入力として図16に示すステートフル設定と図7に示すステートテーブルのログを用いる.また,時刻として2007/01/10 10:11:00を指定したものとする.
STEP1.設定変換機能が,時刻tにおけるステートレス設定に変換する.
設定変換機能の入力のステートフル設定の中のステートフルフィルタは実施例1
で用いたもの同じであり,ステートテーブルのログと時刻も実施例1と同じであ
るから,設定変換の結果は図17となる.
STEP2.ステートレス設定の冗長フィルタを検出するシステムを用いて,時刻tにおける冗長フィルタを検出する.
ここでは,f1とf2-2が同じ送信先IPアドレスを指定してあり,133.68.13.41が
送信先であるパケットはf1によって通過や廃棄が判断される.その結果,f2-2
が実際のパケットの通過や廃棄の判断にかかわらない.このようなフィルタを冗
長フィルタ検出機能は出力する.ここでは,f2-2が冗長フィルタであるという結
果を得る.

第4の発明の実施例を図18に示す.
実効フィルタ検出機能では,サブネットの接続関係を表したテーブルであるサブネット接続関係表(以下snt)と各サブネットIPアドレスの範囲を表した領域定義表(以下sdt)を用いる.各表の説明を次に示し,それぞれの例を図19,図20に示す.この2つの詳細については非特許文献1を参照されたい.
・ サブネット接続関係表(snt)
id:ノードのidを表す.extranetのidは常に1とする.
name:ノードの名前を表す.サブネットの名前またはファイアウォールの名前を保持する.
type:このノードがサブネットかファイアウォールかを表す.サブネットはs,ファイアウォールであればnである.
parentid:このノードの親ノードを示す.ここで,親ノードとは,自身と直接接続されているノードのうち,extranetに近いノードである.
childid:このノードの子ノードを示す.

・ 領域定義表(sdt)
subnetname:サブネットの名前を示す.
address:このサブネットのIPアドレス範囲を示す.

また,実効フィルタ検出機能では,経路フィルタ表を使用する.表の説明を次に示し,例を図21に示す.
・経路フィルタ表
order:送信元から送信先までに通るファイアウォールの順番を表す.
name:送信元から送信先までに通るファイアウォールの名前を表す
filter:ファイアウォールにおけるパケットヘッダの照合に成功するフィルタを示す.
実効フィルタ検出機能の動作の概要を次に示す.入力として,パケットヘッダ情報を受け付ける.
STEP1.入力されたパケットヘッダ情報の送信元IPアドレスが含まれるsubnetnameを,領域定義表(sdt)を用いて検索し,S1とする.送信元IPアドレスの指定がない場合や領域定義表のどれにも当てはまらない場合はS1=extranetとする.
STEP2.入力されたパケットヘッダ情報の送信先IPアドレスが含まれるsubnetnameを,領域定義表(sdt)を用いて検索し,S2とする.送信先IPアドレスの指定がない場合や領域定義表のどれにも当てはまらない場合はS2=extranetとする.
STEP3.経路検索機能が,サブネット接続関係表(snt)を用いてS1からS2までの経路を求め,経路フィルタ表を作成する.
STEP4.FW設定・ステートテーブルログ検索機能が,経路フィルタ表に存在する各ファイアウォールについて,ファイアウォール設定とステートテーブルログをステートフル逆引き機能に渡す.逆引き結果書き込み機能が,ステートフル逆引き機能の出力であるパケットヘッダ情報に関わるフィルタ取得し,それを経路フィルタテーブルに書き込む.
STEP5.実効フィルタ判定機能が経路フィルタテーブルを元に実効フィルタを求める.

各機能の手順を次に示す.
・経路検索機能
この機能は入力として,送信元サブネット名S1,送信先サブネット名S2を受付,
経路フィルタ表を出力する.
STEP3−1.S1からextranetまでの経路リストR1を作成する.
STEP3−1−1.ノード名n=S1とする.また,経路リストR1を空にする.
STEP3−1−2.R1にnを追加する.
STEP3−1−3.n=extranetであればSTEP3−2へ.そうでなければSTEP
3−1−4へ.
STEP3−1−4.nの親ノードidをサブネット接続関係表から得て,親ノードの
名前を検索し,n=親ノードの名前としてSTEP3−1−2へ.
STEP3−2.S2からextranetまでの経路リストR2を作成する.詳細手順は次の通りで
ある.
STEP3−2−1.ノード名n=S2とする.また,経路リストR2を空にする.
STEP3−2−2.R2にnを追加する.
STEP3−2−3.n=extranetであればSTEP3−3へ.そうでなければSTEP
3−2−4へ.
STEP3−2−4.nの親ノードidをサブネット接続関係表から得て,親ノードの
名前を検索し,n=親ノードの名前としてSTEP3−2−2へ.
STEP3−3.R1を先頭から見て,同じ要素がR2に存在する時点で,その要素をcとする.
STEP3−4.経路リストR を空にする.R1の先頭から,cの1つ前までの要素を順番に経路リストRに加える.
STEP3−5.R2のcからS2までの要素を順番にRに加える.
STEP3−6. Rの各要素を先頭から走査し,サブネット接続関係表におけるtypeがNの場合は,順番を1から順に付加し,経路フィルタ表に追加する.

各機能の詳細を次に示す.ここでは,検索条件として次を入力したものとする.
時刻:2007/01/10 10:05:00
protocol:tcp
src:10.10.10.5
dst:133.68.13.193
sport:1050
dport:22

経路検索機能の動作例を図19,図20を用いて説明する.
STEP3−0.ここでは,srcが領域定義表のどのサブネットにも属さないため,S1をextranetとするS2は領域定義表を用いて検索し,hostnetとする.
STEP3−1.S1からextranetまでの経路リストR1を作成する.
STEP3−1−1.ノード名n=extranetとする.また,経路リストR1を空にする.
STEP3−1−2.R1にextranetを追加する.
STEP3−1−3.n=extranetであるからSTEP3−2へ.
この時点で,R1={extranet}である.
STEP3−2.S2からextranetまでの経路リストR2を作成する.
STEP3−2−1.ノード名n=hostnetとする.また,経路リストR2を空にする.
STEP3−2−2(a).R2にhostnetを追加する.
STEP3−2−3(a).n=extranetでないので, STEP3−2−4へ.
STEP3−2−4(a).nの親ノードidをサブネット接続関係表から得ると,3
である.親ノードの名前を検索しfirewall2を得る,n=firewall2としてSTEP3
−2−2へ.
STEP3−2−2(b).R2にfirewall2を追加する.
STEP3−2−3(b).n=extranetでないので, STEP3−2−4へ.
STEP3−2−4(b).nの親ノードidをサブネット接続関係表から得ると,5
である.親ノードの名前を検索しsubnet1を得る,n=subnet1としてSTEP3−2−2へ.
STEP3−2−2(c).R2にsubnet1を追加する.
STEP3−2−3(c).n=extranetでないので, STEP3−2−4へ.
STEP3−2−4(c).nの親ノードidをサブネット接続関係表から得ると,2で
ある.親ノードの名前を検索しfirewall1を得る,n=firewall1としてSTEP3−2−2へ.
STEP3−2−2(d).R2にfirewall1を追加する.
STEP3−2−3(d).n=extranetでないので, STEP3−2−4へ.
STEP3−2−4(d).nの親ノードidをサブネット接続関係表から得ると,1
である.親ノードの名前を検索しextranetを得る,n=extranetとしてSTEP3−
2−2へ.
STEP3−2−2(e).R2にextranetを追加する.
STEP3−2−3(e).n=extranetであるから,STEP3−3へ.
この時点で,R2={hostnet,firewall2,subnet1,firewall1,extranet}である.
STEP3−3.R1を先頭から見て,同じ要素がR2に存在する時点で,その要素をcとす
る.ここでは,R1の先頭であるextranetがR2に存在するため,それをcとする.
STEP3−4. 経路リストR を空にする.R1の先頭から,cの1つ前までの要素を順番に経路リストRに加える.ここでは,cの1つ前の要素がないため,何も追加しない.
R={}
STEP3−5.R2のcからS2までの要素を順番にRに加える.
R={ extranet,firewall1,subnet1,firewall2,hostnet }
STEP3−6. Rの各要素を先頭から走査し,サブネット接続関係表におけるtypeがNの場合は,順番を1から順に付加し,経路フィルタ表に追加する.
firewall1のtypeがN,firewall2のtypeがNであるため,この2つを経路フィ
ルタ表に順に追加する.
この結果を図22に示す.

・FW設定・ステートテーブルログ検索機能
経路フィルタ表の各ファイアウォールにおいて,指定されたパケットヘッダ情報に関係するフィルタを求めるために,ステーフル逆引き機能の入力を生成する機能である.動作手順を次に示す.
STEP4−1.経路フィルタ表の各エントリeについて,経路フィルタ表のorderを昇順として次を行う.
STEP4−2.ファイアウォール設定からエントリeのフィアウォール設定,ステートテーブルログからエントリeのファイアウォールのステートテーブルのログを取得し,ステートフル逆引き機能の入力とする.

FW設定・ステートテーブルログ検索機能の動作例を図22を用いて説明する.
STEP4−1.経路フィルタ表の各エントリeについて,経路フィルタ表のorderを昇順として次を行う.
STEP4−2.ファイアウォール設定DBからエントリeのフィアウォール設定,ステートテーブルログDBからエントリeのファイアウォールのステートテーブルのログを取得し,ステートフル逆引き機能の入力とする.また,各エントリeのファイアウォール名を逆引き結果書き込み機能に渡す.
STEP4−2(firewall1) .firewall1のファイアウォール設定(ここでは図23を用
いる),ステートテーブルのログ(ここでは図24を用いる)をステートフル逆引き
機能に渡す.
firewall1を逆引き結果書き込み機能に渡す.
STEP4−2(firewall2) .firewall2のファイアウォール設定(図25),ステートテ
ーブルのログが空とし,これらをステートフル逆引き機能に渡す.
firewall2を逆引き結果書き込み機能に渡す.

・ 逆引き結果書き込み機能
ステートフル逆引き機能の出力を経路フィルタ表に書き込む機能である.フィルタ・ステートテーブルログ検索機能からファイアウォール名を取得し,ステートフル逆引き機能からステートフル逆引き結果を取得する.ファイアウォール名が一致するエントリのfilter列にステートフル逆引き結果を書き込む
firewall1
firewall1の設定における逆引き結果は図26となり,これらを経路フィルタ表
に書き込む{firewall1,{f1,f2,f3}}.
firewall2
firewall2の設定における逆引き結果は図27となり,これらを経路フィルタ表に
書き込む{firewall1,{f2,f4}}.
この結果を図28に示す.

・ 実効フィルタ判定機能
経路フィルタ表を元に,実効フィルタを求める機能である.動作手順を次に示す.
ただし,この機能はパケットヘッダ情報として,protocol,src,dst,sport,dportのすべてを指定された場合に正しく機能するものである.
STEP5−1.実効フィルタリストEを空にする.
STEP5−2.経路フィルタ表の各エントリeのフィルタ列において,先頭のフィルタを残して他は削除する.
STEP5−3.経路フィルタ表の各エントリeについて,orderを昇順として次の手順を行う.
STEP5−4.eのフィルタfのf.actionがACCEPTであれば,実効フィルタリストEに加える.f.actionがDROPであれば実効フィルタリストEに加え,STEP5−5へ.
STEP5−5.実効フィルタリストEを出力する.

動作例を次に示す.ここでは,経路フィルタ表として図28を用いる.
STEP5−1.実効フィルタリストEを空にする.
E={}
STEP5−2.経路フィルタ表の各エントリeのフィルタ列において,先頭のフィルタを残して他は削除する.経路フィルタ表は図29となる.
STEP5−3.経路フィルタ表の各エントリeについて,orderを昇順として次の手順を行う.
STEP5−4.eのフィルタfのf.actionがACCEPTであれば,実効フィルタリストEに
加える.f.actionがDROPであれば実効フィルタリストEに加え,STEP5−5
へ.
STEP5−4(order =1).f.actionがACCEPTであるから,実効フィルタリストに加える.
E={{firewall1,f1}}
STEP5−4(order =2).f.actionがACCEPTであるから,実効フィルタリストに加える.
E={{firewall1,f1},{firewall2,f2}}
STEP5−5.実効フィルタリストEを出力する.
An embodiment of the first invention is shown in FIG. The setting conversion function accepts stateful settings, state table logs, and time t as input, and outputs a conversion table that records which filters in the stateless settings and stateful settings at time t are converted to stateless filters.
Here, for any packet at time t, it is judged whether the stateful firewall has passed or discarded using the stateful settings before conversion and the state table log, and the stateless firewall using the stateless settings after conversion is passed or blocked for the same packet. Convert so that the judgments of are the same. Figure 6 shows this model. In the stateful FW at the top of Fig. 6, the contents of the state table at time t are represented as S (t), and the packet that has reached time t is represented as P (t). Here, the stateful FW configuration is expressed as SFC (Stateful Firewall Configuration) because it remains unchanged unless rewritten by the network administrator.
Here, R_1 (t) as a result of the decision to pass or block the packet P (t) and the filter f1 from which the decision is made are determined by SFC, S (t), and P (t). Next, in the stateless FW at the bottom of Fig. 6, the decision to pass or block a packet is made using SLC (Stateless Firewall Configuration). , P (t). Therefore, SLC (t) is determined from SFC and S (t) so that R_1 (t) = R_2 (t). Also, by recording the data representing the pair of f1 and f2, it is possible to obtain the analysis result of the SFC at time t based on the analysis result of SLC (t).

The following explains the setting conversion function. As an input example of FIG. 5, an example of stateful setting using iptables shown in FIG. 4 is used, and an example of a state table log is used in FIG. It is also assumed that 2007/01/10 10:11:00 is input as time t.
Here, the state table log entries are as follows.
State table log entry: id timestamp operation protocol src1 dst1 sport1 dport1 flag src2 dst2 sport2 dport2
id: This is the id that identifies the log, and is appended in the order in which the log entries were recorded.
timestamp: Indicates the time when this entry was recorded.
operation: Indicates the operation that was performed when the log was recorded. ADD, CHANGE, DELETE
There are as follows.
ADD: When an entry is added to the state table.
CHANGE: This is when the entry flag changes.
DELETE: When an entry is deleted from the state table.
In flag: UNREPLIED, communication from src1 to dst1 is detected.
If the UNREPLIED flag is not set, bidirectional packets have been detected.
is there.
This section outlines the overall operation of the setting conversion function.
STEP1. The stateless filter and stateful filter are separated by the filter discrimination function. The stateless filter is used as the output of the setting conversion function, and the stateful filter is passed to the filter search function.
STEP2. The state table restoration function restores the contents of the state table at time t from the state table log.
STEP3. The filter condition candidate output function obtains and outputs a filter condition candidate set from the contents of the state table at time t.
STEP4. The filter search function compares each filter condition candidate set against the packet header condition of the stateful filter, and outputs the pair that succeeds as a filter candidate set.
STEP5. The stateless filter output function outputs a stateless filter using the filter candidate set.

A detailed explanation of each function is given below.
The filter discrimination function separates the stateful filter and the stateless filter in the input stateful setting. The stateless filter in the stateful setting is used as the output of the setting conversion function. The stateful filter is passed to the condition part search function to determine the condition part. The operation procedure is as follows.
STEP 1-1. The following operations are performed for fi (i = 1 to n) of stateful filters f1 to fn.
STEP1-2. If fi does not have a -state field, it is used as the output of the setting conversion function.
If fi has a -state field, pass it to the conditional search function.
As an example of operation, in the stateful setting shown in Fig. 4, filter f1 applies to the stateful filter format, so filter f1 is passed to the conditional part search function. Since f2, f3, f4, f5, and f6 are in the form of stateless filters, they are output as they are.

Next, the state table restoration function restores the contents of the state table at the specified time t from the state table log. The operation procedure to restore is as follows.
STEP 2-1. Get all entries in the state table log before time t, and list them as L1.
STEP2-2. In L1, let L2 be the list of all entries whose operation field is DELETE.
STEP2-3. The following operation is performed for each entry ei (i = 1 to n) of L2.
STEP2-4. For each entry ej (j = 1 to m) in L1, delete the entry ej that satisfies the following conditions from L1.
ei.timestamp> = ej.timestamp
∧ ei.src1 = ej.src1 ∧ ei.dst1 = ej.dst1 ∧ ei.sport1 = ej.sport1 ∧ ei.dport1 = ej.dport1
∧ ei.src2 = ej.src2 ∧ ei.dst2 = ej.dst2 ∧ ei.sport2 = ej.sport2 ∧ ei.dport2 = ej.dport2
However, ei.timestamp> = ej.timestamp indicates whether the ei timestamp is the same as or later than the ej timestamp.
STEP2-5. In L1, all entries whose operation field is CHANGE are listed as L3.
STEP 2-6. The following operation is performed for each entry ek (k = 1 to m) in L3.
STEP2-7. For each entry ej (j = 1 to m) in L1, delete the entry ej that satisfies the following conditions from L1.
ek.timestamp> = ej.timestamp
∧ ek.src1 = ej.src1 ∧ ek.dst1 = ej.dst1 ∧ ek.sport1 = ej.sport1 ∧ ek.dport1 = ej.dport1
∧ ek.src2 = ej.src2 ∧ ek.dst2 = ej.dst2 ∧ ek.sport2 = ej.sport2 ∧ ek.dport2 = ej.dport2
However, ek.timestamp> = ej.timestamp indicates whether the ei timestamp is the same as or later than the ej timestamp.
STEP 2-8. Remove the timestamp and operation fields from each entry e in L1.
This restores the state table contents S (t) at time t to L1.

An example of operation is shown below. Here, the state table log shown in Fig. 7 is used as input. The procedure is shown below, and the results are shown in Fig. 8.
STEP 2-1. Let L1 be the time stamp of each entry before 2007/01/10 10:11:00.
L1 = {e1, e2, e3, e4, e5, e6, e7, e8, e9}
STEP2-2. In L1, let L2 be all entries whose operation field is DELETE.
L2 = {e3, e6}
STEP2-3. The following operations are performed for each entry e3 and e6 of L2.
STEP2-4 (e3). For each entry ej (j = 1 to m) in L1, delete the entry ej that satisfies the following conditions from L1.
e3.timestamp> = ej.timestamp
∧ e3.src1 = ej.src1 ∧ e3.dst1 = ej.dst1 ∧ e3.sport1 = ej.sport1 ∧ e3.dport1 = ej.dport1
∧ e3.src2 = ej.src2 ∧ e3.dst2 = ej.dst2 ∧ e3.sport2 = ej.sport2 ∧ e3.dport2 = ej.dport2
E1, e2, and e3 correspond to this condition, and they are deleted from L1.
L1 = {e4, e5, e6, e7, e8, e9}
STEP2-4 (e6). For each entry ej (j = 1 to m) in L1, delete the entry ej that satisfies the following conditions from L1.
e6.timestamp> = ej.timestamp
∧ e6.src1 = ej.src1 ∧ e6.dst1 = ej.dst1 ∧ e6.sport1 = ej.sport1 ∧ e6.dport1 = ej.dport1
∧ e6.src2 = ej.src2 ∧ e6.dst2 = ej.dst2 ∧ e6.sport2 = ej.sport2 ∧ e6.dport2 = ej.dport2
E4, e5, and e6 correspond to this condition, and they are deleted from L1.
L1 = {e7, e8, e9}
STEP2-5. In L1, all entries whose operation field is CHANGE are listed as L3.
L3 = {e9}
STEP 2-6. The following operation is performed for e9 of L3.
STEP2-7. For each entry ej (j = 1 to m) in L1, delete the entry ej that satisfies the following conditions from L1.
e9.timestamp> = ej.timestamp
∧ e9.src1 = ej.src1 ∧ e9.dst1 = ej.dst1 ∧ e9.sport1 = ej.sport1 ∧ e9.dport1 = ej.dport1
∧ e9.src2 = ej.src2 ∧ e9.dst2 = ej.dst2 ∧ e9.sport2 = ej.sport2 ∧ e9.dport2 = ej.dport2
Here, e7 is applicable, and they are deleted from L1.
L1 = {e8, e9}
STEP 2-8. Remove the timestamp and operation fields from each entry e in L1.

The filter condition candidate output function outputs a set of filter condition candidates based on the contents of the state table at time t. The filter condition candidate c is as follows.
Candidate filter condition c: id protocol src dst sport dport flag
id: The id that identifies the filter condition candidate.
In flag: UNREPLIED, communication from src to dst is detected. UNREPLIED
If the flag is not set, a bidirectional packet has been detected.
The operation procedure is as follows.
STEP 3-1. The following operations are performed for each entry e in the contents of the state table at time t.
STEP3-2. id for a set of e.protocol, e.src1, e.dst1, e.sport1, e.dport1, e.flag
The filter condition candidate c1 is output with "e.id" + "-f".
For the set of e.protocol, e.src2, e.dst2, e.sport2, e.dport2, the id is “e.id” + ”-b”
To output the filter condition candidate c2.


An example of the operation of the contents of the state table in Fig. 8 is shown below, and the result is shown in Fig. 9.
STEP 3-1. The following operations are performed for e8 and e9 respectively.
STEP3-2 (e8). Paired with e8.protocol, e8.src1, e8.dst1, e8.sport1, e8.dport1, e8.flag
And output filter condition candidate c1 with e8-f.
c1 = (e8-f tcp src = 133.68.13.41 dst = 133.68.21.4 sport = 2210 dport = 8080
UNREPLIED)
Outputs filter condition candidates with id assigned to the set of e8 protocol, src2, dst2, sport2, and dport2.
c2 = (e8-b: tcp src = 133.68.21.4 dst = 133.68.13.41 sport = 8080 dport = 2210)
STEP3-2 (e9). e9.protocol, e9.src1, e9.dst1, e9.sport1, e9.dport1, e9.flag
The filter condition candidate is output with id.
c1 = (e9-f: tcp src = 133.68.13.32 dst = 133.68.13.41 sport = 1474 dport = 3389)
Filter condition by assigning id to the set of protocol, src2, dst2, sport2, and dport2 of e9
The candidate is output.
c2 = (e9-b: tcp src = 133.68.13.41 dst = 133.68.13.32 sport = 3389 dport = 1474)

In the filter search function, the filter condition candidate set and the conditions specified by the stateful filter are matched, and the pair that succeeds in matching is passed to the stateless filter output function. The operation procedure is as follows.
STEP4-1. Let the filter candidate set FC be an empty set.
STEP4-2. STEP4-3 is performed with each of the filter condition candidate sets as c.
STEP4-3. Use c.protocol, c.src, c.dst, c.sport, and c.dport of filter condition candidate c as keys.
And collate with each filter of the stateful filter set.
If the filter is successful, the filter and filter condition candidate pair is designated as the filter candidate set FC.
In addition to STEP 4-3. Exit.
STEP 4-4. Pass the filter candidate set FC to the stateless filter output function.

An example of operation is shown below. The input is f1 in Fig. 4 and the filter candidate set shown in Fig. 9.
STEP4-1. Let the filter candidate set FC be an empty set.
FC = {}
STEP4-2. Do the following for e8-f, e8-b, e9-f, and e9-b.
STEP4-3a. Matching filter condition candidate e8-f with each filter of the stateful filter set
* = tcp ∧ * = 133.68.13.41 ∧ * = 133.68.21.4 ∧ * = 2210 ∧ * = 8080
Since each element is not specified in the filter, each is true and the matching succeeds.
Therefore, the following set is added to FC.
{f1, e8-f}
STEP4-3b. Matching filter condition candidate e8-b with each filter of the stateful filter set
* = tcp ∧ * = 133.68.21.4 ∧ * = 133.68.13.41 ∧ * = 8080 ∧ * = 2210
Since each element is not specified in the filter, each is true and the matching succeeds.
Therefore, the following set is added to FC.
{f1, e8-b}
STEP 4-3c. Although elapse is omitted, e9-f succeeds in matching with f1 and adds the next set to FC.
{f1, e9-f}
STEP 4-3d. Although elapse is omitted, e9-b succeeds in matching with f1, and adds the next set to FC.
{f1, e9-b}
STEP 4-4. Pass the filter candidate set FC to the stateless filter output function.
FC = {{f1, e8-f}, {f1, e8-b}, {f1, e9-f}, {f1, e9-b}}

The stateless filter output function generates a stateless filter based on the filter candidate set. The stateless filter output function outputs the stateful filter and state entry used for conversion and the conversion table of the output stateless filter. The operation procedure is as follows.
STEP 5-1. The following operations are performed for each element c of the filter candidate set.
STEP5-2. Let c be f and c be a candidate filter condition.
If there is no UNREPLIED flag in cc, the following filter is generated.
g.protocol = cc.protocol, g.src = cc.src, g.dst = cc.dst, g.sport = cc.sport, g.dport = cc.dport, g.action = f.action
Also, a new filter id is generated based on the fi of the stateful filter id, and a set of the new filter id, the state entry id used for conversion, and the stateful filter id is added to the conversion table.

An example of operation is shown below. It is assumed that FC = {{f1, e8-f}, {f1, e8-b}, {f1, e9-f}, {f1, e9-b}} are given as inputs.

STEP 5-1. FC = {{f1, e8-f}, {f1, e8-b}, {f1, e9-f}, {f1, e9-b}}
Do.
STEP5-2 {f1, e8-f}. f = f1, cc = e8-f. Because the UNREPLIED flag exists, the filter is
Not done.
STEP5-2 {f1, e8-b}. f = f1, cc = e8-b. Since e8-b does not have UNREPLIED, the next fill
Output.
g.protocol = tcp, g.src = 133.68.21.4, g.dst = 133.68.13.41, g.sport = 8080,
g.dport = 2210, g.action) = ACCEPT
f1-1: iptables -A FORWARD -p tcp -s 133.68.21.4 --sport 8080 -d 133.68.13.41
--dport 2210 -j ACCEPT
Also add f1-1, e8, and f1 entries to the conversion table.
STEP5-2 {f1, e9-f}. Since e9-f does not have UNREPLIED, the following filter is output.
g.protocol = tcp, g.src = 133.68.13.32, g.dst = 133.68.13.41, g.sport = 1474,
g.dport = 3389, g.action = ACCEPT
f1-2: iptables -A FORWARD -p tcp -s 133.68.13.32 --sport 1474 -d 133.68.13.41 --dport 3389 -j ACCEPT
Also add f1-2, e9, and f1 entries to the conversion table.
STEP5-2 {f1, e9-b}. Since e9-b does not have UNREPLIED, the following filter is output.
f1-3: iptables -A FORWARD -p tcp -s 133.68.13.41 -sport 3389 -d 133.68.13.32 --dport 1474 -j ACCEPT
Also add entries f1-3, e9, and f1 to the conversion table.
The output of this function is f1-1, f1-2, f1-3 in Fig. 10, and it becomes the output of the setting conversion function together with the filters f2, f3, f4, f5, f6 output without conversion. Figure 11 shows the conversion table.

An embodiment of the second invention is shown in FIG. The operation procedure of the stateful reverse lookup function is as follows.
STEP1. Stateless settings and conversion tables are obtained using stateful settings, state table logs, and time t.
STEP2. The stateless reverse lookup function outputs a set of stateless filters (called stateless reverse lookup results) that match the specified packet header information.
STEP3. The reverse conversion function searches the id in the stateless reverse lookup result, reversely converts the stateless setting converted from the stateful setting to the stateful one, and outputs the stateful reverse lookup result at time t.

An example of operation is shown below. Here, each input is as follows.
Time t: 2007/01/10 10:11:00
Stateful setting: Stateful setting shown in Figure 4
Status table log: Status table log shown in FIG.
Packet header information: Protocol: tcp, Source IP address: Not specified
Destination IP address: 133.68.13.41, source port number: not specified,
Destination port number: 3389
STEP1. Stateless settings and conversion tables are obtained using stateful settings, state table logs, and time t. Since it is the same as the input shown in the first embodiment, the stateless setting shown in FIG. 10 and the conversion table shown in FIG. 11 are obtained.
STEP2. The stateless reverse lookup function outputs the filter set related to the input packet header information from the stateless setting. Refer to Non-Patent Document 1 for details of this function.
Figure 13 shows the result of stateless reverse lookup.
STEP3. The reverse conversion function searches the id in the stateless reverse lookup result, reversely converts the stateless setting converted from the stateful setting to the stateful one, and outputs the stateful reverse lookup result at time t. Here, f1-2 exists in the converted id of the conversion table. Get the f1 of the entry's pre-conversion id and replace f1-2 with f1. Figure 14 shows the result.

An embodiment of the third invention is shown in FIG. The procedure for detecting the redundant filter at time t is as follows.
STEP1. The setting conversion function converts to the stateless setting at time t.
STEP2. The system that detects the stateless redundant filter detects the stateless redundant filter that is the result of the conversion. The result is a redundant filter at time t.

Here, the stateful setting shown in FIG. 16 and the state table log shown in FIG. 7 are used as inputs. It is assumed that 2007/01/10 10:11:00 is specified as the time.
STEP1. The setting conversion function converts to the stateless setting at time t.
The stateful filter in the stateful setting of the input of the setting conversion function is the first embodiment.
The state table log and time are the same as those used in Example 1.
Therefore, the result of setting conversion is shown in Fig. 17.
STEP2. A redundant filter at time t is detected using a system that detects a redundant filter with a stateless setting.
Here, f1 and f2-2 specify the same destination IP address, and 133.68.13.41 is
Packets that are destinations are judged to pass or be discarded by f1. As a result, f2-2
Is not concerned with the actual packet passing or discarding decision. Such a filter is redundant
The long filter detection function outputs. Here, it is concluded that f2-2 is a redundant filter.
Get the fruit.

An embodiment of the fourth invention is shown in FIG.
The effective filter detection function uses a subnet connection relation table (hereinafter referred to as “snt”) that is a table representing the connection relation of subnets and an area definition table (hereinafter referred to as “sdt”) that represents the range of each subnet IP address. The explanation of each table is shown below, and examples are shown in Figs. See Non-Patent Document 1 for details of these two.
-Subnet connection table (snt)
id: represents the id of the node. The extranet id is always 1.
name: represents the name of the node. Holds the name of the subnet or the name of the firewall.
type: Indicates whether this node is a subnet or a firewall. The subnet is s, and n for firewalls.
parentid: Indicates the parent node of this node. Here, the parent node is a node close to extranet among the nodes directly connected to itself.
childid: indicates a child node of this node.

-Area definition table (sdt)
subnetname: Indicates the name of the subnet.
address: Indicates the IP address range of this subnet.

The effective filter detection function uses a route filter table. The table is explained below, and an example is shown in Fig. 21.
・ Route filter table
order: Indicates the order of the firewall that passes from the source to the destination.
name: Represents the name of the firewall that passes from the source to the destination
filter: Indicates a filter that successfully matches the packet header in the firewall.
The outline of the operation of the effective filter detection function is as follows. Accepts packet header information as input.
STEP1. A subnetname containing the source IP address of the input packet header information is searched using the area definition table (sdt), and is set as S1. Set S1 = extranet if the source IP address is not specified or does not apply to any area definition table.
STEP2. Search the subnetname containing the destination IP address of the input packet header information using the area definition table (sdt), and set it as S2. If the destination IP address is not specified or does not apply to any of the area definition tables, set S2 = extranet.
STEP3. The route search function finds the route from S1 to S2 using the subnet connection relation table (snt) and creates a route filter table.
STEP4. The FW setting / state table log search function passes the firewall settings and state table log to the stateful reverse lookup function for each firewall in the route filter table. The reverse lookup result writing function acquires the filter related to the packet header information that is the output of the stateful reverse lookup function, and writes it to the route filter table.
STEP5. The effective filter decision function finds an effective filter based on the path filter table.

The procedure for each function is as follows.
・ Route search function
This function accepts source subnet name S1 and destination subnet name S2 as input,
Outputs a route filter table.
STEP 3-1. Create a route list R1 from S1 to extranet.
STEP3-1-1. The node name is n = S1. The route list R1 is emptied.
STEP 3-1-2. Add n to R1.
STEP3-1-3. If n = extranet, go to STEP 3-2. Otherwise STEP
Go to 3-1-4.
STEP3-1-4. Obtain the parent node id of n from the subnet connection relation table, and
Search for the name, and go to STEP 3-1-2 as n = parent node name.
STEP3-2. Create a route list R2 from S2 to extranet. Detailed steps are as follows
is there.
STEP 3-2-1. The node name is n = S2. The route list R2 is emptied.
STEP 3-2-2. Add n to R2.
STEP 3-2-3. If n = extranet, go to STEP3-3. Otherwise STEP
Go to 3-2-4.
STEP 3-2-4. Obtain the parent node id of n from the subnet connection relation table, and
Search for the name, and go to STEP 3-2-2 as n = parent node name.
STEP3-3. When R1 is seen from the top and the same element exists in R2, let that element be c.
STEP 3-4. The route list R is emptied. The elements from the beginning of R1 up to the previous c are added to the route list R in order.
STEP 3-5. This adds elements from R2 to c2 in order.
STEP 3-6. Scan each element of R from the top, and if the type in the subnet connection relation table is N, add the order from 1 and add it to the route filter table.

Details of each function are as follows. Here, assume that the following is entered as a search condition.
Time: 2007/01/10 10:05:00
protocol: tcp
src: 10.10.10.5
dst: 133.68.13.193
sport: 1050
dport: 22

An example of the route search function will be described with reference to FIGS.
STEP 3-0. Here, since src does not belong to any subnet in the area definition table, S2 with S1 as extranet is searched using the area definition table and set as hostnet.
STEP 3-1. Create a route list R1 from S1 to extranet.
STEP3-1-1. The node name is n = extranet. The route list R1 is emptied.
STEP 3-1-2. Add extranet to R1.
STEP3-1-3. Since n = extranet, go to STEP 3-2.
At this point, R1 = {extranet}.
STEP3-2. Create a route list R2 from S2 to extranet.
STEP 3-2-1. The node name is n = hostnet. The route list R2 is emptied.
STEP 3-2-2 (a). Add hostnet to R2.
STEP 3-2-3 (a). Since n is not extranet, go to STEP 3-2-4.
STEP 3-2-4 (a). If the parent node id of n is obtained from the subnet connection relation table, 3
It is. Search parent node name and get firewall2, STEP3 as n = firewall2
Go to 2-2.
STEP 3-2-2 (b). Add firewall2 to R2.
STEP 3-2-3 (b). Since n is not extranet, go to STEP 3-2-4.
STEP 3-2-4 (b). If the parent node id of n is obtained from the subnet connection relation table, 5
It is. Search for the name of the parent node and obtain subnet1, and set n = subnet1 to STEP 3-2-2.
STEP 3-2-2 (c). Add subnet1 to R2.
STEP 3-2-3 (c). Since n is not extranet, go to STEP 3-2-4.
STEP 3-2-4 (c). If the parent node id of n is obtained from the subnet connection relation table, 2
is there. Search for the name of the parent node to get firewall1, and set n = firewall1 to STEP 3-2-2.
STEP 3-2-2 (d). Add firewall1 to R2.
STEP 3-2-3 (d). Since n is not extranet, go to STEP 3-2-4.
STEP 3-2-4 (d). When the parent node id of n is obtained from the subnet connection relation table, 1
It is. Search for parent node name and get extranet, STEP3 as n = extranet
Go to 2-2.
STEP 3-2-2 (e). Add extranet to R2.
STEP 3-2-3 (e). Since n = extranet, go to STEP3-3.
At this point, R2 = {hostnet, firewall2, subnet1, firewall1, extranet}.
STEP3-3. When R1 is seen from the top and the same element exists in R2, that element is set to c
R Here, since the extranet that is the head of R1 exists in R2, let it be c.
STEP 3-4. The route list R is emptied. The elements from the beginning of R1 up to the previous c are added to the route list R in order. Here, nothing is added because there is no previous element of c.
R = {}
STEP 3-5. This adds elements from R2 to c2 in order.
R = {extranet, firewall1, subnet1, firewall2, hostnet}
STEP 3-6. Scan each element of R from the top, and if the type in the subnet connection relation table is N, add the order from 1 and add it to the route filter table.
Since the type of firewall1 is N and the type of firewall2 is N, these two are
Add to the filter table in order.
The results are shown in Fig. 22.

・ FW setting ・ State table log search function
This function generates the input of the reverse reverse function for finding the filter related to the specified packet header information in each firewall in the route filter table. The operation procedure is as follows.
STEP4-1. For each entry e in the route filter table, do the following with the order of the route filter table in ascending order.
STEP4-2. The firewall settings for entry e are obtained from the firewall settings, and the firewall state table log for entry e is obtained from the state table log.

An example of the FW setting / state table log search function will be described with reference to FIG.
STEP4-1. For each entry e in the route filter table, do the following with the order of the route filter table in ascending order.
STEP4-2. Get the firewall settings for entry e from the firewall settings DB and the firewall state table log for entry e from the state table log DB, and use them as input for the reverse stateful lookup function. Also, the firewall name of each entry e is passed to the reverse lookup result writing function.
STEP4-2 (firewall1) Firewall1 firewall settings (Figure 23 is used here)
The state table log (Fig. 24 is used here)
Pass to function.
Pass firewall1 to the reverse lookup result writing function.
STEP4-2 (firewall2) firewall2 firewall settings (Figure 25), state
The log of the table is empty, and these are passed to the stateful reverse lookup function.
Pass firewall2 to the reverse lookup result writing function.

・ Reverse lookup result writing function
This function writes the output of the stateful reverse lookup function to the route filter table. The firewall name is obtained from the filter / state table log search function, and the stateful reverse lookup result is obtained from the stateful reverse lookup function. Write stateful reverse lookup result to filter column of entry with matching firewall name
firewall1
The reverse lookup result in the firewall1 setting is shown in FIG.
Write {firewall1, {f1, f2, f3}}.
firewall2
The reverse lookup results for firewall2 settings are shown in Fig. 27.
Write {firewall1, {f2, f4}}.
Figure 28 shows the result.

・ Effective filter judgment function
This function obtains the effective filter based on the route filter table. The operation procedure is as follows.
However, this function works correctly when all of protocol, src, dst, sport, and dport are specified as packet header information.
STEP 5-1. Empty the effective filter list E.
STEP5-2. In the filter column of each entry e in the route filter table, leave the first filter and delete others.
STEP5-3. For each entry e in the route filter table, perform the following procedure with order in ascending order.
STEP 5-4. If f.action of the filter f of e is ACCEPT, it is added to the effective filter list E. If f.action is DROP, go to STEP 5-5 in addition to effective filter list E.
STEP 5-5. Outputs the effective filter list E.

An example of operation is shown below. Here, FIG. 28 is used as the route filter table.
STEP 5-1. Empty the effective filter list E.
E = {}
STEP5-2. In the filter column of each entry e in the route filter table, leave the first filter and delete others. The route filter table is shown in FIG.
STEP5-3. For each entry e in the route filter table, perform the following procedure with order in ascending order.
STEP 5-4. If f.action of the filter f of e is ACCEPT, the effective filter list E
Add. If f.action is DROP, in addition to effective filter list E, STEP5-5
What.
STEP 5-4 (order = 1). Since f.action is ACCEPT, add it to the effective filter list.
E = {{firewall1, f1}}
STEP 5-4 (order = 2). Since f.action is ACCEPT, add it to the effective filter list.
E = {{firewall1, f1}, {firewall2, f2}}
STEP 5-5. The effective filter list E is output.

このようなコンピュータネットワークのファイアウォール設定解析方式は,ローカルエリアネットワークなどのコンピュータネットワークの管理運用におおいに役立つ.

This kind of computer network firewall setting analysis method is very useful in the management and operation of computer networks such as local area networks.

ステートレスファイアウォールの動作概要である.This is an overview of stateless firewall operation. ステートレス設定の例である.This is an example of stateless setting. ステートフルファイアウォールの動作概要である.This is an overview of stateful firewall operation. ステートフル設定の例である.This is an example of stateful setting. 発明1による,ステートフル設定をステートレス設定に変換するデータフロー図である.It is a data flow figure which changes stateful setting into stateless setting by invention 1. ステートレス設定とステートフル設定の変換のモデルである.This is a model of conversion between stateless setting and stateful setting. 設定変換機能の入力となる,ステートテーブルのログの例である.This is an example of a state table log that is input to the setting conversion function. 図7のステートテーブルのログから復元した2007/01/10 10:11:00におけるステートフルテーブルの内容である.This is the contents of the stateful table as of 2007/01/10 10:11:00 restored from the state table log in Fig. 7. 図7から生成したフィルタ条件候補集合である.This is a filter condition candidate set generated from Fig. 7. 設定変換機能によって出力される,ステートフルフィルタをステートレスフィルタに変換したものとステートレスフィルタをあわせたステートレス設定の例である.This is an example of the stateless setting that combines the stateless filter and the stateless filter that is output by the setting conversion function. 図4のステートフル設定と図10の時刻tにおけるステートレス設定の変換表の例である.It is an example of the conversion table of the stateful setting of FIG. 4 and the stateless setting at the time t of FIG. 発明2による,ステートフル設定の中から特定のパケットヘッダ情報にかかわるものだけを検出するデータフロー図である.FIG. 10 is a data flow diagram for detecting only those related to specific packet header information from among stateful settings according to the second aspect of the present invention. ステートフル設定をステートレス設定に変換した後,特定のパケットヘッダにかかわるフィルタを検出した例である.This is an example of detecting a filter related to a specific packet header after converting a stateful setting to a stateless setting. 図13を,変換表を用いてステートフル設定に逆変換した結果である.FIG. 13 shows the result of reverse conversion to the stateful setting using the conversion table. 発明3による, ステートフル設定の中から,時刻tにおける冗長フィルタを検出するデータフロー図である.It is a data flow figure which detects the redundant filter in the time t from the stateful setting by the invention 3. FIG. 図15の入力例のステートフル設定の例である.It is an example of the stateful setting of the input example of FIG. 図16を時刻2007/01/10 10:11:00におけるステートレス設定に変換した例である.This is an example of converting Fig. 16 to stateless setting at time 2007/01/10 10:11:00. 発明4による実効フィルタ検出機能の構成例である.It is a structural example of the effective filter detection function by the invention 4. 図18におけるサブネット接続関係表の例である.It is an example of the subnet connection relation table in FIG. 図18における領域定義表の例である.This is an example of the area definition table in FIG. 図18における経路フィルタ表の例である.This is an example of the path filter table in FIG. 図18において,経路検索機能の出力例である.FIG. 18 shows an output example of the route search function. 図18の動作例におけるfirewall1の設定例である.This is a setting example of firewall1 in the operation example of FIG. 図18の動作例におけるfirewall1のステートテーブルのログである.It is a log of the state table of firewall1 in the operation example of FIG. 図18の動作例におけるfirewall2の設定例である.This is a setting example of firewall2 in the operation example of FIG. 図18の動作例における,firewall1のステートフル逆引きの結果である.This is the result of stateful reverse lookup of firewall1 in the operation example of FIG. 図18の動作例における,firewall2のステートフル逆引きの結果である.This is a result of stateful reverse lookup of firewall2 in the operation example of FIG. 図18の動作例における,実効フィルタ候補を追加した結果である.This is a result of adding effective filter candidates in the operation example of FIG. 図18の動作例における,冗長な実効フィルタ候補を削除した結果である.This is a result of deleting redundant effective filter candidates in the operation example of FIG.

Claims (4)

状態テーブルなどにより通信状況を管理し,パケット到着時の通信状況に従ってパケットの通過や廃棄などの動作を決定するステートフルファイアウォールにおいて,通信状況により動作を変化させるフィルタ(ステートフルフィルタと呼ぶ)を含むステートフルファイアウォールの設定(ステートフル設定と呼ぶ)を,時刻tの通信状況を用いて,動作が通信状況に依存しないフィルタ(ステートレスフィルタと呼ぶ)だけからなるステートレスファイアウォールの設定(時刻tのステートレス設定と呼ぶ)に変換する設定変換機能を有することを特徴とするファイアウォール設定解析方式. A stateful firewall that includes a filter (called a stateful filter) that changes the operation according to the communication status in a stateful firewall that manages the communication status using a status table, etc., and determines the operation such as packet passing or discarding according to the communication status when the packet arrives (Referred to as stateless setting) is used as a stateless firewall setting (referred to as stateless setting at time t) consisting only of a filter whose operation does not depend on the communication status (referred to as stateless filter) using the communication status at time t. Firewall setting analysis method characterized by having a setting conversion function to convert. 1又は複数のパケットヘッダ情報と時刻tを指定されたときに,時刻tのステートレス設定を用いて,そのパケットヘッダ情報を持つパケットに対してアクションを施すステートフルフィルタを,ステートフル設定の中から検出するフィルタ逆引き機能(ステートフル逆引き機能と呼ぶ)を有することを特徴とする請求項1記載のファイアウォール設定解析方式. When one or more packet header information and time t are specified, a stateful filter that performs an action on a packet having the packet header information is detected from the stateful setting using the stateless setting at time t. 2. The firewall setting analysis method according to claim 1, further comprising a filter reverse lookup function (referred to as a stateful reverse lookup function). 時刻tのステートレス設定において,どのようなパケットが到着しても決してアクションを施すことのないフィルタを検出する冗長フィルタ検出機能を有することを特徴とする請求項1記載のファイアウォール設定解析方式. 2. The firewall setting analysis method according to claim 1, further comprising a redundant filter detection function for detecting a filter that never takes an action no matter what packet arrives in the stateless setting at time t. 複数のファイアウォールが多段に接続されたネットワークにおいて,1又は複数のパケットヘッダ情報と時刻tを指定されたときに,各ファイアウォールの時刻tのステートレス設定を用いて,そのパケットヘッダ情報を持つパケットに対して実際にアクションを施すステートフルフィルタ(実効フィルタと呼ぶ)を検出する実効フィルタ検出機能を有することを特徴とする請求項1記載のファイアウォール設定解析方式. When one or more packet header information and time t are specified in a network in which a plurality of firewalls are connected in multiple stages, the stateless setting at time t of each firewall is used for packets having the packet header information. The firewall setting analysis method according to claim 1, further comprising an effective filter detection function for detecting a stateful filter (referred to as an effective filter) that actually performs an action.
JP2008018839A 2008-01-30 2008-01-30 Method for analyzing setting of firewall Pending JP2009182574A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008018839A JP2009182574A (en) 2008-01-30 2008-01-30 Method for analyzing setting of firewall

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008018839A JP2009182574A (en) 2008-01-30 2008-01-30 Method for analyzing setting of firewall

Publications (1)

Publication Number Publication Date
JP2009182574A true JP2009182574A (en) 2009-08-13

Family

ID=41036211

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008018839A Pending JP2009182574A (en) 2008-01-30 2008-01-30 Method for analyzing setting of firewall

Country Status (1)

Country Link
JP (1) JP2009182574A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073631A (en) * 2011-09-28 2013-04-22 Fisher Rosemount Systems Inc Methods, apparatus, and articles of manufacture to provide firewalls for process control systems

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073631A (en) * 2011-09-28 2013-04-22 Fisher Rosemount Systems Inc Methods, apparatus, and articles of manufacture to provide firewalls for process control systems
JP2017199380A (en) * 2011-09-28 2017-11-02 フィッシャー−ローズマウント システムズ,インコーポレイテッド Method, apparatus, and recording medium for providing firewall for process control system

Similar Documents

Publication Publication Date Title
US9001661B2 (en) Packet classification in a network security device
US8989198B2 (en) Automatic address range detection for IP networks
US8301771B2 (en) Methods, systems, and computer program products for transmission control of sensitive application-layer data
US9565097B2 (en) Application based packet forwarding
CN106817275B (en) System and method for automatically preventing and arranging strategy conflict
US7127739B2 (en) Handling information about packet data connections in a security gateway element
WO2006093557A2 (en) Method, systems, and computer program products for implementing function-parallel network firewall
Dixit et al. Challenges and Preparedness of SDN-based Firewalls
Sayeed et al. Intrusion detection system based on Software Defined Network firewall
Niksefat et al. Efficient algorithms for dynamic detection and resolution of IPSec/VPN security policy conflicts
Miller et al. The impact of different botnet flow feature subsets on prediction accuracy using supervised and unsupervised learning methods
JP2009182574A (en) Method for analyzing setting of firewall
CN112217782A (en) Apparatus and method for identifying attacks in a computer network
CN112217780A (en) Apparatus and method for identifying attacks in a computer network
Karoui et al. Formal specification, verification and correction of security policies based on the decision tree approach
Buttyán et al. Consistency verification of stateful firewalls is not harder than the stateless case
US8499026B2 (en) Distributed packet processing system for high-speed networks and distributed packet processing method using thereof
EP2023566B1 (en) Online security rules conflict management
Perhác et al. Coalgebraic specification of network intrusion signatures
CN112217784A (en) Apparatus and method for attack recognition in computer networks
KR20040038168A (en) The method and system of internet security service by using packet marking
Chu CCNA Cyber Ops SECOPS–Certification Guide 210-255: Learn the skills to pass the 210-255 certification exam and become a competent SECOPS associate
CN115174265B (en) ICMP hidden tunnel detection method based on flow characteristics
Kumar Real time and offline network intrusion detection using improved decision tree algorithm
Bloem et al. An optimal control approach to malware filtering