Discussion:
[Winpcap-users] Npcap 0.04, based on original WinPcap 4.1.3, call for test
食肉大灰兔V5
2015-09-01 02:56:13 UTC
Permalink
Hi Mark,


On Tue, Sep 1, 2015 at 8:02 AM, Mark Pizzolato - Winpcap-Users <
Hi Yang,
Thanks for doing this.
I have 2 comments and one bug/issue.
1) Windows XP and Vista systems are still somewhat common. It would
be great if the installer could be setup to install the original WinPcap
binaries on these platforms. Then there could be a single pcap installer
for all Windows platforms.
In fact, Npcap has integrated the original WinPcap files for XP and Vista.
The installer will install stock WinPcap when running on XP and Vista
systems. You can try it if you like.
2) The Administrator mode is a good enhancement. It would be nice
if a middle position (between completely open and completely admin) were
available for some environments. Maybe membership in a paritular security
group
.
We have talked about this plan (see Plan C at the end of the mail) and
didn't go along that way ( at last chooses Plan A). But I don't think it's
impossible for now. Maybe we can create a new user group called "Npcap
Users" and leave it empty at first, then if a user trying to use Npcap is a
member of "Npcap Users", he will be permitted, if he is not a member, Npcap
will check if he has Admin right, if yes, then permit too. What do you
think about this? You can submit this idea as an issue on the list.
With the Npcap package installed, I was unable to map a shared folder for
a system on my LAN which had worked previously. Uninstalling the Npcap
package immediately allowed access to the shared folder on the other system.
Npcap has released 1.00 version now, maybe you'd like to try the latest
installer at:
https://svn.nmap.org/nmap-exp/yang/NPcap-LWF/npcap-nmap-1.00.exe

I have installed 1.00 version on my Win10 host, and accessed a shared
folder at \\192.168.0.80\osv with no issue. Can you access the Internet
when you found this issue?
Maybe you want to enable ‘issues’ in the github repository to track things
like this.
Npcap uses the same issue list with Nmap at
https://github.com/nmap/nmap/issues, you can fire an issue there.
Thanks again.
- Mark Pizzolato
Cheers,
Yang
*Sent:* Saturday, August 22, 2015 6:02 AM
*Subject:* [Winpcap-users] Npcap 0.04, based on original WinPcap 4.1.3,
call for test
Hi list,
Npcap is an update of WinPcap to NDIS 6 Light-Weight Filter (LWF)
technique. Within Google Summer of Code 2013 and 2015, Npcap has added many
features and become stable in its 0.04 version. I hope that you guys could
test its functionalities, and I'd like to see WinPcap official adopt
features of Npcap.
1) NDIS 6 Support
2) "Admin-only Mode" Support
3) "WinPcap Compatible Mode" Support
4) Loopback Packets Capture Support
5) Loopback Packets Send Support
https://github.com/nmap/npcap
https://svn.nmap.org/nmap-exp/yang/NPcap-LWF/
npcap-nmap-0.04-r5.exe
<https://svn.nmap.org/nmap-exp/yang/NPcap-LWF/npcap-nmap-0.04-r5.exe>
1) You need to try it under Win7 and later, and no need to change the
installation options, just click the "Next"s. Npcap installed in "WinPcap Compatible
Mode" is exclusive with WinPcap, so you must uninstall WinPcap first
(installer will prompt you this).
2) If you have installed WinPcap, better to reboot the PC after
uninstalling WinPcap and then install Npcap.
Cheers,
Yang
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------------------------------------------------------------------------------------------------------------------------------------------------
Forwarded:

I want to let you decide which plan we will use for our function: *Add
privilege support to Npcap so we can limit it to users with administrator
access*

*Last week I said there are three options as below:*

Plan A: Allow Administrators group to use the driver, nmap run by built-in
Administrator account can use the driver directly. The other members of
Administrators group must run nmap with Run as Administrator option, or the
driver will refuse to be accessed.

Plan B: Allow Users group to use the driver. All members of Users group can
use the driver directly.

