1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00
Commit Graph

390 Commits

Author SHA1 Message Date
david
40b0f784e7 Make http-date.nse capable of printing time differences in years. A web
server with a date in 2007 was producing the output

|_ http-date: Sun, 07 Jan 2007 08:17:36 GMT; -918d13h46m40s from local time.

Now it is

|_ http-date: Sun, 07 Jan 2007 09:01:44 GMT; -2y187d13h46m40s from local time.
2009-07-13 22:48:53 +00:00
david
426ed74a8b Add the http-date.nse script. Also the function http.parse_date that
parses an HTTP date in any of three possible formats.

http-date.nse gets the Date: header field value from and HTTP server,
then displays it with how much it differs from local time.
2009-07-13 22:03:02 +00:00
fyodor
4e9d7c17a5 update Nmap version number to 4.90RC1, rebuild generated files, except for man pages which are problematic at the moment 2009-07-08 22:32:49 +00:00
joao
52bb4f7cd0 dns-zone-transfer.nse now accepts new syntax argument table
comments updated
2009-07-05 10:01:10 +00:00
joao
bfa10a3499 whois.nse now accepts new syntax for table arguments.
comments updated.
2009-07-05 10:00:21 +00:00
batrick
ca2d116e2b Improved some code's efficiency. 2009-07-02 01:14:10 +00:00
fyodor
9ca4041ec1 Merged -r13793:HEAD from nmap-exp/dev/nmap branch now that we're opening up trunk development
again.  Here are the items which were merged:

------------------------------------------------------------------------
r13971 | jah | 2009-06-29 14:30:27 -0700 (Mon, 29 Jun 2009) | 2 lines

Improved a pattern for matching HTTP status-line, tidy away some variables and
fix a typo.
------------------------------------------------------------------------
r13967 | daniel | 2009-06-29 13:47:04 -0700 (Mon, 29 Jun 2009) | 5 lines

o Added a convenience top-level BSD makefile redirecting BSD make
  to GNU make on BSD systems.  This should help prevent bogus
  error reports when users run "make" instead of "gmake" on BSD
  systems. [Daniel Roethlisberger]

------------------------------------------------------------------------
r13965 | batrick | 2009-06-29 06:50:11 -0700 (Mon, 29 Jun 2009) | 14 lines

[NSE] The NSE Nsock Library binding no longer relies on garbage collection to
monitor the use of socket "slots". A thread (script) attempting to connect must
first obtain one of a limited number of available socket locks (usually 10 or
--max-parallelism). The binding would use garbage collection of sockets to
determine when a thread has finished using its allocated sockets. This is
unfortunately slow and requires us to constantly run the garbage collector to
cause timely reallocation. I have changed the binding to now regularly inspect
allocated sockets in the nsock_loop function. Available sockets slots are now
immediately reallocated and done with far less execution time.

See [1] for benchmarks and further explanation.

[1] http://seclists.org/nmap-dev/2009/q2/0624.html

------------------------------------------------------------------------
r13964 | batrick | 2009-06-29 06:37:49 -0700 (Mon, 29 Jun 2009) | 10 lines

[NSE] Fixed a rare (and usually undetectable) bug that can cause a SEGFAULT.
The NSE nsock library binding may attempt to push values on the stack of
a thread that ended due to an error. It is possible that the internal
Lua stack was completely full and any further pushed values would result
in a segmentation memory violation.

This bug is very hard to reproduce with a SEGFAULT but is usually visible
when Lua assertion checks are turned on. A socket handler routine must be
called AFTER a thread has ended in error.

------------------------------------------------------------------------
r13963 | batrick | 2009-06-29 05:51:20 -0700 (Mon, 29 Jun 2009) | 3 lines

Fixed some global scoped variables to be local. This caused a many scripts to
overwrite each others' sockets, options, etc.

------------------------------------------------------------------------
r13939 | joao | 2009-06-27 16:07:35 -0700 (Sat, 27 Jun 2009) | 2 lines

Fixed port rule to include ssl pop3 port, now that pop3.lua supports SSL connections in function capabilities

