1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 09:59:04 +00:00
Commit Graph

439 Commits

Author SHA1 Message Date
batrick
98d4bee8e5 global bug fixes 2010-04-08 20:36:43 +00:00
kris
0e579c71a4 o [NSE] Correct misspelled "Capabilities.IgnoreSpaceBeforeParanthesis"
name in the MySQL library. [Kris]

The second "a" in "paranthesis" should be in "e".  No current scripts use
this name (yet).
2010-04-06 02:05:07 +00:00
jah
58eca6dfb7 setup_connect, called by exchange, now connects to targets by IP address rather than targetname (which could sometimes be a different host or address family). 2010-04-05 19:39:57 +00:00
kris
c7d97ae2c4 fix function names in error messages 2010-04-05 00:12:58 +00:00
jah
aec0b2c88c Add nsedoc @return tag for get_url. 2010-04-04 13:00:02 +00:00
patrik
1d26975ede o [NSE] Added a library for Microsoft SQL Server and 7 new scripts. The new
scripts are:
  - ms-sql-brute.nse uses the unpwdb library to guess credentials for MSSQL
  - ms-sql-config retrieves various configuration details from the server		
  - ms-sql-empty-password checks if the sa account has an empty password
  - ms-sql-hasdbaccess lists database access per user
  - ms-sql-query add support for running custom queries against the database
  - ms-sql-tables lists databases, tables, columns and datatypes with optional
    keyword filtering
  - ms-sql-xp-cmdshell adds support for OS command execution to privileged
    users
  [Patrik]
2010-04-04 10:11:54 +00:00
patrik
f137a07847 o [NSE] Fixed bug in rpc.lua library that incorrectly required file handles
to be 32 octects when calling the ReadDir function. The bug was reported by
  Djalal Harouni. [Patrik]
2010-04-02 17:58:32 +00:00
ron
dd471d09d5 Fixed a bug in http.lua where http.post() wouldn't work if the arguments were passed in as a string instead of a table (the documentation says it should work in both places) 2010-04-01 04:41:48 +00:00
david
5fa554266b Fix NSEDoc. 2010-03-31 20:28:14 +00:00
david
7009f54778 Fix a silly error I made in afp.lua. Use (pos + 1) % 2 instead of
pos % 2 + 1.
2010-03-30 19:54:13 +00:00
david
6bf9b360a6 Add fp_get_server_info to afp.lua. This is from a patch originally by
Andrew Orr, reworked by Patrik Karlsson and David Fifield.

Among other things, this function gets the servers hostname, IPv4 and
IPv6 addresses, and potentially hardware type.
2010-03-30 19:19:26 +00:00
patrik
b1e64b3161 o [NSE] Updated the AFP library to support several new AFP functions and added
authentication support. Updated the afp-showmount script and added two new
  scripts:
  - afp-brute attempts to guess passwords against the AFP service
  - afp-path-vuln detects the AFP directory traversal vulnerability 
    CVE-2010-0533
  [Patrik]
2010-03-29 17:41:00 +00:00
david
4fc799fdb7 Put the default time limits for unpwdb in the NSEDoc. Document that
unpwdb.timelimit=0 disables the time limit.
2010-03-29 02:53:25 +00:00
david
a0b011fa84 Increase the size of passwords.lst from 201 to 5000 entries. 2010-03-25 02:57:56 +00:00
david
15dbb78266 o [NSE] The unpwdb library now has a default time limit on the
usernames and passwords iterators. This will prevent brute force
  scripts from running for a long time when a service is slow. These
  new script arguments control the limits:
    unpwdb.userlimit  Limit on number of usernames.
    unpwdb.passlimit  Limit on number of passwords.
    unpwdb.timelimit  Time limit in seconds.
  Pass 0 for any of these limits to disable it. [David]
2010-03-24 17:36:41 +00:00
patrik
dd9a237fe2 o [NSE] Added RPC library and three new NFS scripts. Modified the rpcinfo and
nfs-showmount scripts to use the new library. The new scripts are:
  - nfs-acls shows the owner and directory mode of NFS exports
  - nfs-dirlist lists the contents of NFS exports
  - nfs-statfs shows file system statistics for NFS exports
  [Patrik]
2010-03-21 17:56:17 +00:00
patrik
53460a9682 o [NSE] Fixed mysql-brute.nse error that would cause brute-forcing to fail
if password contained a format string. Fixed a problem with SSL support
  detection in mysql.lua library. [Patrik]
