1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-03-30 22:19:17 +02:00

105 Commits

Author SHA1 Message Date
dwelch-r7
66bbd5f078 Code review changes and small refactor 2022-04-26 23:49:04 +01:00
dwelch-r7
e29d876b2e Remove debug artifacts from release build 2022-04-26 15:56:53 +01:00
dwelch-r7
9dfa3ec1fc winpmem failing to compile 2022-04-26 15:56:53 +01:00
Spencer McIntyre
f9e62ba042 Add a Debug configuration to include debug logs 2020-12-18 16:07:04 -05:00
OJ
37fb807a95
Get extapi compiling under mingw 2020-06-25 10:31:53 +10:00
OJ
effe6b9827
Lots of changes + stdapi support 2020-06-25 10:30:49 +10:00
OJ
060feece01
Kinda almost sorta working for metsrv 2020-06-25 10:29:48 +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
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
Veli-Matti Visuri
78b2b58ab1 Fix varargs leaks 2017-12-04 21:20:05 +02:00
OJ
2cd4f3cf98
Turn off debug builds 2017-08-09 15:59:37 +10:00
OJ
e12e711ec5
Interim commit while debugging 2017-07-21 18:27:04 +10:00
OJ
415665ef59
Pivot stability, fixes, tidies, etc 2017-07-18 20:58:23 +10:00
OJ
f96fe3542f
Next phase of packet pivot work 2017-07-06 15:40:32 +10:00
OJ
fc6c593eb7
Add the first pass of named pipe pivot code 2017-07-05 16:15:06 +10:00
OJ
12055fca25
Finalised support for RSA-encrypted AES key negotiation
Still needs to be wired into HTTP/S.
2017-06-25 10:24:40 +10:00
OJ
8ffb877610
Initial version of working AES encrypted TLV packets 2017-06-21 21:02:33 +10:00
OJ
cb9ae6acd4
Rework the packet XOR code
Make the XOR key an array of bytes as a start to normalise the way the
XOR happens across the board. Given that we're going to be adding
encryption to the packet level and adding more stuff to the packet
header, now is the time to fix this up once and for all.
2017-06-20 19:20:41 +10:00
OJ
3554aff9de
Remove SSL from all but the python extension
Re-implement MD5 and SHA1 file hashing using CSP.
2017-06-14 21:40:20 +10:00
Brent Cook
28a9f42e14 more ssl flensing 2017-06-14 04:56:47 -05:00
Brent Cook
0a2d768e77 delete Linux meterpreter support 2017-05-14 02:11:57 -05:00
Brent Cook
d840805ad4 end-of-line mismatches in common.h 2017-01-24 18:49:14 -06:00
Brent Cook
b50955a924 Revert "Refactor XOR code, dedup packet writing code"
This reverts commit 7e8b4c3c5206891de38312c15518e5139fc56d6e.
2016-11-17 06:22:53 -06:00
OJ
4d145d78a7
Merge upstream/master into uuid-to-tlv 2016-10-29 15:25:21 +10:00
Brent Cook
af34146109
disable debug messages 2016-10-26 05:21:39 -05:00
OJ
7e8b4c3c52
Refactor XOR code, dedup packet writing code 2016-10-10 14:40:05 +10:00
OJ
0cbb86c59b
Add localtime support to php, tidy python and c 2016-10-03 15:26:54 +10:00
OJ
5ca5fe89f0 Begin to enable DWORD xor out of the box 2015-12-02 13:30:22 +10:00
OJ
71212bba43 Turn off debug trace 2015-10-30 15:23:01 -05:00
OJ
f572570b7d Initial work to get python talking to metsrv's ssl 2015-10-30 15:23:01 -05:00
OJ
4b2257c791 More bindings, including kiwi as an example 2015-10-30 15:23:01 -05:00
OJ
04cb09737e More work on the meterpreter bindings for python 2015-10-30 15:23:00 -05:00
OJ
8ae2ae5682 Turn off debug trace 2015-10-30 15:23:00 -05:00
OJ
90be1cc878 First attempt at the python extension
It builds for x64 and x86. There is a single command implemented that
allows for single-shot python commands to be run.
2015-10-30 15:22:59 -05:00
Brent Cook
600ed34f1e merge and cleanup @stufus's pageantjacker extension into extapi
see https://github.com/rapid7/meterpreter/pull/164 for details
2015-09-20 20:18:02 -05:00
OJ
18a814d3a0 Refactor wininet/winhttp code to reduce code duplication 2015-07-03 20:46:18 +10:00
OJ
d89cd69bc5 Implement a sleep in windows that lasts longer 2015-06-03 14:06:17 +10:00
Brent Cook
644bef77f6 remove duplicate check in SAFE_FREE 2015-04-27 11:43:35 -05:00
OJ
e5a3c8748c More refactoring and code tidying 2015-04-08 14:42:26 +10:00
OJ
b3b9726b4b Refactored TCP/HTTP transport functions
Updated the code so that the TCP stuff is moved into its own file and doesn't pollute the main server file with stuff that is specific to TCP transports.

Updated the winhttp functionality in the same way so that functionality is properly segregated.

Modified the global parameters so that they're part of a structure that can be passed around.

Added a stack of documnetation as well.
2015-04-08 12:48:07 +10:00
Brent Cook
7e017d4771 move unicode helper functions to a common place 2015-04-05 18:36:36 -05:00
OJ
8b637d7248 Refactored windows transport hopping
Instead of basing everything on URLs, the transport hopping now actually supports the creation of a whole new transport on the fly. The transport instance is stored in the remote as a "next transport" pointer.

This better facilitates the notion of being able to set all of the parameters on the transport when doing the switch, and is a step closer to being able to support chains of transports.
2015-04-02 22:51:12 +10:00
OJ
934525d2e7 Remove traces of wininet from the source
WinInet won't work any more thanks to use making modifications on the MSF that will cause it to break. We're basically all-in for WinHTTP now.
2015-04-02 12:36:17 +10:00
OJ
94897b7331 Add machine ID support to the Win32 side 2015-04-01 14:29:44 +10:00
OJ
6ba59b87b3 Merge 'upstream/master' 2015-03-30 19:29:21 +10:00
Brent Cook
26effa7328 fix include path 2015-03-24 10:29:50 -05:00
Brent Cook
6cb8061e8e Fix build issues using OpenSSL APIs >= 1.0
There are duplicate defines between the Windows crypto API and OpenSSL.
2015-03-24 10:29:50 -05:00
OJ
91a8bce4b6 Implement first pass of transport refactoring
* Transports are now defined by a set of callbacks that are bound to the Remote.
* Transport initialisation and dispatching is seprated.
* The context of the transport should be switchable depending on new transport requirements.

More to do, but it has begun.
2015-03-23 12:35:45 +10:00
OJ
0739cbc0f3 Add support for SSL cert validation
Tweak the SSL implemention so that for https meterpreters the SSL certificate is validated against a hash that is specified in the payload. If the hash isn't specified, then certificate validation isn't attempted.
2015-03-17 13:27:33 +10:00
OJ
f44b44f2ce Implement https communications via winhttp
First pass, some instability still. Migration doesn't play nice.
2015-03-16 21:51:44 +10:00