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
1
vote
0 answers

correct way to determine a complete handshake of EAPOL frames

I am trying to capture completed handshake frames in an WPA2 EAPOL authentication. The source can be a pcap file or live capture. My idea is to identify message type of EAPOL (message 1, 2, 3 & 4) compare Key Nonce (should be similar for message…
1
vote
0 answers

How to capture a multicast packet programmatically

I have a multicast packet from a capture using tcpdump. I can replay the packet using tcpreplay -i eth0 on.pcap and I can receive it on another machine using tcpdump. I have tried c code and python code to try and capture this packet without…
John Smith
  • 3,493
  • 3
  • 25
  • 52
1
vote
0 answers

How to capture a HTTP session from the server without a shell

I am debugging a web app that communicates with a secure payment gateway provided by my client's bank. The secure gateway works the following way: The end user's browser is redirected to the bank's website, where he has to input his credit card…
PaulJ
  • 1,646
  • 5
  • 33
  • 52
1
vote
1 answer

How to filter tcpdump result by keeping socket recv() data only?

As is known, the result of a tcp packet capture consists of packets that may be retransmission, out of order and so on, which will be filtered and rearranged by the network stack, and the application will call recv() to get the real data. My…
alexzzp
  • 419
  • 2
  • 6
  • 15
1
vote
1 answer

Intermediate C : String search in a large file

I'm writing a 'C' code that stores the TCP payload of captured packets in a file (payload of each packet is separated by multiple "\n" characters). Using C, is it possible to search for a particular string in the file after all the packets are…
1
vote
0 answers

Pcapy streaming to Flask

The following script has been circling around a lot of my pcapy google searches, it does exactly what I need it to do, which is live packet capture. import pcapy from impacket.ImpactDecoder import * # list all the network…
A.L
  • 31
  • 1
  • 4
1
vote
0 answers

Packet sniffing on another system

I'm developing a packet sniffer program that captures the packets going through a system using protocols(TCP,UDP,HTTP). The packet sniffer program will run on a system and captures the packets on another system using the other system's ip address.…
vamsi
  • 344
  • 5
  • 22
1
vote
1 answer

Can I edit packets from my server before they reach my Client?

I made a simple Instant Message Chat Client and Server on TCP, that both run off Adobe AIR. It works great and it was a interesting way to learn basic networking programming. My Question: Is it possible to change the data in the packet sent from the…
1
vote
0 answers

Adding multiprocessing to threading code in python

I am writing a Python 3 script to sniff and process wireless packets. Right now, I am able to use threading and run simultaneously a producer and a consumer. The producer sniffs packet and puts each one in a queue, in real time, and the consumer…
1
vote
3 answers

how to increase security while using ssl in android volley

I am searching for 2 days for my problem and i had no luck in finding it. my problem : I have comodo ssl/tls certificate installed on my server, and I am using android volley library for connecting to server, until now i was using just "https://..."…
niafara
  • 13
  • 3
1
vote
0 answers

Log all URLs visited by user windows machine within a windows service

I've been searching the internet for C# tutorials on how to implement a windows service that sits on a windows machine that logs all URLs visited from any browser on that machine. In the most simple sense i literally want to Log the URL and DateTime…
1
vote
1 answer

PcapDotNet only runs on development machine

I'm using the PcapDotNet Library (https://github.com/PcapDotNet/Pcap.Net/wiki) to build a protocol-specific remote sniffer for a private network. I can include the DLLs in Visual Studio 2017 in a C# application, and it runs fine. There are 5 PCAP…
buzzard51
  • 1,372
  • 2
  • 23
  • 40
1
vote
1 answer

Lost some packet using Python sniffing module

I've tried almost all Python sniffing modules (pcapy, winpcapy, pypcap, scapy, socket). I got always the same problem that I lost a part of the packets (about 1% ~ 10%). But at same time with Wireshark and tcpdump packets are never lost; maybe…
Poisonx
  • 11
  • 2
1
vote
1 answer

Packet logging on windows

Are there any methods to log incoming packets other than wincap?
user963241
  • 6,758
  • 19
  • 65
  • 93
1
vote
2 answers

Monitor traffic in Java

I'm messing around with a program to track my internet browsing habits and I'm trying to think of the best way to do it. I have some ideas but I'm not sure how feasible they are. Somehow hook into firefox. I don't think there's an API that I can…
JPC
  • 8,096
  • 22
  • 77
  • 110