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

1319 Commits

Author SHA1 Message Date
dmiller
63ad40fb74 Fix a bug in creds.lua, comparing creds without users
When creds.lua is used without usernames (like in snmp-brute.nse), the
credentials could not be sorted because they are sorted first by
username, which is nil and cannot be compared. Now the script first
checks that both values are non-nil (and true) before comparing them.
2015-05-26 03:40:09 +00:00
dmiller
9781830ece Check for system files and directory traversal in tftp-enum.nse 2015-05-15 19:35:17 +00:00
henri
b1d6bcd9be nselib/smb: fix find_files function (next_item coroutine)
Patch by Pierre LALET <pierre.lalet@cea.fr>
2015-04-30 17:58:13 +00:00
dmiller
c8db85bc4a Fix some documentation about comm.lua timeouts 2015-04-28 13:18:21 +00:00
dmiller
1033287ccd Fix unpwdb.filter_iterator (http://seclists.org/nmap-dev/2015/q2/44) 2015-04-17 03:26:58 +00:00
paulino
fba4bc85c6 Make the library vulns use HTTPS by default when generating CVE links. 2015-04-15 20:29:47 +00:00
dmiller
54543b303c Clean up some documentation regarding http redirects 2015-04-10 12:56:05 +00:00
dmiller
2e55f5d3b8 Allow redirect_ok to be a number of redirects to follow (http.lua) 2015-04-10 03:42:44 +00:00
dmiller
dab7b10ebe Add 3389 as an SSL port; Enhanced RDP Security requires TLS 2015-04-02 04:40:26 +00:00
dmiller
ab5b346352 Obey TLSv1.2 RFC regarding anonymous signature type 2015-03-25 19:35:20 +00:00
dmiller
170a45f21d Fix a typo in a debug message 2015-03-25 14:30:18 +00:00
dmiller
04fee3d14c Move TLSv1.2 signature_algorithms extension defaults into tls.lua 2015-03-25 02:29:25 +00:00
dmiller
ed86473b0c Send supported signature algorithms for TLSv1.2 2015-03-24 23:22:19 +00:00
dmiller
1fd4b3edd8 Use some sane defaults in tls.client_hello 2015-03-06 19:59:59 +00:00
dmiller
40945dc702 Send SSLv3 as record version in ClientHello for compatibility 2015-03-06 19:59:57 +00:00
dmiller
e2bfa97920 Replace instances of bin.pack('A', x), which is equivalent to tostring(x), and a no-op on strings 2015-03-03 04:48:18 +00:00
dmiller
03110e7e89 String concat cleanup grab-bag
Mostly just eliminating concatenation-reassignments by chaining
concatenations, reordering assignments to allow better use of bin.pack,
and using tables to store intermediate results before concatenating
them. Used strbuf as a quick fix in dhcp.lua. Eliminated some unused
string variables in vulns.lua.
2015-03-02 14:39:29 +00:00
dmiller
c1b2429efd Remove some more creative ways of building a literal byte 2015-03-02 13:47:45 +00:00
dmiller
ea58c6bebb Replace chained concatenation reassignment with simple concatenation
Example:

x = y
x = x .. z

Fixed:

x = y
.. z

This simple fix would save 1 string creation/deletion. Most changes
involve many more than this.
2015-03-02 13:47:42 +00:00
dmiller
3025022f98 Optimize stdnse.debug and stdnse.verbose
Unnecessary, probably, but this eliminates 2 of 7 string
creations/collections due to concatenation and reassignment. Also
eliminates 2 unneeded table lookups and tests (since host always has
host.ip and port always has port.number), and eliminates 1 extra test
for prerule and postrule scripts, since we can't have a port if we don't
have a host.
2015-03-01 04:18:33 +00:00
dmiller
d641d00031 Simplify format_get_indent since all indents are spaces for a long time now. 2015-03-01 04:18:32 +00:00
dmiller
4d106cbe23 Remove unneeded requires 2015-02-28 12:43:59 +00:00
dmiller
fac667e621 Bugfixes in json.lua
A few bugs crept in during the conversion to LPEG parsing:

1. Unicode parsing of UTF-16 surrogate pairs returned an ending position
that was off by 2, so that the last 2 characters in the escape code were
parsed as literal characters.

2. Arrays and objects were not being tagged as such with make_array and
make_object during parsing.

This commit fixes these bugs, and returns to using unicode.utf8_enc for
UTF-8 encoding instead of a separately-defined function. Also, the tests
at the end (which were helpful in finding both of the bugs above) were
converted to unittest.lua tests.
2015-02-28 12:43:43 +00:00
dmiller
0e74dd7a35 Replace some string.char and bin.pack calls with literals 2015-02-27 19:42:56 +00:00
dmiller
204d37e4d7 Replace packet.toip* and ip*tobin with ipOps.ip_to_str and str_to_ip 2015-02-27 19:42:46 +00:00
dmiller
4f0518bd93 Replace concat-loop padding with string.rep 2015-02-27 14:55:42 +00:00
dmiller
e275a96c72 Use string.gsub instead of looped concat to modify strings 2015-02-27 14:55:29 +00:00
dmiller
d16772a8a8 Simplify bencode parsing and random string gen in bittorrent.lua 2015-02-27 14:55:26 +00:00
dmiller
9d5c8962dd Fix error message in ipOps.fromdword 2015-02-27 14:55:25 +00:00
dmiller
db717c7543 Standardize random string generation on stdnse.generate_random_string 2015-02-25 05:06:08 +00:00
dmiller
f6733b2d89 Replace msrpc.random_crap with stdnse.generate_random_string 2015-02-25 05:06:05 +00:00
dmiller
8f939279ca Let charset arg to stdnse.generate_random_string be a string
The charset argument was intended to be a table, since Lua doesn't allow
indexing strings with []. Unfortunately, irc-brute and tftp-enum passed
a string instead, which meant that the output was always the empty
string. This change allows both formats, and fixes those scripts.

irc-brute and tftp-enum had been broken since r33632 (no released
version of Nmap)
2015-02-25 05:06:03 +00:00
dmiller
6ba9936d24 NSE support for Adobe LiveCycle
http-fingerprints and default account additions by rvrsh3ll.
Closes #61
2015-02-20 15:54:13 +00:00
dmiller
ca3d838b1b Fix some globals in nselib/data/http-*.lua 2015-02-20 15:54:12 +00:00
dmiller
1b97aae733 Add https-alt to shortport.http (Fixes #56) 2015-02-18 19:54:05 +00:00
dmiller
6139ed22e7 Replace host.ip, port.number with host, port
In most cases (e.g. any of the nmap.socket operations), functions can
take full host and port tables instead of just host.ip and port.number.
This makes for cleaner-looking code and easier extensibility if we
decide to check for a protocol on both TCP and UDP, for instance.
2015-02-18 14:38:42 +00:00
paulino
588d744bd6 Adds Zebra printer fingerprints to http-default-accounts 2015-02-17 23:38:40 +00:00
dmiller
b26bf922bd Fix boolean logic in comm.get_banner 2015-02-12 20:04:27 +00:00
dmiller
498f0c3371 fix some string-building in dns.lua 2015-02-10 05:58:46 +00:00
paulino
617be2ea28 Renames the original http-wordpress-enum to http-wordpress-users and adds the new version of http-wordpress-enum which detects plugins and themes of Wordpress installations 2015-02-09 07:14:55 +00:00
paulino
f160b590aa Adds a popular FrontPage extension file to http-enum 2015-02-08 19:15:11 +00:00
dmiller
bf58512bec Move service fingerprint unwrapping code from scripts to lpeg-utility 2015-02-05 04:17:54 +00:00
dmiller
e985053c6d Add check for Cisco ASA version disclosure, CVE-2014-3398 2015-02-02 18:25:53 +00:00
dmiller
d1e429f42b Don't crash when an NSE library (e.g. sasl) calls stdnse.debug during require 2015-01-01 21:09:03 +00:00
paulino
f819655677 Adds fingerprint to detect the administration console of Oracle WebLogic Servers 2014-12-19 00:21:15 +00:00
dmiller
711f6d97c9 New script, snmp-info for querying snmpv3 services 2014-12-18 00:22:48 +00:00
dmiller
d9cf8adf04 New ipOps.str_to_ip function 2014-12-18 00:22:46 +00:00
dmiller
5aca2bd4f1 Correct some NSEdoc regarding datafiles.parse_file return values 2014-12-18 00:22:44 +00:00
dmiller
31ba95b918 Don't override port.protocol in comm.lua; socket.connect already defaults to tcp 2014-12-18 00:22:41 +00:00
tomsellers
845616623d Add support to 'citrix-enum-apps-xml' for reporting if published applications in the list are enforcing/requiring the level of ICA/session data encryption shown in the script result. This information was already in the XML provided by the server, this change just adds parsing for it. 2014-12-17 11:56:52 +00:00