Encode passwords with a more secure mechanism

Description

Spark is using a hardcoded key (accessible with source code on GitHub in src/java/org/jivesoftware/spark/util/Encryptor.java) to encrypt passwords saved in spark.properties, thus making them easy to decrypt. Though an attacker has to gain access to the victim's system to gain access to this file first.

Additional disclosure links:
http://adamcaudill.com/2012/07/27/decrypting-spark-saved-passwords/
https://www.pentestgeek.com/2012/12/26/recover-spark-im-stored-passwords-with-metasploit/

Environment

None

Activity

Show:

Paweł Ścibiorski November 17, 2017 at 1:14 PM
Edited

For windows maybe this could be used https://github.com/foundeo/jdpapi64, it's wrapper around Windows Data Protection Api, for Mac perhaps Keychain can be used and for Linux it seems to be more complicated and I doesn't see good solution yet.

wroot August 20, 2016 at 2:18 PM

So when you move your profile to another PC it won't recognize passwords. Well, maybe not a huge problem if you remember all the passwords Anyway, something has to come up with a patch to do such encryption. Maybe some existing library or API can be used for this (Apache licensed).

speedy August 20, 2016 at 12:29 PM

My concern is when using LDAP/AD without GSSAPI, as network credentials could be exposed. Guus stated the same about the key still needing to be stored on the computer, but there has to be a way to make things a little more secure. perhaps using the a unique hardware identifier as the key (sn,uuid,mac address) or some other way of obfuscation.

wroot August 20, 2016 at 8:13 AM

If Spark would switch to using some random key for encryption, it would still have to store that key on the system. So if someone would get an access to that system, he would still be able to access the key and decrypt the passwords.

The only secure solution would be for Spark to use some key, stored somewhere in the ignitrealtime.org infrastructure, so it won't be publicly known, but that seems like an overkill for a simple IM application.

Details

Priority

Assignee

Reporter

Affects versions

Ignite Forum URL

Created March 29, 2015 at 5:38 PM
Updated October 28, 2020 at 1:44 PM