Commit Graph

13484 Commits (c5cc013819898471a12243f7d313565c511e4c21)

Author SHA1 Message Date
Brent Cook c5cc013819 auto-detect SSL supported options 2017-11-21 08:30:42 -06:00
Brent Cook 967b459ff1 restore default enum is first value behavior 2017-11-21 08:30:42 -06:00
Brent Cook 6615c6efc7 tighten up corner cases with option validation 2017-11-21 08:30:42 -06:00
Brent Cook 6da66e885a fix enum default logic for bools that default to false 2017-11-21 08:30:42 -06:00
Brent Cook d811a2a8c1 set good defaults 2017-11-21 02:52:05 -06:00
Brent Cook 65c58c3d55 set a good default, remove unused methods, speed up checks 2017-11-21 02:52:05 -06:00
Brent Cook ffa6d74a23 remove historical cruft 2017-11-21 02:52:05 -06:00
Brent Cook d3ee86dc5c update to new format 2017-11-21 02:52:05 -06:00
Brent Cook 249c08f597 usability improvements ith how base options are registered
This adds named parameters for all of the current array-index based
options. It also allows specifying the description as the 2nd parameter,
allowing the 'required' parameter to be implicitly false (the most
common value).

A simple parameter like:

 OptAddress.new('ReverseListenerBindAddress',
   [false, 'The specific IP address to bind to on the local system']),

Can now be rewritten as:

 OptAddress.new('ReverseListenerBindAddress',
   'The specific IP address to bind to on the local system'),

More complex options are also now easier to read:

 OptString.new(
   'HttpUserAgent',
   'The user-agent that the payload should use',
   default: Rex::UserAgent.shortest,
   aliases: ['MeterpreterUserAgent']
 ),

This also makes dealing with enums easier because default is implicit
unless specified. This:

  OptEnum.new('PayloadProxyType',
    [true, 'The proxy type, HTTP or SOCKS', 'HTTP', ['HTTP', 'SOCKS']]),

Becomes:

  OptEnum.new('HttpProxyType',
    'The proxy type, HTTP or SOCKS', required: true, enums: ['HTTP', 'SOCKS'])

