パケットキャプチャ用のIDPユーティリティ
パケット キャプチャ用の IDP ユーティリティは、IDP イベントに関連するパケット データのキャプチャ、管理、分析を可能にする専用ツールです。
パケットキャプチャユーティリティは、ネットワークトラフィックを記録するパケットキャプチャファイルを分析するために使用します。IDP ユーティリティを使用すると、ネットワーク管理者はこれらのパケットキャプチャファイルを調べて、ネットワークトラフィック内の潜在的なセキュリティ上の脅威や異常を特定できます。
機能エクスプローラーを使用して、特定の機能のプラットフォームとリリースのサポートを確認します。
プラットフォームに関連する注意事項については、「 プラットフォーム固有のパケットキャプチャ動作」 セクションを参照してください。
パケットキャプチャ
IDPのパケットキャプチャは、ネットワークトラフィックをキャプチャして分析し、セキュリティ上の脅威を検出して防止する機能です。
CLIサポートは、パケットキャプチャトラフィックに対してのみコンテキストと関連データを表示およびクリアするために提供されており、これによりIDP検証プロセスが向上します。
パケットキャプチャユーティリティをinetモードまたは透過モードで実行して、プロトコルコンテキストを生成できます。UNIXシェルプロンプト(%)からコマンドラインパケットキャプチャフィーダーユーティリティツールを実行する必要があります。
パケットキャプチャフィーダーユーティリティは、パケットが供給されるトラフィックインターフェイスで利用可能な送信元と宛先のIPv4アドレスのペアを使用します。パケットキャプチャフィーダーユーティリティは、これらのPCAPが注入されるインターフェイスに設定されたIPV4アドレスも使用します。 PCAPがこれらのインターフェイスに供給されると、PCAPに関連付けられたコンテキストのリストとデータがコンテキストと照合されます。コンテキスト、ヒット、および関連データは、パケットキャプチャフィーダーによって生成されたトラフィックに対してのみ表示されます。ライブトラフィック統計はキャプチャされません。パケットを供給する際は、必ずインターフェイスのサブネットIPにパケットを供給してください。インターフェイスIPにパケットをフィードすると、IDPセキュリティ処理がコンテキストを検出しない可能性があります。インターフェイスIPを除く他のすべてのサブネットIPアドレスを使用できます。
パケットキャプチャフィーダーユーティリティツールを介して新しいPCAPを実行する前に、以下のクリアコンテキストコマンドを使用して、既存のコンテキストとデータをクリアします。
[edit security] user@host> clear security idp attack context user@host> clear security flow session interface <intf1> user@host> clear security flow session interface <intf2> user@host> clear security flow session idp user@host> clear security idp attack table
Inet モード パケット キャプチャ フィーダーに使用されるコマンド例:
% pcapfeed –verbose --interface-ip1 5.0.0.13 --interface-ip2 15.0.0.14 --pcap-ip1 6.0.0.1 --pcap-ip2 7.0.0.1 --interface1 ge-0/0/6 --interface2 ge-0/0/7 --pcap /var/tmp/http.pcap
または
% pcapfeed –quiet --interface-ip1 5.0.0.13 --interface-ip2 15.0.0.14 --pcap-ip1 6.0.0.1 --pcap-ip2 7.0.0.1 --interface1 ge-0/0/6 --interface2 ge-0/0/7 --pcap /var/tmp/http.pcap
透過モード パケット キャプチャ フィーダーに使用されるコマンド例:
% pcapfeed –verbose –transparent --pcap-ip1 6.0.0.1 --pcap-ip2 7.0.0.1 --interface1 ge-0/0/6 --interface2 ge-0/0/7 --pcap /var/tmp/http.pcap
または
% pcapfeed –quiet –transparent --pcap-ip1 6.0.0.1 --pcap-ip2 7.0.0.1 --interface1 ge-0/0/6 --interface2 ge-0/0/7 --pcap /var/tmp/http.pcap
表1 は、上記のサンプル出力からPCAPフィーダーツールのフィールドを定義しています。
Fields |
Description |
pcap --quiet |
ログがコンソールに表示されないようにします |
pcap --詳細 |
ログをコンソールに表示できるようにします |
インターフェイス-ip1 |
パケットキャプチャパケットをフィードするための最初のインターフェイスのIPアドレス |
インターフェイス-ip2 |
パケットキャプチャパケットを供給するためのもう一方のインターフェイスのIPアドレス |
pcap-ip1 |
パケットキャプチャに表示されたIPアドレス |
PCAP-IP2 |
パケットキャプチャに見られる別のIPアドレス |
インターフェイス1 |
セキュリティ デバイスのインターフェイス 1 |
インターフェイス2 |
セキュリティ デバイスのインターフェイス 1 |
パケットキャプチャフィーダーは以下をサポートしていません。
IPv6
FTPなどのマルチチャネルプロトコル
例:パケット キャプチャ フィーダーの設定
この例では、パケットキャプチャ(PCAP)フィーダーをinetモードで実行し、プロトコルコンテキストを生成する方法について説明します。
要件
始める前に:
ネットワークインターフェイスを設定します。
概要
関連するIDPポリシーでPCAPフィーダーを実行し、関連するプロトコルコンテキストを取得するには。この例では、PCAPはクワイエットモードでpcap-ip1 6.0.0.1およびpcap-ip2 7.0.0.1を使用して供給されます。
設定
手順
CLIクイックコンフィグレーション
この例をすばやく設定するには、以下のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク設定に一致させる必要がある詳細を変更し、コマンドを [edit] 階層レベルのCLIにコピーアンドペーストして、設定モードから commit を入力します。
set security idp idp-policy idppolicy rulebase-ips rule 1 match from-zone any set security idp idp-policy idppolicy rulebase-ips rule 1 match source-address any set security idp idp-policy idppolicy rulebase-ips rule 1 match to-zone any set security idp idp-policy idppolicy rulebase-ips rule 1 match destination-address any set security idp idp-policy idppolicy rulebase-ips rule 1 match application default set security idp idp-policy idppolicy rulebase-ips rule 1 match attacks predefined-attack-groups “HTTP - All” set security idp idp-policy idppolicy rulebase-ips rule 1 then action close-client-and-server set security idp idp-policy idppolicy rulebase-ips rule 1 then notification log-attacks set security forwarding-options family inet6 mode flow-based set security policies from-zone trust to-zone untrust policy 1 match source-address any set security policies from-zone trust to-zone untrust policy 1 match destination-address any set security policies from-zone trust to-zone untrust policy 1 match application any set security policies from-zone trust to-zone untrust policy 1 then permit application-services idp-policy idppolicy set security policies from-zone untrust to-zone trust policy 1 match source-address any set security policies from-zone untrust to-zone trust policy 1 match destination-address any set security policies from-zone untrust to-zone trust policy 1 match application any set security policies from-zone untrust to-zone trust policy 1 then permit application-services idp-policy idppolicy set security zones security-zone untrust host-inbound-traffic system-services all set security zones security-zone untrust host-inbound-traffic protocols all set security zones security-zone untrust interfaces ge-0/0/0.0 set security zones security-zone untrust application-tracking set security zones security-zone trust host-inbound-traffic system-services all set security zones security-zone trust host-inbound-traffic protocols all set security zones security-zone trust interfaces ge-0/0/2.0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.15/24 set interfaces ge-0/0/2 unit 0 family inet address 10.0.0.16/24
ステップバイステップの手順
次の例では、設定階層のさまざまなレベルに移動する必要があります。その方法の詳細については、『CLIユーザーガイド』の「構成モードでのCLIエディターの使用」を参照してください。
アプリケーションを作成し、それをIDPポリシーに関連付けるには:
意味のある名前を付けてポリシーを作成し、ルールベースをポリシーに関連付け、ルールベースにルールを追加し、ルールの一致基準を定義します。
[edit security] user@host#set idp idp-policy idppolicy rulebase-ips rule 1 match from-zone any user@host#set idp idp-policy idppolicy rulebase-ips rule 1 match source-address any user@host#set idp idp-policy idppolicy rulebase-ips rule 1 match to-zone any user@host#set idp idp-policy idppolicy rulebase-ips rule 1 match destination-address any user@host#set idp idp-policy idppolicy rulebase-ips rule 1 match application default user@host#set idp idp-policy idppolicy rulebase-ips rule 1 match attacks predefined-attack-groups “HTTP - All” user@host#set idp idp-policy idppolicy rulebase-ips rule 1 then action close-client-and-server user@host#set idp idp-policy idppolicy rulebase-ips rule 1 then notification log-attacks user@host#set forwarding-options family inet6 mode flow-based
ポリシーを設定します。
[edit security] user@host#set policies from-zone trust to-zone untrust policy 1 match source-address any user@host#set policies from-zone trust to-zone untrust policy 1 match destination-address any user@host#set policies from-zone trust to-zone untrust policy 1 match application any user@host#set policies from-zone trust to-zone untrust policy 1 then permit application-services idp-policy idppolicy user@host#set policies from-zone untrust to-zone trust policy 1 match source-address any user@host#set policies from-zone untrust to-zone trust policy 1 match destination-address any user@host#set policies from-zone untrust to-zone trust policy 1 match application any user@host#set policies from-zone untrust to-zone trust policy 1 then permit application-services idp-policy idppolicy
ゾーンを設定し、インターフェイスを割り当てます。
[edit security] user@host# set zones security-zone untrust host-inbound-traffic system-services all user@host# set zones security-zone untrust host-inbound-traffic protocols all user@host# set zones security-zone untrust interfaces ge-0/0/0.0 user@host# set zones security-zone untrust application-tracking user@host# set zones security-zone trust host-inbound-traffic system-services all user@host# set zones security-zone trust host-inbound-traffic protocols all user@host# set zones security-zone trust interfaces ge-0/0/2.0
転送インターフェイスを設定します。
[edit] user@host# set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.15/24 user@host# set interfaces ge-0/0/2 unit 0 family inet address 10.0.0.16/24
結果
設定モードから、 show security idp および show applications コマンドを入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の設定手順を繰り返して修正します。
[edit]
user@host# show security idp
idp-policy idppolicy {
rulebase-ips {
rule 1 {
match {
from-zone any;
source-address any;
to-zone any;
destination-address any;
application default;
}
then {
action {
close-client-and-server;
}
notification {
log-attacks;
}
}
}
}
}
[edit]
user@host# show security policies
from-zone trust to-zone untrust {
policy 1 {
match {
source-address any;
destination-address any;
application any;
}
then {
permit {
application-services {
idp-policy idppolicy;
}
}
}
}
[edit]
user@host# show security zones
security-zone untrust {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
ge-0/0/0.0;
}
application-tracking;
}
[edit]
user@host# show interfaces
ge-0/0/0 {
unit 0 {
family inet {
address 10.0.0.15/24;
}
}
}
ge-0/0/2 {
unit 0 {
family inet {
address 10.0.0.16/24;
}
}
}
デバイスの設定が完了したら、設定モードから commit を入力します。
検証
設定が正常に機能していることを確認するには、次のタスクを実行します。
設定の確認
目的
PCAPフィーダーツールを使用してPCAPを実行した後、IDP攻撃コンテキストを確認します。
アクション
動作モードから、 show security idp attack context コマンドを入力します。
出力例
user@host> show security idp attack context IDP context statistics: Context name #Hits #Data http-url 1 / http-get-url 1 / http-header-host 1 7.0.0.1 http-header-user-agent 1 lwp-request/5.827 libwww-perl/5.833 http-header 2 te: deflate,gzip;q=0.3 && connection: TE, close http-request 1 GET / HTTP/1.1 http-request-method 1 GET / HTTP/1.1
例:透過モードでのパケットキャプチャフィーダーの設定
この例では、パケットキャプチャ(PCAP)フィーダーを透過透過モードで実行してプロトコルコンテキストを生成する方法について説明します。
要件
始める前に:
ネットワークインターフェイスを設定します。
概要
関連するIDPポリシーでPCAPフィーダーを実行し、パケットキャプチャから実行されているパケットから関連するプロトコルコンテキストを取得するには。この例では、PCAPフィーダー pcap-ip 2 7.0.0.1 をクワイエットモードで使用してパケットを供給しています。
設定
手順
CLIクイックコンフィグレーション
この例をすばやく設定するには、以下のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク設定に一致させる必要がある詳細を変更し、コマンドを [edit] 階層レベルのCLIにコピーアンドペーストして、設定モードから commit を入力します。
set groups global protocols l2-learning global-mode transparent-bridge set security idp idp-policy idppolicy rulebase-ips rule 1 match from-zone any set security idp idp-policy idppolicy rulebase-ips rule 1 match source-address any set security idp idp-policy idppolicy rulebase-ips rule 1 match to-zone any set security idp idp-policy idppolicy rulebase-ips rule 1 match destination-address any set security idp idp-policy idppolicy rulebase-ips rule 1 match application default set security idp idp-policy idppolicy rulebase-ips rule 1 match attacks predefined-attack-groups “HTTP - All” set security idp idp-policy idppolicy rulebase-ips rule 1 then action close-client-and-server set security idp idp-policy idppolicy rulebase-ips rule 1 then notification log-attacks set security policies from-zone trust to-zone untrust policy 1 match source-address any set security policies from-zone trust to-zone untrust policy 1 match destination-address any set security policies from-zone trust to-zone untrust policy 1 match application any set security policies from-zone trust to-zone untrust policy 1 then permit application-services idp-policy idppolicy set security policies from-zone untrust to-zone trust policy 1 match source-address any set security policies from-zone untrust to-zone trust policy 1 match destination-address any set security policies from-zone untrust to-zone trust policy 1 match application any set security policies from-zone untrust to-zone trust policy 1 then permit application-services idp-policy idppolicy set security zones security-zone untrust host-inbound-traffic system-services all set security zones security-zone untrust host-inbound-traffic protocols all set security zones security-zone untrust interfaces ge-0/0/0.0 set security zones security-zone untrust application-tracking set security zones security-zone trust host-inbound-traffic system-services all set security zones security-zone trust host-inbound-traffic protocols all set security zones security-zone trust interfaces ge-0/0/2.0 set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode access set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members 301 set interfaces ge-0/0/2 unit 0 family ethernet-switching interface-mode access set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members 301 set interfaces irb unit 301 family inet address 10.1.1.11/8 set vlans bd-vlan-301 vlan-id 301 set vlans bd-vlan-301 l3-interface irb.301
ステップバイステップの手順
次の例では、設定階層のさまざまなレベルに移動する必要があります。その方法の詳細については、『CLIユーザーガイド』の「構成モードでのCLIエディターの使用」を参照してください。
アプリケーションを作成し、それをIDPポリシーに関連付けるには:
設定グループを設定します。
[edit] user@host#set groups global protocols l2-learning global-mode transparent-bridge
意味のある名前を付けてポリシーを作成し、ルールベースをポリシーに関連付け、ルールベースにルールを追加し、ルールの一致基準を定義します。
[edit security] user@host# set idp idp-policy idppolicy rulebase-ips rule 1 match from-zone any user@host# set idp idp-policy idppolicy rulebase-ips rule 1 match source-address any user@host# set idp idp-policy idppolicy rulebase-ips rule 1 match to-zone any user@host# set idp idp-policy idppolicy rulebase-ips rule 1 match destination-address any user@host# set idp idp-policy idppolicy rulebase-ips rule 1 match application default user@host# set idp idp-policy idppolicy rulebase-ips rule 1 match attacks predefined-attack-groups “HTTP - All” user@host# set idp idp-policy idppolicy rulebase-ips rule 1 then action close-client-and-server user@host# set idp idp-policy idppolicy rulebase-ips rule 1 then notification log-attacks user@host# set forwarding-options family inet6 mode flow-based
ポリシーを設定します。
[edit security] user@host# set policies from-zone trust to-zone untrust policy 1 match source-address any user@host# set policies from-zone trust to-zone untrust policy 1 match destination-address any user@host# set policies from-zone trust to-zone untrust policy 1 match application any user@host# set policies from-zone trust to-zone untrust policy 1 then permit application-services idp-policy idppolicy user@host# set policies from-zone untrust to-zone trust policy 1 match source-address any user@host# set policies from-zone untrust to-zone trust policy 1 match destination-address any user@host# set policies from-zone untrust to-zone trust policy 1 match application any user@host# set policies from-zone untrust to-zone trust policy 1 then permit application-services idp-policy idppolicy
ゾーンを設定し、インターフェイスを割り当てます。
[edit security] user@host# set zones security-zone untrust host-inbound-traffic system-services all user@host# set zones security-zone untrust host-inbound-traffic protocols all user@host# set zones security-zone untrust interfaces ge-0/0/0.0 user@host# set zones security-zone untrust application-tracking user@host# set zones security-zone trust host-inbound-traffic system-services all user@host# set zones security-zone trust host-inbound-traffic protocols all user@host# set zones security-zone trust interfaces ge-0/0/2.0
転送インターフェイスを設定します。
[edit] user@host# set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode access user@host# set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members 301 user@host# set interfaces ge-0/0/2 unit 0 family ethernet-switching interface-mode access user@host# set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members 301 user@host# set interfaces irb unit 301 family inet address 10.1.1.11/8
VLAN-IDを設定します。
[edit] user@host# set vlans bd-vlan-301 vlan-id 301 user@host# set vlans bd-vlan-301 l3-interface irb.301
結果
設定モードから、 show security idp および show applications コマンドを入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の設定手順を繰り返して修正します。
[edit]
user@host# show security idp
idp-policy idppolicy {
rulebase-ips {
rule 1 {
match {
from-zone any;
source-address any;
to-zone any;
destination-address any;
application default;
}
then {
action {
close-client-and-server;
}
notification {
log-attacks;
}
}
}
}
}
[edit]
user@host# show security policies
from-zone untrust to-zone trust {
policy 1 {
match {
source-address any;
destination-address any;
application any;
}
then {
permit {
application-services {
idp-policy idppolicy;
}
}
}
}
}
default-policy {
permit-all;
}
[edit]
user@host# show security zones
security-zone trust {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
ge-0/0/0.0;
ge-0/0/2.0;
}
advance-policy-based-routing-profile {
p1;
}
}
security-zone untrust {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
ge-0/0/1.0;
ge-0/0/2.0;
ge-0/0/3.0;
ge-0/0/0.0;
}
application-tracking;
}
[edit]
user@host# show interfaces
ge-0/0/0 {
unit 0 {
family inet {
address 14.0.0.1/24;
}
family ethernet-switching {
interface-mode access;
vlan {
members 301;
}
}
}
}
ge-0/0/2 {
unit 0 {
family inet {
address 192.0.3.1/24;
}
family ethernet-switching {
interface-mode access;
vlan {
members 301;
}
}
}
}
デバイスの設定が完了したら、設定モードから commit を入力します。
検証
設定が正常に機能していることを確認するには、次のタスクを実行します。
設定の確認
目的
PCAPフィーダーツールを使用してPCAPを実行した後、IDP攻撃コンテキストを確認します。
アクション
動作モードから、 show security idp attack context コマンドを入力します。
出力例
user@host> show security idp attack context IDP context statistics: Context name #Hits #Data http-url 1 / http-get-url 1 / http-header-host 1 7.0.0.1 http-header-user-agent 1 lwp-request/5.827 libwww-perl/5.833 http-header 2 te: deflate,gzip;q=0.3 && connection: TE, close http-request 1 GET / HTTP/1.1 http-request-method 1 GET / HTTP/1.1
プラットフォーム固有のパケットキャプチャ動作
機能エクスプローラーを使用して、特定の機能のプラットフォームとリリースのサポートを確認します。
お使いのプラットフォームに固有の動作を確認するには、以下の表を使用してください。
| プラットフォーム |
違い |
|---|---|
| SRXシリーズファイアウォール |
パケットキャプチャをサポートするSRX300、SRX320、SRX340、SRX345ファイアウォールは、ユーザーが現在の分析状態を表示し、パケットキャプチャトラフィックに対して以前に処理されたデータをリセットできる |