Commit Graph

16492 Commits

Author SHA1 Message Date
Jeffrey Martin 78872be2ad Merge released '4.x' 2018-01-04 14:13:18 -06:00
Metasploit d4de9eef9b Bump version of framework to 4.16.30 2018-01-04 10:03:21 -08:00
William Vu 50f4ebb3b2 Add register_dirs_for_cleanup to FileDropper 2018-01-04 11:06:32 -06:00
William Vu d7c826b5e8 Add rm_rf to Post::File 2018-01-03 23:14:21 -06:00
Adam Cammack 16fa3b99ef Land #9350, Improve fake SSL cert details 2018-01-03 15:32:27 -06:00
James Barnett 5058c2d36f Merge branch 'goliath' into add_https 2018-01-03 10:51:22 -06:00
James Barnett 92e435898b Missed a file in the merge somehow 2018-01-02 17:38:41 -06:00
James Barnett 4aac8f5c39 Merge branch 'rapid7/master' into goliath 2018-01-02 17:34:40 -06:00
Matthew Kienow 40d15bf3e6 Hash#each style correction 2018-01-02 12:25:14 -05:00
James Barnett f015b926da Merge branch 'goliath' into add_https 2018-01-02 10:38:48 -06:00
Brent Cook a444bdb329 handle no datastore 2017-12-29 15:26:28 -06:00
Brent Cook 198aeda2c8 rename option 2017-12-29 12:31:56 -06:00
Brent Cook e546598cf1 Implement a method for command shells to register a post-session cleanup command 2017-12-29 12:14:34 -06:00
RageLtMan c32ef4a3be Require msf/core/cert_provider in framework.rb
Add an explicit require for the new cert_provider in framework.rb
in case it has not yet been loaded.

This should address the Travis failure on initial PR, although the
gem version in socket has not been updated, so this might take a
bit to propagate. In the end, if the dependency already gives us
this functionality by the time we call Rex::Socket::Ssl then this
commit can safely be dropped
2017-12-29 02:14:48 -05:00
RageLtMan f1a1e1a357 Implement specific dispatch extensions for tunnels
All meterpreter Clients are created equal, and as such they all
include the PacketDispatcher mixin and call its init methods when
a passive dispatcher is needed. However, since tunneling protocols
have different requirements for implementation, the methods which
provide protocol-specific functionality need to be mixed into the
Client before it attempts to initialize the dispatcher.

Provide a dispatch_ext option in the has passed to the client on
init from the session handler which is an Array containing mixin
references which are sent to :extend calls in the :init_meterpreter
method just prior to calling :initialize_passive_dispatcher.

Each handler implementation can thus push chains of mixins to the
client in order to provide middleware specific to the tunnel. Down
the road, this should permit stacking C2 encapsulations or tunnel
protocols/permutators to create unique session transports on the
fly.
2017-12-29 00:56:06 -05:00
RageLtMan d420bf1a6a Pull out HTTP-specific code from PacketDispatcher
PacketDispatcher has some hardcoded assumptions about utilizing
HTTP services as the async resource. With C2 and DNS tunnels in
the pipeline, these elements need to be separated from the core
functions of async packet dispatch and moved into their own module.

This creates a new namespace for Meterpreter::HttpPacketDispatcher,
meant to be mixed in after PacketDispatcher. The module implements
only three of the original module's methods - init, shutdown, and
the :on_passive_request callback; with the first two using :super,
with the expectation of having a PacketDispatcher mixin or API
compatible namespace already in the mix.
2017-12-28 23:37:01 -05:00
RageLtMan 18f3815147 Update TLS certificate generation routines
Msf relies on Rex::Socket to create TLS certificates for services
hosted in the framework and used by some payloads. These certs are
flagged by NIDS - snort sid 1-34864 and such.

Now that Rex::Socket can accept a @@cert_provider from the Msf
namespace, a more robust generation routine can be used by all TLS
socket services, provided down from Msf to Rex, using dependencies
which Rex does not include.

This work adds the faker gem into runtime dependencies, creates an
Msf::Exploit::Remote::Ssl::CertProvider namespace, and provides
API compatible method invocations with the Rex version, but able
to generate higher entropy certs with more variables, options, etc.

