Closed stufus closed 8 years ago
Can one of the admins verify this patch? For more information see: https://github.com/rapid7/meterpreter/wiki/CI-Testing
Thanks for the submission @stufus! I'll get around to looking at this as some point today.
@OJ No worries mate, thanks for looking at it :) Hope I don't need to change too much......
General code style comment:
We need to stick with the style used for the windows code, which uses BSD style braces instead of K&R style, and always wraps blocks in braces even if there is just one line to wrap.
Another one:
Local vars are camelCased
, functions are snake_cased
. Global vars are frowned upon :)
Thanks again for the submission @stufus :) I know it looks like I'm being picky/critical here but I'm not. It's just a few general tidies and a couple of semantic questions that I was interested in.
Will chat more on IRC. Cheers!
@OJ - No worries mate, I need to be consistent. I've committed a bunch of changes, hopefully this is looking in better shape
@OJ Are the changes here ok, or do I need to copy this over to the new repo?
I'm going to grab this for tomorrow.
Cheers, I feel like I have some work to do on it still - will re read everything in case I have missed anything!
S
On 3 Sep 2015, at 21:29, Brent Cook notifications@github.com wrote:
I'm going to grab this for tomorrow.
— Reply to this email directly or view it on GitHub.
@bcook-r7 - Shall I just copy this to a new branch in the metasploit-payloads repo?
I'm so sorry @stufus - if you have time, please do! I kept starting to do it, then getting distracted by lower hanging fruit.
@bcook-r7 no worries mate, will do - is there a clever way to preserve the history or shall I just not worry about it? :)
I wouldn't worry about it; I actually got some time today to work on this and will add a new PR on metasploit-payloads in a bit once I'm done testing.
Closing this one for now.
Overview
PageantJacker is designed to allow SSH agent commands and data to be forwarded through meterpreter, between a UNIX ssh agent client and a Windows Pageant server. An example of a use case is one in which a penetration tester running Metasploit has been able to upload meterpreter onto a remote Windows machine and has discovered that Pageant is running with keys loaded. This extension would allow them to interact with the agent as if it was local. Commands such as 'ssh-add' will work natively, allowing keys to be added or deleted, and the 'ssh' client will attempt to use the keys stored in Pageant to authenticate to a host.
Components
Note that the PuTTY Enumeration module (https://github.com/rapid7/metasploit-framework/pull/5359) may be useful in determining whether to load this extension or not.
Meterpreter Extension
This extension provides the functionality to communicate with Pageant running in Windows. The IPC is implemented using shared memory, with events being generated through the Windows event loop. OpenSSH ssh-* commands can therefore be rewritten to Pageant, with the output being sent back through meterpreter.