Commit Graph

7956 Commits

Author SHA1 Message Date
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
Adam Cammack 40a71af7ed Add missing end 2017-11-20 17:50:59 -06:00
Adam Cammack 2fdc34c8fd Add new template for DoS modules 2017-11-20 17:19:14 -06:00
Adam Cammack dd57138423 Make external module read loop more robust
Changes from a "hope we get at most one message at a time" model to
something beginning to resemble a state machine. Also logs error output
and fails the MSF module when the external module fails.
2017-11-20 16:52:05 -06:00
Matthew Kienow 39f06a3995 Land #8807, template for external module servers 2017-11-20 17:34:37 -05:00
christopher lee 238aecf81c Integrated first round of feedback 2017-11-20 10:45:39 -06:00
christopher lee 621130d74b Added missing requires 2017-11-17 13:06:05 -06:00
christopher lee a16cd5aade Clean up metadata store logic 2017-11-17 12:42:19 -06:00
christopher lee 0e642bd9cd Remove puts and fix bug 2017-11-16 12:59:14 -06:00
christopher lee e89eb6e8b6 Fix first time startup timing bug 2017-11-16 12:50:31 -06:00
christopher lee fe1af35107 First pass at changes needed for module metadata caching 2017-11-15 16:38:01 -06:00
Patrick Webster 2f6da89674 Change author name to nick. 2017-11-09 03:00:24 +11:00
christopher lee 43ddc66350 Initial fix for non db cache 2017-11-07 10:33:47 -06:00
h00die 697031eb36 mysql UDF now multi 2017-11-03 05:26:05 -04: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
James Barnett 04f5f41265 Merge branch 'port_dbnmap' into loot_and_creds 2017-10-31 17:03:40 -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
James Barnett cfdda37f62 Send nmap file across the wire. 2017-10-31 10:12:45 -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 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
h00die 3b8ef02c29 sid vs side 2017-10-29 08:36:05 -04:00
James Barnett 9d00093d81 Initial commit for nmap proxying 2017-10-25 16:04:31 -05:00
Jeffrey Martin 386e14828a Land #8728, Psexec via PSH related fixes 2017-10-24 15:55:18 -05:00
James Barnett e2a7ecedaf Merge branch 'goliath' into loot_and_creds 2017-10-24 14:52:44 -05:00
James Barnett 5f433e3d25 Fix typo in thread_manager 2017-10-24 14:52:17 -05:00
James Barnett a4914074fb Merge branch 'goliath' into loot_and_creds 2017-10-24 12:01:32 -05:00
James Barnett d63b087610 Fix bug with creating session_events 2017-10-24 11:51:27 -05:00
Tim 40e57d7ee6 android payload options 2017-10-24 18:32:47 +08: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
James Barnett ffcec527a7 Successfully storing creds remotely 2017-10-23 11:30:50 -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
christopher lee 2c8f27cd98 More general cleanup including is_local db check 2017-10-16 17:07:26 -05:00
James Barnett 5232e9926e creds command converted 2017-10-16 15:27:53 -05: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
Wei Chen 6b89f62b08 Land #9080, ensure autoruns on shell sessions
Land #9080
2017-10-13 15:35:31 -05:00
Wei Chen 5ce4c32213 Use session object instead of self
The session object has :process_autoruns, not self
2017-10-13 15:33:27 -05:00
William Vu b2de5aba07 Fix #9075, super setup fix for local exploits 2017-10-13 12:45:14 -05:00
bigendiansmalls 1b306caf39 Fixed ftp.rb to get files larger than 16384
Existing ftp.rb did get_once, which limits file
DL to 16384 (def_block_size). Change to get and
added one more timeout variable see:
http://www.rubydoc.info/gems/librex/Rex%2FIO%2FStream:def_block_size
and
http://www.rubydoc.info/gems/librex/Rex%2FIO%2FStream:get_once
and
http://www.rubydoc.info/gems/librex/Rex%2FIO%2FStream:get
2017-10-13 12:41:11 -05:00
bigendiansmalls e5e9c7ccd6 Fixed ftp.rb so it closes all data sockets
ftp.rb was doing a shutdown without a close on data
(not command) sockets.  This can cause CLOSE_WAIT
for extended periods in certain circumstances-ending
only when msf itself is closed.
2017-10-13 10:09:43 -05:00