This should reduce the hit rate against NIDS on the wire, reducing
pesky blue team interference until we slip up some other way. Also,
with the ability to generate different cert types, we may want to
look at extending this effort to probide a more comprehensive key
oracle to Framework and consumers.

Testing:
  None yet, internal tests pending.
  Travis should fail as this requires rex-socket #8.
2017-12-28 21:00:03 -05:00
Metasploit 7254130b77 Bump version of framework to 4.16.29 2017-12-28 15:19:22 -08:00
Jeffrey Martin 66ca61f636 Merge released '4.x' 2017-12-28 17:15:29 -06:00
HD Moore 258ce2ceb2 Allow stub payloads to be autoselected when compatible 2017-12-28 16:19:22 -06:00
Brent Cook c2bb144d0f Land #9302, Implement ARD auth and add remote CVE-2017-13872 (iamroot) module 2017-12-28 14:11:26 -06:00
Metasploit c681c7881d Bump version of framework to 4.16.28 2017-12-28 10:03:39 -08:00
Brent Cook 6f1196d30c clarify what's happening when there is a connection failure 2017-12-27 22:32:08 -06:00
Matthew Kienow 6c3dbfa275 Remove debug output and cleanup of delete_host 2017-12-27 16:49:53 -05:00
Jon Hart bbed7db13c Merge branch 'upstream-master' into feature/mqtt-login 2017-12-27 13:08:44 -08:00
Jeffrey Martin 8ea50572df Land #9329, Add basic framework for interacting with MQTT 2017-12-27 14:59:34 -06:00
Matthew Kienow 331c09ab1b Fix issue in currently unused delete_host option 2017-12-27 14:35:20 -05:00
Matthew Kienow 5e4836b1e9 Implement hosts remote data store delete
Also, resolve an issue when adding a host where the client-side
raises an exception.
2017-12-26 23:09:23 -05:00
Tod Beardsley e6de25d63b Land #9316 Cambium modules and mixins, tx @juushya
These cover several of the CVEs mentioned in

https://blog.rapid7.com/2017/12/19/r7-2017-25-cambium-epmp-and-cnpilot-multiple-vulnerabilities/
2017-12-26 12:39:51 -06:00
juushya 8b0f2214b1 few more updates 2017-12-23 03:04:11 +05:30
juushya 038119d9df Use of get_cookies_parsed, changing dirs, marking deprecated in 2 mods, more 2017-12-23 00:14:27 +05:30
b0yd 0b6e41d65b Attempting to fix cached size errors. 2017-12-22 12:49:02 -05:00
b0yd 0f5ff6ead3 Added bytes to required size 2017-12-22 12:28:37 -05:00
b0yd add26ca405 Cleaned up 2017-12-22 12:17:15 -05:00
Jon Hart d4bc98c13f Merge branch 'upstream-master' into feature/mqtt-login 2017-12-22 08:07:40 -08:00
William Vu caae33b417 Land #9170, Linux UDF for mysql_udf_payload 2017-12-21 20:48:24 -06:00
Metasploit 909caa0425 Bump version of framework to 4.16.27 2017-12-21 13:27:52 -08:00
Brent Cook 9d8cb8a8d0 Merge branch '4.x' into upstream-master 2017-12-21 15:17:38 -06:00
b0yd a7fbe71a93 Added socket bind port option for reverse tcp payload. 2017-12-21 14:10:41 -05:00
Metasploit ee2f10efc5 Bump version of framework to 4.16.26 2017-12-21 10:04:38 -08:00
Jon Hart becc05b4f1 Cleaner client_id handling 2017-12-21 06:57:33 -08:00
Jon Hart 157d973194 Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 19:13:34 -08:00
Jon Hart 82bdce683b Remove to_s 2017-12-20 19:13:12 -08:00
Jon Hart adca42f311 Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 19:11:52 -08:00
Jon Hart b78f1105f7 Add missing port 2017-12-20 19:11:33 -08:00
Jon Hart bedc276225 Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 19:09:51 -08:00
Jon Hart ddb2566f3b Remove duplicate options, set less suspicious client_id 2017-12-20 19:09:35 -08:00
Jon Hart 962bc71d10 Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 18:58:36 -08:00
Jon Hart cf21d13b2e Resolve conflict 2017-12-20 18:58:16 -08:00
William Vu 1975713a92 Land #9333, get_cookies_parsed using CGI::Cookie 2017-12-20 20:08:33 -06:00