SlideShare uma empresa Scribd logo
1 de 14
Capture file manipulation Part I : packet selection August 2008
Welcome Back! ,[object Object],[object Object]
This months topic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Use capinfos to get quick info (1) $  capinfos test01.cap  File name: test01.cap File type: Wireshark/tcpdump/... - libpcap File encapsulation: Ethernet Number of packets: 7387  File size: 4194809 bytes Data size: 4076593 bytes Capture duration: 113.756167 seconds Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:49:47 2008 Data rate: 35836.24 bytes/s Data rate: 286689.90 bits/s Average packet size: 551.86 bytes Average packet rate: 64.94 packets/s $
Use capinfos to get quick info (2) $  capinfos -ae test*cap File name: test01.cap Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:49:47 2008 File name: test02.cap Start time: Wed Aug 13 19:49:47 2008 End time: Wed Aug 13 19:50:30 2008 File name: test03.cap Start time: Wed Aug 13 19:50:30 2008 End time: Wed Aug 13 19:51:27 2008 File name: test04.cap Start time: Wed Aug 13 19:51:27 2008 End time: Wed Aug 13 19:51:42 2008 $
Use tshark to extract packets $  tshark -r test03.cap -R "tcp.port==34421" -w port-34421.cap $ $ capinfos -aec test03.cap port-34421.cap  File name: test03.cap Number of packets: 5900  Start time: Wed Aug 13 19:50:30 2008 End time: Wed Aug 13 19:51:27 2008 File name: port-34421.cap Number of packets: 110  Start time: Wed Aug 13 19:51:11 2008 End time: Wed Aug 13 19:51:19 2008 $  $ tshark -C clean -c 10 -r port-34421.cap  1  0.000000 192.168.1.46 -> 195.12.3.3  TCP 34421 > http [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=1 2  0.333175  195.12.3.3 -> 192.168.1.46 TCP http > 34421 [SYN, ACK] Seq=0 Ack=1 Win=17520 Len=0 MSS=1460 WS=0 3  0.333227 192.168.1.46 -> 195.12.3.3  TCP 34421 > http [ACK] Seq=1 Ack=1 Win=128000 Len=0 4  0.334018 192.168.1.46 -> 195.12.3.3  HTTP GET /images/menubar/menu_on_5.gif HTTP/1.1  5  0.615100  195.12.3.3 -> 192.168.1.46 TCP [TCP segment of a reassembled PDU] 6  0.615203  195.12.3.3 -> 192.168.1.46 HTTP HTTP/1.1 200 OK  (GIF89a) 7  0.615241 192.168.1.46 -> 195.12.3.3  TCP 34421 > http [ACK] Seq=700 Ack=1473 Win=128000 Len=0 8  0.615849 192.168.1.46 -> 195.12.3.3  HTTP GET /images/buttonBG.gif HTTP/1.1  9  0.966606  195.12.3.3 -> 192.168.1.46 HTTP HTTP/1.1 200 OK  (GIF89a) 10  0.967238 192.168.1.46 -> 195.12.3.3  HTTP GET /images/nav_02_dn.gif HTTP/1.1  $
Use mergecap to merge capture files $ tshark -r test03.cap -R "tcp.port==34421" -w tmp03.cap $ tshark -r test04.cap -R "tcp.port==34421" -w tmp04.cap $  mergecap -w port-34421.cap tmp03.cap tmp04.cap  $ $ capinfos -aec tmp03.cap tmp04.cap port-34421.cap  File name: tmp03.cap Number of packets: 110  Start time: Wed Aug 13 19:51:11 2008 End time: Wed Aug 13 19:51:19 2008 File name: tmp04.cap Number of packets: 64  Start time: Wed Aug 13 19:51:32 2008 End time: Wed Aug 13 19:51:36 2008 File name: port-34421.cap Number of packets: 174  Start time: Wed Aug 13 19:51:11 2008 End time: Wed Aug 13 19:51:36 2008 $
Use editcap to split capture files (1) <x> packets per file $  editcap -c 2500 test01.cap tmp01.cap $ $ capinfos -aec tmp01.cap* File name: tmp01.cap-00000 Number of packets: 2500  Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:49:09 2008 File name: tmp01.cap-00001 Number of packets: 2500  Start time: Wed Aug 13 19:49:09 2008 End time: Wed Aug 13 19:49:27 2008 File name: tmp01.cap-00002 Number of packets: 2387  Start time: Wed Aug 13 19:49:27 2008 End time: Wed Aug 13 19:49:47 2008 $
Use editcap to split capture files (2) <x> seconds per file $ editcap -i 30 test01.cap tmp01.cap $ $ capinfos -ae tmp01.cap* File name: tmp01.cap-00000 Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:48:17 2008 File name: tmp01.cap-00001 Start time: Wed Aug 13 19:48:30 2008 End time: Wed Aug 13 19:48:48 2008 File name: tmp01.cap-00002 Start time: Wed Aug 13 19:48:57 2008 End time: Wed Aug 13 19:49:23 2008 File name: tmp01.cap-00003 Start time: Wed Aug 13 19:49:23 2008 End time: Wed Aug 13 19:49:47 2008 $
Use editcap to select packets (1) by packet numbers $  editcap -r test01.cap tmp01.cap 1-10 21-30 Add_Selected: 1-10 Inclusive ... 1, 10 Add_Selected: 21-30 Inclusive ... 21, 30 $  $ capinfos -aec tmp01.cap File name: tmp01.cap Number of packets: 20  Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:47:54 2008 $
Use editcap to select packets (2) by time $  editcap -A &quot;2008-08-13 19:48:00&quot; -B &quot;2008-08-13 19:48:59&quot;  test01.cap tmp01.cap  $ $ capinfos -aec tmp01.cap File name: tmp01.cap Number of packets: 844  Start time: Wed Aug 13 19:48:00 2008 End time: Wed Aug 13 19:48:59 2008 $
All together now :-) $  mergecap -w total.cap test*cap $  editcap -A &quot;2008-08-13 19:48:00&quot; -B &quot;2008-08-13 19:50:59&quot;  total.cap clean.cap $  editcap -i 60 clean.cap by-minute.cap $ $ capinfos -ae by-minute.cap*  File name: by-minute.cap-00000 Start time: Wed Aug 13 19:48:00 2008 End time: Wed Aug 13 19:48:59 2008 File name: by-minute.cap-00001 Start time: Wed Aug 13 19:49:01 2008 End time: Wed Aug 13 19:49:59 2008 File name: by-minute.cap-00002 Start time: Wed Aug 13 19:50:00 2008 End time: Wed Aug 13 19:50:59 2008 $
That's all folks! ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object]

