We can use SessionGopher to extract saved PuTTY, WinSCP, FileZilla, SuperPuTTY, and RDP credentials.
Clear-Text Passwords in Registry
Certain programs and windows configurations can result in clear-text passwords or other data being stored in the registry.
Windows AutoLogon
Windows Autologon is used to configure their Windows operating system to automatically log on to a specific user account without requiring manual input of credentials.
The username and passwords are stored in clear in the registry at:
It has 3 values usually:
AdminAutoLogon - "0" for off "1" for on
DefaultUserName
DefaultPassword
We read the values with:
Instead it is recommend to use Autologon.exe from the Sysinternals suite, which will encrypt the password as an LSA secret.
Putty
For Putty sessions utilizing a proxy connection, when the session is saved, the credentials of the proxy are stored in the registry in clear text.
Registry key access is tied to the user who saved the PuTTY session; it's in HKEY_CURRENT_USER. With admin privileges, you can find it in the corresponding user's hive in HKEY_USERS.
First we enum the sessions:
We can check the credentials of the session we found:
Wifi Passwords
List wifi connected to recently:
Depending on the network configuration, we can retrieve the pre-shared key (Key Content below) and potentially access the target network:
> .\lazagne.exe -h
...
chats Run chats module
mails Run mails module
all Run all modules
git Run git module
svn Run svn module
windows Run windows module
wifi Run wifi module
maven Run maven module
sysadmin Run sysadmin module
browsers Run browsers module
games Run games module
multimedia Run multimedia module
memory Run memory module
databases Run databases module
php Run php module
...