mailing list archives
Nmap on Vista - maybe UAC?
From: majek04 <majek04+nmap-dev () gmail com>
Date: Fri, 11 Apr 2008 01:34:24 +0200
c:\nmap -sS nmap.org
dnet: Failed to open device eth4
As everybody knows, first run of nmap on Vista must be with
so that WinPcap driver gets loaded.
I thought it would be nice to get standard UAC window instead of that.
The code works like this:
- if nmap can't open dnet interface (in tcpip.cc:eth_open_cached)
- new instance of nmap is invoked using ShellExecute function
- with parameter "runas" which should show the UAC dialog
- new instance of nmap does nothing, except that it loads the WinPcap driver
- we try to open the dnet interface once more (and it should succeed now)
This command is executed with Administrator priviledges when nmap
fails to open dnet interface:
nmap -sS -p80 -P0 -n -e <interface name, like eth4> 127.0.0.1
(nmap string is actually argv)
This command sucesfully loads WinPcap driver. I thought that it's
going to quickly fail, because
nmap can't scan localhost on windows. But it actually sends something,
which is not what
Anyone has better idea for simplest nmap command that is going to load
Can anyone tell me if this works for windows xp? (i mean when you run
nmap as normal user)
The code is here (uac code + fix for vs2008):
Oh, the project must be linked with shell32.lib.
I haven't updated the *sln or *vcproj files, so you must add this lib by hand.
(Alt+F7 -> configuration -> linker -> input -> additional
dependencies, add "shell32.lib" there)
vs2008 - http://ai.pjwstk.edu.pl/~majek/private/nmap/nmap-vs2008-2.diff
uac - http://ai.pjwstk.edu.pl/~majek/private/nmap/nmap-vista-uac.diff
minor warnigs -
Sent through the nmap-dev mailing list
Archived at http://SecLists.Org
- Nmap on Vista - maybe UAC? majek04 (Apr 10)