-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Add Meterpreter sanity tests to CI #18210
Add Meterpreter sanity tests to CI #18210
Conversation
7222e68
to
c21fcc1
Compare
e51b097
to
e616b65
Compare
2fcf9fa
to
0ed4075
Compare
0ed4075
to
9a3d068
Compare
REM pcap dependencies | ||
powershell -Command "[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} ; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip', 'C:\Windows\Temp\WpdPack_4_1_2.zip')" |
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.
Just out of curiosity what's all this needed for? and any chance that version will disappear and break the job?
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.
The pcaprub gem dependency needs it to compile during a bundle on windows
if session_has_registry_ext | ||
if session.commands.include?(Rex::Post::Meterpreter::Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_LOAD_KEY) |
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.
Are these changes related to the tests?
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.
Yes; I could extract this out - but made sense to land together in the context of this PR
Old release notes before it was reverted: Adds stability enhancements to Meterpreter payloads. Additionally adds a large suite of automated sanity tests to Github Actions that verify OSX/Windows/Linux/Python/Java/PHP Meterpreter payloads work. |
Revival of #16357
Adds a larger suite of Meterpreter sanity tests to Github Actions
We also use Allure to generate an interactive test report:
Each generated test has the reproduction steps, and console output available for debugging purposes:
Under the hood the test suite spins up msfconsole as a child process and interacts with it via stdin/stdout. The main work flow is generating a payload, creating a listener, executing the payload, validating the stdout of the module. This approach was chosen over pure unit tests to help replicate more closely how a user would interact with msfconsole, and to catch semantic differences, such as autoloading disparity, between the existing test suite versus booting msfconsole directly
Verification