introduction to ostinato, network packet crafting and generator

23
Introduction to Ostinato Packet Traffic Generator and Analyzer Twitter: @ebiken | [email protected] Introduction to "OSTINATO" | 2015/12/09 1

Upload: kentaro-ebisawa

Post on 17-Feb-2017

1.517 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Introduction to Ostinato, network packet crafting and generator

Introduction toOstinato

Packet Traffic Generator and Analyzer

Twitter: @ebiken | [email protected]

Introduction to "OSTINATO" | 2015/12/09 1

Page 2: Introduction to Ostinato, network packet crafting and generator

List of Contents |目次•What is “OSTINATO”• Overview of OSTINATO• Installation (Windows)• Installation (Linux/Ubuntu)• Steps to use Ostinato• Connecting to remote drone• Import / Export Stream• Links

• “OSTINATO” とは?• OSTINATO 全体構成• インストール方法 (Windows)•インストール方法 (Linux/Ubuntu)•利用手順•リモートの drone に接続•ストリームのインポート / エクスポート•リンク集

Introduction to "OSTINATO" | 2015/12/09 2

Page 3: Introduction to Ostinato, network packet crafting and generator

What is “OSTINATO” |“ OSTINATO” とは?• Ostinato is …• Network packet crafter/traffic generator and analyzer with a friendly GUI.• Use via GUI or Python API.• Runs on Windows, Linux, BSD and Mac OS X.• OpenSource (GNU GPLv3)

• Ostinato とは?• グラフィカルにパケット作成&送信&キャプチャ(解析)が可能• GUI に加え、 Python API 経由でのパケット送信• Windows, Linux, BSD, Mac OS X で動作• OpenSource (GNU GPLv3)

Introduction to "OSTINATO" | 2015/12/09 3

Page 4: Introduction to Ostinato, network packet crafting and generator

Overview of OSTINATO | OSTINATO 全体構成

Introduction to "OSTINATO" | 2015/12/09 4

drone(controller)

ports

Ostinato GUI (agent)

ports

• User interface to craft packets | start/stop traffic. パケット作成(編集) | トラフィック開始・停止• Agent could be Python script. Agent 機能は Python script でも実行可能

Note: Naming of agent and controller is a bit confusing. Be careful when reading documents. agent / controller のネーミングが誤解を招きやすいので注意

• Send / Receive packets パケット送受信を実行• could run on different host 異なるホスト上で動作可能drone

(controller)

Page 5: Introduction to Ostinato, network packet crafting and generator

Installation | インストール方法 (Windows)1. Install Winpcap | Winpcap をインストール• https://www.winpcap.org/

2. Download binary | バイナリをダウンロード• http://ostinato.org/downloads.html#binary-packages

3. Extract and Run | 展開して実行• By running “ostinato.exe” (GUI), “drone.exe” will be also

executed in background.• “ostinato.exe” (GUI) を起動すると、バックグラウンドで “ drone.exe” も実行される。

Introduction to "OSTINATO" | 2015/12/09 5

Page 6: Introduction to Ostinato, network packet crafting and generator

Installation | インストール方法 (Linux/Ubuntu)$ sudo apt-get install ostinato• This will install related packages like wireshark.• wireshark 等、関連パッケージもインストールされる。

$ sudo ostinato• By running “ostinato” (GUI), “drone” will be also executed in background.• “ostinato” (GUI) を起動すると、バックグラウンドで “ drone” も実行される。

Introduction to "OSTINATO" | 2015/12/09 6

ebiken@u1510d:~$ which ostinato/usr/bin/ostinatoebiken@u1510d:~$ which drone/usr/bin/drone

!! root privilege required !!

Page 7: Introduction to Ostinato, network packet crafting and generator

Steps to use Ostinato | 利用手順1. Remove unnecessary ports2. Craft Streams• Stream = Packet to send

3. Apply stream settings• To send stream settings to drone

(controller)4. Send packets (Start Tx)5. Start Capture

1. 不要なポートを削除2. ストリームの作成• Stream = 送信するパケット3. ストリームの適用( Apply )• drone (controller) へストリーム設定を送信4. パケットの送信 ( Start Tx )5. パケットのキャプチャ

Introduction to "OSTINATO" | 2015/12/09 7

Page 8: Introduction to Ostinato, network packet crafting and generator

0. Run Ostinato (GUI) | Ostinato 起動

Introduction to "OSTINATO" | 2015/12/09 8

Port Group and Ports• Port Group = drone (Controller)• By default, Ostinato will connect to

the drone running on localhost.• デフォルトでは同じホストの

drone (port group) に接続しているStream settings (per port)ポート毎のストリーム設定• You would add stream here• ここにストリームを追加するStart / Stop Stream, CaptureClear Statsストリームやキャプチャの開始 / 停止統計情報のクリアStatus & Statistics info per Port.ポート毎の状態&統計情報

Page 9: Introduction to Ostinato, network packet crafting and generator

1. Remove unnecessary ports |不要なポートを削除

Introduction to "OSTINATO" | 2015/12/09 9

• By default, there are many unnecessary ports listed.• Remove them by adding configuration file: Ostinato.ini

• デフォルトでは不要なポートが表示されている• 設定ファイルを追加する事により削除可能:

Ostinato.ini ex: any (…) , bluetooth-monitor (…)

Linux:• Create ~/.config/Ostinato.ini• ~/.config/Ostinato.ini を作成Windows:• Create in same folder as ostinato.exe, drone.exe• 実行ファイル( ostinato.exe, drone.exe )のあるフォルダに作成More details noted here | 詳細はこちら• https://github.com/pstavirs/ostinato/wiki/Settings#drone

