1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-20 22:49:01 +00:00
Commit Graph

4571 Commits

Author SHA1 Message Date
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
patrik
2828af7ca7 Add ldap-search.nse 2010-03-04 19:10:48 +00:00
patrik
a439772d2a o [NSE] Added the script ldap-search which queries a LDAP directory
for either all or a number of pre-defined object types. [Patrik]
2010-03-04 19:07:56 +00:00
david
a2798e0120 Add some more script review to TODO. 2010-03-03 22:44:46 +00:00
david
6e1daddd55 Break out the code in smb-psexec.nse that looks for nmap_service.exe, so
an error message can be displayed in verbose mode, without requiring
debugging.
2010-03-03 22:27:51 +00:00
fyodor
7b3ae6c7d3 some work finished 2010-03-03 21:55:51 +00:00
david
eb15f3ae27 Update vcredist_x86.exe to version 9.0.30729.4148. Axel Pettinger reported that
the previous version, 9.0.30729.17, causes a Windows Update when installed on
Windows 7 because the old version was the subject of security advisory
MS09-035. See http://seclists.org/nmap-dev/2010/q1/528 for lots of links and
details.

The file I downloaded was from

"Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package ATL Security Update"
http://www.microsoft.com/downloads/details.aspx?familyid=2051a0c1-c9b5-4b0a-a8f5-770a549fd78c&displaylang=en

Specifically,

http://download.microsoft.com/download/9/7/7/977B481A-7BA6-4E30-AC40-ED51EB2028F2/vcredist_x86.exe
2010-03-03 00:25:28 +00:00
david
1906c0febd Don't print out a blank line in http-methods.nse when there's nothing to
report.
2010-03-02 22:44:10 +00:00
david
a90ba28583 Have http-methods.nse highlight "interesting" methods as "potentially
risky" methods. Provide a link to the NSEDoc and to the OWASP page on
methods for more information.
2010-03-02 22:34:11 +00:00
david
ce18e4bb54 Make http-methods.nse merge the contents of the Allow and Public
headers, as suggested by Patrik Karlsson.
2010-03-02 20:27:08 +00:00
david
a39c302fcc Re-block the socket before sending in subprocess_thread_func. The
WSAEventSelect call we make to find out when the socket is ready for reading,
also makes it non-blocking for the purpose of writing. A fast-writing process
could cause a WSAEWOULDBLOCK error. This was reported by David Millis.
2010-03-02 19:24:32 +00:00
david
5e8f88194d Use socket_errno() instead of errno in NSE raw socket code, to get
Windows errors.
2010-03-02 18:29:22 +00:00
david
9fb01bdb3b Add to CHANGELOG:
o [Ncat] Fixed a bug that prevented detecting EOF from stdin on
  Windows. This was reported by Adrian Crenshaw and Andy Zwirko.
  [David]
2010-03-02 06:55:15 +00:00
kris
cb9c2c9a03 Remove duplicate changelog entry, left over from v5.21 rearrange 2010-03-02 01:18:52 +00:00
david
8112f5d03f Add some further improvements to smtp-open-relay.nse from Duarte Silva,
checking for EOF and TIMEOUT errors.
2010-03-01 23:05:22 +00:00
david
9232479ee7 o [Nsock] WSAEACCES was added to the list of known connect error
codes. This error can happen on Windows when a port is blocked by
  Windows Firewall. Thanks to taemun for reporting this and
  investigating.
2010-03-01 22:39:39 +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
d9fd52c194 o Fixed the parsing of libdnet DLPI interface names that contain more
than one string of digits. Joe Dietz reported that an interface with
  the name e1000g0 was causing the error message
    Warning: Unable to open interface e1000g0 -- skipping it.
  on Solaris 9. [David]
2010-02-28 19:45:39 +00:00
kris
2e99f41bfd Remove VC++ pragma to disable C4244 warning. It looks like the code originally producing this warning was faulty and was fixed long ago. No other files use this pragma, and no warning is printed without it. 2010-02-27 21:00:23 +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
ffb34b2259 Make sure port.service exists before passing it to string.match. This
bug was reported by Brandon.
2010-02-27 00:16:29 +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
david
49e36a57f3 Add a function free_services that tells Nmap to reload the nmap-services
file again when it needs it. This is called from nmap_free_mem, because
cp_free (also called by nmap_free_mem) invalidates members of the
services data structures.

