LoginSignup
144
153

More than 5 years have passed since last update.

iPhone端末とかのパケットキャプチャ

Posted at

出来るとは聞いていたけど、やってみたら簡単さに感動したのでメモw
詳細は以下に書いてある。
QA1176 Getting a Packet Trace

まとめると、以下

  1. Macを用意する
  2. Xcode(4.2以降)をインストールする
  3. iPhoneやiPadなどの端末(iOS5以降)をMacに接続する
  4. iPhoneデバイスの仮想インターフェイス(Remote Virtual Interface)を作成する
  5. 仮想インターフェイスをキャプチャする
  6. 仮想インターフェイスを破棄する

以下appleサイトからの引用

仮想インターフェイス作成

$ # First get the current list of interfaces.
$ ifconfig -l
lo0 gif0 stf0 en0 en1 p2p0 fw0 ppp0 utun0
$ # Then run the tool with the UDID of the device.
$ rvictl -s 74bd53c647548234ddcef0ee3abee616005051ed

Starting device 74bd53c647548234ddcef0ee3abee616005051ed [SUCCEEDED]

$ # Get the list of interfaces again, and you can see the new virtual
$ # network interface, rvi0, added by the previous command.
$ ifconfig -l
lo0 gif0 stf0 en0 en1 p2p0 fw0 ppp0 utun0 rvi0

  • -sで指定しているのは端末のidentifier
    • 色々確認方法はあると思うが、今回はOrganizerで端末のidentifierを確認

キャプチャ開始

$ sudo tcpdump -i rvi0 -n

  • 後で、wiresharkで読み込んだりするのなら、-wでファイルに書き出すと良いかも
  • buffer sizeを変更してないとイケナイ場合は、-Bとか

    • パケットサイズが大きい時とか!
  • 個人的には結局以下のコマンドを叩いた

$ sudo tcpdump -i rvi0 -n -w hoge.pcap

仮想インターフェイスの破棄

$ rvictl -x 74bd53c647548234ddcef0ee3abee616005051ed

Stopping device 74bd53c647548234ddcef0ee3abee616005051ed [SUCCEEDED]

まとめ

僕は、未だに解読出来る事の方が少ないですけどね(^q^;

144
153
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
144
153