11.07.2015 Views

Ikeriri network service co., ltd. Packet capture company - Sharkfest ...

Ikeriri network service co., ltd. Packet capture company - Sharkfest ...

Ikeriri network service co., ltd. Packet capture company - Sharkfest ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PA-3 Debugging Wireless with WiresharkIncluding Large Trace Files, AirPcap &Cascade PilotMegumi Takeshita, ikeriri <strong>network</strong> <strong>service</strong><strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp1


<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>.<strong>Packet</strong> <strong>capture</strong> <strong>co</strong>mpany<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp3Training at JGSDF• Consulting• Reselling• Debugging• Investigating• Training<strong>Packet</strong>Capture


Reseller of Riverbed Technology,Metageek, OSCIUM, Dual<strong>co</strong>mm etc.• <strong>Ikeriri</strong> is one of the reseller of <strong>Packet</strong> <strong>capture</strong> /analysis products in Japan• Riverbed Technology’s AirPcap, TurboCap, Pilot• Metageek Wi-Spy and Chanalyzer• OSCIUM products• Dual<strong>co</strong>mm productsetc.<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp4


Comparison pcap files• We should <strong>capture</strong> <strong>co</strong>mparison pcap files fordebugging because there may be clues !• Using boundary value analysis and equivalencepartitioning, <strong>co</strong>llect <strong>co</strong>mparison pcaps.• Some cases we can easily find the problem, keys,and the answer only watching 2 pattern of pcaps.• Frame <strong>co</strong>lor,Expert info is easiest<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp7


Gathering information and making tableCreate plan ofExperiment8• Hearing the customer in deep,address (MAC,IP) port (TCP,UDP)log message, how to ? How many ?• Host type, OS, Software version*Android is difficult ( many variation)iOS ( iPhone and iPad ) is simpleWindows 7/8 may be in same result• Frequency is also important<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jpTest <strong>capture</strong>procedurethe iterationnumbertest kind, typestest <strong>co</strong>nfiguration


Standards and proto<strong>co</strong>l and sequence• Standards, proto<strong>co</strong>l helps usdebugging, using documents,White Papers in IEEE, RFCsin IANA and other sites• Sequence diagram is verymuch hint for debug forchecking and <strong>co</strong>mparing<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp9


<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp10


11Before capturing• Clear browser cache for capturing all <strong>co</strong>mmunicationpacket.• DNS cache is also clear if you need to get DNS queryresponsepacket• Disable or turn off Windows firewall and personalfirewall etc.• Stop and exit software and <strong>service</strong> of sending packetlike VPN(keep alive), UPnP(SSDP dis<strong>co</strong>very), iTunes• Re<strong>co</strong>rd Date, IP address, tcp port and MAC address forinspecting later.<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp


Tips1 redirecting information12• Executing ip<strong>co</strong>nfig and getmac <strong>co</strong>mmand andredirecting help us inspecting later<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp


TIPS2: netstat –a and netstat -b<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp13• Show tcp/udp <strong>co</strong>nnections using netstat,and I re<strong>co</strong>mmend piping and find matching (LISTEN)netstat –b tells bind application to socket.


TIPS3• Please check your NIC status ( including Error andDiscard frames ) using netstat –e <strong>co</strong>mmand.<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp14


Check settings in NIC• Today almost NICs offload tcp, udp/ip function.• Almost NICs support Gigabit Ethernet and carrierextension ( over 1500MTU ex. 9kb MTU)• Wireshark read pcap stream from WinPcap• Please check offload settings in propertiesin NIC ( from device manager)• Also please check MTU setting too.(Jumbo frame or MTU)<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp15


Use Windows Search Index• To add extension of cap and pcap,set type as clear text search,We can search pcap/cap files like Google !off <strong>co</strong>urse in multibytes ( in Japanese )• Control panel -> index option / folder option16


<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp17


