Mac OS X is preinstalled with Ruby, but we want to upgrade to Ruby 1.9.3. Download the file Nessus-5.x.x.dmg.gz, and then double click on it to unzip it. Double click on the Nessus5.x.x.dmg file, which will mount the disk image and make it appear under “Devices” in “Finder”. TCPDUMP is a command line packet analyzer. Packet Peeper is a free network protocol analyzer (or ‘packet sniffer’) for Mac OS X. Its features include: TCP stream reassembly; Privilege separation; Simultaneous capture sessions; Filters, which may be defined at any time. Packet Peeper uses the same syntax as tcpdump and Wireshark (or any other program that uses the pcap library).
< B2G
This page describes how to use
netcat , tcpdump , and Wireshark to monitor network traffic to and from a real Firefox OS phone. (It may also work with the simulator, but that hasn't been tested.)
![]()
This has been tested on Ubuntu 12.10 x64; if you work with a different platform, please update this page with your experiences.
This page is based on the AOSP instructions on debugging with tcpdump and other tools.
![]()
Prerequisitesadb
These instructions assume you have a working version of
adb installed and on your path. adb is necessary to install some needed utilities, and also provides the communications channel between your phone and Wireshark. One way of getting a working copy of adb is to build your own version of Firefox OS; you can also get a prebuilt binary by following these instructions.
udevDownload Tcpdump For Windows
For
adb to work, you also need to configure a udev rule for your phone.
Getting and Installing the ToolsWireshark
Mac gba emulator. Download and install the latest version of Wireshark through one of the following channels.
Tcpdump Show Mac AddressLinux
Windows and Mac OS X
Local netcatLinux
Windows and Mac OS X
TODO: add instructions on installing netcat to Mac OS X, if necessary; Windows is a whole other beast.
Remote tcpdump and netcat
This step installs a pair of utilities onto your Firefox OS phone. Before proceeding, connect your phone to a USB port on your PC and confirm that
adb can see your phone by typing:
If your phone doesn't appear, double-check that you have followed these instructions correctly.
Getting and Installing
If you reflash the gonk portion of your phone, you will need to repeat the above instructions to reinstall
netcat and tcpdump .
Adding to Your Flash Image
Download jabra direct software. You can add
netcat and tcpdump to your build images permanently by copying them (and making sure their permissions are set to 0555) to the out/target/product/$PRODUCT_NAME/system/xbin subfolder of your B2G root directory, where $PRODUCT_NAME is the name of your phone (i.e. otoro , unagi , etc).
For example, for
otoro :
Note that if you change your build to another platform, you will need to copy
nc and tcpdump to the new xbin folder as well.
Running Wireshark
Open two terminals. In the first terminal, run:
In the second terminal, run:
The second command will launch Wireshark; if one or more interfaces is active, you should see all of the packets your phone is sending and receiving on those interfaces.
Gotchas
1. Restarting the running live capture in Wireshark (i.e. by clicking on the toolbar icon with the 'back' arrow) seems to break the connection to the phone. When this happens, exit Wireshark and kill the
tcpdump process (in the first terminal, above), then re-run the two commands again.2. if you get an error : tcpdump: no suitable device found, run |adb root| first.You need root access on the device in order to get tcpdump
TODO
Retrieved from 'https://wiki.mozilla.org/index.php?title=B2G/Packet_Sniffing_with_Wireshark&oldid=1103343'
Wireshark is one of the world's foremost network protocol analyzers, and is the standard in many parts of the industry.It is the continuation of a project that started in 1998. Hundreds of developers around the world have contributed to it, and it it still under active development. Wireshark has a rich feature set which includes the following:
Tcpdump Mac AddressSome Windows versions requires WinPcap to be installed. Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |