talira

Packet capture library for Windows

source availableNpcap Licenseself-hostablefree

Npcap is the Nmap Project's packet capture and injection library for Windows: a kernel driver built on the NDIS 6 Light-Weight Filter API plus a Windows build of libpcap, so programs written to the pcap API, such as Wireshark and Nmap, can capture and send raw packets. It also captures and injects loopback traffic through the Windows Filtering Platform, reads raw 802.11 frames in monitor mode with radiotap headers, can restrict capture to Administrators behind a UAC prompt, and has a WinPcap API-compatible mode for older software. It supports Windows 7 and later on x86, x64 and ARM64 with an EV-signed driver countersigned by Microsoft, and replaces WinPcap, which Riverbed stopped maintaining in 2018 at version 4.1.3. Its source is public under the Npcap License, which isn't open source: the free edition may be installed on up to five systems (unlimited with Nmap, Wireshark or Microsoft Defender for Identity) and can't be redistributed. Npcap OEM licences, from $4,980 for 100 internal installs or $39,980 for a small company to redistribute it, add a silent installer, support and redistribution rights.

Problems it solves

  • capture network packets on Windows from my own C program using the pcap API
  • Wireshark on Windows shows no interfaces and needs a packet capture driver installed
  • sniff localhost traffic between two processes on the same Windows machine
  • capture raw Wi-Fi frames in monitor mode on a Windows laptop
  • send crafted raw packets from a Windows application
  • port our libpcap-based Linux capture tool to Windows with the same API
  • replace WinPcap, which hasn't been updated in years, without rewriting our capture code
  • bundle a packet capture driver inside our commercial Windows product with a silent installer
  • install a packet capture driver unattended on hundreds of company Windows machines
  • only let administrators capture network traffic on shared Windows workstations
  • packet capture that works on Windows on ARM laptops
  • run Nmap scans on Windows that need raw packet access
  • a packet capture driver signed properly enough that Windows 10 and 11 will load it
  • licence a Windows packet capture driver for more than a handful of machines in our company

Features

  • kernel driver on the NDIS 6 Light-Weight Filter API, faster than WinPcap's NDIS 5 API
  • Windows build of the current libpcap release, so the same capture API works on Windows, Linux and macOS
  • loopback capture and injection through the Windows Filtering Platform (NPF_Loopback adapter)
  • raw 802.11 capture and monitor mode with radiotap headers
  • packet injection with pcap_inject()
  • optional restriction of capture to Administrators, with a UAC prompt for other users
  • WinPcap API-compatible mode, and source compatibility with software written for WinPcap
  • EV-signed driver countersigned by Microsoft; ASLR and DEP enabled; signed DLLs and executables
  • Windows 7 and later (Server 2008 R2 to 2019, Windows 10 and 11) on x86, x64 and ARM64
  • installer command-line options for WinPcap mode, admin-only, 802.11 support and driver version
View 2 more
  • Npcap SDK for building software against it
  • Npcap OEM: silent installer, commercial support, updates and redistribution rights

Limitations

  • Doesn't support Windows XP or earlier: the Nmap Project points those users to WinPcap1

Ways to run it

Npcap free edition

You run it, Npcap License (source-available)

free on up to 5 systems; unlimited when used with Nmap, Wireshark or Microsoft Defender for Identity123

Not included

  • silent installation (/S)
  • redistribution with other software
  • commercial support

Self-hosting docs

Npcap OEM

You run it, under a commercial licence

Internal-use perpetual licences from $4,980 (100 installs) to $59,980 (unlimited); redistribution licences $39,980 to $79,980 by company size, or a quarterly term licence from $6,980 every 3 months; maintenance extra456

Only in this edition

  • silent installer
  • commercial support and updates with maintenance
  • redistribution rights (redistribution licence)
  • a warranty

Self-hosting docs

Alternatives

The same job

These do what Npcap does.

  1. libpcap A portable C/C++ library for network traffic capture

Compare Npcap with the top 3