Capturing many interface in one timeCheck multiple interface and <strong>capture</strong>• In case of checking many interface in the same time,now check multiple interface and start <strong>capture</strong>.• Trace file is <strong>co</strong>mbined with multiple interface• For example upstream/downstream from router,client/server and so on.<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp18


USB Debugging• We can <strong>capture</strong> USB frames using Linux• VMware environment also works<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp19


Using display filter• Proto<strong>co</strong>l.field.value style• Easiest way is taking use of actual header field(right click and show submenu and set/prepare filter )• Condition of multiple format &&(AND) ||(OR)parameter value can be <strong>co</strong>mpared ( gt ge / lt le )• Automatic <strong>co</strong>mplication will help you to create• Contains keywordhttp.request.url <strong>co</strong>ntains ikeriri<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp20


<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp23


Capturing PING(ICMP) packet• Start capturing, then test ping <strong>co</strong>mmand• Source / destination IP and MAC address is necessary for<strong>co</strong>mmunication under TCP/IP• ARP request / response loop make address resolution.• ARP result is remembered and cached for 120 se<strong>co</strong>nds ineach PCs• ICMP echo request / response loop check layer 3 <strong>co</strong>nnectivity.<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp24


IP trace file analysis• Check identification field of IP headersame Identification number means re-send packet,fragmentation, and security problem.• TTL field is the hint of hop <strong>co</strong>unts ( always the nodeuses 128/64 )• Check DF/MF bit and offset field in IP header.• Compare IP length field and MTU size.<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp25


ping a.b.c.d –l 1500 -f• originalEthernet II(14)IP(20)ICMP(8)Message1500• Fragment1Ethernet II(14)IP(20)DF= MF=offset=ICMP(8)Message1472• Fragment2Ethernet II(14)IP(20)DF= MF=offset=Message28<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp26


Count packet size (MTU1500)ICMP -28Ethernet II(14)IP(20)ICMP(8)Message1472(MTU=1500)• ping IP –l size ※-f fragment disabledTCP HTTP and many proto<strong>co</strong>ls -40Ethernet II(14)IP(20)TCP(20)UDP VOIP and video transmission -28Ethernet II(14)IP(20)UDP(8)Segment sizeMSS=1460Datagram size1472(MTU=1500)<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp27


PPPoE Header and MTU size ac<strong>co</strong>rdingto Japanese ISPs• NTT east fletsMTU 1454Bytes MSS 1414Bytes• NTT west flets premiumMTU 1438Bytes MSS 1398Bytes• GRE + IPsec (transport mode) 1440 BytesGRE + IPsec (tunneling mode) 1420 Byte• UDP(NAT Traversal)IP(20) UDP(8) , PPPoE, PPP header<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp


(C) いけりり★ネットワークサービスhttp://www.ikeriri.ne.jp29


tfgen• For checking TCP vs. UDPit is very useful<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp30


Create IO graph and visualize• Compare TCP ( <strong>co</strong>nnection oriented ) and UDP(<strong>co</strong>nnectionless proto<strong>co</strong>l ) and visualize.• Lets use IO graph function and filter packet by proto<strong>co</strong>l• Set X axis to se<strong>co</strong>nds and Y axis to bit/tick (means bps)<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp31


Check streams TCP/UDP• Wireshark set stream ID (tcp.stream) in each TCP<strong>co</strong>nnection automatically.• Filter by tcp stream number and <strong>co</strong>lorize <strong>co</strong>nversation.• Check bytes using “Follow TCP Stream”• UDP stream is also analyzing by “Follow UDP Stream”<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp32


Export function is very good for HTTP• We can restore HTTP data from WEB <strong>co</strong>mmunicationpcap/pcapng files by File>Export>Object>HTTP• HTTP statistics is importantthe <strong>co</strong>unt value means Web application performance1 image map vs. 100 gif file<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp33


FlowGraph gives you a new look of debugging• Statistics>FlowGraph and maximize the screen• Display filter is very good ways to create good visualization.• If you need to follow TCP, set graph to TCP graph.• Compare behavior with RFC and standards<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp34