Mais conteúdo relacionado

Mais de Denny K

4/23/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
4/23/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..4/23/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
4/23/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..Denny K
 
4/16/2024「同心共善」善心法師網上禪修班 (粵語) ..........
4/16/2024「同心共善」善心法師網上禪修班 (粵語) ..........4/16/2024「同心共善」善心法師網上禪修班 (粵語) ..........
4/16/2024「同心共善」善心法師網上禪修班 (粵語) ..........Denny K
 
4/2/2024 - Fourth Noble Truth • Mindfulness Meditation and Dharma Talk with V...
4/2/2024 - Fourth Noble Truth • Mindfulness Meditation and Dharma Talk with V...4/2/2024 - Fourth Noble Truth • Mindfulness Meditation and Dharma Talk with V...
4/2/2024 - Fourth Noble Truth • Mindfulness Meditation and Dharma Talk with V...Denny K
 
3/26/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/26/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..3/26/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/26/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..Denny K
 
3/19/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/19/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..3/19/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/19/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..Denny K
 
3/12/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/12/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..3/12/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/12/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..Denny K
 
3:5:2024 - Third Noble Truth • Mindfulness Meditation and Dharma Talk with Ve...
3:5:2024 - Third Noble Truth • Mindfulness Meditation and Dharma Talk with Ve...3:5:2024 - Third Noble Truth • Mindfulness Meditation and Dharma Talk with Ve...
3:5:2024 - Third Noble Truth • Mindfulness Meditation and Dharma Talk with Ve...Denny K
 
2/27/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
2/27/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..2/27/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
2/27/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..Denny K
 
2/20/2024「同心共善」善心法師網上禪修班 (粵語) ..........
2/20/2024「同心共善」善心法師網上禪修班 (粵語) ..........2/20/2024「同心共善」善心法師網上禪修班 (粵語) ..........
2/20/2024「同心共善」善心法師網上禪修班 (粵語) ..........Denny K
 
2/13/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
2/13/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..2/13/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
2/13/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..Denny K
 
