1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
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
af81f31573 Correctly handle cases where the basepath consists of a single character other than "/". 2013-08-15 17:32:39 +00:00
sophron
d3cb3dfa37 Fixed category's name in the description of http-default-accounts.nse. 2013-07-29 22:19:59 +00:00
tomsellers
644595d077 Modified multiple scripts that operated against HTTP based services so as to remove false positives that were generated when the target service answers with a 200 response to all requests.
Some scripts that had been previously modified were updated so that the debug output was consistent.

A few scripts were calling identify_404 with host.ip as opposed to the proper host object.  This has been adjusted as well.
2012-07-08 12:41:37 +00:00
perdo
5ac6c7d64a Fixed errors found by nse_check_globals. 2012-06-06 22:23:02 +00:00
batrick
000f6dc4d9 Lua 5.2 upgrade [1] for NSE.
[1] http://seclists.org/nmap-dev/2012/q2/34
2012-05-27 08:53:32 +00:00
fyodor
2ff08a24a1 Update some script nsedoc descriptions for consistency. The description should almost always start with an active verb and never with the script name or 'this script'. Admittedly that makes the first sentence a fragment. The first sentence should be capitalized 2011-09-11 20:50:56 +00:00
fyodor
bff90f3d55 minor updates to the nsedoc descriptions for some scripts 2011-09-11 18:26:37 +00:00
paulino
c8c2ef76d0 Fixes typo in default fingerprint file 2011-07-27 04:56:41 +00:00
paulino
26dc09ad43 Gets arguments with stdnse.get_script_args instead of reading them from nmap.registry 2011-07-27 03:28:13 +00:00
paulino
7c75967507 Quits iterating over probes when a valid login for that application has been found. If we don't quit we get the same valid credentials in different paths. 2011-07-08 18:43:51 +00:00
paulino
89bf1d1661 Fixes bug when adding credentials using creds library. 2011-07-04 20:55:39 +00:00
paulino
82a68e02db Adds http-default-accounts - It tests for access with default credentials in a variety of web applications and devices.
It works similar to http-enum, we detect applications by matching known paths and launching a login routine using default credentials when found.
This script depends on a fingerprint file containing the target's information: name, category, location paths, default credentials and login routine.
2011-07-01 21:43:34 +00:00