------------------------------------------------------------------------
r13938 | joao | 2009-06-27 16:06:28 -0700 (Sat, 27 Jun 2009) | 2 lines

Added transparent SSL support using comm.tryssl

------------------------------------------------------------------------
r13937 | joao | 2009-06-27 16:05:19 -0700 (Sat, 27 Jun 2009) | 2 lines

Added transparent SSL support using comm.tryssl

------------------------------------------------------------------------
r13936 | joao | 2009-06-27 16:03:50 -0700 (Sat, 27 Jun 2009) | 2 lines

Added SSL transparent support using comm.tryssl

------------------------------------------------------------------------
r13935 | joao | 2009-06-27 16:02:39 -0700 (Sat, 27 Jun 2009) | 2 lines

Added SSL transparent support using comm.tryssl

------------------------------------------------------------------------
r13934 | joao | 2009-06-27 16:01:38 -0700 (Sat, 27 Jun 2009) | 2 lines

Added SSL transparent support using comm.tryssl

------------------------------------------------------------------------
r13933 | joao | 2009-06-27 16:00:27 -0700 (Sat, 27 Jun 2009) | 2 lines

SSL transparent support using comm.tryssl

------------------------------------------------------------------------
r13932 | joao | 2009-06-27 15:19:58 -0700 (Sat, 27 Jun 2009) | 2 lines

Included transparent ssl support to function pop3.capabilities using comm.tryssl

------------------------------------------------------------------------
r13931 | joao | 2009-06-27 15:19:06 -0700 (Sat, 27 Jun 2009) | 3 lines

New version of comm.lua with function tryssl, that transparently adds support to ssl connections


------------------------------------------------------------------------
r13930 | joao | 2009-06-27 14:50:38 -0700 (Sat, 27 Jun 2009) | 6 lines

Fixed buffering problem exposed by david on nmap-dev list.
The problem was solved using a buffer to receive the data, making the script work fine in cases where the ssh packets are fragmented.

A very similar solution was applied to ssh1.lua.


------------------------------------------------------------------------
r13928 | batrick | 2009-06-27 04:43:12 -0700 (Sat, 27 Jun 2009) | 18 lines

[NSE] We now propogate a NSE initiated yield on a script through all user
coroutines so that NSE may resume control. Previously, scripts that would yield
in a child coroutine (e.g. a script's child coroutine generated by Lua's
coroutine.create function) would give control back to the script. A script
would yield in this way by making a blocking socket operation. NSE would be
unable to correctly resume child coroutine when the socket operation is
finished processing.

By yielding the chain of coroutines a script has operating, we allow to NSE to
handle the socket operation properly. NSE would then resume the entire chain so
execution may correctly resume at the coroutine which initiated the socket
operation. This restores the "illusion" that a script executes without
interruption.

See [1] for more information, further explanation, and some use cases.

[1] http://seclists.org/nmap-dev/2009/q2/0586.html

------------------------------------------------------------------------
r13817 | david | 2009-06-18 15:57:29 -0700 (Thu, 18 Jun 2009) | 3 lines

Improve an OS fingerprint with a model number and broader matching.
Based on a follow-up report from a submitter.

------------------------------------------------------------------------
r13814 | josh | 2009-06-17 21:34:15 -0700 (Wed, 17 Jun 2009) | 3 lines

[zenmap] Added support to zenmap for the new SCTP options: -PY, -sY and -sZ


------------------------------------------------------------------------
r13797 | ron | 2009-06-17 11:02:18 -0700 (Wed, 17 Jun 2009) | 1 line

Applied a patch from Mak Kolibabi that enhances the output of smb-enum-processes. The output is now modeled after the output of the 'ps' tool for higher verbosity levels.
------------------------------------------------------------------------
r13795 | david | 2009-06-17 09:05:21 -0700 (Wed, 17 Jun 2009) | 6 lines

