Pages

Tuesday, April 10, 2018

Decrypt The Passwords In Weblogic

Decrypt The Passwords In Weblogic


step.1

source the $DOMAIN_HOME/bin/setDomainEnv.sh

step.2

cd $DOMAIN_HOME/security
create a file called plainpassword.py and save the file.
vi plainpassword.py

from weblogic.security.internal import *
from weblogic.security.internal.encryption import *

encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)

passwd = raw_input("Enter encrypted password of one which you wanted to decrypt : ")

plainpwd = passwd.replace("\\", "")

print "Plain Text password is: " + clearOrEncryptService.decrypt(plainpwd)

step.3

Run the setWLSEnv.sh script located in $WL_HOME/server/bin.

step.4

Run the below command to decrypting the password. Enter the encrypted password when prompted.
java weblogic.WLST plainpassword.py

step.5

Provide the encrypted password .

Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Enter encrypted password of one which you wanted to decrypt : {AES}LsGaddassssvQDyibmejXFkf1tWxyndNArAhZ3M5GcnjXWUpJs=
Plain Text password is: Welcome1234

Note:
username and password both can be decrypted with the above method.

No comments:

Post a Comment