Commit Graph

300 Commits

Author SHA1 Message Date
adfoster-r7 9a40e2612b Land #17129, Add OSX Aarch64 Payload support 2023-08-02 18:37:56 +01:00
usiegl00 9019b51eaa Update AARCH64 Shellcode Generation
This updates the aarch64 payloads to include comments with the
corresponding instructions for each little-endian integer. It also fixes
the debug output for x64 payloads under rosetta.
2023-07-29 08:26:56 -07:00
adfoster-r7 f3adc3f79f Fix invalid references in modules 2023-07-27 16:02:37 +01:00
usiegl00 22101f15cc Update Aarch64 Payloads for RuboCop
Use msftidy to fix the rubocop errors.
2023-06-19 11:20:23 +02:00
usiegl00 b8068bc781 Cleanup for Sonoma Dyld
This adds support for the dyld changes incorperated into Sonoma and
cleans up the existing support for Ventura. This does not break
compatibility with previous versions.
2023-06-19 10:57:37 +02:00
usiegl00 44762f18e8 Increase Stack Space for Loader
This increases the stack stack space mmap'd for the 2nd stage loader and
should fix the invalid stack memory access crash on the staged payload.
2023-06-19 10:57:37 +02:00
usiegl00 5f8767f4cf M1ssion Dyld Mettle: Aarch64 Payloads
This builds on Back from the dyld by adding the required aarch64
assembly code to enable the OSX loader to run on the m1. This enables
the use of native payloads on M1 or M2 devices that do not have Rosetta
installed.
2023-06-19 10:57:37 +02:00
Spencer McIntyre 088f359cee Make stage encoding optional 2023-03-01 12:24:46 -05:00
bwatters 07aa024b21 Add custom session types and minor cleanups 2022-09-07 15:43:50 -05:00
bwatters 0201693519 Rebase and update with Spencer's collab branch 2022-05-26 18:31:37 -05:00
bwatters 3f736834d2 Add x64 config 2022-05-24 16:13:01 -05:00
bwatters 681455dec3 Add a custom stager type for x86 windows 2022-05-24 16:09:47 -05:00
dwelch-r7 1f4ee19c05 Expose options for logging to a file in mettle 2022-05-06 14:36:55 +01:00
space-r7 500d08f08e Land #16426, fix osx stager crash in osx Monterey 2022-04-18 12:38:51 -05:00
sjanusz 5fdf82ff76 Add toggleable logging to console & file to PHP Meterpreter 2022-04-12 17:15:06 +01:00
usiegl00 b9052be102 Use libdyld locator to fix osx stager on monterey
We locate the dyld_shared_cache in memory to find and resolve the
functions we need in libdyld.dylib. We retain the original dyld location
method on osx versions before Sierra.

Explicitly set length for osx x64 initial stage

