1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-20 20:37:27 +01:00
Commit Graph

28 Commits

Author SHA1 Message Date
Tim W
8ec7d7b254 cleanup windows fs_search 2021-09-22 13:13:27 +01:00
Tim W
027de2be9c fix windows build 2021-09-20 19:08:06 +01:00
Tim W
a5d2e6cbe3 move packet_get_tlv_uint to core 2021-09-20 15:47:04 +01:00
Tim W
6c8eee5e95 Fix windows meterpreter transport session expiry time, 0 should never expire 2021-07-28 22:42:17 +01:00
Spencer McIntyre
777fadd00b Cleanup base.c based on PR feedback 2021-01-27 09:07:00 -05:00
Spencer McIntyre
9aece96e94 Cleanup registered commands using the pseudo extension's deinit callback 2021-01-15 13:59:39 -05:00
Spencer McIntyre
ebdcd95615 Handle core commands like they're provided by the pseudo core extension 2021-01-15 13:59:32 -05:00
vixfwis
9f0b9008bb Fix endless loop bug
Main thread will be stuck in loop if recv returns SOCKET_ERROR (-1) due
to int to DWORD casting
2020-10-09 20:24:37 +03:00
Alan Foster
985ccbd3af
Fix Metasploit 6 pivoting issue 2020-10-01 22:58:21 +01:00
OJ
325048a5e6
Fix build, remove metsrv warning 2020-06-25 10:41:29 +10:00
OJ
effe6b9827
Lots of changes + stdapi support 2020-06-25 10:30:49 +10:00
OJ
dee84d6ca9
Fix small compiler warning 2020-06-25 10:29:59 +10:00
OJ
d820fb6458
Get x86 working for metsrv 2020-06-25 10:29:54 +10:00
OJ
aa3b58628f
Get rid of the clang noise 2020-06-25 10:29:51 +10:00
OJ
060feece01
Kinda almost sorta working for metsrv 2020-06-25 10:29:48 +10:00
OJ
c9ca614313
Remove DLL exports from Meterpreter
Add support for loading RDI-related stuff using ordinals instead of
function names. Remove exports from the extensions/etc. This is another
step in the direction to make the DLLs less obvious.

Extensions no longer have their own name in the library metadata.
They're all "extension.dll". Metsrv is now "server.dll" and the two
non-extensions are "plugin.dll". I was going for something a little less
obvious.

This required changes to the RDI functionality.
2020-06-22 08:25:30 +10:00
Spencer McIntyre
c8312f9c73
Land #397, Change from PEM to DER for crypt TLV negotiation 2020-06-18 13:54:31 -04:00
OJ
45624d2389
Fix config generation for migration 2020-06-18 09:15:50 +10:00
OJ
30f232a7fd
Adjust TLV types and fix up code to deal with new raw api 2020-06-09 10:57:44 +10:00
OJ
5fc2117325
Adjust the tlv raw function and remove some unnecessary headers 2020-06-09 10:57:43 +10:00
OJ
5c959187ea
Support pub key in DER instead of PEM
Easy change on the Windows side, we just needed to remove the code that
converts PEM to DER and off we go.
2020-06-09 10:54:28 +10:00
OJ
3f574e3521
Implement extendion IDs and refactor command enum
Enumeration of commands was a bit of a hack, and still resultsed in
strings (like "stdapi") to appear in binaries, and also meant that
extensions needed to identify themselves.

This code changes the way this works. Extensions no longer have a name.
Instead they have an internal ID tha maps to the command sets they
support. To enumerate extension commands, MSF will ask for a range of
commands, and if any command IDs fit within that range, they'll be
returned.

This moves us towards a nicer way of handling things across all the
meterpreters.
2020-05-01 15:36:07 +10:00
OJ
c7f7bc2fc0
Remove method strings from TLV packets
We now use ints, and hopefully this means we don't have as much obvious
stuff in the binaries!

```
$ # Before:
$ strings metsrv.x86.dll | grep core_ | wc -l
46
$ # After:
$ strings metsrv.x86.dll | grep core_ | wc -l
0
```
Big win, and it's even bigger for the likes of stdapi.

Had to fix a bunch of other stuff along the way, including a subtle
issue with the Powershell Meterp bindings.
2020-04-28 23:41:06 +10:00
OJ
3dbff1e401
Clean and working builds with CMake 2020-04-24 13:31:34 +10:00
OJ
f5313a91d0
Remove __declspec(dllexport) from the Init function in metsrv 2020-04-23 01:37:51 +10:00
OJ
24e6067b51
Update RDI, remove metsrv references/libs from extensions 2020-04-22 13:13:56 +10:00
OJ
05d5a16fe5
Get the python extension working without delay loading 2020-04-22 13:06:47 +10:00
OJ
4ffe127f04
Begin removing the delay-load dependency
The 'common' library has been removed. The only project that actually
used it was metsrv, so the code that metsrv required from common is now
directly compiled in as part of that project.

The common folder now contains files that are importanta cross all of
the projects, with a primary focus on the new "API" style function. What
this means is that MetSrv has an API that it exposes through a function
pointer that is passed to the extension when it's initialised. This
pointer references a structure with all the API functions wired in. This
means that:

* Extensions don't need to know anything about metsrv at compile time.
* The delay loading code can be removed, which was one of the last
  instances of "metsrv.dll" as a string.
* Metsrv.dll no longer exports any functions.

More to come.
2020-04-22 13:06:40 +10:00