1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-22 22:29:03 +00:00
Commit Graph

1262 Commits

Author SHA1 Message Date
fyodor
e806585cdd o [NSE] Updated our Wordpress plugin list to improve the
http-wordpress-plugins NSE script. We can now detect 34,077 plugins,
  up from 18,570. [Danila Poyarkov]
2014-11-10 05:37:39 +00:00
dmiller
8f414cfc3a Correct conversion of DH key size to RSA bit strength equivalent 2014-11-07 21:41:38 +00:00
dmiller
8101fa65e0 Remove ssl-ciphers data file 2014-11-07 18:05:10 +00:00
dmiller
222b2a009d Use internal cipher/handshake scoring system instead of static datafile 2014-11-07 16:39:26 +00:00
dmiller
f365b81c23 Add server certificate message parsing to tls.lua 2014-11-05 05:55:54 +00:00
dmiller
2871ba3e6c New function, sslcert.parse_ssl_certificate
For reasons, the function is exported from nse_ssl_cert.cc into
nmap.socket, then included and documented in sslcert.lua because it fits
better there.
2014-11-05 05:55:52 +00:00
dmiller
040b813986 tls.lua: get info about a cipher suite by parsing its name 2014-11-03 21:29:31 +00:00
sophron
52589ae6d1 [NSE] Added sanity check in data/http-devframework-fingerprints.lua 2014-11-02 11:49:56 +00:00
tomsellers
ea749d785b Fixed a bug in the sslcert.lua library that was triggered against certain services when version detection was used.
http://seclists.org/nmap-dev/2014/q4/110
2014-10-25 18:38:17 +00:00
dmiller
9cb2800c97 Revert r33755 (broken fix) 2014-10-25 12:18:15 +00:00
dmiller
553e827110 sslcert: if -sV detects ssl, then no STARTTLS is needed 2014-10-25 12:09:55 +00:00
dmiller
e9354a4793 Add TLS_FALLBACK_SCSV checking to ssl-poodle 2014-10-22 17:01:19 +00:00
paulino
4ea5456251 Patch to vulns.Report:make_output() now uses stdnse.output_table() to return output.
Over 40 scripts using the library 'vulns' now support XML structured output.
2014-10-19 20:53:04 +00:00
paulino
97c56e3e57 Adds fingerprints for ASUS RT-N10U and motorola RF switch 2014-10-18 04:09:05 +00:00
dmiller
5952b9745b Move url-encoding to url.build_query
patch from nnposter: http://seclists.org/nmap-dev/2014/q3/427
2014-10-15 18:12:58 +00:00
dmiller
58f1b845d6 Let lpeg-utility.escaped_quote only remove escaped escapes and quotes 2014-10-01 17:56:19 +00:00
dmiller
f9abb3108c Streamline starttls functions for smtp, pop3, and imap 2014-09-24 20:31:47 +00:00
dmiller
3e2ac00e55 Leverage ftp and comm libs in sslcert.lua
This should result in faster (comm.lua's timeouts) and more reliable
(ftp.lua's response processing) STARTTLS for FTP
2014-09-24 20:31:45 +00:00
dmiller
278450ce94 Fix a script crash when comm.opencon was called without opts 2014-09-24 20:31:44 +00:00
dmiller
99cc5102c3 Correct a typo: tables don't work like strings 2014-09-23 13:41:58 +00:00
dmiller
e42409be93 XML structured output for brute.lua and creds.lua
The @xmloutput section documentation is not done, and I'm not sure how
to best do it, since it will be the same for all brute.lua scripts. This
is how it looks:

metasploit-msgrpc-brute:
<table key="Accounts">
  <table>
    <elem key="username">root</elem>
    <elem key="state">Valid credentials</elem>
    <elem key="password">root</elem>
  </table>
</table>
<elem key="Statistics">Performed 3 guesses in 4 seconds, average tps: 0</elem>

creds-summary:
<table key="127.0.0.1">
  <table key="9929/nping-echo">
    <table>
      <elem key="password">123456</elem>
      <elem key="state">Valid credentials</elem>
    </table>
  </table>
  <table key="55553/unknown">
    <table>
      <elem key="username">root</elem>
      <elem key="state">Valid credentials</elem>
      <elem key="password">root</elem>
    </table>
  </table>
</table>
2014-09-23 05:23:19 +00:00
dmiller
aaf7838b10 Improve error handling in comm.opencon and tryssl 2014-09-23 05:23:17 +00:00
dmiller
b8d2327c5e Correct some field typos in creds.Account 2014-09-23 05:23:16 +00:00
dmiller
f37ac44380 Move brute.Account to creds.Account
In addition to fitting better (brute library is the verb, creds library
is the noun), this will allow creds.lua to use creds.Account internally
where necessary (see subsequent commits)

Also change old references to string argument "OPEN" into
creds.State.VALID.
2014-09-23 05:23:13 +00:00
dmiller
379759d539 Avoid __pairs metamethod in stdnse.keys
This allows stdnse.keys to be used in a __pairs metamethod to, for
instance, yield keys in sorted order. Using next() bypasses the __pairs
metamethod that would be called when pairs() was used. Otherwise,
infinite recursion was possible.
2014-09-23 05:23:06 +00:00
dmiller
a101e58a4c Abstract case-insensititive html tag searching 2014-09-20 14:49:57 +00:00
dmiller
ed9ecc54ea Improve html form parsing, patch from nnposter
http://seclists.org/nmap-dev/2014/q3/418
2014-09-20 14:49:55 +00:00
dmiller
791566faf0 Let imap and pop3 use shorter connect timeouts 2014-09-19 03:10:10 +00:00
dmiller
45ff211483 Refactor smtp.connect to use comm.opencon 2014-09-19 03:10:09 +00:00
dmiller
004851bb06 Reindent comm.lua (whitespace-only) 2014-09-19 03:10:07 +00:00
dmiller
77a1c5c79c Some comm.lua internal changes
1. export the comm.opencon function. Does all the connect/request
timeout, recv_before, and first data payload stuff that tryssl does, but
without trying SSL. Ought to save some boilerplate in some scripts

2. Make opencon use setup_connect instead of duplicating code.

3. Move a debug message about tryssl to tryssl from opencon

4. Transparently handle UDP in tryssl, in case someone does that. Debug
message about DTLS not being supported is printed, but otherwise just
connects with opencon. Previously, doing this would result in a
connection to the TCP version of the port, even if you passed in a port
table with port.protocol=="udp".
2014-09-19 03:10:06 +00:00
dmiller
e8eddb6cfe Use comm.lua default timeouts for http.pipeline_go, remove unused get_default_timeout 2014-09-18 04:11:28 +00:00
dmiller
a7b86fa0fa Change timeouts for comm.lua
As reported by nnposter (http://seclists.org/nmap-dev/2014/q3/472) using
the rtt-based timeouts for read timeouts is not a good idea, since host
processing time can be considerably longer, especially for SSL
connections. comm.lua already allowed for different connect_ and
request_timeout values to reflect this truth, so this commit switches to
using the rtt-based timeout for the connect timeout and adding 6 seconds
to get the request timeout. This value is based on the totalwaitms value
in nmap-service-probes, and is still well short of the default 30s nsock
timeout.
2014-09-18 03:38:24 +00:00
dmiller
327496d50c Relax http.parse_form to allow forms without an action
Patch from nnposter: http://seclists.org/nmap-dev/2014/q3/384
2014-09-18 03:38:23 +00:00
dmiller
440ed59396 Export http.parse_redirect, a useful function 2014-09-17 21:57:57 +00:00
dmiller
b6e59efb4b Add stdnse.keys() for extracting keys from a table 2014-09-05 13:08:09 +00:00
dmiller
33adefaab6 Update several scripts and libraries to use stdnse.format_time 2014-09-05 02:54:39 +00:00
dmiller
6dfd1b5abe Let stdnse.format_time take other units besides seconds 2014-09-05 02:54:37 +00:00
dmiller
9460f34e32 New stdnse.format_time for showing time intervals 2014-09-05 02:54:35 +00:00
dmiller
8bb13ebf81 Localize more functions in stdnse.lua 2014-09-03 19:49:59 +00:00
dmiller
40f36a4e3e Some string optimizations in NSE
Changes fall into these categories:

1. Avoid pathological string building. Loops over x = x .. "foo" can
become very slow. Instead, use strbuf.lua, table.concat, or just one
continuous concatenation; a = x .. y .. z is one operation, better than
a = x .. y; a = a .. z

2. Use hex-escaped strings instead of string.char. I find this more
readable in many cases, and it avoids a table lookup and function call.

3. Don't duplicate code. A few libraries and scripts had re-implemented
stdnse.generate_random_string or openssl.rand_bytes.
2014-09-03 04:49:54 +00:00
dmiller
25725d369e Localize a few functions in stdnse.generate_random_string for performance reasons 2014-09-03 04:49:49 +00:00
dmiller
c615bee688 New convenience function stdnse.get_timeout 2014-09-02 18:23:09 +00:00
dmiller
2692746c42 NSEdoc cleanup
Mostly splitting function summaries (the first paragraph of NSEdoc) from
the body of the description to make the summary indexes shorter and
easier to scan.

Also fixed some unbalanced code tags like <code>foo</table>
2014-09-02 18:23:06 +00:00
dmiller
667be96764 Fix some nsedoc 2014-08-29 19:58:15 +00:00
dmiller
964006b223 Adjust default timeout for rpc.lua
Reported: http://seclists.org/nmap-dev/2014/q3/378

Changes the default timeout for rpc.lua from 30s to 5 times Nmap's
calculated host timeout or 10s if no timeout info is available.
2014-08-29 16:34:56 +00:00
dmiller
d6bc7eed0b Add some code from Patrick for debugging lpeg grammars 2014-08-26 18:53:52 +00:00
dmiller
b27feed980 Support diffie-hellman-group14-sha1 in ssh2.lua
ssh-hostkey was hitting an assertion failure when scanning OpenSSH 6.7.
The cause was a failure to check for a shared KEX algorithm. We just
assumed diffie-hellman-group1-sha1 would be supported, since RFC 4253
says it "MUST be supported". This adds support for group14, which is a
2048-bit modulus; key strength was likely the reason for dropping
group1. A more complete solution would be to support more KEX
algorithms, but that's beyond the scope of the bug report.
2014-08-26 13:35:25 +00:00
dmiller
8f609b060d Move lpeg/utility.lua up a directory to fix installation issues 2014-08-25 22:22:15 +00:00
paulino
64b40b7a93 Adds signature for Lantronix SLC (http://www.lantronix.com/it-management/console-servers/slc.html) to http-default-accounts 2014-08-25 01:12:59 +00:00