1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 12:19:02 +00:00
Commit Graph

2136 Commits

Author SHA1 Message Date
paulino
6acfb753c3 Updates script database after the removal of 'db2-discover.nse' 2014-10-18 04:44:26 +00:00
dmiller
917842059b Check TLS body protocol for compatibility in ssl-enum-ciphers
Haven't seen this, and it shouldn't happen, but it's possible for a
server to send the same protocol version in the record, but a different
one in the body. This wouldn't be valid, so we should reject it.
2014-10-16 04:07:07 +00:00
dmiller
cdd61aa874 Fix a bug in ssl-enum-ciphers
If the last chunk of ciphers was rejected, then all results were
discarded.
2014-10-15 21:52:36 +00:00
dmiller
ead3649ac5 Remove db2-discover.nse
Service probe does the same work. See
http://seclists.org/nmap-dev/2014/q3/415
2014-10-15 18:52:08 +00:00
dmiller
8005bfe83f Improvements and fixes to http-rfi-spider
patch from nnposter: http://seclists.org/nmap-dev/2014/q3/443
2014-10-15 18:38:16 +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
f60bf5fbc6 Correct CRLF in ftp-brute 2014-10-14 02:30:02 +00:00
sophron
4651a8f4ae [NSE] Updated http-robtex-* scripts to match current robtex API. 2014-10-08 01:39:30 +00:00
dmiller
b4988f1f5b Improvements to http-server-header
If service scan failed to find a match, the probe responses are cached.
Now http-server-header will look through those responses before sending
a probe of its own. This should result in better detection with fewer
probes sent.

Also changed the Server header string match to case-insensitive.
2014-10-01 19:54:34 +00:00
dmiller
23d4abd5e9 New docker-version script
http://seclists.org/nmap-dev/2014/q3/265
2014-09-24 20:31:42 +00:00
dmiller
a472ea34ab Major improvements to http-form-brute
Credit nnposter: http://seclists.org/nmap-dev/2014/q3/479
2014-09-23 13:42:00 +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
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
1d5da8bccb Get rid of redundant/useless tonumber()s in script arg processing 2014-09-20 06:03:25 +00:00
dmiller
47d31171b0 Some NSE globals cleanup. 2014-09-20 05:40:49 +00:00
dmiller
0224e0515a Make http-vuln-wnr1000-creds actually return something 2014-09-20 05:40:47 +00:00
dmiller
bf457ee12c Normalize some timeouts in scripts
Added use of stdnse.parse_timespec for timeout args. Used comm.lua
default timeouts in a couple cases. Corrected 2 cases of incorrect
documentation ("Default 60" when the default was 30 seconds).
2014-09-20 05:40:46 +00:00
dmiller
5db940fc70 Update http-server-header in a few ways
1. Use "softmatched" to let Nmap print the service fingerprint for the
user to submit.

2. Run even if version detection got a good match. This allows it to be
run by-name, or to provide additional info if available. Existing match
will not be clobbered, though.

3. Use comm.lua's default timeouts. Also, no need to pass port.protocol,
since comm.tryssl will use the port table directly.

