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

512 Commits

Author SHA1 Message Date
ron
13f8f95a5f nmap_service.exe is now encoded locally by xor'ing each byte by 0xFF. It is decoded in line before it is uploaded. This is to prevent antivirus false positives from picking it up. 2010-01-23 16:56:49 +00:00
ron
49d8db7ba5 Fixed a bug in smb-enum-sessions discovered by Brandon Enright -- most error conditions would cause a nil-pointer exception. 2010-01-23 16:55:54 +00:00
ron
00b2c842e2 smb-brute now checks the hosts lockout policy before starting. If accounts can be locked out, it bails with an error message telling the user how to force it to run. 2010-01-23 16:31:40 +00:00
david
a066cd7bdc Add the missing dirname function to http-favicon.nse. I missed this when
I copied parse_url_relative from favicon-survey.nse. Ron Meldau reported
that this error is raised:
  http-favicon.nse:141: variable 'dirname' is not declared
It happens when a web page specifies a relative icon URL in a link
element. (dirname is used to absolutize the URL.)

Also, I changed to code to be sure to pass a plain string and number for
the host and port to parse_url_relative. Otherwise parse_url_relative
may return the tables that it receives and complicate the matching code
to decide if a URL should be followed.
2010-01-22 18:45:04 +00:00
kris
c6508cceb6 Fix http-enum.nse so it uses the full pathname for the fingerprints file (from
fetchfile) so it doesn't throw an error and quit running.

Reported by Ron Meldau and Brandon:

http://seclists.org/nmap-dev/2010/q1/222
2010-01-22 18:38:46 +00:00
ron
354eaca0ff Re-wrote smb-enum-domains.nse to be more generic and rely on library functions. Ultimately, I want to use these same functions in smb-brute to trim out impossible passwords and figure out account lockout policies before the bruteforce starts. It'll make smb-brute a little cleaner after the changes. 2010-01-22 04:43:51 +00:00
ron
d8bd5c399e Fixed a bug in smb-brute that wouldn't detect properly if an account became locked out, and would proceed to lock out every account. It was a totally braindead mistake on my part, I don't know how I did it, but I got a condition backwards. It's fixed now, though\! 2010-01-22 03:25:22 +00:00
david
ad0a63deef Add dns-service-discovery.nse from Patrik Karlsson. See
http://seclists.org/nmap-dev/2010/q1/87 for more information.
2010-01-21 01:53:46 +00:00
david
a105f13975 afp script updates from Patrik Karlsson. 2010-01-20 23:47:04 +00:00
david
69000c63f0 Add afp.lua and afp-showmount.nse from Patrik Karlsson. See
http://seclists.org/nmap-dev/2010/q1/97.
2010-01-20 21:49:30 +00:00
fyodor
88cbb875ce Another canonicalization fix (making the author line the same for scripts written by the same author -- among other minor benefits, makes it easy to count how many scripts each person has written) 2010-01-19 08:32:26 +00:00
fyodor
785126a4a9 Some minor canonicalization of the author fileds in NSE scripts 2010-01-19 08:28:30 +00:00
david
19c2d93903 Merge from /nmap-exp/david/nselib-http. This is an overhaul of HTTP
parsing mostly. Response parsing is centralized, and fewer operations
are done on raw HTTP data.

The biggest user-visible change is that http.request goes back to
returning a parsed result table, not raw HTTP data. I believe this is
how the function worked in the past; it's what the NSEDoc for the
function says. The only thing that used http.request was citrixxml.lua,
and this commit alters it to match the new expectations.

