1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

46 Commits

Author SHA1 Message Date
dmiller
b2ebc18360 NSEdoc fixes 2025-03-13 18:13:21 +00:00
dmiller
b5b48befe3 Fix a typo [ci skip] 2022-03-10 17:24:36 +00:00
dmiller
dc1e484ad0 Remove bin.lua from a few more libs 2018-09-11 19:20:16 +00:00
dmiller
880f883029 Remove some leftover debug statements 2018-08-28 16:58:01 +00:00
dmiller
72c54e9c8f Don't run smbauth tests requiring OpenSSL if it's not present 2016-10-16 13:58:10 +00:00
dmiller
963011520f Fix bugs where pos return value of bin.unpack was ignored 2016-07-21 17:05:24 +00:00
dmiller
43dedd7b0e Extract optional OS version info from NTLM challenge message 2016-01-07 20:43:19 +00:00
gyani
3d2a008cef Modified smbauth.lua to create ntlmv2 session response.
http.lua now allows NTLM authentication.
2015-07-04 08:19:17 +00:00
dmiller
f846e7c818 Allow make nse_check to pass when configured --without-openssl 2015-06-25 14:00:53 +00:00
gyani
d32f3b9c52 on line 525 unicode was assigned to a string and a function was being called[unicode.utf8to16]. removed the assginment 2015-06-04 15:58:58 +00:00
dmiller
00064a1809 Whitespace/reindent cleanup in NSE. https://secwiki.org/w/Nmap/Code_Standards 2015-05-31 17:37:51 +00:00
dmiller
0e74dd7a35 Replace some string.char and bin.pack calls with literals 2015-02-27 19:42:56 +00:00
batrick
ee6622aea4 nselib stdnse.print_debug -> stdnse.debug
$ f() { find -name \*.lua -exec /bin/echo sed -i "$1" {} \; ; }
$ f 's/stdnse.print_debug( *\([0-9]*\) *, */stdnse.debug\1(/'
$ f 's/stdnse.print_debug( *"\(.*\))/stdnse.debug1("\1)/'
2014-08-03 00:56:45 +00:00
dmiller
3dcf997d60 Fix NSEdoc errors
1. All @table blocks must have an explicit @name
2. All @field blocks must have both a name and description

Also added some more information to the creds.States table description
2014-03-08 14:02:06 +00:00
dmiller
88146749f6 Add unittest.testing() to make test building conditional 2014-03-06 17:15:05 +00:00
dmiller
3187efdf81 Add extended-ASCII support to LM hashing
Probably only works for US-English, since it uses Code Page 437. Adding
support for other locales would require detecting or setting the locale
for the remote system, since SMB has no way to negotiate code page. In
other words, Windows systems with different locales will have different
LM hashes for the same password.

Also added some tests. Hashes confirmed by googling for them and finding
the correct plaintext.
2014-03-06 17:14:59 +00:00
dmiller
4e79e60547 Clean up smbauth.lua NSEdoc
https://secwiki.org/w/Nmap/Code_Standards#NSEdoc_best-practices
2014-03-04 17:05:02 +00:00
dmiller
6e3980733e Use unicode library for msrpc/smb 2014-02-19 22:14:16 +00:00
dmiller
1b71f75aad Spelling fixes for Lua files
Mostly in documentation/comments, but a couple code bugs were caught,
including a call to stdnse.pirnt_debug and a mis-declared variable.
2014-02-19 04:15:46 +00:00
dmiller
e5fc094635 Add some NSEdoc for smbauth.get_host_info_from_security_blob 2014-02-05 18:30:57 +00:00
dmiller
69e343f0aa Reindent the last of the NSE libraries.
https://secwiki.org/w/Nmap/Code_Standards
2014-02-04 19:47:26 +00:00
dmiller
620f9fdb34 Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem.
https://secwiki.org/w/Nmap/Code_Standards
2014-01-23 21:51:58 +00:00
patrik
40b1c4705b check_globals cleanup 2012-10-07 12:39:21 +00:00
patrik
81b6bae5eb Squashed commit of the following:
commit e5cb0a18d5474730310f1797016e1106c33ca059
Author: Patrik Karlsson <patrik@cqure.net>
Date:   Sun Oct 7 10:47:35 2012 +0200

    compatibility fixes to spnego authentication in smb and smbauth libraries

    the spnego authentication blob now decodes properly in wireshark
    fixes in spnego authentication for both Window 2003 and Windows 7
2012-10-07 08:54:34 +00:00
patrik
655f766445 reverted bad commits 2012-10-06 19:38:15 +00:00
patrik
2e5a448aa5 Revert "Squashed commit of the following:"
This reverts commit 71f5f22e79bdb44fffa14edd5d3ffa570efde8ed.
2012-10-06 19:25:04 +00:00
dmiller
346a495dd0 Squashed commit of the following:
commit 7c26e4de2ab365a30fe6e91f3a531eb38c8dfdba
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Aug 7 16:36:54 2012 -0500

    Fix indentation on netbios.lua (no code change)

