1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-06-09 12:03:41 +02:00

136 Commits

Author SHA1 Message Date
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
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
OJ
6419fa9e40
Fix buffer meta type values, typos and function calls 2020-06-09 10:57:44 +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
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
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
Brent Cook
2e9943af8d
Land , enhance Windows extapi support for window enumeration
Merge remote-tracking branch 'upstream/pr/385' into upstream-master
2020-04-08 06:04:41 -05:00
cn-kali-team
6d7740cc72 Process Unicode support 2020-04-05 11:53:22 +08:00
cn-kali-team
451a094269 Process Unicode support 2020-04-05 11:53:16 +08:00
cn-kali-team
25f770dcb3 Process Unicode support 2020-04-05 11:53:06 +08:00
cn-kali-team
a8df9b3604 Process Unicode support 2020-04-05 11:52:08 +08:00
Justin Bui
bad3ef7df4
Update config.c
Reduced permissions from ALL_ACCESS to the minimum access needed.
2020-02-12 20:18:18 -08:00
Francesco Soncina
b35cc0ac70
add support for PPID spoofing
fix 
2019-12-17 00:57:49 +01:00
bwatters
db171fb83a
Those should be usigned ints, not unsigned longs. 2019-07-23 10:21:21 -05:00
bwatters
509c1936a3
Update OS names to be more generic in kernel versions 10.0.x 2019-07-23 08:17:06 -05:00
Green-m
108081e1da Handle REG_MULTI_SZ correctly. 2018-11-29 15:36:40 +08:00
Green-m
e2029e2342
Handle more strings in one line. 2018-11-22 15:25:45 +08:00
Green-m
f779b809fa
Fix issue about REG_MULTI_SZ. 2018-11-05 16:07:34 +08:00
scriptjunkie
0b89ea3e37 Support non-ascii environment variables 2017-11-21 16:22:51 -06:00
scriptjunkie
936272b59d Encode name characters 2017-11-21 15:59:56 -06:00
OJ
c6eebdf72b
Properly fix half-baked changes to getprivs
This was left over code from me trying to do some fixes to getprivs
which didn't make sense in the middle of the packet pivot work. This was
left over by me as a result of my half-baked revert. This caused issues
with both the `getprivs` and `getsystem` command. I'm pretty sure that
as a result of breaking the latter, I will never live down the "make
getsystem great again" meme.
2017-09-27 16:30:18 +10:00
OJ
a10938e5a0
Revert changes made to getprivs
This work should be done in another PR
2017-08-09 15:58:38 +10:00
OJ
6d2582102d
Slow progress on pipe packet pivots 2017-07-10 20:00:37 +10:00
Brent Cook
0a2d768e77 delete Linux meterpreter support 2017-05-14 02:11:57 -05:00
ouahib-el-hanchi
4f9866d035 Fixed issue 2017-04-15 02:55:00 +01:00
Brent Cook
8e4af5500a Windows 2016 is released 2016-12-29 13:31:05 -06:00
OJ
4d145d78a7
Merge upstream/master into uuid-to-tlv 2016-10-29 15:25:21 +10:00
OJ
ed1e912e6b
Remove presence of WOW64 in the architecture string 2016-10-29 06:43:26 +10:00
Brent Cook
f302463f94
Land , add local time command 2016-10-10 23:28:20 -05:00
Brent Cook
c304eb79c3 revert mode changes 2016-10-03 23:05:57 -05:00
OJ
d10795ba09
Update to use wchar_t API functions and unicode results 2016-10-04 13:50:28 +10:00
OJ
2b9aac9c45
Add support for listing of loaded drivers 2016-10-04 11:30:12 +10:00
OJ
46484c2f35
Small space/comment fix 2016-10-03 15:26:54 +10:00
OJ
0cbb86c59b
Add localtime support to php, tidy python and c 2016-10-03 15:26:54 +10:00
OJ
5e6dc8ca85
Add localtime command support for POSIX 2016-10-03 15:26:54 +10:00
OJ
38fe6e1188
Add localtime command to Windows native meterp 2016-10-03 15:26:54 +10:00
Brent Cook
42a1e49768 fix unicode string writes for REG_EXPAND_SZ types 2016-09-29 23:10:27 -05:00
ssyy201506
6625248fc7 fix crash after closing channel 2016-07-08 15:40:29 +09:00
ssyy201506
baad192ba6 Fix the immediate closing of a interactive channel. 2016-06-16 11:14:12 +09:00
Brent Cook
0057809573 fix registry class, take 2 2016-05-03 22:05:14 -05:00
Brent Cook
90f5cd2c3a fix the length calculation for meterpreter registry class reads 2016-05-03 16:40:58 -05:00
Brent Cook
423dbaeba2 consistency and bug fixes 2016-03-15 05:45:21 -05:00
Brent Cook
31e6ae1a63 Convert registry access to use UTF-8 2016-03-15 02:58:36 -05:00
Brent Cook
099da2b4b7 Revert "Convert registry access to use UTF-8"
This reverts commit bc8dfb17b5b6e81a9c26f39ef3ddf6a2c4ec5f0d.
2015-12-07 14:17:52 -06:00
Brent Cook
2f575a45a0 Revert "fixup buffer sizes"
This reverts commit 2d6c0194c921f5f5e1da20a5cd7af16c9fc6ceb8.
2015-12-07 14:17:50 -06:00
Brent Cook
2d6c0194c9 fixup buffer sizes 2015-12-01 14:58:20 -06:00
Brent Cook
bc8dfb17b5 Convert registry access to use UTF-8 2015-12-01 13:53:45 -06:00
Brent Cook
98fae3e075 change source perms back to non-executable 2015-11-09 21:10:30 -06:00
OJ
cbb50227a5 Refactor TLV layout, add more debug output, token stealing 2015-11-03 14:03:33 +10:00