1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 11:49:01 +00:00
Commit Graph

3493 Commits

Author SHA1 Message Date
david
e88781716e Remove the unused Port::next member. 2009-11-19 16:10:49 +00:00
david
1a37d25650 Change cstringSanityCheck from being a method of Port to a static
function.
2009-11-19 16:04:37 +00:00
fyodor
07dae5d498 Next release will be 5.05BETA2 to distinguish it from the BETA1 used in svn for the last several months 2009-11-19 08:30:27 +00:00
fyodor
61190c7818 Some initial work on the CHANGELOG -- much more is needed though 2009-11-19 08:28:06 +00:00
fyodor
05eb8c8520 Note new man-xlate dir in Makefile, rename the portuguese man page XML source files to correspond to renamed rendered versions 2009-11-19 05:26:12 +00:00
fyodor
1b12a44ee8 Moved the Nmap translation XML source files here 2009-11-19 05:17:07 +00:00
david
3723852e17 Use the same trick of peeking inside the ARP packet for the destination
MAC in the doArp function as is done for ARP ping scan in
scan_engine.cc. This makes us capable of reading ARP responses that are
sent to the broadcast address.
2009-11-19 04:51:38 +00:00
fyodor
5289d55392 move the nroff man page translations to new man-xlate directory 2009-11-19 04:13:20 +00:00
david
9d4e947b4b Revert r16121, which changed when NSE sockets are created, as it seems
to be the cause of a segfault reported by Ron Bowes.

nmap -PN -p4567 -sV --script=http-* x.x.x.x
Program received signal SIGSEGV, Segmentation fault.
nsock_connect_tcp (nsp=0x83b8b38, ms_iod=0x0, handler=0x80b5cf0
<l_nsock_connect_handler(void*, void*, void*)>, timeout_msecs=10000,
userdata=0x8729308, saddr=0x871a6f8, sslen=16, port=4567)
    at nsock_connect.c:154
2009-11-19 03:46:53 +00:00
david
d54e4d4a9c Remove deleted or renamed scripts in the install-nse rule. People who
install from source may have old copies of scripts with different names,
like HTTPAuth instead of http-auth, because we don't delete the contents
of the scripts directory when installing. Rather than wipe out the whole
directory, which might contain people's custom scripts, there is now a
list of old script names in Makefile.in which are selectively deleted.
The whole list is

anonFTP
ASN
brutePOP3
bruteTelnet
chargenTest
daytimeTest
dns-safe-recursion-port
dns-safe-recursion-txid
dns-test-open-recursion
echoTest
ftpbounce
HTTPAuth
HTTP_open_proxy
HTTPpasswd
HTTPtrace
iax2Detect
ircServerInfo
ircZombieTest
MSSQLm
MySQLinfo
netbios-smb-os-discovery
popcapa
PPTPversion
promiscuous
RealVNC_auth_bypass
ripeQuery
robots
showHTMLTitle
showHTTPVersion
showOwner
showSMTPVersion
showSSHVersion
skype_v2-version
smb-enumdomains
smb-enumsessions
smb-enumshares
smb-enumusers
smb-serverstats
smb-systeminfo
SMTPcommands
SMTP_openrelay_test
SNMPcommunitybrute
SNMPsysdescr
SQLInject
SSH-hostkey
SSHv1-support
SSLv2-support
strangeSMTPport
UPnP-info
xamppDefaultPass
zoneTrans
2009-11-18 19:20:15 +00:00
fyodor
41a73d779e Note that the -r option sorts the port in ascending fashion 2009-11-18 19:06:31 +00:00
fyodor
8c6093581f Applied a patch from Matt Selsky which improves Oracle TNS Listener signature 2009-11-18 08:59:08 +00:00
david
8b89e83df2 Create an Nsock iod with nsi_new as soon as nmap.new_socket is called,
instead of waiting until a request is made to connect. This eliminates a
little bit of bookkeeping that needed to be done to retain state on the
NSE socket. Unfortunately this alone doesn't allow binding a socket to a
source address to receive UDP data, because Nsock doesn't create the
physical socket until a connection is made.
2009-11-18 05:35:39 +00:00
david
a4fc71afb6 Return the last host before skipping an octet in an IPv4 range exclude
group. Not doing this was the cause of off-by-one errors that led to
assertion failures and, potentially, excluded hosts being scanned. Here
is the comment I added:

  /* The decision to skip a range was based on the address that came immediately
     before what our current array contains now. For example, if we have just
     handed out 0.0.0.0 from the the range 0-5.0.0.0, and we're asked to skip
     the first octet, we want to advance to 1.0.0.0. But 1.0.0.0 is what is in
     the current array right now, because TargetGroup::get_next_host advances
     the array after returning an address. If we didn't step back we would
     erroneously skip ahead to 2.0.0.0. */
2009-11-18 01:17:59 +00:00
fyodor
714dd18f7f even more TODO updates -- prioritization 2009-11-17 23:54:28 +00:00
fyodor
3ba615a40b Add an assertion failure item 2009-11-17 23:22:07 +00:00
fyodor
9c7e5af8fb some changes after discussion w/David 2009-11-17 23:16:35 +00:00
fyodor
f8f550fd47 Updates for the generated files 2009-11-17 20:05:07 +00:00
fyodor
fda8a41343 Regenerate man pages -- my new system seems to be generating them properly unlike my old system. At least they look fine on a first glance 2009-11-17 06:23:01 +00:00
fyodor
e87adf87d6 note a problem I encountered with gtk+-bundle_2.16.6-20091013_win32.zip which lead me to revert back to gtk+=bundle_2.14.7-20090119_win32.zip 2009-11-17 04:27:18 +00:00
tomsellers
1f9a3e2fba Updating script.db, this was neglected during the db2-info.nse
commit.  [Tom]
2009-11-17 01:35:33 +00:00
david
4017a3a872 Remove some obsolete syntax from a comment. 2009-11-16 23:17:59 +00:00
david
682b8cbc53 Include the reason why a host is down with --reason. It looks like this:
Nmap scan report for 1.2.3.4 [host down, received time-exceeded]
Nmap scan report for 1.2.3.5 [host down, received no-response]
2009-11-16 19:38:37 +00:00
david
3c0a38d281 Print the "Warning: giving up on port because retransmission cap hit"
message once per host, not one per hostgroup. Include the IP address and
tryno in the message. It now looks like

Warning: 64.13.134.52 giving up on port because retransmission cap hit (0).

This was suggested by Chris Clements.
2009-11-16 17:33:12 +00:00
fyodor
f2da90d612 some updates and issues from building on my new Windows 7 x64 build machine 2009-11-16 09:46:27 +00:00
david
5c2eb72454 Allow traceroute to affect host timing stats. 2009-11-16 08:46:11 +00:00
david
300e038aa6 Print host timing information ("Final times for host" and the times
element in XML) even when doing only a ping scan. Don't print the
information if it was never set; i.e., we never measured an RTT to the
target.
2009-11-16 08:36:58 +00:00
fyodor
a2b0f3b0fe grab VC express install location from registry rather than hard coding it, as even the default differs by platform 2009-11-16 08:30:04 +00:00
david
ecb9aa0565 Print output for down hosts, even when doing scanning past a ping scan.
This always goes to XML and grepable output. It goes to normal in
interactive output in verbose mode. The format for printing a down host
is changed slightly:
Nmap scan report for 1.1.1.1 [host down]
2009-11-16 07:37:01 +00:00
david
2ccb1144da Remove a conditional that printed the "Host is down" line to either
LOG_PLAIN or LOG_STDOUT depending on whether o.resolve_all was set, and
just always print to LOG_PLAIN like we do all the other output. This was
the cause of a discrepancy between interactive and normal output
reported at http://seclists.org/nmap-dev/2009/q4/230.
2009-11-16 04:08:58 +00:00
david
1178943eaa Add a couple more OS fingerprints that I had flagged or that I just got
more information about from email.
2009-11-15 01:50:13 +00:00
tomsellers
08711b5eb2 Changing Makefile.in in order to permit the make install process to finish without error. A few extra files are installed so it may need some tweaking, but the change should at least get the process functional. [Tom] 2009-11-14 22:14:01 +00:00
david
5151648e0a Fix some nmap-os-db typos caught by the summary script. 2009-11-14 01:37:31 +00:00
david
d887a45600 All 81 OS corrections. 2009-11-14 01:19:27 +00:00
david
56dd6a4fba The last 549 OS submissions from this batch. 2009-11-14 00:10:33 +00:00
david
3bea09fabc Get rid of a warning "Classification of observed fingerprint does not
appear in reference fingerprint" and the code used to support it. This
happens all the time with submitted fingerprints and is nothing to worry
about. I don't want to be distracted from other warnings. This code was
only used by the OS fingerprint integration tools, not by Nmap itself.
2009-11-13 18:29:08 +00:00
david
5cb44e43ff Another 500 OS submissions. 2009-11-13 01:35:45 +00:00
david
da40786c2d Do 300 OS submissions. 2009-11-12 16:00:50 +00:00
david
e0870187de Remove a test
if (tcp_rpc_socket > max_sd)
	  max_sd = tcp_rpc_socket;
The condition is always true because max_sd is initialized to -1 and that block
of code is entered only if tcp_rpc_socket > -1. It looks like the kind of thing
that would be managing a large set of sockets for select, but here we're only
selecting on one socket at a time. This was suggested by Lionel Cons.
2009-11-12 16:00:16 +00:00
tomsellers
b5444fa390 Add a new script, db2-info.nse, that enhances DB2 database instance detection.
The script provides detection when version probes fail, but will default to 
the value provided the version probes if that value is more precise. The 
script also detects the server platform and database instance name. 
[Tom]
2009-11-12 11:44:02 +00:00
batrick
2b3df5882f [NSE] Patch to add worker threads to NSE for scripts to use. Right
now a script is limited in parallelism to working on one socket at any
time. A script can now create a worker thread that will be capable of
doing work on sockets in parallel with the parent script. See [1] for
more information.

This patch also comes with condition variables that are similar to
POSIX condition variables. They are used in the same fashion as
NSE's mutexes (nmap.mutex).

[1] http://seclists.org/nmap-dev/2009/q4/294
2009-11-12 01:33:52 +00:00
batrick
8f3ecdbb8b Cleaned up documentation for mutexes. Also added note that NSE
only maintains a weak reference in the background.
2009-11-12 01:20:19 +00:00
david
86d766a34e Use an std::map instead of a custom hash table for MAC address prefix
lookup. The hash table used linear probing which got very slow as the
hash table got full. Using std::map is about 10 times faster. The hash
table was slow enough that it took the majority of the time for me in an
ARP scan of a single address.

# nmap -sP 192.168.0.190
mac_prefix_init took 0.49261 s.
Nmap done: 1 IP address (1 host up) scanned in 0.59 seconds

# nmap -sP 192.168.0.190
mac_prefix_init took 0.04392 s.
Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds

The memory usage of std::map is probably greater. The hash table used
19037 pointers and about 13000 structures of size 8 (on a 32-bit
architecture), or about 176 KB. Assuming the map has left, right, and
parent pointers, and a red-black indicator per node, the usage is 16
bytes per prefix plus 8 bytes for the structure data, or 304 KB total.
But this makes fingerdiff so much faster, I want to leave it in place at
least until this round of OS integration is done.
2009-11-11 21:25:07 +00:00
david
53deb965ce All parse_single_fingerprint to handle a MatchPoints pseudo-print. 2009-11-11 19:36:10 +00:00
david
e22ebd5580 Reset ss.numqueries_outstanding to 0 when giving up on an RPC port
because of a lack of responses. Otherwise there is no way for that
number to decrease after moving on to the next port, leading to an
infinite loop. Lionel Cons reported the problem and provided a debug log
at http://seclists.org/nmap-dev/2009/q4/364.
2009-11-11 17:49:31 +00:00
tomsellers
3432ae3ad5 Updated DB2 port ranges to be broader in order to improve detection of the database instances that typically live in the 50000-50025 and 60000-60025 range. [Tom] 2009-11-11 13:45:57 +00:00
fyodor
ddcc123b26 Add Lionel Cons discovered rpc scan error 2009-11-11 08:20:59 +00:00
fyodor
46efa29253 Some changes from chat w/David earlier today 2009-11-11 04:12:59 +00:00
david
6662fc1cca Reindent the get_rpc_results function. 2009-11-11 03:53:12 +00:00
david
3718c179b2 Add a comment to the TODO item about localization for Nmap. Need to be
careful of security risks from functions that change their behavior
depending on the locale.
2009-11-10 20:48:20 +00:00