2010-03-17 09:30:26 +00:00
david
91b2aa680b Regenerate passwords.lst from the combination of these databases:
faithwriters, hotmail, myspace, phpbb, and rockyou. I kept the output at
200 lines for now until we have more comprehensive limits on the unpwdb
module.

The only password that didn't come straight out of the databases was the
empty password. I added it manually at the top. The previous version of
passwords.lst had it too.
2010-03-17 00:25:30 +00:00
patrik
16e0a8449f o Added the function bignum_add to the nse_openssl library to support BIGNUM
addition [Patrik]
2010-03-09 20:54:01 +00:00
patrik
2a44a941af o [NSE] Added checks for missing OpenSSL to MySQL scripts and library [Patrik] 2010-03-09 20:27:48 +00:00
patrik
118e029b0e o [NSE] Added a new library for PostgreSQL and the script pgsql-brute that uses
it to guess credentials. [Patrik]
2010-03-04 19:18:55 +00:00
david
b3edd3d4c0 Make json.lua string escaping/unescaping a little nicer. Derive both
forward and reverse escapes from a single table.
2010-02-28 22:05:04 +00:00
david
15915eb793 Make Json:parseValue handle any kind of value, without taking a
parameter to control whether only top-level structures are allowed.
Instead, move the special top-level code out to the Json:parseStart
function.
2010-02-28 21:31:55 +00:00
david
dfe10a6866 Remove the call to test() at the end of json.lua, otherwise the test
gets run (and output printed) whenever the module is loaded.
2010-02-28 21:26:22 +00:00
david
e89094261d Add json.lua, couchdb-databases.nse, and couchdb-stats.nse, all by
Martin Holst Swende.
2010-02-28 21:25:01 +00:00
david
598d94f6f5 Return false in new_try handlers in proxy.lua, so that socket errors are
reported to the caller like other errors are.
2010-02-27 00:27:49 +00:00
david
c2a4f8b442 Quote string with Lua's %q format in nsedebug.tostr, so you can tell the
difference between nil and "nil".
2010-02-27 00:14:24 +00:00
kris
a42ea72a97 Merge through r16884 from /nmap-exp/kris/nse-rawip plus the following changelog
entries:

o [NSE] Raw packet sending at the IP layer is now supported, in addition to
  the Ethernet sending functionality.  Packets to send start with an IPv4
  header and can be sent to arbitrary hosts. [Kris]

o [NSE] Added the ipidseq script to classify a host's IP ID sequence numbers
  in the same way Nmap does.  This can be used to test hosts' suitability for
  Nmap's Idle Scan (-sI), i.e. check if a host is an idle zombie.  This is
  the first script to use the new raw IP sending functionality in NSE. [Kris]

o [NSE] Added the function nmap.is_privileged() to tell a script if, as far
  as Nmap's concerned, it can do privileged operations.  For instance, this
  can be used to see if a script should be able to open a raw socket or
  Ethernet interface. [Kris]

o [NSE] Added the function nmap.get_ports() to allow a script to iterate
  over a host's port tables matching a certain protocol and state. [Kris,
  Patrick]
2010-02-26 20:42:10 +00:00
david
84a388aeb9 Give datafiles.lua the ability to parse nmap-mac-prefixes, and use it in
nbstat.nse to look up the MAC vendor string.
2010-02-26 00:27:30 +00:00
patrik
42da3e0ba0 o [NSE] Added a new library for LDAP and two new scripts:
- ldap-brute uses the unpwdb library to guess credentials for LDAP
  - ldap-rootdse retrieves the LDAP root DSA-specific Entry (DSE)
2010-02-21 08:52:44 +00:00
ron
3a3535e07c Fixed a couple formatting bugs in the smb-* libraries that come up when debugging/verbose is disabled 2010-02-20 15:03:11 +00:00
david
3510744a54 Canonicalize the formatting of some functions in http.lua. 2010-02-19 05:13:02 +00:00
david
4178846c05 Honor the options table in http.request (specifically options.timeout).
I think this was supposed to work but it was broken.
2010-02-19 05:06:57 +00:00
david
bb2e8c439b Factor out common code for HTTP request building. Replace the two-step
buildGet/buildRequest with a one-step build_request. Provide a new
function generic_request that can do a request for any given method
(get, head, and post are now defined in terms of this function).
2010-02-19 04:54:28 +00:00
david
7f892c1563 Don't pass the cookies table as a parameter, but as a member of the
options table, in http functions. It was unreasonable that this
yet-unused feature was given a more prominent place than even the header
and request body, both of which are in the options table.

