Enable psexec PowerShell delivery for Windows AArch64 payloads - #21857
Open
vinicius-batistella wants to merge 1 commit into
Open
Enable psexec PowerShell delivery for Windows AArch64 payloads#21857vinicius-batistella wants to merge 1 commit into
vinicius-batistella wants to merge 1 commit into
Conversation
rex-powershell 0.1.105 taught run_hidden_psh how to route to the native ARM64 powershell.exe on Windows-on-ARM, so the psexec PowerShell target and the Automatic branch no longer have to detour AArch64 payloads through Native upload. Require rex-powershell >= 0.1.105, add ARCH_AARCH64 to the PowerShell target, and drop the AArch64-only fallback in Automatic. Native upload remains available for oversize AArch64 payloads. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #21779 and rapid7/rex-powershell#49 (
rex-powershell0.1.105).#21779 wired AArch64 into psexec Native upload (drop an EXE) and left the PowerShell target on x86/x64 only, because
run_hidden_pshcould not pick the ARM64powershell.exe. That gem now routes WoA hosts viaPROCESSOR_ARCHITECTURE/PROCESSOR_ARCHITEW6432.This PR:
rex-powershell >= 0.1.105.ARCH_AARCH64to the PowerShell target.powershell.exeis on the share, Automatic now selects PowerShell for AArch64 the same way it does for x86/x64.Native upload is unchanged and still available for payloads that do not fit the 8192-byte AArch64 template.
Verification
Windows 11 ARM64 VM (build 26200), local admin,
windows/aarch64/shell_reverse_tcp.Automatic (
target 0)Before this change, Automatic with the same payload printed
Selecting native target.Explicit PowerShell (
target 1)Same payload/options,
set target 1: command length 4914, same SCM timeout message, session 2 opened.Test plan
windows/aarch64/shell_reverse_tcpselects PowerShell and opens a SYSTEM session on Windows 11 ARM64.target 1) with the same payload also opens a session.powershell.exeis present (unchanged control flow).Made with Cursor