Move AArch64 payload mixins under payload/windows/aarch64/ - #8
Open
vinicius-batistella wants to merge 1 commit into
Conversation
Mirror the layout used for x86_64 payload mixins (payload/windows/x64/) by relocating exitfunk_aarch64.rb and reverse_tcp_aarch64.rb into lib/msf/core/payload/windows/aarch64/ and adding that directory to Zeitwerk's collapse_list so the module namespaces stay flat (Msf::Payload::Windows::Exitfunk_Aarch64 and ReverseTcp_Aarch64), as noted by dledda-r7 on rapid7#21744. The shared helper module (Msf::Payload::Windows::Aarch64, in windows/aarch64.rb) is left where it is - Zeitwerk resolves it from the sibling .rb file while the collapsed aarch64/ directory contributes the individual mixins to the same parent namespace. No code changes in the moved files; msfvenom loads and generates windows/aarch64/exec, shell/reverse_tcp, and shell_reverse_tcp unchanged. 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.
Follow-up to rapid7#21744 addressing @dledda-r7's non-blocking note about the AArch64 mixin layout.
Summary
exitfunk_aarch64.rbandreverse_tcp_aarch64.rbfromlib/msf/core/payload/windows/intolib/msf/core/payload/windows/aarch64/, mirroring the existingpayload/windows/x64/layout.lib/msf/core/payload/windows/aarch64to Zeitwerk'scollapse_listinlib/msf_autoload.rbso the module namespaces stay flat (Msf::Payload::Windows::Exitfunk_Aarch64,Msf::Payload::Windows::ReverseTcp_Aarch64), matching thex64convention (BindTcp_x64,Exitfunk_x64, etc.).The shared helper module (
Msf::Payload::Windows::Aarch64, inwindows/aarch64.rb) stays where it is - the sibling.rbfile defines the parent namespace and the collapsedaarch64/directory contributes the individual mixins under the same namespace.Verification
./msfvenom --refresh-cache -l payloads | grep 'windows/aarch64'on this branch:Generation still produces identical shellcode sizes:
rubocopon the moved files andlib/msf_autoload.rb: no new offenses (two pre-existingStyle/Documentationoffenses onmsf_autoload.rbare already present onrapid7/master).ruby tools/dev/msftidy.rbon the three consuming modules (singles/windows/aarch64/shell_reverse_tcp.rb,stagers/windows/aarch64/reverse_tcp.rb,stages/windows/aarch64/shell.rb): clean.Made with Cursor