mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Add new packaging of x64 WinPcap drivers from Rob Nicholls. He observed that
64-bit applications wouldn't work using Nmap's installed WinPcap. This fixes that.
This commit is contained in:
parent
91b2aa680b
commit
68f3bca589
9 changed files with 72 additions and 22 deletions
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
[NOT YET RELEASED]
|
||||
|
||||
o Fixed the packaging of x64 versions of WinPcap drivers in the
|
||||
winpcap-nmap installer. 64-bit applications that used WinPcap (like
|
||||
Wireshark) would fail. [Rob Nicholls]
|
||||
|
||||
o Improved the passwords.lst database used by NSE by combining several
|
||||
databases collected by Ron Bowes.
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,85,0,8
|
||||
FILEVERSION 5,21,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x21L
|
||||
|
|
@ -29,7 +29,7 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Insecure.Org\0"
|
||||
VALUE "FileDescription", "Nmap\0"
|
||||
VALUE "FileVersion", "4.85BETA8\0"
|
||||
VALUE "FileVersion", "5.21\0"
|
||||
VALUE "InternalName", "Nmap\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0"
|
||||
VALUE "LegalTrademarks", "NMAP\0"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
How to upgrade Nmap to a new WinPcap release (2009)
|
||||
How to upgrade Nmap to a new WinPcap release (2010)
|
||||
---------------------------------------------------
|
||||
|
||||
1) Download the latest version of WinPcap from www.winpcap.org and make
|
||||
|
|
@ -10,26 +10,49 @@ How to upgrade Nmap to a new WinPcap release (2009)
|
|||
the license text from the installer into the LICENSE file which should
|
||||
be saved as PC file format (not UNIX) and ANSI encoding (not UTF-8).
|
||||
|
||||
3) Extract the required files from the setup file using 7-Zip
|
||||
(http://www.7-zip.org/). The installed files at time of writing are:
|
||||
|
||||
3) Extract all the files from the setup file using 7-Zip
|
||||
(http://www.7-zip.org/). Enter the $SYSDIR subdirectory. One by one,
|
||||
extract (you can drag and drop) the different copies of the files.
|
||||
Copy the files into the mswin32/winpcap directory (you may need to
|
||||
install WinPcap in order to determine the correct files; if you get
|
||||
two similar looking files it's usually the smaller one). The installed
|
||||
files at time of writing are:
|
||||
|
||||
x86:
|
||||
C:\Program Files\WinPcap\rpcapd.exe
|
||||
C:\Windows\system32\Packet.dll
|
||||
C:\Windows\system32\pthreadVC.dll
|
||||
C:\Windows\system32\wpcap.dll
|
||||
C:\Windows\system32\drivers\npf.sys
|
||||
|
||||
The Vista version of Packet.dll needs to be extracted into the
|
||||
mswin32/winpcap/vista subdirectory. Right click on each Packet.dll,
|
||||
|
||||
x64:
|
||||
C:\Program Files\WinPcap\rpcapd.exe
|
||||
C:\Windows\SysWOW64\Packet.dll
|
||||
C:\Windows\system32\Packet.dll
|
||||
C:\Windows\SysWOW64\pthreadVC.dll
|
||||
C:\Windows\SysWOW64\wpcap.dll
|
||||
C:\Windows\system32\wpcap.dll
|
||||
C:\Windows\system32\drivers\npf.sys
|
||||
|
||||
Check the Details tab to identify the NT5/NT6/AMD64 files. You will need to
|
||||
extract the files (you can auto rename them to ensure all the files are there)
|
||||
in order to view the descriptions.
|
||||
|
||||
We do not support NT4, so those files are not required.
|
||||
|
||||
The smaller NT5 version of Packet.dll needs to be extracted into the
|
||||
mswin32/winpcap/nt5/x86 subdirectory. The larger NT5 version of
|
||||
Packet.dll needs to be extracted into the mswin32/winpcap/nt5/x64
|
||||
subdirectory.
|
||||
|
||||
The smaller Vista version of Packet.dll needs to be extracted into the
|
||||
mswin32/winpcap/vista/x86 subdirectory. The larger Vista version of
|
||||
Packet.dll needs to be extracted into the mswin32/winpcap/vista/x64
|
||||
subdirectory.
|
||||
|
||||
The smaller version of wpcap.dll needs to be extracted into the
|
||||
mswin32/winpcap subdirectory. The larger version of wpcap.dll
|
||||
needs to be extracted into the mswin32/winpcap/x64 subdirectory.
|
||||
|
||||
The x86 version of npf.sys needs to be extracted into the
|
||||
mswin32/winpcap subdirectory. Right click on each npf.sys,
|
||||
click "Properties", then select the "Version" tab. The
|
||||
"Description:" field will have a string containing "NT4", "NT5", or
|
||||
"Vista". We don't support NT4, so those files are not required.
|
||||
"Description:" field will have a string containing "x86".
|
||||
|
||||
The AMD64 version of npf.sys needs to be extracted into the
|
||||
mswin32/winpcap/x64 subdirectory. Right click on each npf.sys,
|
||||
|
|
@ -49,16 +72,23 @@ How to upgrade Nmap to a new WinPcap release (2009)
|
|||
var /GLOBAL my_ver
|
||||
StrCpy $my_ver "X.X.X.X" <-- file version goes here
|
||||
|
||||
6) Generate installer exe by compiling winpcap-nmap.nsi using the
|
||||
6) Generate the installer by compiling winpcap-nmap.nsi using the
|
||||
running the command
|
||||
makensis winpcap-nmap.nsi
|
||||
Alternately, you can right click the script and select "Compile NSIS Script".
|
||||
makensis is part of the "Nullsoft Scriptable Install System" at
|
||||
http://nsis.sourceforge.net/.
|
||||
|
||||
7) Give the installer a test, make sure the correct version appears in
|
||||
the installer's name and in Add/Remove Programs. You may also want to
|
||||
try installing it when it is already installed or an older version is
|
||||
installed.
|
||||
installed. Ideally this should be tested on as many platforms as possible.
|
||||
The following should be a sufficient minimum, as Windows XP x64 is based
|
||||
on 2003 x64, 2008 is based on Vista and 2008R2 is the same codebase as 7:
|
||||
Windows XP
|
||||
Windows 2003 x64
|
||||
Windows Vista
|
||||
Windows 7 x64
|
||||
|
||||
8) Open mswin32/nsis/Nmap.nsi and update the references to the winpcap
|
||||
installer's name. You should only have to change the version number.
|
||||
|
|
|
|||
BIN
mswin32/winpcap/nt5/x64/Packet.dll
Executable file
BIN
mswin32/winpcap/nt5/x64/Packet.dll
Executable file
Binary file not shown.
0
mswin32/winpcap/Packet.dll → mswin32/winpcap/nt5/x86/Packet.dll
Normal file → Executable file
0
mswin32/winpcap/Packet.dll → mswin32/winpcap/nt5/x86/Packet.dll
Normal file → Executable file
BIN
mswin32/winpcap/vista/x64/Packet.dll
Executable file
BIN
mswin32/winpcap/vista/x64/Packet.dll
Executable file
Binary file not shown.
0
mswin32/winpcap/vista/Packet.dll → mswin32/winpcap/vista/x86/Packet.dll
Normal file → Executable file
0
mswin32/winpcap/vista/Packet.dll → mswin32/winpcap/vista/x86/Packet.dll
Normal file → Executable file
|
|
@ -354,12 +354,11 @@ Section "WinPcap" SecWinPcap
|
|||
StrCpy $R0 $R0 2
|
||||
StrCmp $R0 '6.' vista_files
|
||||
|
||||
File Packet.dll
|
||||
; WanPacket.dll no longer present as of 4.1.0
|
||||
File nt5\x86\Packet.dll
|
||||
Goto install
|
||||
|
||||
vista_files:
|
||||
File vista\Packet.dll
|
||||
File vista\x86\Packet.dll
|
||||
|
||||
install:
|
||||
|
||||
|
|
@ -399,6 +398,20 @@ Section "WinPcap" SecWinPcap
|
|||
; disable Wow64FsRedirection
|
||||
System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
|
||||
File x64\npf.sys ; x64 NT5/NT6 version
|
||||
; The x86 versions of wpcap.dll and packet.dll are
|
||||
; installed into the right place further above.
|
||||
; install the 64-bit version of wpcap.dll into System32
|
||||
SetOutPath $SYSDIR
|
||||
File x64\wpcap.dll ; x64 NT5/NT6 version
|
||||
; install the 64-bit version of packet.dll into System32
|
||||
; check for vista, otherwise install the NT5 version (for XP and 2003)
|
||||
StrCpy $R0 $R0 2
|
||||
StrCmp $R0 '6.' vista_x64_packet
|
||||
File nt5\x64\Packet.dll ; x64 XP/2003 version
|
||||
Goto nt5_x64_packet_done
|
||||
vista_x64_packet:
|
||||
File vista\x64\Packet.dll ; x64 Vista version
|
||||
nt5_x64_packet_done:
|
||||
WriteRegStr HKLM "Software\WinPcap" "" "$PROGRAMFILES64\WinPcap"
|
||||
; re-enable Wow64FsRedirection
|
||||
System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
|
||||
|
|
@ -460,9 +473,9 @@ Section "Uninstall"
|
|||
Delete $INSTDIR\LICENSE
|
||||
Delete $INSTDIR\uninstall.exe
|
||||
|
||||
; This deletes the x86 files from SysWOW64 if we're on x64.
|
||||
Delete $SYSDIR\Packet.dll
|
||||
Delete $SYSDIR\pthreadVC.dll
|
||||
; No longer need to delete WanPacket.dll as of WinPcap 4.1.0.
|
||||
Delete $SYSDIR\wpcap.dll
|
||||
|
||||
; check for x64, delete npf.sys file from system32\drivers
|
||||
|
|
@ -474,6 +487,9 @@ Section "Uninstall"
|
|||
System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
|
||||
|
||||
Delete $SYSDIR\drivers\npf.sys
|
||||
; Also delete the x64 files in System32
|
||||
Delete $SYSDIR\wpcap.dll
|
||||
Delete $SYSDIR\Packet.dll
|
||||
|
||||
; re-enable Wow64FsRedirection
|
||||
System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
|
||||
|
|
|
|||
BIN
mswin32/winpcap/x64/wpcap.dll
Executable file
BIN
mswin32/winpcap/x64/wpcap.dll
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue