1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 06:59:01 +00:00
Commit Graph

4571 Commits

Author SHA1 Message Date
david
ec1b16f7d7 o [NSE] Added two new scripts for the MongoDB database from Martin
Holst Swende. mongodb-info gets information like the version number,
  memory use, and operating system. mongodb-databases lists the
  databases and their size on disk.
2010-01-29 22:23:06 +00:00
patrik
048b3ad931 Add lexmark-config.nse see
http://seclists.org/nmap-dev/2010/q1/6

Updated the mysql entries in the CHANGELOG
2010-01-29 21:04:25 +00:00
tomsellers
3cd9c64405 Added CHANGELOG entry for db2-das-info NSE script 2010-01-29 10:51:20 +00:00
david
0b6f99affd Add to CHANGELOG:
o [Ncat] Added support for HTTP Digest authentication of proxies, as
  both client and server. Previously only the less secure Basic was
  supported. [Venkat, David]
2010-01-29 05:58:10 +00:00
tomsellers
1135590980 Modified portrule to restrict the script to port 523 instead of 523 OR ibm-db2
in order to keep the script from running against the actual database instances.
Also modified the debugging output so that the bulk of the information is 
generated at -d 4 or higher.
2010-01-29 00:51:55 +00:00
david
80f90e4d5f Fix a typo in a comment. 2010-01-28 19:12:11 +00:00
david
0ed416b8fd Fix these compiler warnings with a patch from Solar Designer:
ncat_proxy.c: In function `ncat_http_server':
ncat_proxy.c:163: warning: dereferencing type-punned pointer will break strict-aliasing rules

nmap_dns.cc: In function `void parse_resolvdotconf()':
nmap_dns.cc:951: warning: unsigned int format, different type arg (arg 4)

traceroute.cc: In member function `void TracerouteState::read_replies(long int)':
traceroute.cc:1031: warning: 'header_len' might be used uninitialized in this function
2010-01-28 18:55:08 +00:00
tomsellers
9f9ce26425 Add a new script, db2-das-info.nse, that connects to the IBM DB2 Administration Server (DAS)
on TCP or UDP port 523 and exports the server profile.  No authentication is required for 
this request. The script will also set the port product and version if a version scan is
requested. [Patrik Karlsson, Tom Sellers]
2010-01-28 00:48:29 +00:00
fyodor
6cf3b33924 Update version number to 5.21 to reflect the latest Nmap user (even though technically the 5.21 release is coming from the /nmap-exp/stable-5.2 branch 2010-01-27 02:51:09 +00:00
fyodor
9a7b977b2a Update CHANGELOG to reflect the 5.21 branch 2010-01-27 02:48:02 +00:00
fyodor
d85c8d3603 Typo fix: reponses -> responses 2010-01-27 02:05:01 +00:00
david
b1e62c573f Add to CHANGELOG:
o [NSE] Restored the ability of http.head to return a body if the
  server returns one. This was lost in the http.lua overhaul from
  5.20. [David]

o [NSE] Fixed the use of our strict.lua library on distributions that
  install their own strict.lua. The error message was
    nse_main.lua:97: attempt to call a boolean value
  It was reported by Onur K. [Patrick]

o [NSE] Corrected a behavior change in http.request that was
  accidentally made in 5.20: it could return nil instead of a table
  indicating failure. [David]

o [NSE] Fixed the use of an undefined variable in smb-enum-sessions,
  reported by Brandon. [Ron]

o Fixed a compiler error when --without-liblua is used. [Brandon]

o [NSE] Did some simple bit-flipping on the nmap_service.exe program
  used by the smb-psexec script, to avoid its being falsely detected
  as malware. [Ron]

o [NSE] Fixed an error with running http-enum.nse along with the
  --datadir option. The script would report the error
    http-enum.nse:198: bad argument #1 to 'lines'
      (nselib/data/http-fingerprints: No such file or directory)
  The error was reported by Ron Meldau and Brandon. [Kris]
2010-01-27 01:52:26 +00:00
david
d04e2e825a Use a bigger buffer to read IP addresses from /etc/resolv.conf (to
acommonate IPv6 addresses) and make the sscanf format size match the
buffer size (to avoid smashing the stack). The format string is
constructed dynamically to the size of the buffer with Snprintf. Gunnar
Lindberg reported this problem; discussion starts at
http://seclists.org/nmap-dev/2010/q1/250.
2010-01-27 01:16:14 +00:00
david
5f4409ebc2 Add a workaround for Python packaging difficulties on Ubuntu. Specifically, cache the value of self.prefix before calling install.finalize_options, which on Ubuntu modifies self.prefix. Without this change, the path definitions in the installed Paths.py are wrong. (They refer to /usr/share/zenmap when they should refer to /usr/local/share/zenmap.) 2010-01-27 00:37:17 +00:00
fyodor
21e6e7d6fe some TODO updates after weekly review w/David 2010-01-27 00:00:30 +00:00
david
549dc85ad3 Change PortList::getPortState to return the default port state if the
port is unknown, instead of -1. This makes it a better fit with the
other accessor functions. For those callers that need to know whether a
port is in the default state or not, add PortList::portIsDefault.

Having getPortState return -1 for ports in the default state would cause
the slightly wrong

Discovered unknown port 88/udp on 192.168.0.190 is actually open

to be printed instead of

Discovered open|filtered port 88/udp on 192.168.0.190 is actually open
2010-01-26 20:46:26 +00:00
david
1f6c6d1aac Only change the port state to PORT_OPEN during service scan if it is not
already open. Rob Nicholls pointed out that setting the state
unconditionally results in multiple messages per port:

Discovered open port 3389/tcp
Discovered open port 3389/tcp
Discovered open port 3389/tcp
Discovered open port 3389/tcp

This is because setPortState has the side effect of printing a message.
2010-01-26 20:14:29 +00:00
david
6804b8d435 Change our match line for "Mac OS X Kerberos" to "MIT Kerberos" because
of new fingerprints from Matt Selsky. Also add a match line for MIT
Kerberos 1.2 from Matt.

The susec field of the response may be represented as an encoded string
of 3, 2, or (rarely) 1 bytes. I adjusted the Kerberos matches to be
specific about how other fields may change when this one does.
2010-01-26 19:40:44 +00:00
patrik
0bc8e65811 Add the scripts
mysql-brute
  mysql-datatabase
  mysql-empty-password
  mysql-users
  mysql-variables
and the mysql module
2010-01-26 09:40:38 +00:00
patrik
f53635148c Documented the daap_item_limit that limits the output of the daap-get-library script. Add changelog entries for r16568 2010-01-26 07:33:55 +00:00
patrik
54b977e6b2 Add daap-get-library.nse see
http://seclists.org/nmap-dev/2010/q1/164.
2010-01-25 23:51:44 +00:00
david
3c09069ee4 Show a nicer error message in Ndiff when an input file can't be opened. 2010-01-25 23:07:16 +00:00
ron
9365ad46e9 Added a README explaining the purpose of the encoded binary. 2010-01-25 21:22:22 +00:00
kris
e4c1ad93d8 Just add changelog entries for my changes in r16541 and r16559 2010-01-25 03:56:39 +00:00
kris
c9e68798c9 Updating ip_is_reserved(): 001/8 and 027/8 allocated 2010-01-25 01:52:37 +00:00
kris
d1e4ae6dc7 Set header variables like ip_ttl when calling ip_set_ttl() rather than just
setting the packet data.  This was confusing watching packets go correctly
over the wire but having incorrect variables.
2010-01-24 20:16:40 +00:00
bmenrigh
9ad0a206db Fixing compilation when --without-liblua is used. 2010-01-24 08:57:38 +00:00
batrick
92564b9b00 Merge from 16504:16554 from /nmap-exp/patrick/docs-parallelism.
Adding documentation for the various new parallelism features
NSE has recently added including mutexes, condition variables,
child coroutine support, and new threads.
2010-01-23 19:45:44 +00:00
ron
ba9532c2d4 Changed an error message throughout smb.lua that I never really liked. 2010-01-23 17:25:30 +00:00
ron
b00f6234d5 Fixed some bugs found by Brandon Enright in smb.lua. They were all caused by servers returning less bytes than they're supposed to. This revision basically makes the broken-server detection more robust. 2010-01-23 17:23:57 +00:00
ron
13f8f95a5f nmap_service.exe is now encoded locally by xor'ing each byte by 0xFF. It is decoded in line before it is uploaded. This is to prevent antivirus false positives from picking it up. 2010-01-23 16:56:49 +00:00
ron
49d8db7ba5 Fixed a bug in smb-enum-sessions discovered by Brandon Enright -- most error conditions would cause a nil-pointer exception. 2010-01-23 16:55:54 +00:00
ron
00b2c842e2 smb-brute now checks the hosts lockout policy before starting. If accounts can be locked out, it bails with an error message telling the user how to force it to run. 2010-01-23 16:31:40 +00:00
david
4c57d3f8c8 Unconditionally set the port state to PORT_OPEN when receiving a service
scan response, instead of checking for a current state of
PORT_OPENFILTERED. The code calls getPortState, but the port may not
have been assigned a state, again because of the new Port allocation
architecture, so the function returns -1.

It would make sense to have getPortState return the default port state
if a Port has not been allocated, but there are two other places it is
used where the code relies on it returning -1 to indicate that a port
has not received a state yet.
2010-01-23 02:01:50 +00:00
david
12ccaa7786 Remove a speck of uncertainty from favicon-db. 2010-01-23 01:54:32 +00:00
david
5318e5a375 Improve date formatting in Kerberos matches.
From: 20100123014311Z
To:   2010-01-23 01:43:11Z
2010-01-23 01:45:53 +00:00
david
44ea93217c Add another service match line for Mac OS X Kerberos on UDP. 2010-01-23 01:40:01 +00:00
david
e942244ba2 Add a patch to dns.lua from Patrik Karlsson to cope with some mDNS
implementations.
2010-01-22 23:44:51 +00:00
david
86c3be8180 Remove local declarations from the usage example in unpwdb.lua on a
suggestion from Patrick Donnelly. The for loops already localize their
variables.
2010-01-22 21:54:52 +00:00
david
5d7f91a6b2 Add a @usage section to unpwdb.lua showing how to use the iterators. 2010-01-22 21:10:55 +00:00
david
a066cd7bdc Add the missing dirname function to http-favicon.nse. I missed this when
I copied parse_url_relative from favicon-survey.nse. Ron Meldau reported
that this error is raised:
  http-favicon.nse:141: variable 'dirname' is not declared
It happens when a web page specifies a relative icon URL in a link
element. (dirname is used to absolutize the URL.)

Also, I changed to code to be sure to pass a plain string and number for
the host and port to parse_url_relative. Otherwise parse_url_relative
may return the tables that it receives and complicate the matching code
to decide if a URL should be followed.
2010-01-22 18:45:04 +00:00
kris
c6508cceb6 Fix http-enum.nse so it uses the full pathname for the fingerprints file (from
fetchfile) so it doesn't throw an error and quit running.

Reported by Ron Meldau and Brandon:

http://seclists.org/nmap-dev/2010/q1/222
2010-01-22 18:38:46 +00:00
ron
354eaca0ff Re-wrote smb-enum-domains.nse to be more generic and rely on library functions. Ultimately, I want to use these same functions in smb-brute to trim out impossible passwords and figure out account lockout policies before the bruteforce starts. It'll make smb-brute a little cleaner after the changes. 2010-01-22 04:43:51 +00:00
ron
d8bd5c399e Fixed a bug in smb-brute that wouldn't detect properly if an account became locked out, and would proceed to lock out every account. It was a totally braindead mistake on my part, I don't know how I did it, but I got a condition backwards. It's fixed now, though\! 2010-01-22 03:25:22 +00:00
david
b4c34134c0 Add to CHANGELOG:
o Fixed an error that occurred when UDP scan was combined with version
  scan. UDP ports would appear in the state "unknown" at the end of
  the scan, and in some cases an assertion failure would be raised.
  This was an unintended side effect of the memory use reduction
  changes in 5.20. The bug was reported by Jon Kibler. [David]
2010-01-22 01:53:23 +00:00
david
f1551332be Set the default port state and reason whenever PortList::createPort is
called. Formerly the only way to create a port was to call
PortList::addPort, which also set the state. Now ports are allocated on
demand whenever anything about a port is set. If we don't set the state
and reason, they're "unknown" and "unknown-reason". Because of the
special handling of PORT_UNKNOWN in the output table, this could lead to
an assertion failure reported by Jon Kibler.
2010-01-21 23:40:10 +00:00
david
349f0edad0 Let http.next_response receive a body in response to a HEAD request, if
there is one. Even though section 4.4 of RFC 2616 says that sending a
body in response to a HEAD request is a MUST NOT, pyllyukko sent me a
sample from a server that does--"LuCI - Lua Configuration Interface".
2010-01-21 19:42:52 +00:00
batrick
b6d57382e3 Fix bug where Lua will load original, optional Lua libraries when we have
custom libraries that must be used instead. (So, try to load our libaries
first, then look through system paths.) This bug is very rare since these
optional libraries are very rarely installed in most distributions.

Bug found by Onur K. [1].

[1] http://seclists.org/nmap-dev/2010/q1/197
2010-01-21 18:56:30 +00:00
david
929042a690 Fix the first round of HTTP pipeline requests. The pipeline makes an
initial request to get a value stored in the Keep-Alive header, which is
the size of the pipeline. It then iterates, doignt hat many requests at
once until the list of requests is exhausted. The prbolem was that in
the first round, it didn't count its initial Keep-Alive probe. So if the
server said it was good for 40 requests, we would send 41 before closing
the connection. Even worse was when the initial probe returned a
"Connection: close"; the pipeline would try another request before
closing the connection for the first time.
2010-01-21 17:43:23 +00:00
david
c7b4af21db o [NSE] Fixed a bug in http.lua that could lead to an assertion
failure. It happened when there was an error getting the a response
  at the beginning of a batch in http.pipeline. The symptoms of the
  bug were:
    NSE: Received only 0 of 1 expected reponses.
    Decreasing max pipelined requests to 0.
    NSOCK (0.1870s) Write request for 0 bytes...
    nmap: nsock_core.c:516: handle_write_result: Assertion `bytesleft > 0' failed.
  The error was reported by Brandon Enright and pyllyukko.
2010-01-21 16:28:39 +00:00