カテゴリー: consulting
投稿者: ikeriri
•Lawrence Abramsさんの投稿より
https://www.bleepingcomputer.com/news/microsoft/windows-10-quietly-got-a-built-in-network-sniffer-how-to-use/

•Windowsのキャプチャ方法としては以前からnetshによる方法として netsh trace start capture=yes traceFile=ファイル名.etlがありましたが、こちらのETLは以前はWiresharkでうまく処理できなかったり(現在のWiresharkはETL対応)、インタフェースの指定が難しいなど問題がありました。これに対してWindows10 May 2020アップデートにおいて、新しくpktmon.exeに-l real-timeおよびpktmon pcapngオプションが追加されました!
Pktmonのサブコマンドはpktmon [コマンド]に対応しており、オンラインヘルプは pktmon filter help のように入力します。管理者権限でコマンドプロンプトを起動したら、キャプチャフィルタを設定してみます。pktmon filter add –p ポート番号 で特定ポートのみキャプチャするように設定できます.
pktmon start [-c { all | nics | [ids...] }] [-d] [--etw [-p size] [-k keywords]] [-f] [-s] [-r] [-m]でキャプチャを開始します。 たくさんのオプションがあるため、詳細はヘルプを見てください。
-c, --componentsオプション(おすすめ) 監視対象のコンポーネントを選択します。すべてのコンポーネント、NIC のみ、またはコンポーネント ID の一覧を指定できます。既定値は all です。コンポーネントは仮想アダプタなどがたくさんあるので pktmon comp listでIDを確認することをおすすめします。
--etwオプション(必須)パケット キャプチャのロギング セッションを開始します。
-p, --packet-size(おすすめ) 各パケットからログに記録するバイト数。常にパケット全体をログに記録するには、0 に設定します。既定値は 128 バイト。
-f, --file-name(おすすめ) .etl ログ ファイル。既定値は PktMon.etl です。
-s, --file-size ログ ファイルの最大サイズ (MB 単位)。既定値は 512 MB 。
以上が良く使うオプションです。例えば、ID13のコンポーネント(NIC)で、ファイル名test.etlですべてのパケットをキャプチャする場合は pktmon start –-etw –p 0 –c 13 –f test.etl になります。キャプチャを開始したらpktmon stopで停止します。
さて、これまでのファイルはetlのため、Microsoft Message Analyzerに最適化されており、またキャプチャがうまくいっているのかも確認できませんでした。新しいWindows10 May 2020アップデートではpktmonが更新され、pktmonにリアルタイムでキャプチャ情報を表示する「-l real-time」オプション、およびETLファイルをWiresharkで処理しやすいpcapngフォーマットに変換する「pktmon pcapng」サブコマンドが追加されます。
-l real-timeオプションはpktmon startとあわせて使うことで、標準出力にキャプチャ中の情報(MACアドレス、イーサタイプ、IPアドレス等)を随時表示することで正しくキャプチャされているかを確認できます。
さらにMicrosoftのpktmonコマンドにpcapngファイルへの変換を行うpktmon pcapサブコマンドが追加されます!!pktmon pcapng ETLファイル –o pcapngファイルのように指定することでETLファイルをpcapngファイルに変換できます。例 pktmon pcapng test.etl-o test.pcapng (画像はLawrence Abrams氏)
これがあれば私たちはWiresharkがインストールできないような環境でも、現場でパケキャプを取得して後でWiresharkで解析ができます!!
https://www.bleepingcomputer.com/news/microsoft/windows-10-quietly-got-a-built-in-network-sniffer-how-to-use/

