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

1077 Commits

Author SHA1 Message Date
sophron
27f241e20f [NSE] Added http-devframework (along with its fingerprints file) that tries to find out the technology behind the target website. 2013-09-05 19:31:40 +00:00
sophron
bb23a89965 [NSE] Added a new library, formulas.lua, that holds some formula functions. 2013-08-23 01:58:15 +00:00
sophron
9561155701 Patch by nnposter that improves performance of http-default-accounts
http://seclists.org/nmap-dev/2013/q3/346

For any given fingerprint from http-default-accounts-fingerprints
script http-default-accounts currently tests corresponding default
credentials if at least one  of the probe URLs succeeded, namely
returned with status other than 404.

Some web servers, such as Linksys devices, respond with HTTP/401 even
for non-existent URLs. This causes the script to assume that these URLs
do exist and to test the credentials, while ideally they should be
tested only on those servers where they make sense.

The purpose of the attached patches is to reduce unnecessary credential
guessing by implementing a new optional fingerprint element, function
target_check(), which takes some already collected target information,
including a probe URL response, and returns true or false, indicating
whether the credential guessing should be attempted or not.

All of the current fingerprints have been retrofitted with simple
target validations as follows:

* If the fingerprint uses native HTTP authentication, validate that the
target's realm matches the server type.

* If the fingerprint uses form-based authentication, validate that the
probe URL returned with HTTP/200 (as opposed to perhaps HTTP/401).

When testing against the above-mentioned Linksys the difference was
notable: 14 login attempts before the patch versus 1 attempt after the
patch.

This functionality provides opportunity for further improvement by
being able to match page content to differentiate between real HTTP/200
and a custom error page. (As of now the script completely skips targets
that return HTTP/200 for non-existent pages.)
2013-08-18 01:42:48 +00:00
sophron
683e83117b [NSE] Convert these values to numeric (for example, when they passed as command line args). 2013-08-17 06:03:45 +00:00
sophron
8477e0586a [NSE] Updated parse_form function to support double quotes and return more attributes. 2013-08-16 20:04:12 +00:00
sophron
d93a4a21fe Replace the concatenation with a more uniform function call. 2013-08-15 17:36:21 +00:00
david
1154495aa3 Add a "key" element to the result of ssh1.fetch_host_key.
ssh-hostkey.nse wanted this element to be present, but it was missing
from SSH1 keys. This caused a crash that was reported by Dan Farmer and
Florian Pelgrim.
http://seclists.org/nmap-dev/2013/q3/151
http://seclists.org/nmap-dev/2013/q3/155
2013-08-11 05:36:48 +00:00
david
82df82b5fd Do base64-encoding of the SSH key before returning, not after.
Not all SSH key formats use base64 encoding, for example SSH1 keys looks
different. So we can't blindly base64-encode the raw strings that we
receive. Attempt to return keys in the same format as is used by the
known_hosts file.
2013-08-11 05:36:45 +00:00
sophron
23457a77c0 Modifies the cookie header assembling logic to make it more compliant with RFC 6265, Section 4.2.1, which does not allow the trailing semicolon. Patch by nnposter. 2013-08-10 23:09:16 +00:00
sophron
4b8ed158cf Modifies interpretation of the cookie path in nselib/http.lua to make it more compliant with RFC 6265, Section 5.1.4. Patch by nnposter. 2013-08-10 23:02:40 +00:00
sophron
4fcbacc49d Added a fingerprint for Cisco/Linksys WAP55AG accesspoint. 2013-08-09 17:51:07 +00:00
sophron
8572c85d0b Correctly handle cases where the tested fingerprint path does not end with "/". Patch by nnposter. 2013-07-30 00:03:04 +00:00
sophron
40220702d0 Added Linksys WAP200 to http-default-accounts-fingerprints. 2013-07-29 22:17:52 +00:00
sophron
91858c55d4 Handle 404 responses. Patch by nnposter. 2013-07-29 15:57:34 +00:00
fyodor
f79a11aeeb o [NSE] Oops, there was a vulnerability in one of our 437 NSE scripts.
If you ran the (fortunately non-default) http-domino-enum-passwords
  script with the (fortunately also non-default)
  domino-enum-passwords.idpath parameter against a malicious server,
  it could cause an arbitrarily named file to to be written to the
  client system.  Thanks to Trustwave researcher Piotr Duszynski for
  discovering and reporting the problem.  We've fixed that script, and
  also updated several other scripts to use a new
  stdnse.filename_escape function for extra safety.  This breaks our
  record of never having a vulnerability in the 16 years that Nmap has
  existed, but that's still a fairly good run. [David, Fyodor]
