1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-12-21 05:35:54 +01:00
Commit Graph

932 Commits

Author SHA1 Message Date
OJ
ff3121b6f7 Merge branch 'upstream/master' into multi-transport-support
Conflicts:
	source/server/server_setup_posix.c
2015-05-05 20:55:26 +10:00
OJ
76b61f22d6 Update POSIX for configuration support 2015-05-05 08:58:21 +10:00
OJ
952bcd7f32 Add transport listing 2015-05-05 08:58:21 +10:00
Brent Cook
bfccf50c6b disable debug by default 2015-05-05 08:58:21 +10:00
Brent Cook
4e2f6932db remove duplicate check in SAFE_FREE 2015-05-05 08:58:21 +10:00
Brent Cook
c7617615e4 Land #155, remove file and console output from kiwi 2015-05-04 15:10:16 -05:00
OJ
b5f5d0ae17 Remove console and file output from kiwi
This PR removes both log file and console output from kiwi. This is done so that those people who are unfortunate enough to migrate to a console app before running kiwi don't end up rendering all of the console output to a window that the user can see.
2015-05-04 09:14:37 +10:00
OJ
1c9c199e74 Fix up issues with transport hopping
Transport hopping checks for prev/next weren't right. Also, moving from TCP comms was resulting failure due to the fact that it's close to impossible to get Windows to flush the buffer to MSF prior to terminating the socket without doing all kinds of horrible stuff to the socket options (which would ultimately bloat the stagers).

Instead we rely on MSf to clean things up.
2015-04-30 22:39:24 +10:00
OJ
a046d80877 More transport features, UUID fetcher
Users can now add transports without switching to them straight away. They can then move forward and backwards using the next and prev commands in MSF. There's also the get UUID facility too.
2015-04-28 20:20:40 +10:00
OJ
b36c6d96b7 Generate config on the fly for the sake of migration
Migration now works again, and supports all the transports while migrating as well. At the moment we don't have the ability to take extensions across as well, though that might come when we have fixed up the issues with stageless meterpreter.
2015-04-28 17:43:22 +10:00
OJ
479b501fec Remove commented out stuff from header files 2015-04-28 14:03:24 +10:00
Brent Cook
4693429496 Land #151, #152 - transport switching and recovery 2015-04-27 22:54:26 -05:00
OJ
26b82dfb83 Remove guesswork and SOCKADDR persistence from remote
Instead, we'll rely on the configuration block for the transport.
2015-04-28 13:50:13 +10:00
OJ
c33e486ccc Prevent transport deletion on failure 2015-04-28 12:50:03 +10:00
OJ
04429dc6de Remove crud code 2015-04-28 12:35:09 +10:00
OJ
081d89f23e Re-add the session exiry to transport switching 2015-04-28 12:30:13 +10:00
OJ
b8f3eafb6e Fix transport switching
Creation of transports for switching is done a little differently now. But the transports do cycle correctly now when things fail, each with their respective retry times.
2015-04-28 11:23:37 +10:00
Brent Cook
c268efc325 disable debug by default 2015-04-27 12:12:24 -05:00
Brent Cook
644bef77f6 remove duplicate check in SAFE_FREE 2015-04-27 11:43:35 -05:00
OJ
87a2bf6189 Fix small issues, code tidy 2015-04-25 20:38:17 +10:00
OJ
9d8489a972 First pass of configuration changes for multi transport
This relies on some work done to the RDI repository, need to get
that landed before I can get this going.
2015-04-25 11:11:29 +10:00
OJ
1b600dbfbe Couple of small tweaks to make posix happy again 2015-04-23 20:00:57 +10:00
OJ
fe566d5f07 Moved transport stuff from core to metsrv
Lots of transported related things were in the core library which didn't make any sense given that the only thing that needed it was metsrv. This moves the functionality out into metsrv, reformats stuff and gets rid of some dead code.

