1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-05-06 16:09:38 +02:00

820 Commits

Author SHA1 Message Date
Spencer McIntyre
c911749430 Fix a guard condition to check the correct thing 2020-12-18 16:08:14 -05:00
Tim W
be443779ff fix free() process.execute wchars 2020-11-30 18:48:26 +00:00
Kali-Team
7933f06484 [stdapi] support_unicode_characters_for_execute 2020-11-24 17:41:07 +08:00
William Vu
8e3933bed7 Revert "Undo commit for "
This reverts commit 8361d5367a7400d166da3c8b772077aa9a0a793e, reversing
changes made to db3d5f0896ac74b3918387be24de1e994451820d.
2020-10-11 20:49:06 -05:00
William Vu
8c5ab95cd2 Revert "Land - Fix missing TLV migration from string to int"
This reverts commit eb1d51b94e0fa8102734ee3999c53448f9f6f42c, reversing
changes made to b6ce0dff183995ba402c1fe3ebbf74f7a7d8f492.
2020-10-11 20:08:15 -05:00
Spencer McIntyre
1aac00a6ce Disconnect the named pipe and break after the impersonation callback 2020-10-06 15:21:25 -04:00
Spencer McIntyre
e96d8e5fc8 Fix a bad comment 2020-08-20 14:42:17 -04:00
Spencer McIntyre
25a0b76797 Filter out Windows < 6.3 for the namedpipe_rpcss technique 2020-08-20 14:05:48 -04:00
Spencer McIntyre
ee69b4f274 Revert "Add a fourth parameter to the thread API"
This reverts commit 0afe17d160e8846dd7d52814947c6e7461f5f45e.
2020-08-19 11:54:45 -04:00
Spencer McIntyre
cf4614c941 Working on Windows 10 from native x64 and WOW64 2020-08-19 11:54:45 -04:00
Spencer McIntyre
ce7dd3f699 Clean up the namedpipe_rpcss code 2020-08-19 11:54:21 -04:00
Spencer McIntyre
7967fd569d x64 version is working 2020-08-18 15:41:42 -04:00
Spencer McIntyre
ee72ac26b9 Add support for a callback after named pipe impersonation 2020-08-14 18:12:02 -04:00
Spencer McIntyre
0afe17d160 Add a fourth parameter to the thread API 2020-08-14 17:47:59 -04:00
OJ
68e27f00fa
Force mimikatz and RDI submodules to point to master 2020-07-03 08:47:41 +10:00
OJ
1fc117743f
Fix kiwi build 2020-06-25 23:29:36 +10:00
OJ
7fab0b200a
Building, but not working yet
Got an issue where certain functions aren't being resolved and hence are
null when being invoked. Need to debug the loading of the DLL to see why
this is the case.
2020-06-25 10:32:32 +10:00
OJ
37fb807a95
Get extapi compiling under mingw 2020-06-25 10:31:53 +10:00
OJ
3d4d4706e2
Remove unused local 2020-06-25 10:31:48 +10:00
OJ
b55b186e79
Final pass of working stuff for the day 2020-06-25 10:31:45 +10:00
OJ
205405effe
Final winpmem changes.. I think 2020-06-25 10:31:05 +10:00
OJ
936fa267b4
More of the cross compilation dance! 2020-06-25 10:31:03 +10:00
OJ
e7162dda2c
Few more cross comp changes for pmem 2020-06-25 10:31:00 +10:00
OJ
cb0c1d476c
Fix some winpmem stuff for cross building 2020-06-25 10:30:57 +10:00
OJ
fdb785dcee
Few more build fix ups and removal of warnings 2020-06-25 10:30:53 +10:00
OJ
effe6b9827
Lots of changes + stdapi support 2020-06-25 10:30:49 +10:00
OJ
aa3b58628f
Get rid of the clang noise 2020-06-25 10:29:51 +10:00
OJ
e6441ad2fa
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-25 10:28:36 +10:00
OJ
aec49a7863
Final tidy up 2020-06-22 08:25:51 +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 , Change from PEM to DER for crypt TLV negotiation 2020-06-18 13:54:31 -04:00
OJ
c5f8f893ac
Remove the mimikatz extension
Also turn off PDB generation for the sniffer extension.
2020-06-11 08:34:17 +10:00
OJ
6419fa9e40
Fix buffer meta type values, typos and function calls 2020-06-09 10:57:44 +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
e9e5894eca
Updated powershell extension binding IDs 2020-05-08 17:17:25 +10:00
OJ
6163be1142
Updated powershell extension with appropriate command map 2020-05-01 15:41:31 +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
0e9a231e8a
First pass of CMake support (MSVC specific ATM)
This commit includes a bunch of changes that are working towards being
able to build the Meterpreter source from CMake. Changes include:

