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

1059 Commits

Author SHA1 Message Date
OJ
3c26a76ec4
Update kiwi to match Mimikatz 2.1.1 (TBAL) 2018-08-17 09:36:24 +10:00
OJ
5da10e97e9
Fix packet pivoting in HTTP transports
Windows Meterpreter that uses http/s-based transports wasn't correctly checking for cases where pivoted packets were handled. When pivoted packets are forwarded to the correct handler, the packet is set to NULL. For TCP transports, a check already existed to carry on when the packet was NULL, but this wasn't the case for HTTP/S.

This commit fixes this problem and so the pivot session no longer dies when Meterpreter is using an HTTP/S transport.

For funzies, the fix for this was implemented on a live stream to help other people learn some of Meterp's internals. That video can be found here: https://www.youtube.com/watch?v=de-UYWnafow
2018-08-09 21:51:53 +10:00
OJ
3dc014e8ad
Add powershell transport scripts
This commit adds two new scripts and modifies some of the powershell transport binding functionality.

Code has been added that generates valid Metasploit URIs for use with stageless listeners. This means that it's possible to add HTTP/S transports on the fly and have a URL generated that will work with the current architecture of the process.

Two new scripts will appear in each of the powershell sessions:

* Add-WebTransport - adds http/s transports to the session.
* Add-TcpTransport - adds TCP transports to the session.

These two scripts are just abstractions on top of the built-in Meterpreter transport binding functionality, but it makes it a lot easier to interact with the feature and makes it more.. er.. Powershelly.

The functions come with documnetation, so `Get-Help Add-WebTransport -Full` will show how it's used.

From here, people can do some more fun stuff, such as adding init scripts to their stageless payloads that add support for more transports.
2018-05-28 12:45:29 +10:00
OJ
71edb392ea
Fix issue with pointer handling on WOW64 processes
I stuffed up when dealing with values that are being passed back and forth across components when in x86 processes. I was passing 64 bit ints around even in 32 bit mode, which resulted in some natstiness. This commit fixes that problem by forcing everything to be 64 bit regardless of arch, and casting to the appropriate pointer at the right time.
2018-05-21 12:45:21 +10:00
OJ
1e175da8b1
Change hash output to use LM hash if present
The previous commit hard coded the LM hash to the empty value. This commit changes this so that if the LM hash isn't present it'll manually specify the empty one, but use the existing one if it is present.
2018-05-17 09:06:35 +10:00
OJ
90265c5a0f
Rework powershell_shell to work with "streaming"
This commit changes the channel functionality within the powershell extension so that commands do execute behind the scenes and stream the results to the UI in the current channel.

This comes with the caveat that users are patient. I haven't yet made sure that running separate commands while long running ones are running will not cause problems. We'll have to see.
2018-05-07 21:13:08 +10:00
OJ
f44877ae29
Add ability to dcsync & hashdump via Powershell
DCSync functionality is exposed, and from this it is possible to enumerate all users in the domain and dump each user's hash one by one. This code has a few extension functions built into the runner, and also has some baked-in powershell functions that are available in every powershell runner session in the host.