This maintains full backward compatibility with existing code as well.
2017-11-21 02:52:05 -06:00
Jeffrey Martin 80b381cde9
Merge released '4.x' into master 2017-11-13 14:11:23 -06:00
Metasploit 4f660d7dd7
Bump version of framework to 4.16.17 2017-11-10 10:05:05 -08:00
William Vu 97859ebf8c Clarify XXX comment no user will ever see anyway 2017-11-09 15:23:37 -06:00
William Vu 577baf6070 Add a check for .rb in cmd_edit 2017-11-09 15:17:53 -06:00
Patrick Webster 2f6da89674 Change author name to nick. 2017-11-09 03:00:24 +11:00
William Vu fbbc8da8fb Fix raise(s) in MSSQL client aborting mssql_login 2017-11-07 14:30:47 -06:00
Metasploit deb5a7b015
Bump version of framework to 4.16.16 2017-11-03 10:03:38 -07:00
Metasploit a14102083c
Bump version of framework to 4.16.15 2017-11-02 10:01:12 -07:00
bwatters-r7 c2a979dd3c
Land #9134, fix buggy handling of partial ingress packet data 2017-11-01 20:06:23 -05:00
William Vu 5de190f092
Land #9145, ERB/<ruby> for Meterpreter resource 2017-11-01 13:48:51 -05:00
Brent Cook a347dee372
Land #9150, fix broken and simplify unusual RuntimeError exceptions 2017-11-01 06:03:36 -05:00
Brent Cook 90766ceceb remove more unusual raise RuntimeError patterns 2017-11-01 05:59:12 -05:00
lvarela-r7 c36184697c
Merge pull request #9150 from bcook-r7/runtimeerror
Fix several broken raise RuntimeError calls in error paths
2017-10-31 14:47:42 -05:00
Brent Cook 95b6cda06e
Land #9146, add e500v2 and reduce size of x86_64 2017-10-31 09:54:07 -05:00
Brent Cook c4dcd79e41
Land #9144, fix misspelling in exploit/windows/local/wmi_persistence 2017-10-31 05:01:13 -05:00
Brent Cook aa0ac57238 use implicit RuntimeError 2017-10-31 04:53:14 -05:00
Brent Cook 9389052f61 fix more broken RuntimeError calls 2017-10-31 04:45:19 -05:00
Brent Cook f42b980cf0 fix misspelled RuntimeError 2017-10-30 15:42:11 -05:00
Brent Cook 56eb828cc5 add e500v2 payloads 2017-10-30 14:04:10 -05:00
Spencer McIntyre 940573ad49 Support ruby directives in Meterpreter rc scripts 2017-10-29 15:57:33 -04:00
h00die 3b8ef02c29 sid vs side 2017-10-29 08:36:05 -04:00
William Vu 9349e1eda5 Fix find_script_path to check only files 2017-10-27 12:28:58 -05:00
William Vu 73c9807c55 Add module support for sessions -s 2017-10-27 12:28:53 -05:00
Metasploit 140955f220
Bump version of framework to 4.16.14 2017-10-27 10:03:00 -07:00
Brent Cook d188982760 handle masked EOF from Rex sockets (TODO: kill that behavior) 2017-10-27 02:29:25 -07:00
Brent Cook 85b59c87ca fix buggy handling of partial ingress packet data
If we have more data, and the packet parser needs more data, connect the two
together rather than bailing. This fixes reverse_tcp_ssl along with probably a
lot of other higher-latency corner cases.
2017-10-27 02:15:08 -07:00
Jeffrey Martin 4274b76473
Land #9119, Fix #8436, allow session upgrading on meterpreter sessions 2017-10-25 10:26:27 -05:00
Jeffrey Martin 386e14828a
Land #8728, Psexec via PSH related fixes 2017-10-24 15:55:18 -05:00
Brent Cook 1b01232624
Land #9070, Fix bug copying MACE attributes between files 2017-10-23 22:15:42 -05:00
Brent Cook 402e926151
Land #9081, Fix ftp.rb to get files larger than 16384 2017-10-23 22:11:36 -05:00
Brent Cook c6bc55a175
Land #9082, Fix ftp.rb so it closes all data sockets 2017-10-23 22:10:38 -05:00
Tim ca4feb5136 fix session upgrading 2017-10-23 01:26:45 +08:00
Metasploit 884b68fa60
Bump version of framework to 4.16.13 2017-10-20 10:02:23 -07:00
William Vu c795cef69f
Land #9099, disconnect option for send_request_cgi 2017-10-20 10:50:56 -05:00
William Vu 8e5deac3f4 Fix nil bug in setting PromptChar without Prompt 2017-10-20 00:38:01 -05:00
RageLtMan a3912e4913 Provide disconnect option to send_request_cgi
The HTTP client mixin provides a #send_request_cgi method which
forcibly disconnects the client after receiving a response. This
terminates certain types of resulting sessions which depend on the
connection from the client to maintain a subprocess housing the
shell invocation.

Provide a disconnect boolean option to #send_request_cgi which
is checked in the disconnect(c) call after receiving the response.

Testing:
  Locally tested on in-house exploit module written for disclosure
report.

TODO:
  Discuss possibility of implementing fully asynchronous methods
like #send_request_cgi_async which won't bother getting a response
for cases such as the module mentioned above which is a command
injection via unfiltered POST var.
2017-10-19 21:22:31 -04:00
William Vu 60a7a80ff0
Land #9095, default PromptTimeFormat (%T) 2017-10-17 16:50:47 -05:00
James Lee af42f517b8 Default PromptTimeFormat to %T 2017-10-17 16:39:44 -05:00
Evgeny Naumov d5cdd2567a add missing method 2017-10-16 16:01:53 -04:00
Jeffrey Martin b04f5bdf90
Land #9077, Enhancing the functionality on the nodejs shell_reverse_tcp payload. 2017-10-16 10:49:17 -05:00
Jeffrey Martin 6df8c40bb1
adjust whitespace 'no tabs' more reabable 2017-10-13 17:01:47 -05:00