You cannot see this page without javascript.

진주성 블로그 방문하기

WLST to decrypt Weblogic, jdbc and java keystore passwords offline

 
We can decrypt weblogic, jdbc and java keystore passwords offline using WLST.

Kindly follow below steps to decrypt them offline using WLST ( No Script/Online dependency ):
1.      Login to admin server host
2.      Go to $ORACLE_HOME/oracle_common/common/bin
3.      Invoke wlst.sh OR wlst.cmd
4.      wls:/offline> domain = "<$domain_home_path>"
5.      wls:/offline> service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
6.      wls:/offline> encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
7.      wls:/offline> print encryption.decrypt("<encrypted password>")
Please note, in encrypted string we have to remove backward slash symbol.

Examples:
For Linux:
[oracle@demomachine ~]$ cd /u02/oracle12213/osb/oracle_home/oracle_common/common/bin
[oracle@demomachine u02]$./wlst.sh

wls:/offline> domain = "/u02/Oracle12213/osb/domain/dev_domain "
wls:/offline> service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
wls:/offline> encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
wls:/offline> print encryption.decrypt("{AES}577uW8U1WXvE9Ep+9gw7V3ZfJiyjD5TDT3id5X9LtdE= ")
weblogic


For Windows:
C:\windows\system32>cd C:\Oracle12213\Middleware\Oracle_Home\oracle_common\common\bin
C:\Oracle12213\Middleware\Oracle_Home\oracle_common\common\bin>wlst.cmd

Initializing WebLogic Scripting Tool (WLST) ...

Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> domain = "C:\\Oracle12213\\Middleware\\Oracle_Home\\user_projects\\domains\\dev_domain"
wls:/offline> service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
wls:/offline> encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
wls:/offline> print encryption.decrypt("{AES}Rx9/lKeFMhllwNMYXWtC+DryFL9zU3MypEPLNtJ+W4w=")
weblogic123

=========================================================================================
Issues Faced:
You may face below issue while decrypting passwords if you don’t remove backward slash symbol.

Error:
wls:/offline> print encryption.decrypt("{AES}Rx9/lKeFMhllwNMYXWtC+DryFL9zU3MypEPLNtJ+W4w\=")
Traceback (innermost last):
  File "<console>", line 1, in ?
        at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:144)
        at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:192)
        at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:99)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)

weblogic.security.internal.encryption.EncryptionServiceException: weblogic.security.internal.encryption.EncryptionServiceException: com.rsa.jsafe.JSAFE_InputException: Invalid input.

Resolution:
If you are facing above error, kindly delete backward slash symbols from the encrypted string and retry.
e.g. From {AES}Rx9/lKeFMhllwNMYXWtC+DryFL9zU3MypEPLNtJ+W4w\=
To {AES}Rx9/lKeFMhllwNMYXWtC+DryFL9zU3MypEPLNtJ+W4w=
번호 제목 날짜 조회 수
64 Tibero test sql문, SCHEMA_OBJECT_SAMPLE file 2023.10.25 9
63 Tibero 관리 3 2023.10.25 13
62 Red Hat Enterprise Linux Certification Matrix for Dell PowerEdge Servers file 2023.11.02 14
61 tibero 7 install for linux 2023.11.06 20
60 Tibero 관리 2 2023.10.25 23
59 wmic useraccount list brief 2021.04.01 28
58 Tibero 접속 및 관리 2023.10.25 49
57 weblogic admin 패스워드 변경 방법 2021.04.06 59
56 SSL, IPSEC 2017.11.01 99
55 DDos 공격대응 가이드 file 2017.08.25 105
» weblogic wlst 기반 암호화파일 복호화 (AES) 2021.04.06 110
53 Weblogic 보안설정 file 2017.08.25 111
52 디지털 컨텐츠 보호 2017.11.01 113
51 vsphere admin 문서 자료 file 2017.09.09 114
50 windows_2008_security_guide.pdf file 2017.08.25 116
49 winscp for windows file 2017.09.13 118
48 Ipsec for windows file 2017.08.23 126
47 DNS (Domain Name Service) file 2017.11.01 129
46 Ftp passive mode file 2017.08.24 132
45 시만텍 ssr 백업 file 2017.08.23 141
진주성 블로그 방문하기
CLOSE