Wednesday, 24 October 2012

Recover Weblogic Admin, JDBC Connection Pool, Keystore Password : Decrypt Weblogic Admin, JDBC Connection Pool, Keystore Password


Recover Weblogic Admin, JDBC Connection Pool, Keystore Password : Decrypt Weblogic Admin, JDBC Connection Pool, Keystore Password

SerializedSystemIni.dat file is the most important security file of weblogic, this file contain the keys used to decrypt and encrypt the user and password. So in your environment make sure to secure your domain/security folder with proper permission. 

You can use this method to recover - 

  1. Decrypt your weblogic admin username and password using boot.properties file.
  2. Recover your database user passwords in case you have JDBC Connection pools configured by taking encrypt password from respective module xml file.
  3. To recover the keystore passwords


It's very short method

1. Make a file with name decryptpasswd.py under your_domain/security folder  with below   
    contents

#######################################################################

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

#This will prompt you to make sure you have SerializedSystemIni.dat file under #current directory from where you are running command
raw_input("Please make sure you have SerializedSystemIni.dat inside the current directory, if yes press ENTER to continue.")

# Encryption service
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)

# Take encrypt password from user
pwd = raw_input("Please enter encrypted password (Eg. {3DES}Bxt5E3...): ")

# Delete unnecessary escape characters
preppwd = pwd.replace("\\", "")

# Decrypt password
print "Your password is: " + clearOrEncryptService.decrypt(preppwd)

################################################################################

2. Get your encrypt password
3. Now go to  your_domain/bin directory
4. Run setDomainEnv.(sh/cmd)
5. Change directory to your_domain/security ( where you placed decryptpasswd.py script )
6. Run below command

     $ java weblogic.WLST decryptpasswd.py

You will be prompt to make sure you have SerializedSystemIni.dat file inside current directory from where you are running command, Press enter

Now you will be prompt to enter your encrypt password, paste your encrypt password and press enter

bingo!!! You will get your decrypt password.


Enjoy!!!




Tag : recover weblogic admin console password, recover weblogic admin password, recover weblogic console password, recover weblogic 11g password, weblogic recover admin password, weblogic recover password, recover lost weblogic password, recover lost weblogic admin password, how to recover weblogic admin console password, how to recover weblogic admin password, how to recover weblogic password, how to recover weblogic password, decrypt weblogic password, decrypt weblogic jdbc password, decrypt weblogic admin password, decrypt weblogic boot.properties, decrypt boot.properties weblogic

4 comments:

  1. nice post to recover console pwd

    ReplyDelete
  2. can u pls explain whats going on in the script..

    ReplyDelete
  3. Its not working for me [root@www security]# java weblogic.WLST decryptpasswd.py
    Error: Could not find or load main class weblogic.WLST

    ReplyDelete
  4. Its not working for me [root@www security]# java weblogic.WLST decryptpasswd.py
    Error: Could not find or load main class weblogic.WLST

    ReplyDelete