Skip to content
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 a test for stderr output to the cmd_exec tests #13496

Merged
merged 2 commits into from
May 21, 2020

Conversation

timwr
Copy link
Contributor

@timwr timwr commented May 21, 2020

This change adds a test to ensure the stderr output can be seen when running cmd_exec.
This was broken on Java and fixed with rapid7/metasploit-payloads#393
Additionally this was broken on the cmd/windows/reverse_powershell payload before #12985 fixed it.

Verification

List the steps needed to make sure this thing works

  • Get a java meterpreter session (on Windows or Linux) msfconsole -qx "use exploit/multi/handler; set payload java/meterpreter/reverse_tcp; set lhost $LHOST; set lport 4444; set ExitOnSession false; run -j"
  • Run the following:
loadpath test/modules
use post/test/cmd_exec 
set SESSION -1
run
  • Verify the tests all pass

@timwr timwr added the cmd_exec is broken again cmd_exec is broken again label May 21, 2020
@busterb busterb self-assigned this May 21, 2020
@busterb busterb merged commit aa12b98 into rapid7:master May 21, 2020
@busterb
Copy link
Member

busterb commented May 21, 2020

Release Notes

This adds tests to verify that payloads, when used with the cmd_exec API, return the output of the stderr process stream in their results.

@tperry-r7 tperry-r7 added the rn-enhancement release notes enhancement label May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd_exec is broken again cmd_exec is broken again rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants