New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created mixin to retrieve the architecture of the current shell. #18062
Created mixin to retrieve the architecture of the current shell. #18062
Conversation
Currently only supports Windows, but does work on Win2000 upwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor concern, but otherwise this code looks good, nice work!
Windows Server 2022 WOW64 session working fine:
|
And with a native x64 shell on x64 it also seems to be correctly identifying the host as a x64 host:
|
Content looks good, will land this once tests pass. |
Release NotesA new mixin has been added to support detecting the architecture of the host OS on Windows systems. Support for other OSes will be added at a later date. |
Adds a mixin to support retrieving the architecture of the current shell. In meterpreter, this uses the built in behaviour, which calls the appropriate API. In command shells and PowerShell, looks at the appropriate environment variables.
I added this to the
shell_to_meterpreter
module for now.Currently only supports Windows, tested on Win2000 upwards.
Verification
To test this, I created a test module, that simply includes the mixin, calls
get_os_architecture
and prints it out.Tested on:
Command Shell
Meterpreter
PowerShell
Python:
Java: