Commit Graph

4371 Commits (e17a788ab5e578974b8618b7f926dd07343af617)

Author SHA1 Message Date
Brent Cook 2ee7b1ec5c Fix native 'readline' (msfconsole -L) support for Ruby 2.5 onward 2018-04-03 08:00:08 -05:00
Brent Cook bd3c00dfd0
Land #9726, add simple Rex::Tar wrapper for consistency with other archive types 2018-04-02 23:35:22 -05:00
Brent Cook 428233b82d
Land #7949, Format binary registry data nicely on display 2018-04-02 23:11:25 -05:00
William Vu f5025cb84e Add Rex::Tar
This just inherits from Gem::Package::Tar{Reader,Writer} at the moment.
We may want to build out higher-level methods than what the inherited
code already provides. Or don't inherit at all.
2018-03-27 14:57:57 -05:00
Brent Cook 1610db482a minor style nits 2018-03-25 07:34:45 -05:00
Brent Cook 7c5c5513eb Merge remote-tracking branch 'upstream/master' into land-9586- 2018-03-25 07:29:55 -05:00
Brent Cook f662049b27 clarify screenshot on android scenario 2018-03-25 07:29:39 -05:00
b0yd 7e0c255591 Formatted reg binary type to hex when displaying query results. 2018-03-23 15:56:12 -04:00
Jon Hart f09c5eafc7 Appease hound 2018-02-27 04:12:58 -06:00
Jon Hart 46299dff00 The DRDOS mixin operates on strings, so make the bindata'd NTP classes cooperate 2018-02-27 04:12:57 -06:00
Brent Cook 99965c142b remove duplicate check 2018-02-20 04:42:49 -06:00
Brent Cook bb3a11dd20 use ctrl-d to cancel input instead 2018-02-20 04:40:00 -06:00
Tim W 5083150002 fix #9112, improve error message on failure 2018-02-20 18:06:03 +08:00
Brent Cook f5f7b4d25a handle sessions still open 2018-02-20 03:31:20 -06:00
Brent Cook e995ccfc33 make this a little easier to read 2018-02-20 03:27:55 -06:00
Brent Cook e26fb49c99 if we have no more input from the console, quit 2018-02-20 03:27:38 -06:00
Brent Cook 3d8451e616
Land #8997, add local 'ls' support to Meterpreter sessions 2018-02-19 23:21:59 -06:00
Brent Cook 4e9d900a17
Land #9507, Expand paths for meterpreter's cp, mv, and rm commands 2018-02-19 21:26:03 -06:00
UserExistsError b3f26ea55f bind_named_pipe fixes 2018-02-18 10:31:57 -07:00
Brent Cook bd2af0143a properly handle when there is no stat callback specified on upload 2018-02-16 16:14:09 -06:00
Brent Cook 289277c613
Land #9516, Support Bash-Style Continuation Lines 2018-02-16 10:53:58 -06:00
Brent Cook 38b03fdfff Merge branch 'upstream-master' into land-9539- 2018-02-15 16:22:13 -06:00
a1exdandy 7e03bf838b Fix src_size view 2018-02-15 17:44:41 +05:00
a1exdandy a0c473f29e Upload memory usage optimization
Optimize xor_bytes memory usage, use small buffer for upload,
add verbosity
2018-02-15 17:05:22 +05:00
UserExistsError 8ae8a0d94b added bind_named_pipe payload 2018-02-11 18:56:50 -07:00
Spencer McIntyre 214c137b4a Don't use parenthesis around pgets 2018-02-07 15:53:11 -05:00
Spencer McIntyre 0ad7d10e05 Use a continuation flag to disable tab completion 2018-02-06 14:44:55 -05:00
Spencer McIntyre 6d7579d907 Support breaking commands into multiple lines 2018-02-06 14:29:11 -05:00
Spencer McIntyre 8b56bbc541 Update mkdir as well for path expansion 2018-02-05 16:16:53 -05:00
Spencer McIntyre c70bcb5869 Use a constant for the regex and update rmdir too 2018-02-05 16:06:16 -05:00
Spencer McIntyre f441306036 Expand paths for meterpreter's cp, mv, and rm cmds 2018-02-05 15:22:05 -05:00
Brent Cook d5ae2bb55b Fix pivot handler to not consume all packets
Packet handlers should only return true if they consume a packet.
Otherwise, they should return false so something else can consume it.
This fixes port forwards by allowing the socket handler to see packets
that were otherwise being discarded in the pivot handler.
2018-02-02 18:01:05 -06:00
zerosum0x0 c8ff2adf06 added support for smb client 2018-01-27 20:49:17 -07:00
Brent Cook 03d1523d43
Land #6611, add native DNS to Rex, MSF mixin, sample modules 2018-01-22 23:54:32 -06:00
Brent Cook 9a35c324c0
Land #9352, Pull out HTTP-specific code from PacketDispatcher 2018-01-22 16:52:24 -06:00
Pearce Barry ba75d19d34
Fix failing spec. 2018-01-19 15:52:25 -06:00
Pearce Barry 2a6b3671bf
Add connection addr+port info to http response object.
Update owa_login to use this instead of doing lookups on its own.
2018-01-19 13:37:33 -06:00
William Vu 2916c5ae45 Rescue Rex::Proto::SunRPC::RPCTimeout
Coincidentally, this also fixes the rescue in the library, since
rescuing Timeout instead of Timeout::Error does nothing.
2018-01-12 19:34:59 -06: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
jgor 51e5fb450f Detect and return on bad VNC negotiations 2018-01-05 10:12:13 -06: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
Brent Cook c2bb144d0f
Land #9302, Implement ARD auth and add remote CVE-2017-13872 (iamroot) module 2017-12-28 14:11:26 -06: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
Jon Hart d0b3abc14b
Better handling of MQTT endpoints which don't require authentication
Arguably this is working around LoginScanner's inability to provide
blank usernames AND passwords
2017-12-20 18:02:52 -08:00
Jon Hart 2e62d77e36
Add new method for fetching parsed cookies from an HTTP response
This fixed #9332.
2017-12-20 16:19:44 -08:00
Brent Cook 3b78302868
Land #9327, restore transport enum used in TLVs 2017-12-20 16:11:04 -06:00
Jon Hart 741d08f604
Style cleanup 2017-12-20 13:33:47 -08:00