This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Plaintext passwords

Posts only related to Release Builds, all others will be removed!
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
gperks
NewUser
NewUser
Posts: 13
Joined: 13 May 2015 22:49
Contact:
Status: Offline

Plaintext passwords

Post by gperks »

If one looks at config.xml, one will find all your passwords in plaintext!

su
grep password /conf/config.xml

While you do need root access for this, I believe this file is stored on the boot drive. Which for many, is a USB stick I could easily snatch for a few minutes and examine on another machine.

This is a risk people should be aware of.

I can't think of a good solution for this besides not storing the passwords at all. What would be the impact of that?

Onichan
Advanced User
Advanced User
Posts: 238
Joined: 04 Jul 2012 21:41
Status: Offline

Re: Plaintext passwords

Post by Onichan »

The real solution would be storing a salt and hash and not just a single round hash as that's too weak nowadays as well. Would need to either use bcrypt or at least a few hundred thousand rounds of sha hashes with a salt.

Anyways if somebody has unauthorized physical access to your NAS then that's the bigger problem.

gperks
NewUser
NewUser
Posts: 13
Joined: 13 May 2015 22:49
Contact:
Status: Offline

Re: Plaintext passwords

Post by gperks »

Thanks Onichan.

I disagree anout hashes being a solution. Presumably the NAS4Free scripts need access to your various passwords for a reason (updating the system upon Apply Changes?). A hash is innappropriate here - those are for verifying passwords. The whole point of a hash is that you can't get back to the password itself.

Improved security would remove the passwords from the config.xml and require the admin to enter the password when applying changes. Alternatively one could encrypt the passwords in config.xml but then you need yet another password to decrypt!

Onichan
Advanced User
Advanced User
Posts: 238
Joined: 04 Jul 2012 21:41
Status: Offline

Re: Plaintext passwords

Post by Onichan »

Keeping a hash is standard practice for anything with decent security. You don't need to keep the password in plaintext or even reversible encryption for most things.

To authenticate a user using a hash, the user enters their password and the system hashes it, then it compares the new hash to the stored one. If they match then it's the correct password, pretty simple.

If you remove the passwords from the config.xml where would you store them? They must exist somewhere and having them in the backup is good so you don't have to re-enter all user passwords again when restoring.

gperks
NewUser
NewUser
Posts: 13
Joined: 13 May 2015 22:49
Contact:
Status: Offline

Re: Plaintext passwords

Post by gperks »

I fully agree with you on how hashes are used. However config.xml is not the place for a hash since what NAS4Free needs is the password itself, not a 1-way hash.

My question was, what does NAS4Free need the passwords for? Your answer, so they don't have to be re-entered upon restore. What kind of password policy avoids users having to type them in?!

Unix, a long time ago, stored plaintext passwords in /etc/password, because only root could read that file. But even by 1979 they realized what a bad idea that was, see http://www.cs.yale.edu/homes/arvind/cs4 ... ix-sec.pdf.

This is a balance between security and convenience. My belief is that storing plaintext passwords is too far towards convenience.

Does NAS4Free itself need to know these passwords in order to operate, or does running as root give it all the access it needs?

User avatar
daoyama
Developer
Developer
Posts: 394
Joined: 25 Aug 2012 09:28
Location: Japan
Status: Offline

Re: Plaintext passwords

Post by daoyama »

For short test, it's very hard to store hash in config.xml.
samba use NTLM hash which can be stored in passdb.tdb by smbpasswd or pdbedit from plain text only.
At least, you cannot use any user/password for samba (windows share) if store hashed password.
NAS4Free 10.2.0.2.2115 (x64-embedded), 10.2.0.2.2258 (arm), 10.2.0.2.2258(dom0)
GIGABYTE 5YASV-RH, Celeron E3400 (Dual 2.6GHz), ECC 8GB, Intel ET/CT/82566DM (on-board), ZFS mirror (2TBx2)
ASRock E350M1/USB3, 16GB, Realtek 8111E (on-board), ZFS mirror (2TBx2)
MSI MS-9666, Core i7-860(Quad 2.8GHz/HT), 32GB, Mellanox ConnectX-2 EN/Intel 82578DM (on-board), ZFS mirror (3TBx2+L2ARC/ZIL:SSD128GB)
Develop/test environment:
VirtualBox 512MB VM, ESXi 512MB-8GB VM, Raspberry Pi, Pi2, ODROID-C1

Post Reply

Return to “Release Builds”