RawCap is a free command line network sniffer for Windows that uses raw sockets.

Quick RawCap facts:


You will need administrator privileges to run RawCap.

F:\Tools>RawCap.exe --help
NETRESEC RawCap version

Usage: RawCap.exe [OPTIONS] <interface> <pcap_target>
 <interface> can be an interface number or IP address
 <pcap_target> can be filename, stdout (-) or named pipe (starting with \\.\pipe\)

 -f          Flush data to file after each packet (no buffer)
 -c <count>  Stop sniffing after receiving <count> packets
 -s <sec>    Stop sniffing after <sec> seconds
 -m          Disable automatic creation of RawCap firewall entry
 -q          Quiet, don't print packet count to standard out

 0.     IP        :
        NIC Name  : Local Area Connection
        NIC Type  : Ethernet

 1.     IP        :
        NIC Name  : WiFi
        NIC Type  : Wireless80211

 2.     IP        :
        NIC Name  : Loopback Pseudo-Interface 1
        NIC Type  : Loopback

 3.     IP        :
        NIC Name  : Mobile 12
        NIC Type  : Wwanpp

Example 1: RawCap.exe 0 dumpfile.pcap
Example 2: RawCap.exe -s 60 localhost.pcap
Example 3: RawCap.exe \\.\pipe\RawCap
Example 4: RawCap.exe -q - | Wireshark.exe -i - -k

An alternative to supplying the interface number is to supply the IP address of the preferred interface instead, i.e. like this:

RawCap.exe localhost_capture.pcap

Interactive Console Dialog

You can also start RawCap without any arguments, this will leave you with an interactive dialog:

Network interfaces:
0.    Local Area Connection
1.    Wireless Network Connection
2.   3G UMTS Internet
3.   VMware Network Adapter VMnet1
4.   VMware Network Adapter VMnet2
5.       Loopback Pseudo-Interface
Select network interface to sniff [default '0']: 1
Output path or filename [default 'dumpfile.pcap']:
Sniffing IP :
Output File : dumpfile.pcap
 --- Press [Ctrl]+C to stop ---
Packets     : 1337

Streaming PCAP to Wireshark

The easiest way to analyze packets captured by RawCap in Wireshark is to save them to a capture file and open it in Wireshark. But you can also use alternative output methods to analyze the captured packets using Wireshark in real-time.

The simplest way to analyze packets in real-time is to write the PCAP data to standard output (stdout) using the "-" switch, and then reading that data in Wireshark with the "-i -" switch.

RawCap.exe -q - | Wireshark.exe -i - -k

Another alternative is to write the PCAP data to a named pipe, and then let Wireshark "sniff" packets from that named pipe.

  1. Start RawCap and let it write PCAP data to a named pipe called "RawCap".
    RawCap.exe \\.\pipe\RawCap
  2. Start Wireshark (version 2.3.0 or later)
  3. Press: Capture > Options
  4. Click "Manage Interfaces..."
  5. Select the "Pipes" tab
  6. Press the "+" button to add a named pipe
  7. Name the pipe "\\.\pipe\RawCap" and press ENTER to save it
  8. RawCap named pipe interface added in Wireshark
  9. Press "OK" in the Manage Interface window
  10. Wireshark with a PacketCache pipe interface
  11. Press "Start" to see the packets sniffed by RawCap in real-time

Old vs. New RawCap Version

The new RawCap version ( is better than the previous version ( in many ways, but there are a couple of drawbacks. We therefore let the user choose which version to download.

RawCap (old) RawCap (new)
Release year 2013 2020
Save packets in PCAP file Yes Yes
Write packets to standard output (stdout) Yes
Write packets to named pipe Yes
Automatic firewall configuration Yes
Capture from any IPv4 address Yes Yes
IPv6 support
Target .NET framework .NET Framework 2.0 .NET Framework 4.7.2
File size 23 kB 48 kB
Download Old Version Download New Version

Raw sockets limitations (OS dependent)


RawCap cannot capture packets from IPv6 interfaces. This also include the localhost IPv6 interface associated with address ::1. Unfortunately the name "localhost" often resolves to ::1 rather than, which can cause confusion. Therefore, when trying to capture application traffic on localhost, make sure the monitored application is connecting to "" rather than "localhost".

Sniffing localhost

Sniffing localhost/loopback ( has some limitations under Windows XP. When sniffing localhost traffic in Windows XP you will only be able to capture UDP and ICMP packets, not TCP.
TCP, UDP and ICMP packets can, however, all be sniffed properly from localhost on newer operating systems like Windows Vista and Windows 7.

External interfaces

Windows Vista can't capture outgoing packets, only incoming.

If you, on the other hand, find that you are only able to sniff OUTGOING packets then you probably just need to add an exception for RawCap in your local firewall. To create an exception, simply follow these steps:

RawCap Firewall Rule to allow sniffing of incoming packets
Firewall rule to allow RawCap to sniff incoming packets.


RawCap is freeware and can be used by anyone, i.e. even commercial use is allowed.
You are, however, NOT allowed to:

More information

You can read more about RawCap in our blog posts "RawCap sniffer for Windows released" (2011) and "RawCap Redux" (2020). As well as other blog posts tagged with RawCap.

Download RawCap.exe