1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-20 20:37:27 +01:00
Commit Graph

820 Commits

Author SHA1 Message Date
David Maloney
52571872c4 move to the first user record
move through the datatable until we find
the first sam user object.

MSP-12356
2015-04-23 16:51:07 -05:00
David Maloney
9d5c3c1610 pass CRYPT_VERIFYCONTEXT flag
not passing this flag was causing an error attempting
to open the keyset. by setting this we are telling the
CAPI that we only care about ephemeral keys, and so we don't
run into the container issues.

MSP-12356
2015-04-23 15:27:00 -05:00
David Maloney
ac0978abcd attaching database correctly
we have the database attaching properly
seems to be an error decrypting the PEK though

MSP-12356
2015-04-23 14:43:28 -05:00
David Maloney
54b91aab08 clean build
the project now builds cleanly. the code isn't fully itnegrated
but it's in there and it builds which means it's nearly
perfect =P

MSP-12356
2015-04-23 11:53:33 -05:00
David Maloney
2769d986fe migrate all the poc code in
all of the poc libs are migrated in,
compiler warnings are blocking compile at this moment
2015-04-23 10:39:25 -05:00
David Maloney
85987b9cbe start migrating ntds code in
moving the code chunks from the poc into
the actual meterp project
2015-04-22 16:03:30 -05:00
David Maloney
1d1ebe0592 Merge branch 'master' into feature/MSP-12356/ntds-parser 2015-04-21 09:46:34 -05:00
David Maloney
b6d8909227 testing channel creation
just a simple test to make sure i
understand streampool channel creation
2015-04-21 09:45:30 -05: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
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
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
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
553f369492 Land #145 : Add unicode support in fs search 2015-04-07 11:39:13 +10: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
OJ
bea5c1a4ff Merge branch 'upstream/master' into bind-ipv6-and-ipv4 2015-04-06 15:18:27 +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
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
Brent Cook
517dcfea05 convert wds queries to use unicode 2015-04-05 18:41:01 -05:00
Brent Cook
7e017d4771 move unicode helper functions to a common place 2015-04-05 18:36:36 -05:00
Brent Cook
69d6b48e67 normalize and tidy the code a bit 2015-04-05 18:36:36 -05:00
OJ
8a41324dd1 Fix stupid mistake with the use of wchar_t in posix 2015-04-03 07:57:16 +10:00
OJ
5ba41da726 Fix compiler error with incorrect var name 2015-04-02 23:13:08 +10:00
OJ
eb1ebbefc2 Tweaks and update of POSIX 2015-04-02 23:12:22 +10: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
23117bb73c Merge branch 'upstream/master' into transport-refactor 2015-04-02 15:24:57 +10:00
Brent Cook
ff123debc5 Land #143: OJ's stageless winhttp proxy support fixes 2015-04-01 22:25:46 -05:00
OJ
0bdf322889 Bind to IPv4 and IPv6 on the bind transport
This commit includes code which attempts to bind to both IPv4 and IPv6 addresses so that the attacker can connect on either interface.

In the case of Windows XP, the IPv6 stack doesn't allow modification of the socket options so that both address types can be listened to on the same socket. Rather than create separate sockets for both cases, XP and earlier simply fall back to IPv4 only.
2015-04-01 21:49:07 -05: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
a8f4ea5e3d Remove unused reference code and shady ifdef 2015-04-02 08:59:26 +10:00
OJ
420fb927d7 Undo keyboard failure 2015-04-02 08:51:39 +10:00
OJ
e03b381869 Rejig code for the machine ID extraction 2015-04-01 16:23:57 +10:00
OJ
ebf116d4f5 Added POSIX machine ID support 2015-04-01 16:15:51 +10:00
OJ
e28718d1b6 Remvoe const from SSL method 2015-04-01 15:11:20 +10:00
OJ
47cb3cddb2 Merge branch 'transport-refactor' of github.com:OJ/meterpreter into transport-refactor 2015-04-01 14:31:01 +10:00
OJ
94897b7331 Add machine ID support to the Win32 side 2015-04-01 14:29:44 +10:00
OJ
3c32f762a7 More transport refactor work for POSIX
The transport refactor appears to be working, but the transport swtching
requires more work on the side of stageless posix before it will work.
At the moment, the POSIX implementation of the transport switching is
commented out so that it can't be used or built into the binaries.

This should mean we can move forward on other friends without this
holding us back.
2015-04-01 12:10:49 +10:00
OJ
cfa12053bd Fix up WinHTTP proxy implementation 2015-04-01 11:43:53 +10:00
OJ
e2338709aa POSIX transport refactoring
Still more to do here to support transport switching, but progress being
made.
2015-03-30 22:54:52 +10:00
OJ
4758a31f5b Source rejig, refactor POSIX to support changes 2015-03-30 20:14:16 +10:00
OJ
6ba59b87b3 Merge 'upstream/master' 2015-03-30 19:29:21 +10:00
OJ
afcef4f312 Bind to IPv4 and IPv6 on the bind transport
This commit includes code which attempts to bind to both IPv4 and IPv6 addresses so that the attacker can connect on either interface.

In the case of Windows XP, the IPv6 stack doesn't allow modification of the socket options so that both address types can be listened to on the same socket. Rather than create separate sockets for both cases, XP and earlier simply fall back to IPv4 only.
2015-03-30 18:47:56 +10:00