Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Ethernet layer from a pcap file?

I have a pcap captured with Wireshark. Is there any function in Wireshark that will strip Ethernet layer from the result? Or any command line tool to do it?

like image 333
mcv Avatar asked Oct 06 '10 08:10

mcv


People also ask

How do I decode a pcap file in Wireshark?

To load a PCAP file in Wireshark, open Wireshark and in the menu bar, click 'File', then click 'Open' and navigate to the file's location, then click 'Open. ' In our analysis of the PCAP file, we will try three analysis techniques to find any indicators of malicious activity. These steps can be performed in any order.

What is inside a pcap file?

What is a PCAP file? PCAP files are data files created using a program. These files contain packet data of a network and are used to analyze the network characteristics. They also contribute to controlling the network traffic and determining network status.


1 Answers

I searched a bit more about pcap editors, and I found that this works:

$ bittwiste -I a.pcap -O b.pcap -M 12 -D 1-14

-M 12 sets link type to RAW
-D 1-14 deletes bytes 1-14 in link data layer (Etherenet frame is 14 bytes long)

When I open up result in Wireshark I see "Raw packet data (No link information available)" and IP frame below. So this is what I needed.

like image 101
mcv Avatar answered Sep 28 '22 02:09

mcv