Monday, July 13, 2015

Decrypt the Passwords in Weblogic Environment

The following steps will help to decrypt for example components

  •  the password for weblogic user
  • password in boot.properties 
  • password db-schema stored in data source.xml files
  • Password for Node Manager which is stored in config.xml
 Steps:

  • cd $DOMAIN_HOME/security
  • create a file called plainpassword.py with the below contents and save the file
 from weblogic.security.internal import *
from weblogic.security.internal.encryption import *
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)

# Take encrypt password from user
passwd = raw_input("Enter encrypted password of one which you wanted to decrypt : ")
preppwd = passwd.replace("\\", "")

# Display password
print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)

  •  set $DOMAIN_home/BIN/setDomainEnv.sh
  • from the prompt # java weblogic.WLST plainpassword.py
     we will get the following prompt;
     initializing WebLogic Scripting Tool (WLST) ... 
Welcome to WebLogic Server Administration Scripting Shell 
Type help() for help on available commands 
In the next step you will need to put the encrypted PWD

Enter encrypted password of one which you wanted to decrypt : "" here we need to enter the encrypted password""
example:
 Enter encrypted password of one which you wanted to decrypt : {AES}LsGaddassssvQDyibmejXFkf1tWxyndNArAhZ3M5GcnjXWUpJs= 
Plain Text password is: Welcome1238

No comments:

Post a Comment