Extract WinSCP Credentials from any Windows System, winscp config file or recovered user registry hive file
Project description
WinSCP Password Extractor
WinSCP stores ssh session passwords in an encoded format in either the registry or a config file called WinSCP.ini.
This python script searches in the WinSCP default locations to extract stored credentials for the current user, when executed locally on the target. If a WinSCP.ini config file is already present the script can decode stored credentials as seen below. To gather WinSCP credentials from a remote target or a range of targets there is a module present for the pentesting Tool NetExec called "winscp".
These default locations are:
- registry
- %APPDATA%\WinSCP.ini
- %USER%\Documents\WinSCP.ini
Alternatively, a registry hive can be decrypted locally if it has been exported from the target (NTUSER.DAT file from the user home folder).
Installation
WinSCPPasswdExtractor is available on pypi.org. Therefore it is recommended to install this tool with pipx:
pipx install WinSCPPasswdExtractor
Alternatively you could install it with pip or simply download the file and run it.
Usage
You can either specify a file path if you know the exact path to an existing WinSCP.ini file or you let the tool itself look if any credentials are stored in the default locations. If the provided file is a recovered registry hive, pass the -r or --registry flag.
With pipx:
WinSCPPasswdExtractor
WinSCPPasswdExtractor --path <path-to-winscp-file>
WinSCPPasswdExtractor --path <path-to-ntuser-hive-file> --registry
Manually downloaded:
python WinSCPPasswdExtractor.py
python WinSCPPasswdExtractor.py --path <path-to-winscp-file>
python WinSCPPasswdExtractor.py --path <path-to-ntuser-hive-file> --registry
About
This Tool is based on the work of winscppasswd, the ruby winscp parser from Metasploit-Framework and the awesome work from winscppassword.
They did the hard stuff
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file winscppasswdextractor-1.3.0.tar.gz.
File metadata
- Download URL: winscppasswdextractor-1.3.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.0 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a23faa1bbb5f1f4bc30a7ff6a9d7e84dd2422f7c74c73af5b3f54add693e040c
|
|
| MD5 |
6bf36783ba3401659206413465e228cb
|
|
| BLAKE2b-256 |
81ad448f5e2bb393e793577cddaeb39e9733ec5ca538aa587114f3475f0eb853
|
File details
Details for the file winscppasswdextractor-1.3.0-py3-none-any.whl.
File metadata
- Download URL: winscppasswdextractor-1.3.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.0 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a80d5a58bded186947716a845cb8cc3d919d7382db11a181a72c750fc185df8
|
|
| MD5 |
35275345567274713d0b480a9ac6fe91
|
|
| BLAKE2b-256 |
9c9dff173389c143b7cf8c51a64db7609256317c6a162e47d4efc820746d2cb2
|