•Windowsのキャプチャ方法としては以前からnetshによる方法として netsh trace start capture=yes traceFile=ファイル名.etlがありましたが、こちらのETLは以前はWiresharkでうまく処理できなかったり(現在のWiresharkはETL対応)、インタフェースの指定が難しいなど問題がありました。これに対してWindows10 May 2020アップデートにおいて、新しくpktmon.exeに-l real-timeおよびpktmon pcapngオプションが追加されました!
Pktmonのサブコマンドはpktmon [コマンド]に対応しており、オンラインヘルプは pktmon filter help のように入力します。管理者権限でコマンドプロンプトを起動したら、キャプチャフィルタを設定してみます。pktmon filter add –p ポート番号 で特定ポートのみキャプチャするように設定できます.
pktmon start [-c { all | nics | [ids...] }] [-d] [--etw [-p size] [-k keywords]] [-f] [-s] [-r] [-m]でキャプチャを開始します。 たくさんのオプションがあるため、詳細はヘルプを見てください。
-c, --componentsオプション(おすすめ) 監視対象のコンポーネントを選択します。すべてのコンポーネント、NIC のみ、またはコンポーネント ID の一覧を指定できます。既定値は all です。コンポーネントは仮想アダプタなどがたくさんあるので pktmon comp listでIDを確認することをおすすめします。
--etwオプション(必須)パケット キャプチャのロギング セッションを開始します。
-p, --packet-size(おすすめ) 各パケットからログに記録するバイト数。常にパケット全体をログに記録するには、0 に設定します。既定値は 128 バイト。
-f, --file-name(おすすめ) .etl ログ ファイル。既定値は PktMon.etl です。
-s, --file-size ログ ファイルの最大サイズ (MB 単位)。既定値は 512 MB 。
以上が良く使うオプションです。例えば、ID13のコンポーネント(NIC)で、ファイル名test.etlですべてのパケットをキャプチャする場合は pktmon start –-etw –p 0 –c 13 –f test.etl になります。キャプチャを開始したらpktmon stopで停止します。
さて、これまでのファイルはetlのため、Microsoft Message Analyzerに最適化されており、またキャプチャがうまくいっているのかも確認できませんでした。新しいWindows10 May 2020アップデートではpktmonが更新され、pktmonにリアルタイムでキャプチャ情報を表示する「-l real-time」オプション、およびETLファイルをWiresharkで処理しやすいpcapngフォーマットに変換する「pktmon pcapng」サブコマンドが追加されます。
-l real-timeオプションはpktmon startとあわせて使うことで、標準出力にキャプチャ中の情報(MACアドレス、イーサタイプ、IPアドレス等)を随時表示することで正しくキャプチャされているかを確認できます。
さらにMicrosoftのpktmonコマンドにpcapngファイルへの変換を行うpktmon pcapサブコマンドが追加されます!!pktmon pcapng ETLファイル –o pcapngファイルのように指定することでETLファイルをpcapngファイルに変換できます。例 pktmon pcapng test.etl-o test.pcapng (画像はLawrence Abrams氏)
これがあれば私たちはWiresharkがインストールできないような環境でも、現場でパケキャプを取得して後でWiresharkで解析ができます!!
06/10: 19開発者ディナーにて誕生日プレゼントもらいました!また今年のキットはこんな感じです">SharkfestUS'19開発者ディナーにて誕生日プレゼントもらいました!また今年のキットはこんな感じです
カテゴリー: consulting
投稿者: ikeriri
カテゴリー: consulting
投稿者: ikeriri
We have many choices to capture wireless packet, off course airmon-ng ( part of aircrack-ng ) is popular in Linux environment, using Wireless Diagnostics to enable monitor mod e in macOS, but how about Windows? There are some options such as AirPcaps, EyePA and the other commercial products.
New Wireshark3 is included with npcap packet capture driver in Windows. So we can utilize new NDIS based capture driver to capture IEEE802.11 frames.
WLANhelper.exe is a kind of airmon-ng in Windows. WLANhelper set wireless adapter into monitor mode (NetMon) in open source way.
At first, install npcap with “Support raw 802.11 traffic (and monitor mode) for wireless adapters with Wireshark3.

Next download the newest release of WlanHelper ( great work by Yang Luo )
https://github.com/hsluoyz/WlanHelper/releases
Then just execute WlanHelper.exe with Administrator privileges.
( there are many options in WlanHelper but just try it )
WlanHelper starts in interactive mode, so you will just choose opetions to set your wireless adapter in monitor mode. Choose your wireless adapter number and choose 1 to switch WLAN card to Network Monitor (NetMon).

This time I tried Planex GW-450D ( MediaTek mt7610u ), thumb size USB adapeter supports IEEE802.11abgn+ac 1x1:1. ( I tried many kinds of adapters, some Realtek and Intel failed but many Qualcomm and Broadcom works well ).
Finally, start Wireshark3 and choose Capture