2/6/2023 - Second Noble Truth • Mindfulness Meditation and Dharma Talk with V...
2/6/2023 - Second Noble Truth • Mindfulness Meditation and Dharma Talk with V...2/6/2023 - Second Noble Truth • Mindfulness Meditation and Dharma Talk with V...
2/6/2023 - Second Noble Truth • Mindfulness Meditation and Dharma Talk with V...Denny K
 
1/30/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
1/30/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..1/30/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
1/30/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..Denny K
 
1/23/2024「同心共善」善心法師網上禪修班 (粵語) ..........
1/23/2024「同心共善」善心法師網上禪修班 (粵語) ..........1/23/2024「同心共善」善心法師網上禪修班 (粵語) ..........
1/23/2024「同心共善」善心法師網上禪修班 (粵語) ..........Denny K
 
1/16/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
1/16/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..1/16/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
1/16/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..Denny K
 
1/9/2024「同心共善」善心法師網上禪修班 (粵語) ………………………..
1/9/2024「同心共善」善心法師網上禪修班 (粵語) ………………………..1/9/2024「同心共善」善心法師網上禪修班 (粵語) ………………………..
1/9/2024「同心共善」善心法師網上禪修班 (粵語) ………………………..Denny K
 
1/2/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
1/2/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong1/2/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
1/2/2023 - Mindfulness Meditation and Dharma Talk with Venerable De HongDenny K
 
12/27/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
12/27/2023「同心共善」善心法師網上禪修班 (粵語) …………………..12/27/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
12/27/2023「同心共善」善心法師網上禪修班 (粵語) …………………..Denny K
 
12/20/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
12/20/2023「同心共善」善心法師網上禪修班 (粵語) …………………..12/20/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
12/20/2023「同心共善」善心法師網上禪修班 (粵語) …………………..Denny K
 
12/13/2023「同心共善」善心法師網上禪修班 (粵語)……………………..
12/13/2023「同心共善」善心法師網上禪修班 (粵語)……………………..12/13/2023「同心共善」善心法師網上禪修班 (粵語)……………………..
12/13/2023「同心共善」善心法師網上禪修班 (粵語)……………………..Denny K
 
12/6/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
12/6/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong12/6/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
12/6/2023 - Mindfulness Meditation and Dharma Talk with Venerable De HongDenny K
 

Mais de Denny K (20)

4/23/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
4/23/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..4/23/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
4/23/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
 
4/16/2024「同心共善」善心法師網上禪修班 (粵語) ..........
4/16/2024「同心共善」善心法師網上禪修班 (粵語) ..........4/16/2024「同心共善」善心法師網上禪修班 (粵語) ..........
4/16/2024「同心共善」善心法師網上禪修班 (粵語) ..........
 
4/2/2024 - Fourth Noble Truth • Mindfulness Meditation and Dharma Talk with V...
4/2/2024 - Fourth Noble Truth • Mindfulness Meditation and Dharma Talk with V...4/2/2024 - Fourth Noble Truth • Mindfulness Meditation and Dharma Talk with V...
4/2/2024 - Fourth Noble Truth • Mindfulness Meditation and Dharma Talk with V...
 
3/26/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/26/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..3/26/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/26/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
 
3/19/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/19/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..3/19/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/19/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
 
3/12/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/12/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..3/12/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
3/12/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
 
3:5:2024 - Third Noble Truth • Mindfulness Meditation and Dharma Talk with Ve...
3:5:2024 - Third Noble Truth • Mindfulness Meditation and Dharma Talk with Ve...3:5:2024 - Third Noble Truth • Mindfulness Meditation and Dharma Talk with Ve...
3:5:2024 - Third Noble Truth • Mindfulness Meditation and Dharma Talk with Ve...
 
2/27/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
2/27/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..2/27/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
2/27/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
 
2/20/2024「同心共善」善心法師網上禪修班 (粵語) ..........
2/20/2024「同心共善」善心法師網上禪修班 (粵語) ..........2/20/2024「同心共善」善心法師網上禪修班 (粵語) ..........
2/20/2024「同心共善」善心法師網上禪修班 (粵語) ..........
 
2/13/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
2/13/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..2/13/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
2/13/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
 
2/6/2023 - Second Noble Truth • Mindfulness Meditation and Dharma Talk with V...
2/6/2023 - Second Noble Truth • Mindfulness Meditation and Dharma Talk with V...2/6/2023 - Second Noble Truth • Mindfulness Meditation and Dharma Talk with V...
2/6/2023 - Second Noble Truth • Mindfulness Meditation and Dharma Talk with V...
 