* Updated `make.bat` which does the stuff that we need.
* Removed a bunch of stuff from the python extension source tree so that
  CMake generator would not include them.
* Moved a few things around in the priv extension.
* Created `CMakeFileLists.txt` for all the projects.

There are a few hacks required in things like stdapi and kiwi to ignore
files that are on disk but shouldn't be included in the build.

Initial testing indicates that sessions run, extensions load, but some
things don't work as intended. It's a start! Still much to do.
2020-04-24 13:31:16 +10:00
OJ
57eda40fc7
Fix mimikatz to build clean again
I am sad. Like.. really sad. I'm sad for so many reasons. For nearly
7 years I've worked on this god forsaken source, and for many of those
7 years I have had the ext_server_mimikatz project configured to have
warning level 3, and warnings as errors. While making changes to the
build systems in the last week or so, I've even rebuilt this on updated
toolsets on multiple platforms.

Despite all this, one thing slipped through the cracks. I have NO idea
why this warning wasn't shown in th past. Also.. how did this ever
work!? Why is it that it's only rearing its ugly head now? I honestly
don't know. Based on the code that I've had to fix in this PR, there's
no reason why this should build without warnings on any machine. Yet, it
does. It builds clean on my Windows 10 desktop with VS2013/2017/2019.
Same on most of my other virtual machines. For some reason it only
failed on this one VM after I had to fight to reproduce it when Brent
hand an issue.

The issue here was that a `string` type was being constructed from an
iterator over a `wstring` type, and hence there was an implicit
character conversion from `wchar_t` to `char`. This SHOULD be a warning,
because clearly that's not a good thing. BUT HERE WE ARE.

Anyway, we're proxying via the `_bstr_t` type now to avoid having to do
horrible manual character conversions. Given that we're in C++ land
already there's no point in working any harder. Also, this extension is
probably going to go away soon anyway, so a temporary fix that does the
job is good enough.

RIP my morning. I won't be getting that back.
2020-04-24 12:35:40 +10:00
OJ
64f6062d8b
Remove unused crap from espia
The video and audio capture things didn't do anything other than leave
artifacts on disk. So this commit removes the code that does that,
resulting in just one feature being available for this extension. Might
be worth ditching it entirely?
2020-04-22 13:06:49 +10:00
OJ
c8aa435b3c
Finally removed delay loading from the last extension: extapi 2020-04-22 13:06:49 +10:00
OJ
4cd3a29319
Remove delay loading from the kiwi extension 2020-04-22 13:06:48 +10:00
OJ
f4f6bb01d8
Remove delay loading from mimikatz 2020-04-22 13:06:48 +10:00
OJ
472a6b1f9e
Move incognito to no more delay loading 2020-04-22 13:06:48 +10:00
OJ
86a4763164
Update powershell extension to avoid delay loading 2020-04-22 13:06:48 +10:00
OJ
05d5a16fe5
Get the python extension working without delay loading 2020-04-22 13:06:47 +10:00
OJ
ce8544bd2d
Move sniffer over to metserv api 2020-04-22 13:06:47 +10:00