I also find there are a few information in Radiotap / PPI header than AirPcap and EyePA, but its open source ! WLANhelper is a nice alternatives of commercial products !!
(Guy Harris commented below
Unfortunately, on Windows, the only information that Npcap can get for the radiotap header is what Windows' NDIS mechanism supplies, which is:
the type of PHY;
the received signal strength, in dBm;
the data rate;
the channel center frequency;
the TSF time stamp;
and there's no guarantee that a given driver will even supply all of that. I suspect the channel frequency is 0 for your device because the adapter doesn't supply it; it appears that NPF_TapExForEachOpen() in the Npcap driver is supplying the center frequency even if it's zero - I'll file a bug on that. AirPcap devices don't go through the standard Windows NDIS mechanism - they go through a special driver mechanism - so they can provide radio information that Npcap can't.)
New Wireshark3 is included with npcap packet capture driver in Windows. So we can utilize new NDIS based capture driver to capture IEEE802.11 frames.
WLANhelper.exe is a kind of airmon-ng in Windows. WLANhelper set wireless adapter into monitor mode (NetMon) in open source way.
At first, install npcap with “Support raw 802.11 traffic (and monitor mode) for wireless adapters with Wireshark3.

Next download the newest release of WlanHelper ( great work by Yang Luo )
https://github.com/hsluoyz/WlanHelper/releases
Then just execute WlanHelper.exe with Administrator privileges.
( there are many options in WlanHelper but just try it )
WlanHelper starts in interactive mode, so you will just choose opetions to set your wireless adapter in monitor mode. Choose your wireless adapter number and choose 1 to switch WLAN card to Network Monitor (NetMon).

This time I tried Planex GW-450D ( MediaTek mt7610u ), thumb size USB adapeter supports IEEE802.11abgn+ac 1x1:1. ( I tried many kinds of adapters, some Realtek and Intel failed but many Qualcomm and Broadcom works well ).
Finally, start Wireshark3 and choose Capture

I also find there are a few information in Radiotap / PPI header than AirPcap and EyePA, but its open source ! WLANhelper is a nice alternatives of commercial products !!
(Guy Harris commented below
Unfortunately, on Windows, the only information that Npcap can get for the radiotap header is what Windows' NDIS mechanism supplies, which is:
the type of PHY;
the received signal strength, in dBm;
the data rate;
the channel center frequency;
the TSF time stamp;
and there's no guarantee that a given driver will even supply all of that. I suspect the channel frequency is 0 for your device because the adapter doesn't supply it; it appears that NPF_TapExForEachOpen() in the Npcap driver is supplying the center frequency even if it's zero - I'll file a bug on that. AirPcap devices don't go through the standard Windows NDIS mechanism - they go through a special driver mechanism - so they can provide radio information that Npcap can't.)

カテゴリー: consulting
投稿者: ikeriri
カテゴリー: consulting
投稿者: ikeriri

いけりり@Viennaです。初のオーストリアになりますが現地到着しました。

Imperial Riding School Vienna A Renaissance Hotelはすごいきれいなところで、周囲も歴史的な建物が多い印象です

今日からがんばります!
カテゴリー: consulting
投稿者: ikeriri

いけりり@SharkfestUSです。Wernerさんがわざわざ「リックテレコム刊行 パケットキャプチャ入門 Wiresharkによる解析」の旧版を持ってきていただきました!

サインをということでサインしました。大丈夫かなぁ。

記念写真をとりましたー。旧版にあわせてリックテレコム刊行「パケットキャプチャ実践 ダンプ解析 応用編」もあります!

日本語難しいのに、なんだか申し訳ないくらいです
カテゴリー: consulting
投稿者: ikeriri
いけりり@Sharkfest ASIAはじまりました。毎回恒例な開発者ディナーがCosmosというNEC(Nanyang Executive Centre)の隣のレストランでありました!
誕生日イベントとかあって楽しかったです。料理もおいしかったよ
地元ビールはTigerのほか、FAT YAKというのもありました。
FAT YAKはIPA系なのか、苦かったです。
グッズもいただきました!いつもよりはこじんまりとしてましたが、すごくよかったです!
12/21: Wiresharkセミナ開催しました
カテゴリー: consulting
投稿者: ikeriri
カテゴリー: consulting
投稿者: ikeriri
カテゴリー: consulting
投稿者: ikeriri