commit 47dc3e32e6b47bd80620cfbc54e7590193dd0c1a
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 16:42:27 2012 -0500

    Make smbauth.lua use host, not nmap, registry

commit 3738f8e6d551a1260463609d8cda86918843a372
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 16:35:45 2012 -0500

    Make netbios.lua use host registry. Functions now can take host table or IP

commit 031cadb9d407ab7fd43aaddffda1a89c24cbdd45
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 15:54:12 2012 -0500

    Remove mac-geolocation info from snmp-interfaces

commit 2218dbaf8ffd4a33de2bc028def9be7301dfb3a2
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 15:52:36 2012 -0500

    Make path-mtu.nse use host, not nmap, registry

commit 5a3d006bdb9cd3e981a8e753c92b5ade5059a29b
Author: Daniel Miller <bonsaiviking@gmail.com>
Date:   Tue Jul 31 15:51:53 2012 -0500

    Make cvs-* scripts use host, not nmap, registry
2012-08-07 21:38:48 +00:00
patrik
7e85545ea3 Fixed bug in return values for openssl pcall in libraries mssql and smbauth 2012-08-06 00:18:55 +00:00
patrik
6f43ac38b2 SSL overhaul fixing OpenSSL related problems when SSL has not been compiled in
* replace require function calls with stndse.silent_require
* fixed a bug in nse_main that would fail creating scripts.db when a script
  fails to load
* reworked some code to provide limited functionality even though SSL is not
  present
2012-08-05 12:05:07 +00:00
patrik
bc0defc8ff o [NSE] Added SPNEGO authentication supporting Windows 7 and Windows 2008 to
the smb library. [Patrik Karlsson]
2012-06-09 12:17:01 +00:00
patrik
721ac80024 reverted previous commit, due to unfinnished changes in smb, asn1 and smbauth
libraries.
2012-06-06 22:04:28 +00:00
patrik
c4617f8d31 Fixed a bunch of errors reported by Ron Bowes;
http://seclists.org/nmap-dev/2012/q2/639
2012-06-06 21:57:00 +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
patrik
23d2e0d31f o [NSE] Applied patch from Chris Woodbury that adds the following additional
information to the output of smb-os-discovery:
  + Forest name
  + FQDN
  + NetBIOS computer name
  + NetBIOS domain name
2011-07-12 06:08:43 +00:00
david
3447e2a6a2 Use get_script_args to handle smb-related flag options, to use our
common true/false logic and not hardcode "1" and "true" in places. Patch
by Chris Woodbury.
2011-04-20 21:35:10 +00:00
ron
9ae7fb6a5d Added the REQUEST_TARGET flag to the extended authentication packet. I have no clue what that flag does, and I can't find any documentation, but Nmap completely fails against Windows 7 unless it's set. 2010-09-24 03:42:38 +00:00
david
7d0c08a097 Brief copyediting of NSEDoc for modules. 2010-07-12 19:42:43 +00:00
ron
12fe785185 Added the script-arg 'smbnoguest' to the smb scripts. It disables use of the guest account. Andrew Smith on nmap-dev commented that trying the guest account raised an IDS flag, and asked for a way to disable it. 2010-04-29 11:46:58 +00:00
david
5fa554266b Fix NSEDoc. 2010-03-31 20:28:14 +00:00
david
f94e871385 Change a reference to smb-pwdump to smb-psexec. 2010-02-11 02:46:35 +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
batrick
90a712ae2b Patch to libraries that were inappropriately using globals.
Often two (or more) scripts using the same library would
overwrite the globals each was using. This would result
in (at best) an error or (at worst) a deadlock.

The patch changes the global accesses to local.
2009-07-07 00:20:52 +00:00
ron
ab59b09c03 Miscellaneous code cleanups in my smb-* libraries/scripts (removed unused includes, old debug code, etc.) 2009-06-10 23:13:15 +00:00
ron
4b81a92681 Fixed a bug reported where running openssl.encrypt() on an emptys tring would cause an assertion failure. I fixed it by printing a warning message if an empty challenge is encountered and faking out the challenge (if they sent an empty challenge, they're breaking the protocol anyways). This will cause the login to fail, and it will fall back to an anonymous check. 2009-04-02 01:14:15 +00:00
ron
a0d8875867 Fixed a bug where MSRPC would try to sign messages using OpenSSL, even if it wasn't available 2009-03-30 21:32:41 +00:00
ron
45744eddc3 Merge in changes from my private branch, primarily smb-brute.nse and smb-pwdump.nse, among other smaller changes. 2009-03-05 02:03:29 +00:00