0

Code snippets : Encrypted password in PowerShell

-

Many times there is a need to store password in PowerShell script. Unfortunately to leave password in script is insecure solution and might cause an issue.

So, what to do if there is a need to have password in a script and we don’t want to have it embedded in clear-text in script?

Best way is to encrypt it and store in the file and then re-use it when required.

Create file with encrypted password

$secureString = Read-Host -AsSecureString "Enter a secret password"
$secureString | ConvertFrom-SecureString | Out-File C:\Scripts\storedPassword.txt

Use encrypted password in script

$secureString = Get-Content -Path C:\Scripts\storedPassword.txt | ConvertTo-SecureString
Remember that password has to be encrypted on the account which will be running the script. So, in case you plat to use Task Scheduler to run PowerShell script, start PowerShell windows as particular user and then create file with encrypted password.
0

Apps : Cisco7PCF for Windows

-

Just released small app for Windows platform. This app allows to decrypt type 7 password from Cisco devices as well as passwords from Cisco VPN profiles (PCF files).

Password which can be recovered using this app:

  • wireless keys fro Cisco access points,
  • RADIUS/TACACS shared secrets
  • NTP authentication keys
  • Enable passwords (NOT enable secrets, which are stored using MD5)
  • enc_GroupPwd – VPN group password from PCF file
  • enc_UserPassword – VPN user password from PCF file

Application also allows to store password and/or send tchem via email after decryption.

You can find app in Windows Store:

Cisco Password Decryptor

3

Config snippets : Cisco : PCF enc_GroupPwd and enc_UserPassword Decryptor

-

Another small app written in Adobe Flex. This time to decrypt passwords stored in Cisco VPN PCF file. Just simply copy enc_GroupPwd or enc_UserPassword to decryptor and click Decrypt button 🙂

Using this small app you can decode:

  • enc_GroupPwd – VPN group password from PCF file
  • enc_UserPassword – VPN user password from PCF file

For that small webapp to work Adobe Flash Player is required.

(more…)

0

Config snippets : Cisco : Password 7 Decryptor in Adobe Flex

-

As the effect of my attempts to produce some small applications in Adobe Flex, I commited decryptor for type 7 passwords stored on Cisco devices.

Using this small app you can decode:

  • wireless keys fro Cisco access points,
  • RADIUS/TACACS shared secrets
  • NTP authentication keys
  • Enable passwords (NOT enable secrets, which are stored using MD5).

(more…)