This repository was archived by the owner on Jan 29, 2020. It is now read-only.
SessionGopher: PowerShell RDP, WinSCP, PuTTY, SuperPuTTy, FileZilla, .ppk, .rdp, .sdtid session extractor & password decryptor#502
Merged
rvrsh3ll merged 2 commits intoEmpireProject:2.0_betafrom May 8, 2017
Arvanaghi:2.0_beta-SessionGopher
Merged
SessionGopher: PowerShell RDP, WinSCP, PuTTY, SuperPuTTy, FileZilla, .ppk, .rdp, .sdtid session extractor & password decryptor#502rvrsh3ll merged 2 commits intoEmpireProject:2.0_betafrom Arvanaghi:2.0_beta-SessionGopher
rvrsh3ll merged 2 commits intoEmpireProject:2.0_betafrom
Arvanaghi:2.0_beta-SessionGopher
Conversation
added 2 commits
May 7, 2017 22:11
Contributor
|
Tested working. Great tool and thanks for the PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quietly digging up saved sessions and passwords for RDP, WinSCP, FileZilla, PuTTY, and SuperPuTTY
SessionGopher is a purely PowerShell tool that finds and decrypts saved session information for remote access tools. It uses WMI so it can be run remotely, and its best use case is finding Unix systems and jump boxes.
It works by querying the HKEY_USERS hive for all users who have logged onto a domain-joined box at some point. It extracts PuTTY, WinSCP, SuperPuTTY, FileZilla, and RDP saved session information and passwords. It has a built-in WinSCP password decryptor, and also deobfuscates and extracts FileZilla and SuperPuTTY passwords. When run in
Thoroughmode, it searches all drives for PuTTY private key files (.ppk) and extracts all relevant private key information, including the key itself, as well as for Remote Desktop (.rdp) and RSA (.sdtid) files.SessionGopher has remote access built-in using WMI. You to search the entire domain for these artifacts, or an input list you provide it.
Empire Integration
From this Empire module, you can extract all the saved session data from the beaconing host. Or, you can use that host to pivot to another host whose saved sessions and credentials you wish to extract by using the
Targetargument. Similarly, you can run SessionGopher across the entire domain usingAllDomain. SessionGopher will use the security context of the beaconing user to run unless you explicitly provide domain credentials with theuandpflags.Github: https://github.com/fireeye/SessionGopher
Blog post: Using the Registry to Discover Unix Systems and Jump Boxes
Let me know if there's any question or comments I can address.