If you’re interested in Mac Security, the next edition of my Enterprise Mac Security book is now shipping. You can get it here http://www.amazon.com/Enterprise-Mac-Security-OS/dp/148421711X. The book is shipping from 3rd party sellers, but should ship directly from Amazon soon at the regular price. I don’t usually know exactly when, but it should also appear for Kindle and on the Apple Books store as well. Hope you enjoy!
OS X has a command called rvictl, which can be used to proxy network communications from iOS devices through a computer over what’s known as a Remote Virtual Interface, or RVI. To setup an rvi, you’ll need the udid of a device and the device will need to be plugged into a Mac and have the device paired to the Mac. This may seem like a lot but if you’ve followed along with a couple of the other articles I’ve done recently this should be pretty simple. First we’ll pair:
idevicepair pairThen tap Trust on the device itself. Then we’ll grab that udid with idevice_id:
idevice_id -lNext, we’ll setup a rvi with rvictl and the -s option (here I’m just going to grab the udid since I only have one device plugged into my computer):
rvictl -s `idevice_id -l`Then we can list the connections using rvictl with the -l option:
rvictl -lNext, we’ll run a tcpdump using this newly constructed rvi0:
tcpdump -n -i rvi0Next, we’ll get a lot of logs. Let’s fire up the Nike FuelBand app and refresh our status. Watching the resultant traffic, we’ll see a line like this:
22:42:29.485691 IP 192.168.0.12.57850 > 126.96.36.199.443: Flags [S], seq 3936380112, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 706439445 ecr 0,sackOK,eol], length 0There’s an IP in there, 188.8.131.52. We can look this up and see that the servers are sitting on Amazon Web Services and verify it’s Nike. Watching the traffic with tcpdump we can then obtain GET, POST and other information sent and received. Using wireshark we could get even more detailed data. Overall though, this article is meant to focus on the iOS side of this and not on debugging and refining the approach to using tcpdump/wireshark. rvictl is a great tool in the iOS development cycle and for security researchers that are looking into how many of the apps on iOS devices exchange data. Enjoy.