Plan C: Create a custom group named Nmap Users and add all Administrators
group members intoNmap Users during NPcap installation, then allow Nmap
Users group to access the driver. The drawback is if a new user added
to Administrators
group, there's no graceful ways to let that user join our Nmap Users group
automatically. Admins need to add that user manually.

*As Plan B and Plan C are crossed out in our last meeting, we will only
talk about Plan A here, depending on whether we really want to check the
"true" administrator privilege, We have Plan A-1 and Plan A-2 as belows:*

Plan A-1: Add access control to the driver, nmap run by built-in
Administrator account can use the driver directly. The other members of
Administrators group must run nmap with Run as Administrator option, or the
driver will refuse to be accessed. When being denied, we can show our
custom dialog to user which says like "You need to re-run the program as an
Administrator to use NPcap, please restart your program as an
Administrator". Notice Windows has no way to elevate a process during
run-time, the Admin privilege is only granted when a process is started. So
for this solution, Nmap *MUST* restart if not started with Run as
Administrator option. Here what we can do as NPcap is that we prompt a
customized error dialog then quit. Let the user restart a new Nmap by
himself.

Plan A-2: We don't add access control to the driver, we only checks whether
the current user is a member of Administrators group in our DLL
(packet.dll). This solution has nothing to do with UAC and privilege
elevation. So the current user do NOT have to run nmap withRun as
Administratoroption. If the current user is a member of Admin group, then
nmap can use NPcap normally, if the current user is not, we can prompt a
customized dialog says "Your current account is not in Administrator group,
please restart your program under an account within Administrator group.

To sum up,
1) Both solutions need to restart the program (such as Nmap) if the user
fails our check. No way to elevate the privilege at run-time.
2) The difference between the two solutions is that Plan A-1 needs a "true"
administrator privilege, so the not built-in members of Administrators
group must run nmap with Run as Administrator option. Plan A-2 do not need
a "true" administrator privilege, so all members of Administrators group
can run nmap normally without Run as Administrator option.

*Personally, I prefer Plan A-2, because this solution will give the end
users less trouble. So there will be less complaints when user first adopts
our NPcap. At the same time It's less safer than Plan A-1. What about your
suggestions?*
Petr Lázňovský
2015-09-10 07:31:17 UTC
Permalink
Just install this version of SW and it destroy almost whole content of %PATH% variable on my system. I had about 30 paths there, but after install only 3 paths (one of them is npcap path). No change after system reboot, windows 7/64bit. Anyone have similar experience?

L.
Post by 食肉大灰兔V5
https://svn.nmap.org/nmap-exp/yang/NPcap-LWF/npcap-nmap-1.00.exe
Guy Harris
2015-09-10 07:36:43 UTC
Permalink
Post by Petr Lázňovský
Just install this version of SW and it destroy almost whole content of %PATH% variable on my system. I had about 30 paths there, but after install only 3 paths (one of them is npcap path). No change after system reboot, windows 7/64bit. Anyone have similar experience?
That's probably a problem with the installer - perhaps, instead of *adding* the Npcap path to %PATH%, leaving all the existing directories intact, it's *replacing* %PATH% with a setting that includes the Npcap path.
Pascal Quantin
2015-09-10 07:50:55 UTC
Permalink
Hi,
Post by Petr Lázňovský
Post by Petr Lázňovský
Just install this version of SW and it destroy almost whole content of
%PATH% variable on my system. I had about 30 paths there, but after install
only 3 paths (one of them is npcap path). No change after system reboot,
windows 7/64bit. Anyone have similar experience?
That's probably a problem with the installer - perhaps, instead of
*adding* the Npcap path to %PATH%, leaving all the existing directories
intact, it's *replacing* %PATH% with a setting that includes the Npcap path.
I tested numerous versions of Npcap and never faced such issue: my %PATH%
environment variable stayed as before.
Did you untick the 'Install Npcap in WinPcap API-compatible Mode' option?
When looking quickly at the installer code, it seems to be the only thing
that could touch the %PATH% variable (Yang will confirm). And even when
playing with this option mine did not get damaged so far.