This change doesn't affect any other scripts or libraries because none
of them use cookies. In the cases, like http.get, where cookies was an
optional final parameter, I just removed it. Where it was not the final
parameter, as in http.post and http.pGet, I left the parameter in place
but documented that it is ignored for backwards compatibility.
2010-02-19 03:25:57 +00:00
patrik
d2e54f0bf2 o [NSE] Added a new library for ASN.1 parsing and adapted the SNMP library to
make use of it. Added 5 scripts that use the new libraries:
  - snmp-netstat shows listening and connected sockets
  - snmp-processes shows process information including name, pid, path and 
    parameters
  - snmp-win32-services shows the names of running Windows services
  - snmp-win32-shares shows the names and path of Windows shares
  - snmp-win32-software shows a list of installed Windows software
  - snmp-win32-users shows a list of local Windows users
2010-02-16 09:15:38 +00:00
kris
003cc98eab nmap.luadoc typos 2010-02-12 23:41:56 +00:00
david
87fbf1df1e Recognize NT_STATUS_INVALID_PARAMETER as a known error code when testing
if a share is writable (along with NT_STATUS_ACCESS_DENIED). I got this
code from a printer share.
2010-02-12 23:14:37 +00:00
david
be9e0265f6 Remove the nmap_service.exe helper for smb-psexec.nse. Add a message to
the script indicating where to download it if it is not available. Make
the script check whether the file is the normal binary from 5.20 or
before, or the XOR-encoded binary from 5.21.
2010-02-12 20:17:06 +00:00
david
6cd5b248db Add the favicon sent by sslstrip to the favicon-db. This one never
appeared in the Internet surveys, but because of its nature it's not
likely to appear in that sort of scan, and this is a good one to know
about.
2010-02-12 05:29:17 +00:00
david
2a9f389fcc Make the module declaration in citrixxml.lua match the file name. It was
"citrix" and not "citrixxml".
2010-02-11 03:51:05 +00:00
david
f94e871385 Change a reference to smb-pwdump to smb-psexec. 2010-02-11 02:46:35 +00:00
batrick
8200787f7a Fixed wrong variable names that were interpreted as globals. 2010-02-08 02:48:07 +00:00
batrick
470b013612 Fixed return of incorrect variable name (should have been one of the locals,
was interpreted as a global).
2010-02-08 02:46:28 +00:00
batrick
9ac3c5057a Added dummy locals '_' to be saved to rather than global '_'. 2010-02-08 02:36:11 +00:00
batrick
2038337907 Fixed a global variable being set. I believe the intent was to set
response.body and not result.body.
2010-02-08 02:35:17 +00:00
david
4dd04a32a5 Make stdnse.format_output return nil when passed an empty table. Before
it was returning an empty string, causing blank output entries for
scripts with no output:

80/tcp    open   http
|_citrix-enum-apps-xml:
|_citrix-enum-servers-xml:
| http-headers:
|   Date: Sun, 31 Jan 2010 19:28:13 GMT
|   Server: Apache/2.2.3 (CentOS)
|   Accept-Ranges: bytes
|   Content-Length: 739
|   Connection: close
|   Content-Type: text/html; charset=UTF-8
|
|_  (Request type: HEAD)
|_http-date: Sun, 31 Jan 2010 19:28:14 GMT; +1s from local time.
|_html-title: Go ahead and ScanMe!
2010-01-31 19:38:13 +00:00
david
ec1b16f7d7 o [NSE] Added two new scripts for the MongoDB database from Martin
Holst Swende. mongodb-info gets information like the version number,
  memory use, and operating system. mongodb-databases lists the
  databases and their size on disk.
2010-01-29 22:23:06 +00:00
fyodor
d85c8d3603 Typo fix: reponses -> responses 2010-01-27 02:05:01 +00:00
patrik
0bc8e65811 Add the scripts
mysql-brute
  mysql-datatabase
  mysql-empty-password
  mysql-users
  mysql-variables
and the mysql module
2010-01-26 09:40:38 +00:00