The configure script now allows cross-compiling by assuming that
libpcap is recent enough. Previously it would quit because a test
program could not be run. libpcap will always be recent enough when
the included copy is used. The patch was contributed by Mike
Frysinger.
2009-06-29 23:48:19 +00:00
joao
9dcee544b4 Fixed some comments 2009-06-14 19:54:18 +00:00
fyodor
ef7b811881 Restore some nsedoc comment grammar fixes I added yesterday in r13725, but that Joao accidentally blew away in r13729 2009-06-13 21:57:50 +00:00
joao
2d096e924f Removed special chars from comments 2009-06-13 02:25:41 +00:00
joao
e938e1a18f Fixed comments about arguments on the script.
Fixed description.
2009-06-13 02:15:01 +00:00
joao
891fe08af8 Script now have two arguments:
- openproxy.url: Url to make requests to the proxy
- openproxy.pattern: Pattern that should be checked inside the responses for requests HEAD and GET

pattern will never be used for CONNECT requests, that will only check for the connection code

Script now uses default pattern checks for default url
(checks for ^server: gws in www.google.com requests)
If openproxy.url is used, script performs code check, looking for codes 200,301,302.
If openproxy.url is used and openproxy.pattern also, script performs pattern check
2009-06-13 01:55:16 +00:00
fyodor
d678c982d0 Some minor rewording of the nsedoc 2009-06-13 00:11:06 +00:00
joao
c951c9d0c1 Main changes on script http-open-proxy.nse:
- Attempts requests using HEAD and CONNECT also (not only GET, as before).
- Script now accepts destination url for doing the test as argument
- Chekings now are made using response code (200, 301, 302) and no longer google server header
2009-06-12 23:28:21 +00:00
joao
f39e109b64 Adding script for performing open socks proxy server discovery.
Script was also included to script.db file.
2009-06-12 23:23:54 +00:00
ron
7604ec68e2 Updated http-iis-webdav-vuln.nse: gives less output by default (unless -v or -d is given). Also updated it to reflect Microsoft's MS09-020 bulletin. 2009-06-11 21:57:42 +00:00
ron
ab59b09c03 Miscellaneous code cleanups in my smb-* libraries/scripts (removed unused includes, old debug code, etc.) 2009-06-10 23:13:15 +00:00
ron
8ba83f3460 Cleaned up the output for smb-check-vulns.nse. Messages are no longer displayed by default if a vulnerability (or infection) isn't found. With -v, messages indicating a vulnerability was fixed or malware wasn't found are displayed. With -d, error messages are displayed. 2009-06-09 17:56:41 +00:00
bmenrigh
7c63ab6bcd Adding the imap-capabilities script and supporting imap library.
The imap-capabilities script is mostly feature-complete but I could
see adding some analysis code to warn users of non-SSL'd IMAP servers
that offer STARTTLS without NOLOGIN.

The imap "library" is really a joke.  It does the minimum required to
support getting capabilities and nothing more.  IMAP requires each
command to use a unique identifier like 000, 001, 002, etc.  Right now
the identifier is hardcoded to a001.  To make a real imap library that
supports logging in, and other IMAP features a state variable will
have to be maintained to change the command uid.  It would be nice to
see the library get updated so that IMAP brute-forcing could be
supported.
2009-06-08 23:21:56 +00:00
fyodor
51981c07b1 Regenerated data files with 4.85BETA10 version number; that release is probably still 2-3 days away though, but I'm testing new build rules 2009-06-07 04:26:47 +00:00
fyodor
c5fcfefbea Further improvements to the output format. It now always prints the vuln table if an infection is found, but it no longer prints anything for clean machines unless verbosity is 2+ 2009-06-04 19:39:24 +00:00
ron
05a8b54511 Reduced the amount of output that p2p-conficker.nse gives unless verbosity 2 or higher is given. 2009-06-04 13:10:00 +00:00
batrick
3eba69f9f8 Removed packet.hextobin and packet.bintohex. Both are unnecessary
with the struct (bin) library available:

function hextobin(str) return bin.pack("H", str) end
function bintohex(str) return bin.unpack("H", str) end