Pascal.
食肉大灰兔V5
2015-09-10 08:05:46 UTC
Permalink
Hi, Petr and Guy,

First thanks for test. In fact Npcap only adds its program folder to
system's "PATH" only when Npcap is installed NOT in "WinPcap Compatible
Mode". The None-"WinPcap Compatible Mode" is only for future version's
Nmap. So you should *ALWAYS* has *"Install Npcap in WinPcap API-compatible
Mode"* option checked when installing Npcap (which is the default option).

For None-"WinPcap Compatible Mode", Npcap's NSIS installer uses
*${EnvVarUpdate}
$0 "PATH" "A" "HKLM" "$SYSDIR\Npcap"* to add a path and *${un.EnvVarUpdate}
$0 "PATH" "R" "HKLM" "$SYSDIR\Npcap"* to delete the path (see:
https://github.com/nmap/npcap/blob/master/installer/NPcap-for-nmap.nsi, Line
698 and Line 785). I hope I am using it right, if I am wrong, please
correct me:)

Cheers,
Yang
Post by Petr Lázňovský
Post by Petr Lázňovský
Just install this version of SW and it destroy almost whole content of
%PATH% variable on my system. I had about 30 paths there, but after install
only 3 paths (one of them is npcap path). No change after system reboot,
windows 7/64bit. Anyone have similar experience?
That's probably a problem with the installer - perhaps, instead of
*adding* the Npcap path to %PATH%, leaving all the existing directories
intact, it's *replacing* %PATH% with a setting that includes the Npcap path.
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
Petr Lázňovský
2015-09-10 08:14:49 UTC
Permalink
This option is inactive, see screenshoot.

L.

So you should ALWAYS has "Install Npcap in WinPcap API-compatible Mode" option checked when installing Npcap (which is the default option).
食肉大灰兔V5
2015-09-10 08:18:57 UTC
Permalink
Hi,

Like the installer said: "*Npcap detected you have installed WinPcap, in
order to Install Npcap in WinPcap API-compatible Mode, you must uninstall
WinPcap first*.". So I would suggest you uninstall WinPcap first before
trying Npcap in *WinPcap API-compatible Mode.*

*Cheers,*
*Yang*
Post by Petr Lázňovský
This option is inactive, see screenshoot.
L.
So you should ALWAYS has "Install Npcap in WinPcap API-compatible Mode"
option checked when installing Npcap (which is the default option).
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
Pascal Quantin
2015-09-10 08:38:16 UTC
Permalink
Presumably the issue comes from the NSIS EnvVarUpdate macro used by Npcap
installer when having a long %PATH% variable, as explained here:
http://sourceforge.net/p/nsis/bugs/1046/
and
http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries

Looks like the method used to update it should be changed...

