How to decrypt user_password field in sys_user table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 10:33 PM
The password in sys_user table is encrypted by base64 seemingly. I tried to use below script to decrypt it but still fails.
It prints out encrypted password. Anyone has any idea to decrypt the password correctly?
+++++++++++++
var gr = new GlideRecord("sys_user");
gr.get("<sys_id>");
var Encrypter = new GlideEncrypter();
var decryptedStringAsBase64 = Encrypter.decrypt(gr.user_password);
gs.log("Decoded string is " + decryptedStringAsBase64);
+++++++++++++
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 11:12 PM
Hi Henry,
If you are trying to decrypt the 'user_password' field in 'sys_user' table then the script won't work because the field is of type 'password (1 way encrypted)'
Please note, only 'password2' field types can be decrypted
-Udhay
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 11:13 PM
Henry,
The user_password field on sys_user table is a Password (1 way encrypted) type which means you can't decrypt it.
See here:
Password (1 Way Encrypted)
Text field that stores passwords with one-way encryption. One-way encryption stores the password as a secure hash value that cannot be decrypted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 11:51 PM
Henry Cheng wrote:
The password in sys_user table is encrypted by base64 seemingly.
Incorrect - it may be stored as base64, but base64 isn't an encryption algorithm, but an encoding one.
As others have said, for good security one-way encryption is used - finding the unencrypted version involves dictionary attacks.