Also removed a commented copy that was in the sniffer-detect.nse script.
2009-05-28 03:59:02 +00:00
fyodor
d971be11a8 Add links to some other sources of information on the vulnerability and this script 2009-05-22 19:59:07 +00:00
ron
bfd3c5b3df Fixed the 'usage' section -- thanks to Raul Siles for pointing out the mistake 2009-05-22 12:35:59 +00:00
ron
db4b1df6d1 Fixed a nil-reference bug in the WebDAV code 2009-05-21 19:49:53 +00:00
ron
4d38f8c8c5 Fixed a spelling mistake on print_debug ('pring_debug') 2009-05-21 14:35:23 +00:00
ron
9f21ec234c Applied a patch to WebDAV checks created by Andrew Orr:
1) Checks if the root folder is protected and aborts if it is (we can't scan folders if the root folder is protected)
2) Checks if WebDAV is enabled on the server and aborts if it isn't. The check works on IIS 5, 5.1, and 6.0 (hasn't been tested on others)
3) Added support for finding the vulnerability on IIS 5.1 (Windows XP) -- 5.0 doesn't appear to be vulnerable in our tests
2009-05-20 18:44:01 +00:00
fyodor
d3e623bf00 change the categories to vuln and intrusive 2009-05-20 00:51:54 +00:00
fyodor
4599d9f4f5 rename http-webdav-unicode-bypass.nse to http-iis-webdav-vuln.nse and update script.db 2009-05-20 00:43:30 +00:00
bmenrigh
f6eba7c5f1 Fixed Metasplit -> Metasploit typo 2009-05-20 00:05:37 +00:00
fyodor
60b4f7913c remove an apostrophe which was causing us nsedoc generation problems 2009-05-20 00:01:41 +00:00
ron
7382e29cb0 Updated documentation 2009-05-19 23:56:05 +00:00
ron
2d8862524d Gave credit to my friend (well, minion) who wrote the script with me 2009-05-19 23:27:31 +00:00
ron
51b9dd426b Added a check at the start for a password-protected root folder. Prevents checking if we can't get useful results. 2009-05-19 21:27:05 +00:00
ron
571145d92a Improved the script's ability to check subfolders by moving where the 'exploit' unicode characters (%c0%af) are to the beginning of the string. 2009-05-19 21:21:55 +00:00
ron
c213cc97b1 Added an initial WebDAV vulnerability-detection attempt for testing 2009-05-19 20:56:07 +00:00
jah
55ded906f2 Fix a problem, reported by David, which resulted in an error arising from an
unexpected value for the "data" table after repeating queries at the same
service for the same IP (which should not ever happen).
2009-05-01 23:35:44 +00:00
batrick
79eaf3edc3 Updated script database to the new format required by NSE --script
boolean operators.
2009-04-30 05:56:00 +00:00
david
22a77a865c Use host.ip, not just (undefined) ip in whois.nse exception error
messages. Instead of handling an error nicely, it caused a format string
error of its own:
./nselib/stdnse.lua:61: bad argument #3 to 'format' (string expected, got nil)
It seems that a deadlock happens immediately after one of these errors
occurs. This change doesn't fix the deadlock but allows the underlying
error message to be printed.
2009-04-29 23:33:44 +00:00
david
1b2e726629 Sort script.db, remove erroneous smb-check-vulns-2.nse entry. 2009-04-24 18:45:00 +00:00
ron
3882988f7a Removed some debug code 2009-04-21 19:41:02 +00:00
ron
3b11c8696f Fixed a small bug that caused 'checkall' to not actually check all 2009-04-21 19:40:08 +00:00
ron
7793572bc2 Updated the @usage yet again 2009-04-21 19:25:49 +00:00
ron
73b43aed51 Updated 'usage' section again 2009-04-21 19:22:46 +00:00
ron
0df410fb14 Updated the 'usage' section 2009-04-21 19:12:06 +00:00
ron
bc55de0c6e Adding new check for Conficker.C and up, using the peer-to-peer ports. 2009-04-21 18:30:40 +00:00
ron
1fbc9e62cf defaulted to basic login for smb-check-vulns (the test infected box I found doens't like extended logins, not sure whether it's because of Conficker or if it was random chance 2009-04-17 01:13:57 +00:00
ron
dd9f063b1f Updated Conficker.D-detection code 2009-04-17 01:09:29 +00:00
ron
14f2c0c6db Added experimental checks for Conficker.D/E 2009-04-17 00:34:13 +00:00