{"id":1985,"date":"2016-10-23T17:02:57","date_gmt":"2016-10-23T09:02:57","guid":{"rendered":"http:\/\/www.51cos.com\/?p=1985"},"modified":"2016-12-27T12:16:04","modified_gmt":"2016-12-27T04:16:04","slug":"linux%e7%94%a8wireshark%e6%8a%93%e5%8f%96usb%e6%95%b0%e6%8d%ae%e5%8c%85%ef%bc%8cmac-os%e5%88%a9%e7%94%a8remote-virtual-interfacewireshark%e6%8a%93%e5%8f%96iphone%e6%95%b0%e6%8d%ae%e5%8c%85","status":"publish","type":"post","link":"http:\/\/www.51cos.com\/?p=1985","title":{"rendered":"Linux\u7528wireshark\u6293\u53d6USB\u6570\u636e\u5305\uff0cMAC OS\u5229\u7528Remote Virtual Interface+wireshark\u6293\u53d6iphone\u6570\u636e\u5305"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Linux\uff1atype in terminal:<\/p>\n<p>su -c &#8220;modprobe usbmon&#8221;<\/p>\n<p>su -c &#8220;wireshark&#8221;<\/p>\n<p>(First load kernel module that allow for usb sniffing for root, second load wireshark as root)<\/p>\n<p>Than select usbmonX, where X stand for usb bus number (lsusb show those numbers).<\/p>\n<p>After than you still need to filter packets for device \/ vendor id, or something else device specific, as wireshark will show all packets from all devices plugged into that bus. (Again lsusb before\/after plugging you device will help).<\/p>\n<p>&nbsp;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>&nbsp;<\/p>\n<p>\u82f9\u679c\u5728 iOS 5 \u4e2d\u65b0\u5f15\u5165\u4e86\u201c\u8fdc\u7a0b\u865a\u62df\u63a5\u53e3\uff08Remote Virtual Interface,RVI\uff09\u201d\u7684\u7279\u6027\uff0c\u53ef\u4ee5\u5728 Mac \u4e2d\u5efa\u7acb\u4e00\u4e2a\u865a\u62df\u7f51\u7edc\u63a5\u53e3\u6765\u4f5c\u4e3a iOS \u8bbe\u5907\u7684\u7f51\u7edc\u6808\uff0c\u8fd9\u6837\u6240\u6709\u7ecf\u8fc7 iOS \u8bbe\u5907\u7684\u6d41\u91cf\u90fd\u4f1a\u7ecf\u8fc7\u6b64\u865a\u62df\u63a5\u53e3\u3002\u6b64\u865a\u62df\u63a5\u53e3\u53ea\u662f\u76d1\u542c iOS \u8bbe\u5907\u672c\u8eab\u7684\u534f\u8bae\u6808\uff08\u4f46\u5e76\u6ca1\u6709\u5c06\u7f51\u7edc\u6d41\u91cf\u4e2d\u8f6c\u5230 Mac \u672c\u8eab\u7684\u7f51\u7edc\u8fde\u63a5\u4e0a\uff09\uff0c\u6240\u6709\u7f51\u7edc\u8fde\u63a5\u90fd\u662f iOS \u8bbe\u5907\u672c\u8eab\u7684\uff0c\u4e0e Mac \u7535\u8111\u672c\u8eab\u8054\u4e0d\u8054\u7f51\u6216\u8005\u8054\u7f51\u7c7b\u578b\u65e0\u5173\u3002iOS\u8bbe\u5907\u672c\u8eab\u53ef\u4ee5\u4e3a\u4efb\u610f\u7f51\u7edc\u7c7b\u578b\uff08WiFi\/xG\uff09\uff0c\u8fd9\u6837\u5728 Mac \u7535\u8111\u4e0a\u4f7f\u7528\u4efb\u610f\u6293\u5305\u5de5\u5177\uff08tcpdump\u3001Wireshark\u3001CPA\uff09\u6293\u53d6 RVI \u63a5\u53e3\u4e0a\u7684\u6570\u636e\u5305\u5c31\u5b9e\u73b0\u4e86\u5bf9 iPhone \u7684\u6293\u5305\u3002<\/p>\n<p>Mac OS X \u5bf9 RVI \u7684\u652f\u6301\u662f\u901a\u8fc7\u7ec8\u7aef\u547d\u4ee4\u00a0rvictl\u00a0\u63d0\u4f9b\u7684\uff0c\u5728\u7ec8\u7aef\uff08Terminal\uff09\u4e2d\u8f93\u5165\u201c\u00a0rvictl \u00a0?\u00a0\u201d\u547d\u4ee4\u53ef\u67e5\u770b\u5e2e\u52a9\uff1a<\/p>\n<p>==================================================<\/p>\n<p>rvictl Options:<\/p>\n<p>-l, -L\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 List currently active devices<\/p>\n<p>-s, -S\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Start a device or set of devices<\/p>\n<p>-x, -X\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Stop a device or set of devices<\/p>\n<p>==================================================<\/p>\n<p>\uff082\uff09\u4f7f\u7528\u00a0\u201c\u00a0rvictl \u00a0-s\u00a0\u201d\u547d\u4ee4\u521b\u5efa\u865a\u62df\u63a5\u53e3<\/p>\n<p>\u9996\u5148\uff0c\u901a\u8fc7 MFI USB \u6570\u636e\u7ebf\u5c06 iPhone \u8fde\u63a5\u5230\u5b89\u88c5\u4e86 Mac OS+Xcode 4.2(or later) \u7684 Mac \u673a\u4e0a\u3002iOS 7 \u4ee5\u4e0a\u9700\u8981\u642d\u914d Xcode 5.0\uff08or later\uff09\uff0c\u6293\u5305\u8fc7\u7a0b\u4e2d\u5fc5\u987b\u4fdd\u6301\u8fde\u63a5\u3002<\/p>\n<p>\u7136\u540e\uff0c\u901a\u8fc7 iTunes-&gt;Summary \u6216\u8005 Xcode-&gt;Organizer-&gt;Devices \u83b7\u53d6 iPhone \u7684 UDID\uff08identifier\uff09\u3002<\/p>\n<p>\u63a5\u7740\uff0c\u4f7f\u7528\u201crvictl -s\u201d\u547d\u4ee4\u521b\u5efa RVI \u63a5\u53e3\uff0c\u4f7f\u7528 iPhone \u7684 UDID \u4f5c\u4e3a\u53c2\u6570\u3002<\/p>\n<p>==================================================<\/p>\n<p>$rvictl -s\u00a0&lt;UDID&gt;<\/p>\n<p>==================================================<\/p>\n<p align=\"left\"><img alt=\"\" \/><\/p>\n<p align=\"left\">\u521b\u5efa\u6210\u529f\u540e\uff0c\u5728\u7ec8\u7aef\u901a\u8fc7\u00a0ifconfig\u00a0\u547d\u4ee4\u53ef\u4ee5\u770b\u5230\u591a\u4e86\u4e00\u4e2a rvi0 \u63a5\u53e3\u3002\u5f53\u6709\u591a\u4e2a iOS \u8bbe\u5907\u8fde\u63a5 iMac \u65f6\uff0c\u4f9d\u6b21\u662f rvi1,rvi2\u2026\uff0c\u4f7f\u7528\u201c\u00a0rvictl \u00a0-l\u00a0\u201d\u547d\u4ee4\u53ef\u4ee5\u5217\u51fa\u6240\u6709\u6302\u63a5\u7684\u865a\u62df\u63a5\u53e3\u3002<\/p>\n<p align=\"left\">\u5728 Wireshark \u9996\u9875\u9009\u62e9 rvi0\uff0c\u4f7f\u7528\u9ed8\u8ba4\u7684 Capture Options \u5373\u53ef\u5f00\u59cb\u5bf9 iPhone \u8fdb\u884c\u6293\u5305\u3002<\/p>\n<p align=\"left\"><img alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; &nbsp; Linux\uff1atype in terminal: su -c &#038;#82 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1985","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1985"}],"version-history":[{"count":3,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1985\/revisions"}],"predecessor-version":[{"id":2030,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1985\/revisions\/2030"}],"wp:attachment":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1985"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}