~$ cat .config/Ostinato.ini[PortList]Include=Exclude=bluetooth*,any*

bluetooth*,any* was removed

Page 10: Introduction to Ostinato, network packet crafting and generator

2. Craft Streams |ストリームの作成

Introduction to "OSTINATO" | 2015/12/09 10

2. Right Click and Select “New Stream”2. 右クリックして “ New Stream” を選択

1. Select port to send packet from1. パケットを送信したいポートを選択

3. Stream will be added3. ストリームが追加される

Page 11: Introduction to Ostinato, network packet crafting and generator

2. Craft Streams |ストリームの作成

Introduction to "OSTINATO" | 2015/12/09 11

5. Select “Goto” | “ Goto” 設定の選択 Behavior after sending the stream.Recommend “Goto first” for testing.ストリームを流した後の動作テストには “ Goto first” がお勧め

4. Enter any name you like4. 名前を設定(任意)

6. Click to “Edit Stream”6. クリックしてストリームを編集

Page 12: Introduction to Ostinato, network packet crafting and generator

2. Craft Streams |ストリームの作成

Introduction to "OSTINATO" | 2015/12/09 12

Example Crafting IP v 4/UDP StreamIP v 4/UDP ストリームの設定例

Page 13: Introduction to Ostinato, network packet crafting and generator

2. Craft Streams |ストリームの作成

Introduction to "OSTINATO" | 2015/12/09 13

(1)

(2)

(4)

(3)

Page 14: Introduction to Ostinato, network packet crafting and generator

3. Apply stream settings |ストリームの適用( Apply )

Introduction to "OSTINATO" | 2015/12/09 14

Do NOT forget to click “Apply” after crafting stream.This will send stream configuration to drone (controller)

ストリームの設定完了後は必ず “ Apply” をクリック。ストリーム設定が drone (controller) へ投入されます。

Page 15: Introduction to Ostinato, network packet crafting and generator

4. Send packets (Start Tx) |パケットの送信 ( Start Tx )

Introduction to "OSTINATO" | 2015/12/09 15

5. Start Capture |パケットのキャプチャ

3. Start / Stop sending packets3. パケット送信の開始・停止

2. Start / Stop packet capture2. パケットキャプチャの開始・停止

1. Select “ALL Cells” or the port before start/stop (blue)1. 開始・停止前にポートの「全てのセル」を選択(青)

Make sure Transmit / Capture State is “On”Transmit / Capture State が “ On” になっている事を確認

Page 16: Introduction to Ostinato, network packet crafting and generator

Introduction to "OSTINATO" | 2015/12/09 16

5. Start Capture |パケットのキャプチャ“View Capture Buffer”• Wireshark will start by clicking here.• クリックすると Wireshark が起動。

• You can see packets you crafted are sent via the port.

• 作成したパケットが送信されている事を確認できる。

Page 17: Introduction to Ostinato, network packet crafting and generator

Connecting to remote drone |リモートの drone に接続 (1/4)

Introduction to "OSTINATO" | 2015/12/09 17

drone(controller)

ports

Ostinato GUI (agent)

ports

drone(controller)

NEW !!

Windows10

Ubuntu15.10 on VirtualBox

Port Forwardingconfig on VirtualBox

TCP 8888 -> 7878

TCP port 7878

Page 18: Introduction to Ostinato, network packet crafting and generator

Connecting to remote drone |リモートの drone に接続 (2/4)

Introduction to "OSTINATO" | 2015/12/09 18

ebiken@u1510d:~$ sudo drone…The server is running on 0.0.0.0: 7878Version: 0.7.1Revision: da551b378f72@

1. Run “drone” on Ubuntu1. Ubuntu で “ drone” を起動

2. Run “Ostinato GUI” on Windows2. Windows で “ Ostinato GUI” を起動

Page 19: Introduction to Ostinato, network packet crafting and generator

Connecting to remote drone |リモートの drone に接続 (3/4)

Introduction to "OSTINATO" | 2015/12/09 19

3. Right click and then select “New Port Group”3. 右クリックの後 “ New Port Group” を選択

4. Enter “address:port” and then click “OK”4. “address:port” を設定後、” OK” をクリック

Page 20: Introduction to Ostinato, network packet crafting and generator

Connecting to remote drone |リモートの drone に接続 (4/4)

Introduction to "OSTINATO" | 2015/12/09 20

5. You can confirm remote ports are added5. リモートにあるポートが追加された

Page 21: Introduction to Ostinato, network packet crafting and generator

Import / Export Stream |ストリームのインポート / エクスポート

Introduction to "OSTINATO" | 2015/12/09 21

Select Port -> Stream and Right Click to Open/Save streams.ポート -> ストリーム と選択。右クリックでストリームのインポート・エクスポートが可能。3 formats supported | 3つのファイル形式をサポート• Ostinato native | 独自フォーマット• PCAP/PDML (Wireshark / tcpdump)• Python script• Export only |エクスポートのみ• Used to control drone via Python script.• drone を Python script で操作する際に利用可能

Page 22: Introduction to Ostinato, network packet crafting and generator

Links | リンク集• Ostinato Home Page (Official)• http://ostinato.org/• Binary Download : http://ostinato.org/downloads.html

• Ostinato Users Guide (Official)• https://github.com/pstavirs/ostinato/wiki/UserGuide• More details of what explained in this document.• このドキュメントで説明した内容の詳細

• Ostinato Mailing List (Official)• https://groups.google.com/forum/#!forum/ostinato

Introduction to "OSTINATO" | 2015/12/09 22

Page 23: Introduction to Ostinato, network packet crafting and generator

Introduction to "OSTINATO" | 2015/12/09 23