Monday, 2 April 2018

How to Decrypt password of Weblogic 8.1 Admin Console?

Steps to create a script and decrypt the password encrypted(3DES)



1. Copy the password from the config.xml file $BEA_MIDDLEWARE_DOMAIN/user_projects/domains//config/

2. Change the directory in the terminal to the weblogic domain directory/security

"cd $BEA_MIDDLEWARE_DOMAIN/user_projects/domains/
/security/" so as to provide the path of the SerializedSystemIni.dat file

3. Create a java script file using the vi editor command "$vi SsmDecrypt.java" 

Copy and paste the below code 

***************************************************************
import weblogic.security.internal.SerializedSystemIni;
import weblogic.security.internal.*;
import weblogic.security.internal.encryption.*;

public class SsmDecrypt
{
public static EncryptionService es = null;
public static ClearOrEncryptedService ces = null;

public static void main(String args[])
{
String s = null;
if(args.length == 0)
System.out.println("Enter Password");
else
if(args.length == 1)
s = args[0];
else
System.err.println("Usage: java Decrypt [ password ]");
es = SerializedSystemIni.getExistingEncryptionService();
if(es == null)
{
System.err.println("Unable to initialize encryption service");
return;
}
ces = new ClearOrEncryptedService(es);
if(s != null)
System.out.println("\nDecrypted Password is:"+ces.decrypt(s));
}
}
*************************************************************

4. Execute the below command along with the encrypted password

$
java SsmDecrypt <{3DEX}password>
Example

$java SsmDecrypt {3DES}ChApor4ZjYQ=

Output
Decrypted Password is:xxxxxxxx

No comments:

Post a Comment

All about WebLogic t3 and t3s Protocol

WebLogic's  implementation of the RMI specification uses a proprietary protocol known as T3. You can think of T3 (and secure T3S) as a l...