1/30/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
1/30/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..1/30/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
1/30/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
 
1/23/2024「同心共善」善心法師網上禪修班 (粵語) ..........
1/23/2024「同心共善」善心法師網上禪修班 (粵語) ..........1/23/2024「同心共善」善心法師網上禪修班 (粵語) ..........
1/23/2024「同心共善」善心法師網上禪修班 (粵語) ..........
 
1/16/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
1/16/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..1/16/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
1/16/2024「同心共善」善心法師網上禪修班 (粵語) ……………………..
 
1/9/2024「同心共善」善心法師網上禪修班 (粵語) ………………………..
1/9/2024「同心共善」善心法師網上禪修班 (粵語) ………………………..1/9/2024「同心共善」善心法師網上禪修班 (粵語) ………………………..
1/9/2024「同心共善」善心法師網上禪修班 (粵語) ………………………..
 
1/2/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
1/2/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong1/2/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
1/2/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
 
12/27/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
12/27/2023「同心共善」善心法師網上禪修班 (粵語) …………………..12/27/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
12/27/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
 
12/20/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
12/20/2023「同心共善」善心法師網上禪修班 (粵語) …………………..12/20/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
12/20/2023「同心共善」善心法師網上禪修班 (粵語) …………………..
 
12/13/2023「同心共善」善心法師網上禪修班 (粵語)……………………..
12/13/2023「同心共善」善心法師網上禪修班 (粵語)……………………..12/13/2023「同心共善」善心法師網上禪修班 (粵語)……………………..
12/13/2023「同心共善」善心法師網上禪修班 (粵語)……………………..
 
12/6/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
12/6/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong12/6/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
12/6/2023 - Mindfulness Meditation and Dharma Talk with Venerable De Hong
 

