Because Npcap is a packet capture architecture, not merely a software library, some aspects of installation and configuration may fall to the end user. This Users' Guide covers the basics of installing, configuring, and removing Npcap, as well as how to report bugs.
Npcap is distributed as a signed executable installer, downloadable from Nmap.com. Major versions are backwards-compatible, and users of the free non-commercial version are encouraged to upgrade regularly for security and stability fixes. Software distributors may have separate requirements for supported Npcap versions. Please refer to the Npcap License for terms of use and redistribution.
The Npcap installer and uninstaller are easy to use in
“Graphical Mode” (direct run) and “Silent Mode” (run with
/S
parameter, available only with Npcap OEM).
The installer accepts several command-line options that correspond to the
options presented in the graphical interface (GUI). The options take the form
/
,
where name
=value
name
is one of
/npf_startup
, /loopback_support
,
/dlt_null
, /admin_only
,
/dot11_support
, /vlan_support
,
or /winpcap_mode
.
The values for these options must be one of:
yes
: select the option
no
: unselect the option
enforced
: select the option and make it unchangable in the GUI
disabled
: unselect the option and make it unchangable in the GUI
There is also one option that does not appear in the GUI, which is
/disable_restore_point=yes
, which will prevent the
installer from setting a system restore point. Windows may independently
create a restore point because of the driver installation independent
from this option.
The destination directory for installation can also be overridden by
the /D
option, with a few restrictions. First, it will
only affect where Npcap keeps its installation logs and helper utilities.
The driver and DLLs will always be installed into the appropriate
directories below %SYSTEMROOT%\System32\. Second, the
/D
must be the last option in the command, and the path
must not contain quotes. For example, to change the installation directory
to C:\Path With Spaces\
, the invocation would be:
npcap-version
.exe /D=C:\Path With Spaces
An example of Npcap installer options is:
/npf_startup=yes /loopback_support=yes /dlt_null=no /admin_only=yes /dot11_support=yes /vlan_support=yes /winpcap_mode=yes
/npf_startup=yes
: Automatically start the Npcap driver at boot time
/loopback_support=yes
: Support loopback traffic (“Npcap Loopback Adapter” will be created)
/dlt_null=no
: Use DLT_EN10MB
(Ethernet) as the
“Npcap Loopback Adapter”'s link layer protocol instead of the default DLT_NULL
.
/admin_only=yes
: Restrict Npcap driver's access to Administrators only
/dot11_support=yes
: Support raw 802.11 traffic (and “Monitor Mode”) for wireless adapters
/vlan_support=yes
: Support 802.1Q VLAN tag when capturing and sending data
/winpcap_mode=yes
: Install Npcap in WinPcap API-compatible Mode
The uninstaller provided with Npcap also accepts some command-line options.
The /Q
flag means to skip the confirmation page and finish page in the uninstall wizard. So this option is
only meaningful for “GUI Mode”. The /no_kill
controls how the uninstaller handles
processes that are still using Npcap at the time of uninstall. If /no_kill=yes
is specified, then Npcap uninstaller will fail if there are still applications using Npcap driver or DLLs.
If /no_kill=no
is specified in silent mode, Npcap uninstaller will immediately terminate any command-line processes that are using
Npcap (like a Nmap process that is still scanning), and wait for at most 15 seconds to gracefully terminate any GUI processes
that are using Npcap (like Wireshark UI that is still capturing). “gracefully” means that if you are
still capturing via Wireshark, Wireshark UI will prompt the user about whether to save the current capture to a pcap.
So the user have 15 seconds to save his session. Note: although Npcap uninstaller won't terminate Wireshark UI processe
immediately, the live capture stops immediately. This is because Wireshark UI uses command-line processes named
dumpcap.exe
to capture, and that command-line process will be terminated immediately. The default
value for /no_kill
is no
, but if the
graphical interface is used (without /S
), the user will be
prompted for what to do.
An example of Npcap uninstaller options is:
/S /Q /no_kill=yes
We may disable or enforce certain options in the installer GUI to make them unselectable. This usually means that those options can easily cause compatibility issues and are considered not suitable for most users, or we think we need to enforce some rules for the Npcap API. Advanced users can still change their states via command-line parameters, which is described in following sections.
Fortunately, if a distributor wants to start the Npcap installer GUI and disable or enforce
certain options for reasons like compatibility. It can also use the four value
mechanism by setting the command-line parameters to disabled
or enforced
.
For example, the following command will start an installer GUI with the
dlt_null
disabled and unselected:
npcap-version
.exe /dlt_null=disabled
Default options for Npcap installer GUI can be changed. An example is:
npcap-version
.exe /npf_startup=yes /loopback_support=yes /dlt_null=yes /admin_only=no /dot11_support=no /vlan_support=no /winpcap_mode=yes
Because most of these are the default values for these options, this example could be even simpler:
npcap-version
.exe /winpcap_mode=yes
Running the installer
directly without options will see Install Npcap in WinPcap API-compatible Mode
UNCHECKED by default in the “Installation Options” page.
However, the above two commands will launch the installer GUI, and in the “Installation Options” page, the
Install Npcap in WinPcap API-compatible Mode
option will be CHECKED by default.
An example of changing option features for silent installation is:
npcap-version
.exe /S /admin_only=yes /dot11_support=yes /vlan_support=yes
If you doesn't specify a parameter key, it will take the default value. This is the same with the GUI.
The keys are case-insensitive.
The values are case-sensitive, only two values are
permitted: yes
or no
.
The latest Wireshark has already integrated the support for Npcap's “Monitor Mode” capture.
If you want to use Wireshark to capture raw 802.11 traffic in “Monitor Mode”, you need to
switch on the monitor mode inside the Wireshark UI instead of using the section called “WlanHelper”.
This is because Wireshark only recognizes the monitor mode set by itself. So when you turn
on monitor mode outside Wireshark (like in WlanHelper
), Wireshark will not know the adapter
has been in monitor mode, and will still try to capture in Ethernet mode, which will get no traffic.
So after all, the correct steps are:
Install latest version Wireshark and latest version Npcap with
Support raw 802.11 traffic
option checked.
Launch Wireshark QT UI (GTK version is similar), go to “Capture options”.
Then toggle the checkbox in the “Monitor Mode” column of your wireless adapter's row.
Click the “Start” button. If you see a horizontal line instead of the checkbox,
then it probably means that your adapter doesn't support monitor mode. You can use the
WlanHelper
tool to double-check this fact.
To decrypt encrypted 802.11 data packets, you need to specify the decipher key in Wireshark, otherwise you will only see 802.11 data packets.
Stop the capture in Wireshark UI when you finishes capturing, the monitor mode will be turned off automatically by Npcap.
Network disconnects after installing Npcap: As Microsoft states here, an optional NDIS light-weight filter (LWF) driver like Npcap could cause 90-second delay in network availability. Some solutions you could try are: 1) wait for 90 seconds; 2) disable and re-enable the adapter icon in ncpa.cpl; 3) reboot. If this doesn't work, please file a bug report.
Installation fails with error code 0x8004a029
:
The cause is that you have “reached the maximum number of network filter
drivers”, see solution
here.
Npcap Loopback Adapter is missing:
Npcap Loopback Adapter is actually a wrapper of Microsoft Loopback Adapter.
Such adapters won't show up in Wireshark if the Basic Filtering Enging (BFE)
service was not running. To fix this issue, you should start this service at services.msc
manually and restart the Npcap service by running net stop npcap
and net start npcap. See details about this issue
here.
Npcap only captures TCP handshake and teardown, but not data packets. Some network adapters support offloading of tasks to free up CPU time for performance reasons. When this happens, Npcap may not receive all of the packets, or may receive them in a different form than is actually sent on the wire. To avoid this issue, you may disable TCP Chimney, IP Checksum Offloading, and Large Send Offloading in the network adapter properites on Windows. See details about this issue in issue #989 on our tracker.
Please report any bugs or issues about Npcap on the Nmap Project's Issues tracker. In your report, please provide your DiagReport output, user software version (e.g. Nmap, Wireshark), steps to reproduce the problem, and other information you think necessary. If your issue occurs only on a particular OS version (e.g. Win10 1511, 1607), please mention it in the report.
Npcap has provided a diagnostic utility called DiagReport
.
It provides a lot of information including OS metadata, Npcap related files,
install options, registry values, services, etc. You can simply click the
C:\Program Files\Npcap\DiagReport.bat
file to run DiagReport
.
It will pop up a text report via Notepad (it's stored in: C:\Program Files\Npcap\DiagReport.txt
).
Please always submit it to us if you encounter any issues.
For Vista users: DiagReport
is a script written for
Windows PowerShell,
and Vista doesn't have it installed by default. So if you are using Vista,
you need to install PowerShell 2.0 (KB968930) on your
system. Please download it here for x86
and here for x64.
Win7 and later systems have built-in PowerShell support and don't need
to do anything about it.
Npcap keeps track of the installation in a log file:
C:\Program Files\Npcap\install.log
. Please submit it
together in your report if you encounter issues during the installation
(e.g. the installer halts).
Npcap keeps track of the driver installation (aka commands run by
NPFInstall.exe
) in a log file:
C:\Program Files\Npcap\NPFInstall.log
, please submit
it together in your report if you encounter issues during the driver
installation or problems with the “Npcap Loopback Adapter”.
There's another system-provided driver installation log in:
C:\Windows\INF\setupapi.dev.log
.
If you encounter errors during the driver/service installation, please copy
the Npcap-related lines out and send them together in
your report.
For problems with Npcap's regular operation, you may need to obtain a
debug log from Packet.dll
. To do this, you will
need a debug build of Npcap. If you are a Npcap developer, you can build
the Packet.sln
project with the
_DEBUG_TO_FILE
macro defined. If you are an end user,
you can contact the Npcap development team for the latest Npcap debug
build. The debugging process will continue to append to the debug log
(C:\Program Files\Npcap\Packet.log
), so you may want
to delete it after an amount of time, or save your output to another
place before it gets too large.
If there is an issue with the Npcap driver, you can open an
Administrator command prompt, enter sc query
npcap to query the driver status and net start
npcap to start the driver (replace
npcap
with npf
if you
installed Npcap in “WinPcap Compatible Mode”). The command
output will inform you whether there's an error. If the driver is running
well, but the issue still exists, then you may need to check the driver's
log. Normal Npcap releases don't switch on the driver log function for
performance. Contact the Npcap development team to obtain a driver-debug
version of the Npcap installer. When you have got an appropriate
driver-debug version Npcap, you need to use DbgView
to read the Windows kernel log (which contains our driver log). You may
need to turn on DbgView before installing Npcap, if the error occurs when
the driver loads. When done, save the DbgView output to a file and submit
it in your report.