The rdx register, used for passing the payload length, is being
clobbered by a system call in the new MacOS version. Instead of relying
on the register being untouched, we set it equal to the payload length.
2022-04-12 11:27:23 +09:00
sjanusz bbf9e3163a Fix file reads on Windows for binary files 2022-03-21 12:47:39 +00:00
Spencer McIntyre 2e32619328 Merge info in the meterpreter module 2022-02-24 09:04:51 -05:00
Spencer McIntyre bad55a858c Add the new adapter payload type 2022-02-23 16:38:57 -05:00
Spencer McIntyre 683d4ac471 Add support for staged python command payloads 2022-02-13 12:03:08 -05:00
adfoster-r7 4a9a15e638 Run Rubocop layout rules on modules 2021-08-27 17:19:43 +01:00
dwelch-r7 c0912b358c Fix tests 2021-01-05 16:20:42 +00:00
dwelch-r7 bad5ccbc49 Remove msf/base requires 2021-01-05 14:59:46 +00:00
Spencer McIntyre 900c4367ec Note that Meterpreter now requires Windows XP SP2 or newer 2020-12-17 14:32:28 -05:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Adam Galway 242656bc07 Land #13978, proxy support for Python Meterpreter 2020-09-04 10:50:41 +01:00
Spencer McIntyre 67df4ea672 Adjust verbiage and whitespace, remove a buggy asm instruction 2020-09-02 13:20:50 -04:00
Ege Balcı 84b229d393 Major changes on x64 PE loader and several improvments 2020-08-31 21:35:59 +03:00
Ege Balcı 4bd8690370 Several bug fixes on x64 PE loader and PE mapper 2020-08-28 01:08:29 +03:00
Ege Balcı 66292a5f28 DLL preamble fixed & exitfunk is now optional 2020-08-26 19:45:44 +03:00
Ege Balcı 9745385346 More PE validation methods added 2020-08-26 00:13:30 +03:00
Ege Balcı 138c951052 New PE loader mechanics, PE characteristics detection and several bug fixes 2020-08-20 20:35:32 +03:00
Spencer McIntyre cc21e5e50d Validate the PE file early on to raise errors 2020-08-12 17:32:12 -04:00
Spencer McIntyre e65fa7eb26 Fix the Metasm architecture issue 2020-08-12 10:43:51 -04:00
Ege Balcı 65643ff40c Reflective PE Payloads Added 2020-08-12 14:38:56 +03:00
Spencer McIntyre 48e0610bae Add authentication support to the Python Meterpreter 2020-08-10 13:24:55 -04:00
Shelby Pace 15294550ed add require 2019-12-12 12:24:47 -06:00
Shelby Pace 3fa9e9b0a8 add Dependencies array with mingw arch class 2019-11-18 09:35:18 -06:00
Shelby Pace bfa27e6bed add flag, use DefaultOptions for linker script 2019-11-07 15:33:31 -06:00
Shelby Pace 1717001be1 attribution 2019-11-01 09:01:14 -05:00
Shelby Pace 8bb1c5102b opt for inline asm instead of pre-compiled object 2019-10-31 11:55:40 -05:00
Shelby Pace a04291678f add require, fix module context generate 2019-10-29 08:35:04 -05:00
Shelby Pace bb742771e5 add stager and stage for x64 arch 2019-10-10 12:16:10 -05:00
Shelby Pace 3e6283c193 add staged payload 2019-10-10 12:16:10 -05:00
RageLtMan 97943261ed Linux x86 reverse_tcp should read known # of bytes
See notes for x64.

This part does not appear to be working properly yet - stages
generated with this commit recv 102b on the first call to read(),
but subsequently things seem to go off the rails after the
intermediate stage is loaded.

Needs testing and fixup at present for x86 (no worse than before
in terms of success rate however).
2019-09-03 01:55:12 -04:00
RageLtMan 05944ba8c1 Linux x64 reverse_tcp should read known # of bytes
The linux x64 reverse tcp stager is hardcoded to read 4K off the
socket. When a small intermediate stager is used, this can result
in reading part of the next stage as well, which means that the
intermediate stager will never recv the # of bytes it needs and
hang indefinitely.

Break out the mettle piece to use separate methods for assembly and
binary payload generation as well as actually putting the product
on the existing session socket.

Change the first part of the stage to check for the intermediate
stager generation method, and use the size of the produced stager
in the recvfrom call or fall back to the prior 4K read size.

Testing:
  None yet

Ping @bcook-r7, @acammack-r7, @OJ, @ZeroSteiner
2019-09-03 01:27:27 -04:00
William Vu 32334c2386 Update all module splats from http:// to https:// 2019-08-15 18:10:44 -05:00
Brent Cook 20d21bb7cc update specs, add a few more compat modules 2019-06-11 12:56:11 -05:00
Brent Cook 44dfc3506d add udpsockedi, tag compatible payloads
Not all payloads compatible with TCP stagers are compatible with UDP
stagers, so assuming sockedi is not sufficient to ensure compatibility.
This adds a udpsockedi which pairs compatible payloads together.
2019-06-11 04:19:14 -05:00
Brent Cook 5fc7167beb Merge remote-tracking branch 'upstream/master' into land-10812- 2019-02-07 09:31:02 -06:00