In normal use this doesn't matter. It only matters when reinvoking the
engine several times with --interactive.
2010-02-26 22:29:03 +00:00
david
9f55412954 Initialize numhosts_up, numhosts_scanned, and numhosts_scanning in
NmapOps::Initialize.
2010-02-26 21:38:04 +00:00
david
dc45a0b8f8 Reinitialize scriptargs and chosenScripts in NmapOps::Initialize. 2010-02-26 21:34:13 +00:00
david
ba5e337db8 Reset port_list_count in PortList::freePortMap. 2010-02-26 21:25:41 +00:00
david
e32a406032 Fix code style in PortList::freePortMap. 2010-02-26 20:58:54 +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
480394756b Call CloseHandle on the hThread member of the PROCESS_INFORMATION structure we
get back from CreateProcess. We were already closing hProc but hThread has to
be closed too to avoid a handle leak. See the code example at
http://msdn.microsoft.com/en-us/library/ms682512(VS.85).aspx.
2010-02-26 01:57:05 +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
david
1f7e90a0af Add CouchDB and JSON scripts to TODO. They're almost done, I just don't
want to forget about them.
2010-02-26 00:24:24 +00:00
david
2099944ef0 Move entries in libdnet-stripped/NMAP_MODIFICATIONS to reflect recent
upstream merges by Jay Fink.

http://code.google.com/p/libdnet/source/detail?r=654
http://code.google.com/p/libdnet/source/detail?r=655
http://code.google.com/p/libdnet/source/detail?r=656
2010-02-24 01:54:56 +00:00
david
bf612ba7c9 o [NSE] Added the ssl-enum-ciphers script from Mak Kolybabi. This
script lists the ciphers and compressors supported by an SSL/TLS
  server.
2010-02-24 01:33:16 +00:00
fyodor
3358c32fe2 TODO changes from chat w/David 2010-02-23 23:13:21 +00:00
david
77119bb4d8 Use the cached value of recv_fd when removing descriptors from the read
and broadcast lists when a connection is broken, instead of re-reading
the descriptor from the fdinfo struct. The problem was that there were
two calls to rm_fd, and the first one invalidated the data that the
struct pointer pointed to.

For some reason this didn't cause any problems in most situations. Mak
Kolybabi reported that it caused a segfault in
	ncat -l --ssl -k -v 5061 > /dev/null < /dev/zero
With SSL, new connections would try to read memory that was previously
freed, as descriptors were not being removed from the broadcast list as
they were removed from the read list.

You can see the error in these debug logs:

NCAT DEBUG: Closing connection.
NCAT DEBUG: Swapping fd[2] (4) with fd[3] (5)
NCAT DEBUG: Removed fd 4 from list, nfds 3, maxfd 5
NCAT DEBUG: Swapping fd[1] (5) with fd[1] (5)
NCAT DEBUG: Removed fd 5 from list, nfds 1, maxfd 4

The "Remove fd X" should have the same X in both lines.
2010-02-23 20:59:31 +00:00
fyodor
c83f5474b7 minor updates to TODO 2010-02-23 06:35:25 +00:00
david
e603eadd96 Remove TRACE from the http-methods.nse "uninteresting" set on a
recommendation from Daniel Roethlisberger. TRACE is interesting because
it can be used to get cookies or authentication data in a cross-site
scripting attack. See http://www.owasp.org/index.php/Cross_Site_Tracing.
2010-02-22 21:42:47 +00:00
david
a67be3d7d1 Take smtp-open-relay.nse out of {"demo"} and into {"discovery",
"intrusive", "external"} following some improvements by Duarte Silva.
2010-02-22 17:52:13 +00:00
patrik
08063ebd32 Added dependency for ldap-brute to ldap-rootdse.nse 2010-02-21 08:56:10 +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
fyodor
62155f108f latest generated man pages 2010-02-19 06:28:14 +00:00
fyodor
fa4b57661a latest generated man pages 2010-02-19 06:28:02 +00:00
fyodor
a230256d7b latest generated man pages 2010-02-19 06:27:45 +00:00
david
29efe81bf1 Add http-methods.nse to the default category. Make it silent if the only
methods it discovers are in (GET, HEAD, POST, OPTIONS, TRACE). In
verbose mode, or if any other method is discovered, it prints all
methods (and optionally retests them). See
http://seclists.org/nmap-dev/2010/q1/401.
2010-02-19 05:42:36 +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