Questions tagged [packet-capture]

is for questions about capturing packets of various protocols that are transmitted over a network.

A lot of computer network protocols transmit their contents in packets. Packet capture is the interception of these packets as they are moved over a network of some type.

A packet sniffer captures raw data traveling over a network segment and saves it to a file for analysis.

Software

A software sniffer can generally only capture network data either originating from or going to the computer running it, plus any "broadcast" messages, if the computer is connected to the network via a switch. If the computer is connected to the network via a router, it may be able to capture network data for any device on connected to the same router.

Hardware

A hardware packet sniffer is physically connected to the network by connecting it to a router or switch. Sometimes the router or switch has to be configured to allow the sniffer to capture traffic being routed through it; this is called port mirroring.

Analysis

The captured data can be analyzed by the software that captured it, or by a program specifically designed to analyze the network data.

See Also

  • Wikipedia Article on Packet Analyzers
  • The term packet sniffer is also common and can be considered a synonym.
659 questions
0
votes
1 answer

WSASend Buffer to String

How I can get the Winsock2 WSASend() Buffer into a string? This is the code I currently have, and it write only a lot of Icharacters. int WINAPI Hook_WSASend(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, LPWSAOVERLAPPED a5,…
Fr0z3n
  • 1,569
  • 1
  • 18
  • 39
0
votes
1 answer

Libpcap not capturing any interface on android device

I am trying to make a packet sniffing Application and I had build it as a system Application for nexus 4. r = pcap_findalldevs (&alldevs, errbuf); printf("R==========%d",r); __android_log_write(ANDROID_LOG_ERROR, "Tag",errbuf ); error is E/Tag…
0
votes
1 answer

Simple packet capturing

I've got a GPS tracker which is sending two packets to my server. First of them contains OBD data, in the second one we can find coordinates. I have an application which is listening on specific port (Traccar) however it is capturing only the second…
0
votes
1 answer

how to use packets sniffed with scapy

So my question is , I have been trying to work with scapy by sniffing packets going in and out of my computer using a simple sniff() and print pkt.summary() everything is going well then I wanted to go a bit further so I put my wifi adapter in to…
Amr El Aswar
  • 3,395
  • 3
  • 23
  • 36
0
votes
1 answer

How to analyse packet infromation from a traffic dump file in C++?

I write a C console program due to dump network traffic with "pCap" library. I want to get packet information (e.g. protocol-type, sender-ip, etc) from this binary file. My code : #include "stdafx.h" #include #include #include…
0
votes
1 answer

Determine the closed/closing flow in the network traffic

I've developed a network traffic classification program in C. I used the 5 tuple to determine a flow. The 5 tuple is: source adress destination adress source port destination port protocol(tcp,udp,dns etc) However, in addition to determine a…
Anamort
  • 341
  • 4
  • 17
0
votes
1 answer

Implementation of ISATAP Protocol

Can anybody help me figure out how to implement ISATAP packet? I'm creating packets in C++ (Winpcap). I can't imagine how it should be. Specification: http://www.networksorcery.com/enp/protocol/isatap.htm Is that an example of ISATAP packet? 0000…
Igerko
  • 79
  • 2
  • 7
0
votes
1 answer

tshark: apply filter then output a fixed number of packets

I would like to use one tshark command that would: open a capture file, apply a filter to its contents and then output a fixed number of resulting packets. Currently, I have come up with tshark -r -Y -w -c…
alisianoi
  • 2,003
  • 3
  • 31
  • 46
0
votes
1 answer

C / Python WinPCap Translation

Sorry, this will be a very simple question for most of you. I'm trying to convert some of the code from here into Python (3.4) as I don't know C. That's primarily the basis of this issue. While I have created the Python data structures according to…
Apples292
  • 82
  • 1
  • 11
0
votes
0 answers

Wireshark: understanding the contents of youtube video capture file

Here is a link to a .pcapng file which holds the first 30 seconds of a single youtube video. It was preprocessed in the following way: I used the display filter http.request.uri contains "crossdomain.xml" to learn the ip address of the client and…
alisianoi
  • 2,003
  • 3
  • 31
  • 46
0
votes
3 answers

Capturing network traffic on Linux

Question: I have one Windows laptop, one Linux laptop and a wireless router. Now I want to "investigate" the hotmail/windows live protocol. What I want to do is route network traffic from the windows laptop via ethernet to the linux laptop, capture…
Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
0
votes
0 answers

Sniffed packets are wrong

I want to sniff packets on my server and I just tried some wrappers for receive packets like MJSniffer, SharpCap but thats all show me wrong data I had to write server - client exe for check received packets and im surprised. For example i sent to…
Burak Dincer
  • 65
  • 1
  • 9
0
votes
0 answers

Getting IP Packets from NIC in Linux

I am working on some kind of Router Project. I need ethernet frames/ IP Packets to work correctly. However, normal packet sniffing can't work, because it makes two copies of packets. Is there a way to prevent Kernel stack from getting packets and…
Vikas Raturi
  • 916
  • 2
  • 13
  • 23
0
votes
1 answer

How can I merge 'split/partial' packets with libpcap?

I am capturing HTTP packets, and as I expected, it is breaking them up as some of the packers are just too large for one packet. How can I merge packets together? I've looked into the structure, and nothing is popping out. The one thing I did find…
Kladskull
  • 10,332
  • 20
  • 69
  • 111
0
votes
1 answer

Decoding ARP packets using jnetpcap library

The following error occured while trying to read packets using jnetpcap library. What could be the reason ? ERROR actor.OneForOneStrategy: org.jnetpcap.protocol.network.Ip4java.io.NotSerializableException: org.jnetpcap.protocol.network.Ip4 at…
user3823859
  • 469
  • 1
  • 7
  • 20