I've also added a powershell version of the build command that lets us generate the source to the powershell assembly wiring from PSH as well as Python.
2018-05-07 16:36:21 +10:00
OJ
d9cb58050d
Update kiwi to match mimikatz 2.1.1 20180502 2018-05-04 16:59:03 +10:00
UserExistsError
006bb2c998 added support for bind_named_pipe comms 2018-02-11 17:58:39 -07:00
Brent Cook
a8eebd18f2 remove read-only attribute on delete 2018-01-16 10:16:03 -06:00
Brent Cook
0959897065 if we cannot load powershell 4 support, fall back to 2 2017-12-20 14:39:16 -06:00
visuve
b8ef9d3d4e Remove redundant check 2017-12-05 10:14:49 +02:00
Veli-Matti Visuri
db2da2cc89 Fix iterator increments 2017-12-05 10:12:29 +02:00
Veli-Matti Visuri
b6c421cc3b Fix memory leaks 2017-12-04 21:45:00 +02:00
Veli-Matti Visuri
78b2b58ab1 Fix varargs leaks 2017-12-04 21:20:05 +02:00
Brent Cook
d4e403980c
Land #251, use utf8 for user and domain names 2017-11-29 05:37:32 -06:00
Brent Cook
ecedfac2a8
Land #249, update delete_dir to be able to recursively delete 2017-11-29 05:32:44 -06:00
Brent Cook
fcf69bb7ca pass file-not-found and other errors back to the caller 2017-11-29 05:30:53 -06:00
Brent Cook
519df5919c don't crash if there are no custom headers 2017-11-25 15:29:16 -06:00
William Webb
a404126f66
Land #252, Renegotiate AES in HTTP payloads on new framework instance 2017-11-23 00:21:38 -06:00
Brent Cook
4be0b0756d on reconnect to a new framework instance, we have to renegotiate AES keys 2017-11-22 03:20:36 -06: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
Brent Cook
f065a24b1c Merge branch 'master' into land-236-headers 2017-11-21 00:52:50 -06:00
OJ
bbbe755206
Land #250 - Fix recv failure in windows transports
Fixes #9163
Fixes #9175
2017-11-08 09:21:36 +10:00
Brent Cook
0548a12f3c remove do/while(0) exception anti-pattern 2017-11-06 08:06:17 -06:00
Brent Cook
2dc48bea43 remove do/while(0) exception anti-pattern, fail properly on pipe close 2017-11-06 08:05:31 -06:00
Brent Cook
b0fbc4f550 remove do/while(0) exception anti-pattern, fail properly on socket close 2017-11-06 08:04:52 -06:00
Brent Cook
e117dd2326 unify whitespace 2017-11-06 03:33:08 -06:00
Artem
22235e228b
Update fs_win.c
Fix Error Open File VS2017 and Add Delete not empty Folder
2017-11-02 03:43:21 +03:00
Brent Cook
1010ded636
Land #244, handle situations when SetProcessDPIAware is unavailable 2017-10-27 00:06:12 -07:00
Brent Cook
58f7d2d606 fix whitespace 2017-10-26 23:56:45 -07:00
Brent Cook
7a22b3052a actually reset encryption context when freeing 2017-10-26 23:22:08 -07:00
Artem
752888a2c2 Update screenshot.c
Fix Compile in VS2017
2017-10-20 21:36:11 +03:00
OJ
db20322182
Fix TLV type defs and config size for HTTP migrate 2017-10-04 10:42:40 +10: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
e1efa94b06
Transport creation for headers, and starting on python support 2017-09-11 14:39:15 +10:00
OJ
0792d9dc1b
Add HTTP header support for custom HTTP headers
Fixes config size management issues and gets things working in both
WinHTTP and WinINET
2017-09-11 14:39:10 +10:00
Tim
c61c565918 fix record_mic TLV values 2017-09-11 10:53:15 +08:00
Brent Cook
167c2d380a
fix sniffer/networkpug breakage 2017-09-01 03:29:26 -05:00
OJ
e328b986fb
Merge branch 'upstream/master' into packet-pivot 2017-08-21 17:26:21 +10:00
Brent Cook
4fd68effd4
Land #192, add unicode support for the incognito extension 2017-08-18 06:22:34 -04:00
OJ
52d770228e
Fix stupid double-free in WinHTTP packet handling 2017-08-11 17:32:49 +10:00
OJ
2cd4f3cf98
Turn off debug builds 2017-08-09 15:59:37 +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
bc6c2039fb
Add debug statements, and fix one that was causing crashes 2017-08-09 13:03:12 +10:00
OJ
005ba6a8c0
Merge branch upstream into packet-pivot 2017-08-08 17:37:59 +10:00
OJ
b363584648
Merge branch 'upstream/master' into transport-agnostic-packet-encryption 2017-08-08 17:37:25 +10:00
OJ
0413a5c2ce
Add check for existing session reconnect 2017-08-08 17:15:49 +10:00
OJ
5f8b775842
Fix reading data from pipe, fix XOR bug in x64 2017-08-07 19:51:24 +10:00