Commit Graph

1461 Commits (5b8b5fe533e36db5c452673c7e2dc70249f0cd4d)

Author SHA1 Message Date
Brent Cook 1610db482a minor style nits 2018-03-25 07:34:45 -05:00
Brent Cook f662049b27 clarify screenshot on android scenario 2018-03-25 07:29:39 -05:00
Tim W 5083150002 fix #9112, improve error message on failure 2018-02-20 18:06:03 +08: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
Brent Cook bd2af0143a properly handle when there is no stat callback specified on upload 2018-02-16 16:14:09 -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
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
Brent Cook 03d1523d43
Land #6611, add native DNS to Rex, MSF mixin, sample modules 2018-01-22 23:54:32 -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 3b78302868
Land #9327, restore transport enum used in TLVs 2017-12-20 16:11:04 -06:00
Jeffrey Martin 9719ede3f0
restore transport enum used in TLVs 2017-12-20 13:12:24 -06:00
Brent Cook 32c486023c
Land #9308, Ensure tab completion in HWBridge sessions works 2017-12-20 11:29:11 -06:00
Puru bfa0cad8a5
Fix clipboard typo 2017-12-20 20:49:36 +05:45
Brent Cook 90b97d6581 Merge branch 'upstream-master' into land-9151- 2017-12-15 14:15:14 -06:00
Pearce Barry 084dc4470d
Ensure tab completion in HWBridge sessions works as expected. 2017-12-15 12:19:26 -06:00
bwatters-r7 9ea7747a5c
Land #9233, Fix #9232 corruption of non-latin characters in W methods
Merge branch 'land-9233' into upstream-master
2017-12-14 11:54:36 -06:00
Pearce Barry 7aef0f249e
Per MS-2916, load Mettle extensions via new API. 2017-12-07 20:40:22 -06:00
Tim W ce9d2aff2b more osx hacks 2017-11-22 17:25:49 +08:00
Tim W 0f2bfb70c0 hacky fix for osx 2017-11-22 13:07:42 +08:00
scriptjunkie 9a81cc70dd Fix corruption of non-latin characters in W methods 2017-11-21 20:58:38 -06:00
Tim 92190403cc use full target_path 2017-11-22 05:42:01 +08:00
OJ fea28a89a5 Fix TLV defs for http headers 2017-11-21 13:47:19 -06:00
bwatters-r7 c2a979dd3c
Land #9134, fix buggy handling of partial ingress packet data 2017-11-01 20:06:23 -05:00
Pearce Barry 48975a4327
Support multiple suffixes on meterpreter extensions. 2017-10-31 10:04:34 -05:00
Pearce Barry daf2acc2b1
Initial work to support Mettle exetensions (and a sniffer).
See MS-2775.
2017-10-31 10:04:30 -05:00
Spencer McIntyre 940573ad49 Support ruby directives in Meterpreter rc scripts 2017-10-29 15:57:33 -04: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
Bradley Landherr bdc00ef2df Removing unecessary comment 2017-10-11 06:34:09 -07:00
Bradley Landherr 8dee369eb7 Fixing the -f option, removing reference to undefined 'path' variable & get_file_mace already returns a 'Time' object instance 2017-10-11 06:28:03 -07:00
William Webb 14308fb77d
Land #9045, Copy original request ID into TLV response 2017-10-09 10:58:02 -05:00
Jeffrey Martin d0a1fb6019
tlv response to ID based request with original ID
When a tlv response is created the request ID being responded to
needs to be copied into response created.
2017-10-06 13:58:38 -05:00
William Webb d9e0d891a1
Land #9010, Remove checks for hardcoded SYSTEM account name 2017-10-06 13:42:18 -05:00
Tim e534d3cdc8 fix transport and sleep commands on java 2017-10-04 10:36:01 +08:00
OJ 3068fb6e7e
Fix getprivs and getsystem
This is a fix for crap and stupid stuff that I did half way through the
packet pivot code. I was working on some priv stuff at the same time,
and when I realised that the work I was doing was not sensible as part
of the packet pivot PR, I failed to revert my changes properly.

As a result I broke `getprivs` and `getsystem`. I am sorry. And I'm
ashamed.
2017-09-27 16:31:42 +10:00
Christian Mehlmauer 81406a073e
tidy up code 2017-09-27 08:01:48 +02:00
Christian Mehlmauer 41e3895424
remove checks for hardcoded name 2017-09-27 07:41:06 +02:00
Josh Hale 0e59f47095 Comments and whitespace check 2017-09-24 16:37:30 -05:00
Josh Hale 23e1b5b872 Add search term support 2017-09-24 16:25:27 -05:00
Josh Hale 664fd1f7e3 Support single file path 2017-09-24 16:13:26 -05:00
Josh Hale 9f0ff3f3a3 Add in sort and order options 2017-09-23 23:14:21 -05:00
Josh Hale 2068514800 Add initial lls command 2017-09-23 21:38:53 -05:00
Brent Cook d8ee4150e6 move client core constants closer to where they are actually used 2017-09-19 03:22:13 -05:00
Brent Cook 5b579baa33 remove unused Linux migration code 2017-09-19 03:04:43 -05:00