The other change is that the http.pipeline function no longer accepts
the "raw" option. The only script that used that was sql-injection.nse,
and this commit modifies that script as well.
2010-01-13 02:53:13 +00:00
david
1b6c69387a Move the format_difftime function out of http-date.nse and into
stdnse.lua. It can be useful in other scripts.
2010-01-06 20:43:24 +00:00
ron
641a5ff24c Turned off logging in smb-psexec. When logging is on, a .txt file is left on the target system. 2010-01-06 03:39:17 +00:00
ron
c4237f60b0 Updated smb-psexec to finally work on Windows XP, after countless months of it eating away at me. The issue turned out to be an innocuous field in the SMB header, 'process id', which is generally used for connection multiplexing. Apparently, not setting it causes a bug in Windows to surface (I assume it's a bug, anyways) that returns a weird failure code. I found this thanks to Kristof Boeynaems doing some research for me, and then me trying random things to make my packets look more like metasploit's. 2010-01-06 03:10:27 +00:00
david
91242b6e55 Make http-favicon.nse check for a <link rel="icon"> icon first, and only
try /favicon.ico if that fails. If the favicon.uri script arg is given,
only try that. Use more robust parsing to find the <link> element; in
particular, be case insensitive.
2010-01-05 00:32:25 +00:00
ron
046c637bb1 Fixed a typo and a circular dependency in smb-check-vulns.nse. 2010-01-04 17:00:40 +00:00
batrick
610bd0a55b Merge from Dependencies branch (nmap-exp/patrick/dependencies)
with modifications from [2].

** Short description from [1] **

I have created a patch to NSE that replaces runlevels with a table of
dependencies that clearly outlines what other scripts the script
depends on. The table is of the form:

dependences = {"script1", script2", ...}

Runlevels become an internal representation of the order of scripts
that are generated by the dependencies. Dependencies only enforce
an execution order and not a requirement for execution.

[1] http://seclists.org/nmap-dev/2009/q4/295
[2] http://seclists.org/nmap-dev/2009/q4/446
2009-12-30 02:34:05 +00:00
david
671167227f Add the oracle-sid-brute script from Patrik Karlsson. 2009-12-28 17:35:46 +00:00
david
c25165def2 Add a default timeout of 5000 ms to the ntp-info script, and don't try
sending the second probe if the first caused an error. This is based on
the results of a test by Richard Sammet showing that the default timeout
of 30 s is too long when scanning many open|filtered ports that are in
fact filtered.
2009-12-21 20:24:45 +00:00
tomsellers
9f0e11f035 Set port product and state when a DB2 database service is positively matched.
Previously just set port.version.name and confidence.
2009-12-19 16:30:57 +00:00
tomsellers
2615dbbca1 Enhance error reporting to include script name and port protocol.
Correct internal revision date (its not 2010 yet!)
2009-12-19 13:43:32 +00:00
david
ae1d8e23ea Move citrix-enum-apps.nse out of the intrusive category and into safe. 2009-12-14 16:28:29 +00:00
ron
50f8718389 Added some extra information to an error message -- I realized the current error wasn't descriptive enough 2009-12-14 16:27:05 +00:00
david
f2ae05968b Add the scripts
citrix-brute-xml
  citrix-enum-apps
  citrix-enum-apps-xml
  citrix-enum-servers
  citrix-enum-servers-xml
and the citrixxml modules, all by Patrik Karlsson.
2009-12-14 07:30:38 +00:00
david
f9fc544e32 Add retrieval of the current time to ntp-info.nse. This is adapted from
code submitted by Richard Sammet.
2009-12-12 23:27:23 +00:00
david
24e0dceb8e Show all variables in ntp-info with verbosity. 2009-12-12 22:53:33 +00:00
david
6a57dd876a Add the ntp-info script from Richard Sammet. This version is modified
from the one he submitted in the thread at
http://seclists.org/nmap-dev/2009/q4/550. It doesn't yet include the
time retrieval he posted in a later message.
2009-12-12 22:42:39 +00:00
ron
96a390203c Updated http-iis-webdav-vuln.nse to run against SSL-enabled servers 2009-12-08 17:29:43 +00:00
tomsellers
c5c2b3220e ms-sql-info.nse commented version bump. 2009-12-07 00:44:45 +00:00
tomsellers
29014d1118 Updated ms-sql-info.nse to support Microsoft SQL Server 2008
detection.
2009-12-07 00:43:27 +00:00
fyodor
c272e68cf3 Use a looser match pattern for retrieving the owner out of the identd response. This patch was from Richard Sammet - http://seclists.org/nmap-dev/2009/q4/549 2009-11-30 05:58:01 +00:00
david
971a11f3fe Add the nfs-showmount script by Patrik Karlsson. 2009-11-26 16:52:30 +00:00
fyodor
77ab5c4305 Remove email addresses from scripts as discussed in this thread: http://seclists.org/nmap-dev/2009/q4/466 2009-11-24 08:49:02 +00:00
ron
b1739c929f Fixed a small error in smb-psexec -- if it can't find a share to upload to, it would try to access a non-existent variable and die 2009-11-20 16:19:40 +00:00
ron
08da8db7f0 Importing changes from my branch. There are two major updates:
1) I wrote a function that formats output from scripts in a consistent way. Although we haven't really come to a concensus on how it should look yet, it's easy to change when we do. 
2) New script: smb-enum-groups.nse. Enumerate the local groups on a system and their membership.
2009-11-20 16:05:06 +00:00
fyodor
745d34af47 Just remove an unnecessary comma 2009-11-20 04:52:47 +00:00
fyodor
2b7acf87e3 Improve the description slightly 2009-11-20 04:51:20 +00:00
fyodor
1bfe2201ca Expand the description to note that this script can now look at html link rel elements and also to clarify better what this script does 2009-11-20 04:46:58 +00:00
fyodor
f8f550fd47 Updates for the generated files 2009-11-17 20:05:07 +00:00
tomsellers
1f9a3e2fba Updating script.db, this was neglected during the db2-info.nse
commit.  [Tom]
2009-11-17 01:35:33 +00:00
tomsellers
b5444fa390 Add a new script, db2-info.nse, that enhances DB2 database instance detection.
The script provides detection when version probes fail, but will default to 
the value provided the version probes if that value is more precise. The 
script also detects the server platform and database instance name. 
[Tom]
2009-11-12 11:44:02 +00:00
ron
7d67b08e66 Merged in my changes from nmap-smb. The primary changes are:
* Updated the way authentication works on smb -- it's significantly cleaner now
* smb-enum-shares.nse gives significantly better output now (it checks if shares are writable)
* Added a script that checks if smbv2 is enabled on a server
* Added smb-psexec, a script for executing commands on a remote Windows server. I also included some default scripts, a compiled .exe to run everything, and a ton of documentation (in the form of NSEDoc)
* Added 'override' parameters to some of the functions in smb.lua, which lets the programmer override any field in an outgoing SMB packet without modifying smb.lua. 
* Lots of random code cleanups in the smb-* scripts/libraries
2009-11-08 21:31:06 +00:00
ron
b733248462 Updated telnet-brute.nse to use unpwdb instead of a hardcoded list of accounts 2009-11-05 14:50:54 +00:00
tomsellers
c5d1fe5590 Minor change to ssl-cert.nse to bring display of certificate
fingerprints (MD5/SHA) in line with documentation which indicates
that they are not displayed unless verbose output is requested.
2009-10-13 03:01:51 +00:00
tomsellers
3b4fa34257 [NSE] Modified NSE script ssl-cert.nse to support TLS negotiation
against SMTP ports that support it. Depends on Patrick's addition the
  of the reconnect_ssl method.  [Tom Sellers, David]
2009-10-13 01:19:33 +00:00
david
cca80f0304 Fix a typo in smtp-open-relay.nse. 2009-10-11 21:10:27 +00:00
batrick
b356ce2580 Added smb-check-vulns.nse to the vuln category. 2009-10-06 12:04:35 +00:00
fyodor
8cfe264522 regenerate script.db after the updates to the safe/intrusive categories 2009-10-01 19:08:33 +00:00