4. XML output
2014-09-20 05:40:44 +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
d518e2dbcb Use http.parse_redirect and allow arbitrary verbs in http-form-brute
There's no reason we can't use other verbs besides GET and POST. Other
verbs are handled like GET requests (parameters in the URI string). Any
redirect responses will be followed with GET requests, though.
2014-09-17 21:57:59 +00:00
dmiller
5c9d6a3a75 Let http-form-brute use GET in addition to POST
Patch from nnposter. http://seclists.org/nmap-dev/2014/q3/262
2014-09-17 21:57:56 +00:00
dmiller
3c5137e7e7 Update 14 scripts with XML structured output 2014-09-08 04:35:49 +00:00
dmiller
6d421b2e67 Correct CVE number for ssl-ccs-injection 2014-09-06 03:09:37 +00:00
dmiller
9936bf6a47 Update smb-enum-shares to use structured output 2014-09-05 20:07:44 +00:00
dmiller
4a9cd8af7d Update smb-enum-groups to structured output 2014-09-05 13:08:13 +00:00
dmiller
a41685fd33 Correct some wrong output sections (old-style) 2014-09-05 13:08:11 +00:00
dmiller
b6e59efb4b Add stdnse.keys() for extracting keys from a table 2014-09-05 13:08:09 +00:00
dmiller
5c11f46bf0 Update dhcp-discover and broadcast-dhcp-discover to XML output 2014-09-05 02:54:40 +00:00
dmiller
33adefaab6 Update several scripts and libraries to use stdnse.format_time 2014-09-05 02:54:39 +00:00
dmiller
b913b23d58 Structured output for nat-pmp-info, sip-methods, smb-security-mode 2014-09-04 18:35:20 +00:00
dmiller
adc213d536 Update hadoop-namenode-info and hadoop-tasktracker-info with XML output 2014-09-04 18:35:19 +00:00
dmiller
92cf943482 Update ms-sql-info with structured output 2014-09-04 02:37:32 +00:00
dmiller
e7e530ccd0 Update hadoop-jobtracker-info with XML output 2014-09-03 22:07:32 +00:00
dmiller
327e0ab4cd Update hbase-master-info with XML output 2014-09-03 22:07:31 +00:00
dmiller
34ea28f869 Update epmd-info
Added structured output
Simplified building of probe (now just a string)
Added a timeout
2014-09-03 21:39:33 +00:00
dmiller
1bd3e1e85c Convert snmp-win32-* to XML output 2014-09-03 19:50:03 +00:00
dmiller
5365095c7b Convert netbus-info to XML output 2014-09-03 19:50:00 +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
55da3727b6 Fix an error in iax2-version
The logic:

    byte12 == ("03" or "04")

is the same as:

    byte12 == "03"

so the second comparison was never able to succeed.

Additionally, some expressions were simplified, such as not formatting
numbers into strings in order to compare them.
2014-09-03 04:49:47 +00:00
sophron
ced66e5b3f [NSE] Refactored get_admin_cookie method in http-adobe-coldfusion-apsa1301. Patch by nnposter. 2014-08-30 15:48:12 +00:00
sophron
17d115d469 [NSE] http-adobe-coldfusion-apsa1301 missed a sanity check. 2014-08-29 16:31:37 +00:00
dmiller
a4d51ff8d6 Handle 'foo=,' case in ntp-info 2014-08-27 19:41:32 +00:00
dmiller
062b780a48 Relax ntp mode 7 key-value parsing
http://seclists.org/nmap-dev/2014/q3/372
2014-08-27 02:23:08 +00:00
dmiller
8f609b060d Move lpeg/utility.lua up a directory to fix installation issues 2014-08-25 22:22:15 +00:00
dmiller
c633079123 Use lpeg parsing in ntp-info to handle escape-quoted strings 2014-08-23 20:47:49 +00:00
dmiller
f8917a59a3 Compatibility changes for ntp-info
http://seclists.org/nmap-dev/2014/q3/222
2014-08-23 20:47:46 +00:00
batrick
de27812fe4 Revert libssh2 branch, for now.
$ svn merge -r r33518:r33513 .

and removed added scripts to the script.db.

The branch needs further refinement/testing for Windows and Mac before merging
into the trunk. There is also the latent EOF bug which is giving performance
issues.

Further work on the branch will continue in Devin's latest branch:

/nmap-exp/devin/nmap-libssh2
2014-08-18 03:12:00 +00:00
paulino
0343eabd69 Updated script.db. 2014-08-18 02:03:24 +00:00
paulino
942151eefd Adds supermicro-ipmi-conf.nse. Nominated for a Pwnie for Best Server-Side Bug at BH. 2014-08-18 01:55:06 +00:00
devin
42c1444e60 Switched to using silent require for libssh2 in ssh-auth-methods 2014-08-14 16:40:48 +00:00