My favorites | Sign in
Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 51: Specto stores passwords in plaintext
3 people starred this issue and may be notified of changes. Back to list
Status:  Verified
Owner:  woutclymans
Closed:  Aug 2008
Type-Defect
Priority-Critical
Security
Milestone-Release0.3


Sign in to add a comment
 
Reported by chalserogers, Mar 17, 2007
For the email watches, we currently store the passwords in plaintext in the
watches.list file.  At least we create this file with 600 permissions, but
ideally we wouldn't be storing this sensitive data in plain text. 

Since we're in Gnome, we should probably be storing these passwords in the
Gnome Keyring, where they get encrypted etc.
Comment 1 by nekohayo, Mar 17, 2007
Yeah, the reason why it was plaintext initially was because I remember the gaim guys
and their FAQ basically saying "encrypting that on your disk is useless, it's open
source and anything that is encrypted can be decrypted".

Though gnome keyring might be the solution to that. The downside I can see is that
Specto will ask you for permissions each time it checks/starts up, right?
Comment 2 by chalserogers, Mar 18, 2007
Correct.  However, pam-keyring can automatically open your Gnome keyring on login,
and people using NetworkManager *already* need to do the "ask for permission on
startup" bit.

Also, gnome-keyring will only ask you once per session, not once per session per app.
Comment 3 by chalserogers, Mar 18, 2007
Correct.  However, pam-keyring can automatically open your Gnome keyring on login,
and people using NetworkManager *already* need to do the "ask for permission on
startup" bit.

Also, gnome-keyring will only ask you once per session, not once per session per app.
Comment 4 by nekohayo, Jun 02, 2007
«people using NetworkManager *already* need to do the "ask for permission on
startup" bit.»

nope, only those who use some encrypted networks of some kind. My open wifi or wired
network does not ask for a password on login, thankfully.

The big problem I see is the incoming slew of users saying "gaaah, specto bugs me for
a password on startup!"; to which we could solve the problem by:
- giving the option of not remembering any passwords for security freaks
- giving the choice between saving everything in the keyring or in plaintext (with a
big warning)

If someone is willing to implement that, I guess I would not mind very much. Still,
you might want to read the insightful discussion here:
http://osnews.com/comment.php?news_id=17964
Comment 5 by nekohayo, Jun 15, 2007
Chris, IIRC, python's pickle module for storing info saves to some binary thingy,
wouldn't that be a useful replacement for the ini-style watches.list we currently
have, while at the same time obscuring passwords?
Comment 6 by nekohayo, Sep 29, 2007
Hmm. GNOME 2.20's keyring allows for the user to check a "always unlock this
particular keyring on startup" option. Maybe this would solve the problem? If yes,
anyone interested in integrating specto with gnome keyring?
Comment 7 by woutclymans, Jan 11, 2008
In my dev branch the passwords are stored using the base64 module.
This is not a 100% safe but now the password is not saved in plaintext anymore!
We could also add gnome keyring support but for the moment specto can also be used
using only the command line and this would require you to install gnomelibs...
Status: Started
Owner: woutclymans
Labels: DevBranch-Wout
Comment 8 by chalserogers, Jan 13, 2008
If someone wants to add (optional?) gnome-keyring support, there's a pythonic
gnome-keyring library as a part of the AWN project:

http://wiki.awn-project.org/index.php?title=AWNLib#AWNLib_Keyring_Object
Comment 9 by nekohayo, Feb 03, 2008
There is a regression in Wout's branch. The password encoding messes up with certain
passwords. Maybe that would be a point in favor of using gnome keyring.
Comment 10 by woutclymans, Feb 04, 2008
The errors are not password specific.
They happen when you import old watches that were not yet encoded.
Encoding these passwords on import should fix the problem.

I really don't like to use gnome-keyring because it would create a huge depency (and
a graphical interface) depency.
Later i will implement it as an option but it is not on my to-do-fast list :)
Comment 11 by woutclymans, Feb 10, 2008
Your watch importing problem is fixed in my branch!
Comment 12 by nekohayo, Mar 15, 2008
I have doubts on marking this as fixed, because the issue remains to me that encoding
our passwords in base 64 kind of seems like a joke (false sense of security and all
that)... Don't quite know what to do with this one.
Comment 13 by thibaut.bethune, Mar 16, 2008
Concerning comment 6 : i may have read a warning concerning systems with autologon :
they don't have that "unlock this particular keyring on startup" option" thing 
i'm not sure
Comment 14 by jeffschroed, Mar 17, 2008
base64 is encoding and not encryption. NOT COOL.

History has proven that weak encoding will always be broken. I am saying encoding
because base64 is not encryption nor is binary abstraction. If you can reverse the
passwords in the specto source code, so can an attacker.

To properly solve this issue, using a real encryption algorithm is the only sane
solution. Anything else is neglecting your users and giving them a false sense of
security.

You have 2 real solutions to this:
 - Re-implement a wrapper to gpg or an encryption algorithm like aes. Maybe use the
openssl libraries directly? Copy and paste code from revelation.
 - Be a good gnome tool and use gnome-keyring. Just like every other gnome app out there.


Comment 15 by jeffschroed, Mar 17, 2008
Also, what if the algorithm you eventually choose is broken? Say some brilliant math
genius finds a collision in the pgp algorithm? What do you do then? You get another
great review on linux.com that talks about this horrible security problem at the end
of the article.

Or...

You use an abstraction layer such as gnome-keyring. You flip a small bit and change
the algorithm specto (or all of gnome-keyring is using) and this issue wouldn't matter.

Take a look at this page for a quick example:
http://www.rittau.org/blog/20070726-01
Comment 16 by nekohayo, Mar 21, 2008
The current implementation (encoding) is, in my opinion, worse than no implementation
at all. Either we use gnome-keyring or we use nothing, but this needs to be fixed for
0.3 I would think.
Labels: -Priority-Medium Priority-Critical Milestone-Release0.3
Comment 17 by nekohayo, Mar 21, 2008
for reference, attaching a discussion we had regarding gnome-keyring. Some
implementation details (the logic that specto should use, in pseude-code maybe) would
be welcome.
2008 03 21 gnome keyring debate.log
5.3 KB Download
Comment 18 by nekohayo, Apr 12, 2008
For what it's worth, someone provided a patch for gnome-keyring support for another
python application (Conduit)

http://mail.gnome.org/archives/conduit-list/2008-April/msg00015.html
Comment 19 by morningovermidnight, Jun 18, 2008
Looking forward to specto no longer storing passwords in plain-text!
Comment 20 by nekohayo, Jun 19, 2008
actually, Wout told me that specto can (and should) use the keyring by default in his
bazaar branch since a few revisions. Have not had the time to test this myself
though, so if someone here would like to do so, it would be much appreciated :)
Comment 21 by nekohayo, Aug 08, 2008
Tested, and it works. I updated all my watches so that it saves the passwords in the
keyring, and Specto only asks for my keyring password on startup. 

Anyone would be welcome to do a security audit on the bazaar branch (bzr branch
lp:specto) though.
Status: Fixed
Labels: -DevBranch-Wout
Comment 22 by nekohayo, Oct 04, 2008
(No comment was entered for this change.)
Status: Verified
Sign in to add a comment

Hosted by Google Code