Pascal.
Post by 食肉大灰兔V5
Hi,
Like the installer said: "*Npcap detected you have installed WinPcap, in
order to Install Npcap in WinPcap API-compatible Mode, you must uninstall
WinPcap first*.". So I would suggest you uninstall WinPcap first before
trying Npcap in *WinPcap API-compatible Mode.*
*Cheers,*
*Yang*
Post by Petr Lázňovský
This option is inactive, see screenshoot.
L.
So you should ALWAYS has "Install Npcap in WinPcap API-compatible Mode"
option checked when installing Npcap (which is the default option).
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
食肉大灰兔V5
2015-09-10 09:05:36 UTC
Permalink
In that link (http://sourceforge.net/p/nsis/bugs/1046/), someone said a
solution is that the script *"could use the system plugin to allocate
memory and read the registry string,"*. What do you think about this? Is it
viable?
Post by Pascal Quantin
Presumably the issue comes from the NSIS EnvVarUpdate macro used by Npcap
http://sourceforge.net/p/nsis/bugs/1046/
and
http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries
Looks like the method used to update it should be changed...
Pascal.
Post by 食肉大灰兔V5
Hi,
Like the installer said: "*Npcap detected you have installed WinPcap, in
order to Install Npcap in WinPcap API-compatible Mode, you must uninstall
WinPcap first*.". So I would suggest you uninstall WinPcap first before
trying Npcap in *WinPcap API-compatible Mode.*
*Cheers,*
*Yang*
Post by Petr Lázňovský
This option is inactive, see screenshoot.
L.
So you should ALWAYS has "Install Npcap in WinPcap API-compatible Mode"
option checked when installing Npcap (which is the default option).
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
Pascal Quantin
2015-09-10 11:03:12 UTC
Permalink
Post by 食肉大灰兔V5
In that link (http://sourceforge.net/p/nsis/bugs/1046/), someone said a
solution is that the script *"could use the system plugin to allocate
memory and read the registry string,"*. What do you think about this? Is
it viable?
Seems to be a common way to address this issue, according to those links:
http://nsis.sourceforge.net/Setting_Environment_Variables_to_Active_Installer_Process
https://stackoverflow.com/questions/31340823/update-path-environment-variable-using-nsis
Post by 食肉大灰兔V5
Post by Pascal Quantin
Presumably the issue comes from the NSIS EnvVarUpdate macro used by Npcap
http://sourceforge.net/p/nsis/bugs/1046/
and
http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries
Looks like the method used to update it should be changed...
Pascal.
Post by 食肉大灰兔V5
Hi,
Like the installer said: "*Npcap detected you have installed WinPcap,
in order to Install Npcap in WinPcap API-compatible Mode, you must
uninstall WinPcap first*.". So I would suggest you uninstall WinPcap
first before trying Npcap in *WinPcap API-compatible Mode.*
*Cheers,*
*Yang*
Post by Petr Lázňovský
This option is inactive, see screenshoot.
L.
So you should ALWAYS has "Install Npcap in WinPcap API-compatible Mode"
option checked when installing Npcap (which is the default option).
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
Petr Lázňovský
2015-09-10 11:55:51 UTC
Permalink
Maybe dubm question, but why not create MSI package, de-facto standard in installations for windows?

L.
Post by Pascal Quantin
http://sourceforge.net/p/nsis/bugs/1046/
and
http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries
Looks like the method used to update it should be changed...
Pascal.
Hi,
Like the installer said: "Npcap detected you have installed WinPcap, in order to Install Npcap in WinPcap API-compatible Mode, you must uninstall WinPcap first.". So I would suggest you uninstall WinPcap first before trying Npcap in WinPcap API-compatible Mode.
Cheers,
Yang
This option is inactive, see screenshoot.
L.
So you should ALWAYS has "Install Npcap in WinPcap API-compatible Mode" option checked when installing Npcap (which is the default option).
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
食肉大灰兔V5
2015-09-10 15:44:43 UTC
Permalink
Hi,

The first reason I think is that the original WinPcap uses the NSIS
installer, as Npcap tries to keep as much as possible with WinPcap, Npcap
also uses NSIS. Moreover, Nmap also uses NSIS. As for why don't use MSI, I
think this is because open-source projects (like WinPcap, Npcap, etc) tend
to not use commercial software (like MSI). There should be some reasons
about this.

Cheers,
Yang
Post by Petr Lázňovský
Maybe dubm question, but why not create MSI package, de-facto standard in
installations for windows?
L.
Post by Pascal Quantin
Presumably the issue comes from the NSIS EnvVarUpdate macro used by
http://sourceforge.net/p/nsis/bugs/1046/
and
http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries
Post by Pascal Quantin
Looks like the method used to update it should be changed...
Pascal.
Hi,
Like the installer said: "Npcap detected you have installed WinPcap, in
order to Install Npcap in WinPcap API-compatible Mode, you must uninstall
WinPcap first.". So I would suggest you uninstall WinPcap first before
trying Npcap in WinPcap API-compatible Mode.
Post by Pascal Quantin
Cheers,
Yang
This option is inactive, see screenshoot.
L.
So you should ALWAYS has "Install Npcap in WinPcap API-compatible Mode"
option checked when installing Npcap (which is the default option).
Post by Pascal Quantin
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
Pascal Quantin
2015-09-10 16:07:45 UTC
Permalink
Post by 食肉大灰兔V5
Hi,
The first reason I think is that the original WinPcap uses the NSIS
installer, as Npcap tries to keep as much as possible with WinPcap, Npcap
also uses NSIS. Moreover, Nmap also uses NSIS. As for why don't use MSI, I
think this is because open-source projects (like WinPcap, Npcap, etc) tend
to not use commercial software (like MSI). There should be some reasons
about this.
Nowadays there is an open source project named WiX allowing you to create
MSI. But it requires you to create a brand new installer from scratch, and
it seems to be more complex to use (at least that's my first feeling but
people are reluctant to learn new things ;) ).

Cheers,
Pascal.
Post by 食肉大灰兔V5
Cheers,
Yang
Post by Petr Lázňovský
Maybe dubm question, but why not create MSI package, de-facto standard in
installations for windows?
L.
Post by Pascal Quantin
Presumably the issue comes from the NSIS EnvVarUpdate macro used by
http://sourceforge.net/p/nsis/bugs/1046/
and
http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries
Post by Pascal Quantin
Looks like the method used to update it should be changed...
Pascal.
Hi,
Like the installer said: "Npcap detected you have installed WinPcap, in
order to Install Npcap in WinPcap API-compatible Mode, you must uninstall
WinPcap first.". So I would suggest you uninstall WinPcap first before
trying Npcap in WinPcap API-compatible Mode.
Post by Pascal Quantin
Cheers,
Yang
This option is inactive, see screenshoot.
L.
So you should ALWAYS has "Install Npcap in WinPcap API-compatible
Mode" option checked when installing Npcap (which is the default option).
Post by Pascal Quantin
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
食肉大灰兔V5
2015-09-11 03:24:33 UTC
Permalink
I have fixed the PATH empty issue by using a custom strlen-8192 version of
NSIS, see installer at:
https://svn.nmap.org/nmap-exp/yang/NPcap-LWF/npcap-nmap-1.00.exe


Cheers,
Yang
Post by Pascal Quantin
Post by 食肉大灰兔V5
Hi,
The first reason I think is that the original WinPcap uses the NSIS
installer, as Npcap tries to keep as much as possible with WinPcap, Npcap
also uses NSIS. Moreover, Nmap also uses NSIS. As for why don't use MSI, I
think this is because open-source projects (like WinPcap, Npcap, etc) tend
to not use commercial software (like MSI). There should be some reasons
about this.
Nowadays there is an open source project named WiX allowing you to create
MSI. But it requires you to create a brand new installer from scratch, and
it seems to be more complex to use (at least that's my first feeling but
people are reluctant to learn new things ;) ).
Cheers,
Pascal.
Post by 食肉大灰兔V5
Cheers,
Yang
Post by Petr Lázňovský
Maybe dubm question, but why not create MSI package, de-facto standard
in installations for windows?
L.
Post by Pascal Quantin
Presumably the issue comes from the NSIS EnvVarUpdate macro used by
http://sourceforge.net/p/nsis/bugs/1046/
and
http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries
Post by Pascal Quantin
Looks like the method used to update it should be changed...
Pascal.
Hi,
Like the installer said: "Npcap detected you have installed WinPcap,
in order to Install Npcap in WinPcap API-compatible Mode, you must
uninstall WinPcap first.". So I would suggest you uninstall WinPcap first
before trying Npcap in WinPcap API-compatible Mode.
Post by Pascal Quantin
Cheers,
Yang
This option is inactive, see screenshoot.
L.
So you should ALWAYS has "Install Npcap in WinPcap API-compatible
Mode" option checked when installing Npcap (which is the default option).
Post by Pascal Quantin
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
https://www.winpcap.org/mailman/listinfo/winpcap-users
Loading...