1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-08 14:36:22 +01:00
Commit Graph

917 Commits

Author SHA1 Message Date
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
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
OJ
ba70b2b222 Begin work on connection recovery when things go wrong 2015-04-07 22:14:27 +10:00
OJ
553f369492 Land #145 : Add unicode support in fs search 2015-04-07 11:39:13 +10:00
Brent Cook
fdb1b67068 Merge #2, pretty up search more 2015-04-06 20:22:06 -05:00
OJ
602715aaf8 Use group packets and add curlieeees
This commit just adds the braces around single-line blocks as per our "standard". This is important, especially in the case where those single lines contain macros which could expand to multiple lines.

Also added the use of the group packet functionality to make the search result code a little easier on the eye.
2015-04-07 10:02:41 +10:00
Brent Cook
21b4064a3d normalize slashes, remove debug output 2015-04-06 07:47:27 -05:00
Brent Cook
44f9e3c066 Land #142: support binding IPv4 and IPv6 at once 2015-04-06 07:16:13 -05:00
OJ
bea5c1a4ff Merge branch 'upstream/master' into bind-ipv6-and-ipv4 2015-04-06 15:18:27 +10:00
OJ
b7b555bf51 Merge branch 'cert-hash-switching' of github.com:OJ/meterpreter into cert-hash-switching 2015-04-06 14:49:34 +10:00
OJ
5def755239 Implement support for ssl cert verify toggling
Querying of the status of SSL cert verification is now possible. This commit allows for this to be enabled and disabled on the fly.

Also include some code tidy/refactoring.
2015-04-06 14:48:59 +10:00
OJ
e9b7ec97c0 Implement support for ssl cert verify toggling
Querying of the status of SSL cert verification is now possible. This commit allows for this to be enabled and disabled on the fly.
2015-04-06 14:42:38 +10:00
Brent Cook
cc2dbb2045 use size_t for wcslen results 2015-04-05 20:45:52 -05:00
Brent Cook
b1dadbb98e make search_all_drives a separate function 2015-04-05 18:41:02 -05:00
Brent Cook
5c16ddf270 avoid infinite recursion when encountering a bad symlink
reduce stack usage per level
2015-04-05 18:41:01 -05:00
Brent Cook
e1148a0bca first working unicode search
refactor a few giant functions into smaller ones
2015-04-05 18:41:01 -05:00
Brent Cook
61b19560d7 cleanups, use utf8_to_wchar 2015-04-05 18:41:01 -05:00