Último

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Último (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

OSTU - Sake Blok on Wireshark Capture File Manipulation (Part I)

  • 1. Capture file manipulation Part I : packet selection August 2008
  • 2.
  • 3.
  • 4. Use capinfos to get quick info (1) $ capinfos test01.cap File name: test01.cap File type: Wireshark/tcpdump/... - libpcap File encapsulation: Ethernet Number of packets: 7387 File size: 4194809 bytes Data size: 4076593 bytes Capture duration: 113.756167 seconds Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:49:47 2008 Data rate: 35836.24 bytes/s Data rate: 286689.90 bits/s Average packet size: 551.86 bytes Average packet rate: 64.94 packets/s $
  • 5. Use capinfos to get quick info (2) $ capinfos -ae test*cap File name: test01.cap Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:49:47 2008 File name: test02.cap Start time: Wed Aug 13 19:49:47 2008 End time: Wed Aug 13 19:50:30 2008 File name: test03.cap Start time: Wed Aug 13 19:50:30 2008 End time: Wed Aug 13 19:51:27 2008 File name: test04.cap Start time: Wed Aug 13 19:51:27 2008 End time: Wed Aug 13 19:51:42 2008 $
  • 6. Use tshark to extract packets $ tshark -r test03.cap -R &quot;tcp.port==34421&quot; -w port-34421.cap $ $ capinfos -aec test03.cap port-34421.cap File name: test03.cap Number of packets: 5900 Start time: Wed Aug 13 19:50:30 2008 End time: Wed Aug 13 19:51:27 2008 File name: port-34421.cap Number of packets: 110 Start time: Wed Aug 13 19:51:11 2008 End time: Wed Aug 13 19:51:19 2008 $ $ tshark -C clean -c 10 -r port-34421.cap 1 0.000000 192.168.1.46 -> 195.12.3.3 TCP 34421 > http [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=1 2 0.333175 195.12.3.3 -> 192.168.1.46 TCP http > 34421 [SYN, ACK] Seq=0 Ack=1 Win=17520 Len=0 MSS=1460 WS=0 3 0.333227 192.168.1.46 -> 195.12.3.3 TCP 34421 > http [ACK] Seq=1 Ack=1 Win=128000 Len=0 4 0.334018 192.168.1.46 -> 195.12.3.3 HTTP GET /images/menubar/menu_on_5.gif HTTP/1.1 5 0.615100 195.12.3.3 -> 192.168.1.46 TCP [TCP segment of a reassembled PDU] 6 0.615203 195.12.3.3 -> 192.168.1.46 HTTP HTTP/1.1 200 OK (GIF89a) 7 0.615241 192.168.1.46 -> 195.12.3.3 TCP 34421 > http [ACK] Seq=700 Ack=1473 Win=128000 Len=0 8 0.615849 192.168.1.46 -> 195.12.3.3 HTTP GET /images/buttonBG.gif HTTP/1.1 9 0.966606 195.12.3.3 -> 192.168.1.46 HTTP HTTP/1.1 200 OK (GIF89a) 10 0.967238 192.168.1.46 -> 195.12.3.3 HTTP GET /images/nav_02_dn.gif HTTP/1.1 $
  • 7. Use mergecap to merge capture files $ tshark -r test03.cap -R &quot;tcp.port==34421&quot; -w tmp03.cap $ tshark -r test04.cap -R &quot;tcp.port==34421&quot; -w tmp04.cap $ mergecap -w port-34421.cap tmp03.cap tmp04.cap $ $ capinfos -aec tmp03.cap tmp04.cap port-34421.cap File name: tmp03.cap Number of packets: 110 Start time: Wed Aug 13 19:51:11 2008 End time: Wed Aug 13 19:51:19 2008 File name: tmp04.cap Number of packets: 64 Start time: Wed Aug 13 19:51:32 2008 End time: Wed Aug 13 19:51:36 2008 File name: port-34421.cap Number of packets: 174 Start time: Wed Aug 13 19:51:11 2008 End time: Wed Aug 13 19:51:36 2008 $
  • 8. Use editcap to split capture files (1) <x> packets per file $ editcap -c 2500 test01.cap tmp01.cap $ $ capinfos -aec tmp01.cap* File name: tmp01.cap-00000 Number of packets: 2500 Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:49:09 2008 File name: tmp01.cap-00001 Number of packets: 2500 Start time: Wed Aug 13 19:49:09 2008 End time: Wed Aug 13 19:49:27 2008 File name: tmp01.cap-00002 Number of packets: 2387 Start time: Wed Aug 13 19:49:27 2008 End time: Wed Aug 13 19:49:47 2008 $
  • 9. Use editcap to split capture files (2) <x> seconds per file $ editcap -i 30 test01.cap tmp01.cap $ $ capinfos -ae tmp01.cap* File name: tmp01.cap-00000 Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:48:17 2008 File name: tmp01.cap-00001 Start time: Wed Aug 13 19:48:30 2008 End time: Wed Aug 13 19:48:48 2008 File name: tmp01.cap-00002 Start time: Wed Aug 13 19:48:57 2008 End time: Wed Aug 13 19:49:23 2008 File name: tmp01.cap-00003 Start time: Wed Aug 13 19:49:23 2008 End time: Wed Aug 13 19:49:47 2008 $
  • 10. Use editcap to select packets (1) by packet numbers $ editcap -r test01.cap tmp01.cap 1-10 21-30 Add_Selected: 1-10 Inclusive ... 1, 10 Add_Selected: 21-30 Inclusive ... 21, 30 $ $ capinfos -aec tmp01.cap File name: tmp01.cap Number of packets: 20 Start time: Wed Aug 13 19:47:53 2008 End time: Wed Aug 13 19:47:54 2008 $
  • 11. Use editcap to select packets (2) by time $ editcap -A &quot;2008-08-13 19:48:00&quot; -B &quot;2008-08-13 19:48:59&quot; test01.cap tmp01.cap $ $ capinfos -aec tmp01.cap File name: tmp01.cap Number of packets: 844 Start time: Wed Aug 13 19:48:00 2008 End time: Wed Aug 13 19:48:59 2008 $
  • 12. All together now :-) $ mergecap -w total.cap test*cap $ editcap -A &quot;2008-08-13 19:48:00&quot; -B &quot;2008-08-13 19:50:59&quot; total.cap clean.cap $ editcap -i 60 clean.cap by-minute.cap $ $ capinfos -ae by-minute.cap* File name: by-minute.cap-00000 Start time: Wed Aug 13 19:48:00 2008 End time: Wed Aug 13 19:48:59 2008 File name: by-minute.cap-00001 Start time: Wed Aug 13 19:49:01 2008 End time: Wed Aug 13 19:49:59 2008 File name: by-minute.cap-00002 Start time: Wed Aug 13 19:50:00 2008 End time: Wed Aug 13 19:50:59 2008 $
  • 13.
  • 14.