TODO: Make this work with POSIX.
2015-04-23 19:41:25 +10:00
OJ
969b8fb4af Update of code from Windows 2015-04-21 20:11:53 +10:00
OJ
5f0422943f Merge branch 'connection-recovery' of github.com:OJ/meterpreter into connection-recovery 2015-04-21 20:02:54 +10:00
OJ
4ca9daa254 Merge branch 'upstream/master' into connection-recovery 2015-04-21 19:59:16 +10:00
OJ
60c4749a91 Land #150 : WinHttp send/receive code dedupe 2015-04-21 19:57:50 +10:00
Brent Cook
9269a14e6a Merge common WinHttp init code between send and receive functions.
So we don't have any missing initialization between send and receive, this
factors out the common bits.
2015-04-20 16:30:26 -05:00
OJ
9bc8eac20c More posix work for connection resiliency 2015-04-18 19:22:53 +10:00
OJ
1d6e87180a Fix posix extension tracking and transport sleeps
This changeset fixes an issue with POSIX failing to keep track of loaded
extensions properly. The timeout calcs for waiting were trying to be too
smart and hence were simplified.

Also added another flush when reconnecting so that the body of the
second instance of metsrv is ignored by the POSIX side. In future, when
stageless meterpreter works with POSIX, we won't have to do this.
2015-04-17 21:22:16 +10:00
OJ
83f82f3129 Adjust http func pointer type, adjust poll timeout 2015-04-17 19:58:24 +10:00
OJ
fa0d3fc95c Porting of connection reslience work to POSIX 2015-04-17 18:08:26 +10:00
OJ
4807375480 More work moving towards POSIX 2015-04-17 16:41:47 +10:00
OJ
f83dfb46f4 Merge branch 'upstream/master' into connection-recovery
Conflicts:
	source/common/arch/win/i386/base_dispatch.c
	source/server/server_setup_win.c
2015-04-17 14:41:27 +10:00
OJ
60b5eff975 Land #149 : relax the select timeout interval 2015-04-17 11:26:25 +10:00
Brent Cook
78860c8d30 Land #148, support URI patching 2015-04-16 18:03:30 -05:00
Brent Cook
416939af00 relax the select timeout interval on the server socket
Currently, the select timeout on the server socket is 100 ns, meaning that
while idle, the process can wake up 100k times per second. This switches the
timeout to 0.5 second, reducing the idle CPU usage and seemingly increasing
the reliability of posix meterpreter as well.

Tested with various test post test modules without failures.
2015-04-15 16:14:21 -05:00
OJ
4ff18b8bab Add support for URI patching
This commit includes code which will allow for HTTP/S payload URIs to be hot-patched by the server without losing the UUID information. This was put in so that the stageless payloads can be used over and over again and not have issues with session URIs colliding.
2015-04-14 15:26:45 +10:00
Brent Cook
ecd2e0b441 Land #147, use correct SSL cert string 2015-04-13 23:31:17 -05:00
OJ
22b207a7a4 More tidying/refactoring, gearing up for POSIX 2015-04-14 13:06:27 +10:00
OJ
e8d136c35a Constants are better than magic numbers 2015-04-14 08:56:44 +10:00
OJ
dbf33e2fb9 Remove second instance of the SSL check string
The mechanism used for validation of the SSL cert string was the same as for many of the other global replacement options. However, the string value that was used for checking was also the same. The result was that the patch mechanism wasn't patching the right instance of the string.

DERP!

Why this hit stageless only I'm really not sure.
2015-04-14 07:53:31 +10:00
OJ
edfea3624b Add support for sets
Removed the get call, as the set can do the same thing.
2015-04-13 10:42:37 +10:00
OJ
93b48b9bdf Add support for getting timeouts for comms 2015-04-13 10:07:15 +10:00
Brent Cook
16bcd1bd18 Land #146: support TLS certificate verification updates 2015-04-09 10:49:21 -05:00
OJ
5c1f39623e Rejigging of timeouts for session resliency 2015-04-09 17:59:06 +10:00
OJ
8a65f4770a Fix small issue with incorrect URL 2015-04-08 15:44:05 +10: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
OJ
6de5738e21 Merge branch 'upstream/master' into cert-hash-switching
Conflicts:
	source/server/server_setup_win.c - line endings
2015-04-08 08:10:10 +10:00