Commit Graph

178 Commits

Author SHA1 Message Date
h00die 6a851855a8 spelling fixes for lib folder 2024-01-06 15:54:49 -05:00
sjanusz-r7 daa8b8ae99 Use Metasploit-Payloads Crypto to decrypt payloads 2023-10-13 14:42:10 +01:00
sjanusz-r7 7baf199f50 Add support for loading of encrypted libraries 2023-10-13 14:42:10 +01:00
sjanusz-r7 e70f356239 Show errors on inaccessible payload files 2023-10-02 14:46:25 +01:00
adfoster-r7 a643fa517a Give better error messages when failing to load mettle extensions 2023-08-02 23:03:27 +01:00
adfoster-r7 bbd881f999 Fix crashes on timeouts 2022-05-04 09:43:00 +01:00
dwelch-r7 aca1b8df9b Use debug versions of extensions if MeterpreterDebugBuild is enabled 2022-04-13 14:10:57 +01:00
Ashley Donaldson 2447ce3eba Use a random, modern UA string for HTTP payloads 2021-11-10 10:40:32 +11:00
Spencer McIntyre 582d64abe8 Add some documentation for the new code 2021-06-16 09:04:11 -04:00
Spencer McIntyre 8f8337552a Suggest a Meterpreter payload for an extension 2021-06-16 09:04:11 -04:00
Spencer McIntyre f2e1afed79 Fix session verification by checking TLV negotiation 2021-02-22 11:19:31 -05:00
Spencer McIntyre 8a8994bb57 Raise a more specific error when loading an unsupported extension 2021-02-19 15:51:40 -06:00
Spencer McIntyre 7cf5879836 Add a meterpreter test for enumerating core commands 2021-02-19 15:51:39 -06:00
Spencer McIntyre 998b38cf0d Enumerate Meterpreter's supported core commands 2021-02-19 15:51:33 -06:00
dwelch-r7 d2c0924996 Relocate comment 2021-02-08 12:42:46 +00:00
dwelch-r7 b95be3ed10 Zeitwerk rex folder 2021-02-08 12:24:12 +00:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Alan Foster 8bc80c26c1 Remove unused constant references, and add session new command id 2020-09-24 15:00:17 +01:00
OJ d1cfbb0982 Removal of unnecessary local var 2020-06-09 10:34:50 +10:00
OJ 6170f497b6 Fix TLV types and remove ones that no longer exist 2020-06-09 10:34:10 +10:00
OJ 209e463c84 Pass DER-encoed public keys instead of PEM
Just to reduce the more obvious thing going across the wire (ie. no more
"BEGIN PUBLIC KEY"). We now see binary blobs.
2020-06-09 10:34:04 +10:00
OJ 8070074da3 Almost final refactor of how IDs are handled 2020-06-09 08:58:26 +10:00
OJ 641f298819 Support removal of TLV strings
This first bit of code aims to add a "map" to the packet functionality
that is able to translate to and from "method strings" to "command ids".
IDs are sent across the wire, and they're now integers. This removes the
need for the strings to be present in things like native meterp, and
hence makes things a little less obvious on the wire, and way less
obvious on disk/in the payload.

Given that we need this functionality in other Meterpreters to support
the removal of strings, some code has been added that can generate
source files for Python, C# and C. This code might move, but for now
it's at least in a spot where it's used the most.
2020-06-09 08:57:40 +10:00
Brent Cook 6a9cc9b384 use the common method for enabling secure TLV channel 2019-10-28 06:25:51 -05:00
OJ 0e0edeb372 Add a secure command to renegotiate TLV encryption
This gives us the ability to force TLV encryption if for some reason
it's not already in place, and it means we can renegotiate a new key on
the fly if we want to.
2019-06-11 08:26:33 +10:00
Jeffrey Martin 9719ede3f0 restore transport enum used in TLVs 2017-12-20 13:12:24 -06:00
Brent Cook 90b97d6581 Merge branch 'upstream-master' into land-9151- 2017-12-15 14:15:14 -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
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
Pearce Barry 48975a4327 Support multiple suffixes on meterpreter extensions. 2017-10-31 10:04:34 -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
Brent Cook 0e15b2d002 remove unneeded METERPRETER_TRANSPORT constants 2017-09-19 02:59:05 -05:00
RageLtMan 271bd4c4fe Rename METERPRETER_TRANSPORT_SSL to ..._TCP
Since OpenSSL is no longer packages with meterpreter, and transport
secrecy is handled at L7, the SSL cons name doesn't apply anymore.
Rename METERPRETER_TRANSPORT_SSL to METERPRETER_TRANSPORT_TCP for
consistency with wire-level implementation.
2017-09-17 14:31:15 -04:00
OJ 5294722b96 Prevent socket-like behaviours during migrate on pivoted sessions 2017-09-07 01:36:24 -05:00
OJ 7acd772c10 Pivot session stability, display and handling 2017-09-07 01:36:21 -05:00
OJ fdc9864b61 First working packet pivot session! 2017-09-07 01:36:20 -05:00
OJ abc80655b7 Progress in named pipe pivots, more to come 2017-09-07 01:33:54 -05:00
OJ 816e78b6f6 First pass of named pipe code for pivots 2017-09-07 01:33:53 -05:00
OJ 999d90687e Make encryption flags 32 bit
This changes the encryption flags on the meterpreter session so that
it's 32 bits (and hence changes the packet header). This also supports
the idea that sessions may use encryption that isn't AES256, so the
flags field will ultimately indicate that. A type flag has been added so
that MSF knows the type that should be done on the wire.

At some point soon we'll add something that makes sure that the packet
encryption type always matches the encryption type expected in MSF, this
will hopefully avoid the risk of having packets injected into the stream
by external entities.
2017-07-03 16:52:58 +10:00
OJ 25e323fc4b Support AES renegotiation after session migration 2017-06-26 20:50:12 +10:00
OJ 9f2be21eb7 Ignore missing method error when doing aes negotiation
This means that meterpreter instances that don't support will continue
to work.
2017-06-26 15:22:56 +10:00
OJ 67b1a19aa1 Finalised MSF-side of AES key negotiation over RSA 2017-06-25 10:24:00 +10:00
OJ a9e03c1efd Initial working version of AES encryption of TLVs 2017-06-21 21:01:59 +10:00
OJ cec87a3e4f Start of support for AES packet encryption 2017-06-19 22:27:51 +10:00
OJ 37b9cd07a2 Add support for the session GUID in the UI
The Session GUID will identify active sessions, and is the beginning of
work that will allow for tracking of sessions that have come back alive
after failing or switching transports.
2017-06-06 17:15:57 +10:00
OJ 86aad6b7c3 Fix proxy_type references to handle nil case 2017-05-22 21:47:37 +10:00