Commit Graph

7956 Commits

Author SHA1 Message Date
Brent Cook 86c927edb7 fix msfvenom referencing a nil typed_module_set 2018-01-18 00:16:42 -06:00
Brent Cook 7fe237abe1 Land #9220, Module cache improvements 2018-01-17 22:34:51 -06:00
Adam Cammack 0f0b116751 Rename scanner bits to avoid confusion 2018-01-17 14:46:31 -06:00
Adam Cammack 37bf68869f Add scanner for the open proxy from 'SharknAT&To' 2018-01-16 21:05:19 -06:00
Adam Cammack a5be16f74e Add batch scanner external module type 2018-01-16 21:05:19 -06:00
Adam Cammack fb41eea8cc Add vuln reporting to external module API 2018-01-16 21:05:19 -06:00
Adam Cammack 9527c6ffcf Ensure all messages are read from external modules 2018-01-16 21:05:19 -06:00
Adam Cammack 3363bcf629 Add DataStore serialization that preserves Arrays 2018-01-16 21:05:19 -06:00
RageLtMan de411e764a Msf DNS server - add :use_resolver? method 2018-01-13 02:40:53 -05:00
RageLtMan ee218658b6 Cleanup Msf server and add dnsruby to gemspec 2018-01-13 02:30:08 -05:00
RageLtMan c65c03722c Migrate native DNS services to Dnsruby data format
Dnsruby provides advanced options like DNSSEC in its data format
and is a current and well supported library.
The infrastructure services - resolver, server, etc, were designed
for a standalone configuration, and carry entirely too much weight
and redundancy to implement for this context. Instead of porting
over their native resolver, update the Net::DNS subclassed Rex
Resolver to use Dnsruby data formats and method calls.
Update the Msf namespace infrastructure mixins and native server
module with new method calls and workarounds for some instance
variables having only readers without writers. Implement the Rex
ServerManager to start and stop the DNS service adding relevant
alias methods to the Rex::Proto::DNS::Server class.

Rex services are designed to be modular and lightweight, as well
as implement the sockets, threads, and other low-level interfaces.
Dnsruby's operations classes implement their own threading and
socket semantics, and do not fit with the modular mixin workflow
used throughout Framework. So while the updated resolver can be
seen as adding rubber to the tire fire, converting to dnsruby's
native classes for resolvers, servers, and caches, would be more
like adding oxy acetylene and heavy metals.

Testing:
  Internal tests for resolution of different record types locally
and over pivot sessions.
2018-01-12 05:00:00 -05:00
James Barnett 809d3d28c7 Merge branch 'rapid7/master' into goliath 2018-01-11 16:18:41 -06:00
James Barnett b2666ad3f2 Update host delete method to return full objects of deleted hosts 2018-01-11 16:12:25 -06:00
William Vu 4b225c30fd Land #9368, ye olde NIS ypserv map dumper 2018-01-10 22:02:36 -06:00
William Vu 1a8ffed5e3 Land #9369, register_dir{,s}_for_cleanup 2018-01-10 22:02:15 -06:00
William Vu b1cecd4193 Bump TIMEOUT in Msf::Exploit::Remote::SunRPC 2018-01-10 20:36:35 -06:00
William Vu 1c1f3b161e Rescue XDR errors in Msf::Exploit::Remote::SunRPC 2018-01-10 20:11:30 -06:00
James Barnett 3c73892a70 Use json_to_mdm for Credentials. 2018-01-10 16:58:44 -06:00
William Vu 333d57461a Check exploit stance for array as well as string
An exploit can be both aggressive and passive.
2018-01-08 13:52:04 -06:00
William Vu 461f1c12e6 Fix nil bug(s) by moving arrays to initialize 2018-01-06 02:31:16 -06:00
William Vu 14143c2b90 Fix missed file_dropper_win_path 2018-01-06 01:44:25 -06:00
b0yd 27f96110d1 Moved socket struct inside conditional 2018-01-04 21:29:49 -05: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
James Barnett 5058c2d36f Merge branch 'goliath' into add_https 2018-01-03 10:51:22 -06:00
James Barnett 4aac8f5c39 Merge branch 'rapid7/master' into goliath 2018-01-02 17:34:40 -06:00
James Barnett f015b926da Merge branch 'goliath' into add_https 2018-01-02 10:38:48 -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 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
Matthew Kienow 6c3dbfa275 Remove debug output and cleanup of delete_host 2017-12-27 16:49:53 -05: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
William Vu caae33b417 Land #9170, Linux UDF for mysql_udf_payload 2017-12-21 20:48:24 -06:00
b0yd a7fbe71a93 Added socket bind port option for reverse tcp payload. 2017-12-21 14:10:41 -05:00
Jon Hart becc05b4f1 Cleaner client_id handling 2017-12-21 06:57:33 -08:00
Jon Hart 82bdce683b Remove to_s 2017-12-20 19:13:12 -08:00
Jon Hart b78f1105f7 Add missing port 2017-12-20 19:11:33 -08:00
Jon Hart ddb2566f3b Remove duplicate options, set less suspicious client_id 2017-12-20 19:09:35 -08:00
Jon Hart cf21d13b2e Resolve conflict 2017-12-20 18:58:16 -08:00
Jon Hart 741d08f604 Style cleanup 2017-12-20 13:33:47 -08:00
Jon Hart ac1daaf10e Fix rubocop warning 2017-12-20 12:41:44 -08:00
Jon Hart f15309bc48 Add basic framework for interacting with MQTT 2017-12-20 12:28:02 -08:00