Trend analysis BASICTopN style, and drilled down in details1. Create TOPN list table of Endpoint and filtered2. Create Nother list table of Conversation3. Then create proto<strong>co</strong>l hierarchy and check stream<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp35


Utilize IO graph in two ways• Set packets to Y axis to create ERROR graphHistogram style is good for Frequency graph• Set bit to Y axis to create BPS graphline style is good for amount graph.<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp36


Digest Auth SUCCESS/FAILアクセスー 認 証 ( 失 敗 )ー 認 証 ( 成 功 ).pcapng• Digest authentication will be failed when ID/Password mismatch401 Unauthorized• If success<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp37


Sample trace• Try to click “Home” and check trace file.• Once called <strong>co</strong>ntrol.cgi and c.1.ae.brightness==0c.1.wb==auto c.1.shade==off c.1.focus==auto c.1.zoom==6040c.1.pan:=-4014 c.1.tilt:=-153value send to the server• Moving picture needs 5Mbpshow about creating IO graph and set Y axisas a bit/tick<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp38


(C) いけりり★ネットワークサービスhttp://www.ikeriri.ne.jp39


Use AirPcap and set clear text if possible• Need Jumbo frame or IEEE802.11a/n go NX• We have to <strong>capture</strong> their own 4 way handshake todecrypt pcap file secured by WPA2-PSK,• Its terrible troublesome to match between the WPA2handshake and the <strong>co</strong>mmunication packet.• Set free channelin test <strong>capture</strong>( android 14ch NG)<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp1 年 保 守 なし


Type/Subtype, TX rate, BSSID, CH, RSSI• In Wireless environment, please watch importantfield of IEEE802.11 header, physical (radiotap/PPI)header ( Type/Subtype, TX Rate, BSSID, CH, RSSI)• Many troubles are occurred before Data exchangehostAPProve Req/AckAuthenticationAssociation Req/Ack<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jpData1 年 保 守 なし


42Between deployments and standards• IEEE802.11 and related standards, proto<strong>co</strong>ls arenot so punctual and irritate rules ( they are notdescribed in detail and all step, procedure, but justset the summary )• For example WPS is famous and many user usethe PIN or button settings, but the deployments inWireless devices differs a lot• We have to check sequencesin detail for debugging<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp


(C) いけりり★ネットワークサービスhttp://www.ikeriri.ne.jp43


Huge packet case• In old days we use sampling technologieslike SNMP, MRTG, and many flow analysissuch as Cis<strong>co</strong> NetFlow, sFlow, iFlowIgnored Ignored Ignored May be• But small packet ( 64 bytes – 100 bytes ) may be ignored.Some small packet is important symptom of analysis ( ARP/ TCP SYN / HTTP GET and others )<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp


Debugging Environment• Using TurboCap, MMMM packets received by theapplication NNNN packets accepted by the filter anddumped to disk• To fix, Optimize I/O access flowpacket -> IRQ -> SVC -> driver -> OS• Use 6 <strong>co</strong>res Xeon-L5640 and 24GB RAM !( power resolve things and no page files )• Stop tcpdump and create program using pcaplibraries in C/C++ ( dumpcap.exe )• Pcap -> standard output -> FIFO -> SQLite• 3 month no problem<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp


Driving 250GB pcap file with Pilot• We use 250GB pcap file,huge huge file with CascadePilotPE installed into NotePC• Use view to check macro analysis,and finally check the actual pcapsusing Wireshark• Only, best, easiest way todrive huge pcap file<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp1 年 保 守 なし


QA and Demonstration<strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong> <strong>co</strong>., <strong>ltd</strong>http://www.ikeriri.ne.jp48


Thank You !!ikeriri <strong>network</strong> <strong>service</strong>http://www.ikeriri.ne.jp(C) <strong>Ikeriri</strong> <strong>network</strong> <strong>service</strong>http://www.ikeriri.ne.jp

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!