2013-07-29 06:19:24 +00:00
sophron
93accf0619 Handle cases where the HTTP response fails. Patch by nnposter. 2013-07-29 06:14:04 +00:00
sophron
1ecec300db Allowed callbacks to 'withinhost' and 'withindomain' options and introduced 'doscraping' option. 2013-07-18 14:03:42 +00:00
sophron
28f2044442 Replaced tabs with spaces. 2013-07-18 13:58:25 +00:00
sophron
b9f35cbcac Fixed syntax mistake. 2013-07-18 13:56:45 +00:00
sophron
ac4fe58a21 Added an option to turn off http caching while crawling. 2013-07-06 14:01:01 +00:00
david
76264da093 Consider fec0::/10 private.
This is the site-local prefix deprecated by RFC 3879. Suggested by Marek
Majkowski, who noticed that the prefix was included in Tor's
tor_addr_is_internal_ function.
2013-07-03 06:09:35 +00:00
batrick
bd387f6826 With debugging, NSE prints out the script-args string and the pretty printed
final script-args table. The rationale is, unfortunately shells interpret
quotes differently and so it can be hard to tell exactly what NSE ends up
seeing/producing. [Some discussion in #nmap on Freenode resulted in this
addition.]
2013-06-23 02:40:28 +00:00
paulino
fb610761b1 Adds nil check to fix warning the running against hosts with no auth. 2013-06-22 14:46:14 +00:00
sophron
27576cfb34 [NSE] This image is essential for http-fileupload-exploiter.nse. 2013-06-22 13:37:01 +00:00
david
1a6b5448d0 Show debug info for every match.
Based on a patch by Jesper Kückelhahn.
http://seclists.org/nmap-dev/2013/q2/347
2013-06-18 03:44:53 +00:00
david
e73585590e Add additional constants in ike.lua.
Based on a patch by Jesper Kückelhahn.
http://seclists.org/nmap-dev/2013/q2/347
2013-06-18 03:44:48 +00:00
david
b5abe59cf9 Use a mutex for ike.lua's bind to udp/500.
Based on a patch by Jesper Kückelhahn.
http://seclists.org/nmap-dev/2013/q2/347
2013-06-18 03:44:43 +00:00
david
13fd6d1107 Capitalize constant table names in ike.lua.
Based on a patch by Jesper Kückelhahn.
http://seclists.org/nmap-dev/2013/q2/347
2013-06-18 03:44:38 +00:00
david
af5f103b5f Whitespace in ike.lua. 2013-06-18 03:44:32 +00:00
david
dcca84eb0d Fix weird double variable declaration.
It seemed to run fine even with this.
2013-06-13 15:22:09 +00:00
dmiller
ba4097af38 os.date format string cleanup
Removed some non-ANSI-C strftime format strings ("%F") and
locale-dependent formats ("%c") from NSE scripts and libraries.
C99-specified %F was noticed by Alex Weber
(http://seclists.org/nmap-dev/2013/q2/300)
2013-05-16 14:59:48 +00:00
paulino
01e21796ef Adds missing dash so NSEDoc can recognize it correctly. 2013-05-07 03:38:32 +00:00
paulino
db13b65779 Adds missing documentation of login function. 2013-05-07 03:22:28 +00:00
dmiller
930bc91359 Modify stdnse.output_table to handle empty values better
Two changes here, both minor. First, explicitly assigning a new key to
nil does not add the key to the ordered set of keys. This better
emulates the behavior of regular tables.

> o = stdnse.output_table()
> o["test"] = nil

This previously resulted in output like this:

|_ test: nil

Now it simply omits the "test:" key.

Second, I needed a way to tell whether an output table was empty or not.
Since Lua's next() function doesn't call the __pairs metamethod, it was
always returning nil. Instead, I used the __call metamethod, since it
had the least preexisting semantic meaning:

> o = stdnse.output_table()
> =o()
false
> o["test"] = 1
> =o()
true
2013-05-06 18:39:54 +00:00
paulino
fc431f8df5 -Adds an administration password reset vulnerability in Seagate BlackArmor 110, 220 and 440. 2013-04-26 23:59:28 +00:00
dmiller
666de7b83f Clarify nmap.fetchfile only searches Nmap's paths 2013-04-26 12:14:42 +00:00
david
a58e6d0f33 -Adds digest support to basic login method.
-Adds detection entry for Digital Sprite 2 ( Digital recorder )

Originally committed by paulino but recommitted by david after recovery
from backup.
2013-04-12 17:29:26 +00:00
patrik
56ef8fad06 fix flipped ip in BROWSER decoder 2013-03-16 03:18:35 +00:00
patrik
429b030c3d add BROWSER protocol support 2013-03-16 03:18:32 +00:00
patrik
b6492f96af add LLMNR support and cleaned up some result output 2013-03-16 03:18:28 +00:00
patrik
675000afe8 change debug level for missing decoders, more indent cleanup 2013-03-16 03:18:24 +00:00
patrik
560c97923b refactor MDNS code and add ipv6 to Generic table 2013-03-16 03:18:21 +00:00
patrik
bf24a53487 split Netbios up in Queries and Registrations 2013-03-16 03:18:18 +00:00
patrik
66335c6902 add support for decoding MacBooks from DDNS, support for DHCPv6 and CUPS 2013-03-16 03:18:15 +00:00
patrik
4ecb3e55d8 add support to parse and decode fqdn option 2013-03-16 03:18:11 +00:00
patrik
ddbc5d7297 indentation cleanup 2013-03-16 03:18:07 +00:00
dmiller
ab098ef4d2 Don't crash on stdnse.parse_timespec(nil) 2013-03-06 04:36:09 +00:00
david
1ebb9bfe20 Don't include a port number in the Host header.
We never intend to ask for a service on a port other than the one we
connect to. By my reading of RFC 2616 section 14.23, we can leave the
port number off in this case. Robin Wood reported that
https://twitter.com/ gives you a redirect instead of a page if you send
it
	Host: twitter.com:443
rather than
	Host: twitter.com

http://seclists.org/nmap-dev/2013/q1/267
2013-03-02 01:05:32 +00:00
david
a1a106defe Allow CRLF line endings in upnp.lua
Only LF was supported before. Reported by kaito.
http://seclists.org/nmap-dev/2013/q1/221
2013-02-24 04:55:40 +00:00
paulino
666cda3048 Adds entry to detect several vulnerable versions of JCE Joomla extension. (Remote command exec)
Fingerprint taken from http://www.bugreport.ir/78/exploit.htm
2013-02-21 04:53:49 +00:00