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!

Security Loophole

New installs of XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
gmoy8888
NewUser
NewUser
Posts: 7
Joined: 30 Apr 2014 23:11
Status: Offline

Security Loophole

Post by gmoy8888 »

I just installed NAS4Free and wanted to integrate it with my Windows Active Directory for authentication. The NAS4Free AD setup required my domain administrator password. I was reluctant to type it in because I wasn't sure what NAS4Free would do with the password (and whether it would be kept safe). Unfortunately, I was shocked and deeply disappointed when I found my password in plain text in NAS4Free's config.xml file under /conf. Moreover, all passwords (admin, local users, etc.) are stored in the clear in this file as well.

kenZ71
Advanced User
Advanced User
Posts: 379
Joined: 27 Jun 2012 20:18
Location: Northeast, USA
Status: Offline

Re: Security Loophole

Post by kenZ71 »

While the above is true the only way you can view these after logging in with the admin account.
11.2-RELEASE-p3 | ZFS Mirror - 2 x 8TB WD Red | 28GB ECC Ram
HP ML10v2 x64-embedded on Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz

Extra memory so I can host a couple VMs
1) Unifi Controller on Ubuntu
2) Librenms on Ubuntu

gmoy8888
NewUser
NewUser
Posts: 7
Joined: 30 Apr 2014 23:11
Status: Offline

Re: Security Loophole

Post by gmoy8888 »

I don't need the admin login. I can easily mount the disk partition on another OS installation and read the config.xml file.

armandh
Advanced User
Advanced User
Posts: 398
Joined: 23 Jun 2012 04:15
Location: St Louis County Missouri USA
Status: Offline

Re: Security Loophole

Post by armandh »

hardware access required

as with any security once there is hardware access all bets are off
but it might be nice to employ internally mounted flash to avoid a walk by grab of the config.
4 thread 3300 Mhz Intel i3, 1 TB ZFS mirror, available RAM 7.823 Gb, 64 bit NAS4Free 9.1.0.1 rev 573 [88 watts, 48 Mbps]
2 thread 1600 Mhz atom/ion, 1 TB ZFS mirror, available RAM 3.083 Gb, 64 bit NAS4Free-9.1.0.1 rev 573 [27 watts, 35 Mbps]
2 thread 3900 Mhz AMD A6-6400K, 2 TB ZFS Mirror, available RAM 7.557 Gb, 64 bit Nas4Free 9.3.0.2.1771 [89 watts, 68 Mbps]

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2438
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by b0ssman »

i can also use this 5 dollar wrech to hit you over the head with until you tell me the password.

http://xkcd.com/538/
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

User avatar
apollo567
Site Admin
Site Admin
Posts: 675
Joined: 23 Jun 2012 06:37
Location: Ludwigshafen, Germany
Status: Offline

Re: Security Loophole

Post by apollo567 »

b0ssman wrote:i can also use this 5 dollar wrech to hit you over the head with until you tell me the password.

http://xkcd.com/538/

lol - well this it works always.

The open question left is, can the config.xml file be accessed from network/internet or not. Only a way which allows this can be considered a security loophole where the developers would have to think about.
Hardware access is something N4F can't grant protection against .
my NAS and its development until today: viewtopic.php?f=63&t=39&sid=039fed830cf ... 4d0abe4a04

gmoy8888
NewUser
NewUser
Posts: 7
Joined: 30 Apr 2014 23:11
Status: Offline

Re: Security Loophole

Post by gmoy8888 »

I really can't think of any other current operating system which stores all account passwords in clear text without warning and without an option for encryption. Particularly alarming is that NAS4Free considers this the proper way to handle the domain administrator password.

For half the price of a $5 wrench, we can get a knife and take someone's wallet, car keys, ATM PIN, etc.

User avatar
apollo567
Site Admin
Site Admin
Posts: 675
Joined: 23 Jun 2012 06:37
Location: Ludwigshafen, Germany
Status: Offline

Re: Security Loophole

Post by apollo567 »

gmoy8888 wrote:I really can't think of any other current operating system which stores all account passwords in clear text without warning and without an option for encryption. Particularly alarming is that NAS4Free considers this the proper way to handle the domain administrator password.

For half the price of a $5 wrench, we can get a knife and take someone's wallet, car keys, ATM PIN, etc.
Well, N4F is a 'special purpose' OS stripped from many not needed Parts of FreeBSD to peform one specific taks : operating an NAS.
So the question is really, is there loophole in the software which allows an attacker to access this file without permission, if you leave away the danger/possibility of physical access....
my NAS and its development until today: viewtopic.php?f=63&t=39&sid=039fed830cf ... 4d0abe4a04

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by crowi »

@b0ssman LOL :)
I really can't think of any other current operating system which stores all account passwords in clear text
Ohhh, I can think of some of them
Boot any windows machine with e.g. HBCD and you can change the passwords.
Boot any windows machine with syslinux or a LiveLinux and and you have full access to any data stored on the machine.
Although probably not clear text password stored, you even don't need the wrench to get access ;)
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2438
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by b0ssman »

yes with physical access to the machine you can do anything.

change the windows password from linux :)
http://www.howtogeek.com/howto/windows- ... rescue-cd/
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by crowi »

So, back to the security loophole:

I am not happy with clear text passwords, but a sysadmin of a N4F machine, creates the shares, the users and the groups anyway and knows the passwords. The config file shouldn't be accessible for standard users and thus a copy of it shouldn't be stored on a public share, of course.
In an office environment, the server should also be placed in a locked rack anyway, which again should be placed in a locked server room.
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

gmoy8888
NewUser
NewUser
Posts: 7
Joined: 30 Apr 2014 23:11
Status: Offline

Re: Security Loophole

Post by gmoy8888 »

Boot any windows machine with e.g. HBCD and you can change the passwords.
Boot any windows machine with syslinux or a LiveLinux and and you have full access to any data stored on the machine.
None of the scenarios mentioned here allows you to either get the original password or change it to a password of your choosing. You can change or destroy the password's one-way hash which prevents the user from logging in again -- that's all.

A not-so-far-fetched security breach is when a janitor (or someone pretending as one) walks into my office, plugs in his USB flash drive, boots into his OS, and gets my company's domain admin login. In less than 20 seconds, he gets full access to everything without anyone even noticing.

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by crowi »

Only if he boots your server which really should be locked or if you stored the config file on your own pc.

Gesendet von meinem HUAWEI Y300-0100 mit Tapatalk
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

gmoy8888
NewUser
NewUser
Posts: 7
Joined: 30 Apr 2014 23:11
Status: Offline

Re: Security Loophole

Post by gmoy8888 »

The government, for one, would not be satisfied with just physical access restrictions. We are contractually obligated to protect data breach even when physical access is compromised. Furthermore, some of our servers are hosted remotely with third parties. We are also planning cloud-based VM installations. These are scenarios in which we don't have control over the physical servers and can't trust who might gain access.

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by crowi »

But then you should think of a real enterprise system and not be using n4f. :)


Gesendet von meinem HUAWEI Y300-0100 mit Tapatalk
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

gmoy8888
NewUser
NewUser
Posts: 7
Joined: 30 Apr 2014 23:11
Status: Offline

Re: Security Loophole

Post by gmoy8888 »

Here's a solution I've implemented and begun testing. The steps basically involve the following:
  • 1. Create a full installation of NAS4Free on HDD.
    2. Encrypt the data partition of the installation with GELI.
    3. Copy all files from the installation partition to the encrypted data partition.
    4. Change fstab to mount the newly-created encrypted partition as root paritition.
    5. Change /boot/loader.conf.local to load the GELI driver into kernel and to request encryption passphrase at boot time.
Here's the tutorial I found useful: https://forums.freebsd.org/viewtopic.php?&t=19082

gmoy8888
NewUser
NewUser
Posts: 7
Joined: 30 Apr 2014 23:11
Status: Offline

Re: Security Loophole

Post by gmoy8888 »

crowi wrote:But then you should think of a real enterprise system and not be using n4f. :)
This is what I read straight from n4f's home page http://www.nas4free.org/. I guessed I believed the hype :D
Your customized NAS4Free solution will likely be cheaper, more powerful, and more custom fit to your needs than many commercial NAS boxes.
I don't mean to be 100% critical. It's a solution that can work for me after manually converting the root partition with encryption as I mentioned in my previous post.

BrickedBox
NewUser
NewUser
Posts: 7
Joined: 19 Apr 2014 02:39
Status: Offline

Re: Security Loophole

Post by BrickedBox »

gmoy8888 wrote:I don't need the admin login. I can easily mount the disk partition on another OS installation and read the config.xml file.
Or worse, as I do, save the backup-config files to a folder on the windows laptop I use. The admin password is in plain text and a notepad search for "admin" reveals it in a second. Do a Windows Explorer search including file contents and find it anywhere on the drive.

The saving grace for me at least, is that the drive I save that stuff to is encrypted so only I can see the plain text, but it is a bit amateurish to store ANY password in pain text at ANY time.

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by crowi »

This is what I read straight from n4f's home page http://www.nas4free.org/. I guessed I believed the hype :D
The statement is true but I and many others see n4f on SOHO level in comparison to these QNAP, Synology and Buffalo NAS boxes, not as big data and upper enterprise solution.
Here I would switch to HP, SGI, LSI or other big storage systems where you also have warranty and real support.
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

pirateincognito
NewUser
NewUser
Posts: 1
Joined: 02 May 2014 00:23
Status: Offline

Re: Security Loophole

Post by pirateincognito »

I find this highly disturbing. With all the recent events of the NSA/Edward Snowden, heartbleed etc etc. I feel that computer security is more important than ever.

How hard would it be to change the implementation of this function of nas4free to use hashed passwords or something else that isn't plaintext.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2438
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by b0ssman »

pirateincognito wrote:I find this highly disturbing. With all the recent events of the NSA/Edward Snowden, heartbleed etc etc. I feel that computer security is more important than ever.

How hard would it be to change the implementation of this function of nas4free to use hashed passwords or something else that isn't plaintext.
the problem here for example is that the accounts for samba and unix use different password algorythms.

it would be possible but you would have to write the entire routine that handles passwords again for nas4free.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by crowi »

I just checked, at FreeNAS they had the same problem and it took 2 years to solve it:
It's quite interesting to read: https://bugs.freenas.org/issues/1403

- first they postponed the problem,
- then there was a statement "Looks like we can't get this fix for 9.2.0 - it's a complex issue. We agree that it's a problem (security concern) but the fix is "hard"
- then the status was moved from 'bug' to 'feature' :)
- and now they deployed a solution
"The ability to join Active Directory without saving the Administrator password in the database now exists via 46ae467cbff9409f55dd4167b87a7808d196d9ef. Keep in mind that you can still use Administrator username/password if you choose. If not, you can use a kerberos keytab and a less privileged account for performing the LDAP queries that are necessary (but the password still remains in the database). I consider this acceptable and am marking this ticket as resolved."
https://bugs.freenas.org/projects/freen ... 08d196d9ef
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

Dread
Starter
Starter
Posts: 15
Joined: 31 Dec 2013 11:04
Status: Offline

Re: Security Loophole

Post by Dread »

In this case we're dealing with XML config files, not AD. They fixed the AD issue, but if the config file is compromised the attacker still gets a root access.

Why not use a hash of the password in the config file ? Whenever the user is prompted for the root/admin password, the input in hashed with the appropriate algorithm and if the hash equals to the one stored in the XML file, access is granted. I believe that's pretty easy to implement (some parsing, etc.).

chris.shelton
Starter
Starter
Posts: 36
Joined: 08 May 2015 12:01
Status: Offline

Re: Security Loophole

Post by chris.shelton »

Has there been any progress made on this?

Is there a way around storing the user passwords in plain text in the config.xml file?

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2438
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: Security Loophole

Post by b0ssman »

yes the config can now be encrypted when you safe it.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

chris.shelton
Starter
Starter
Posts: 36
Joined: 08 May 2015 12:01
Status: Offline

Re: Security Loophole

Post by chris.shelton »

b0ssman wrote:yes the config can now be encrypted when you safe it.
But that doesn't get around that fact that the passwords are stored in plain text in NAS4Free.

Is there any way to have them permanently not in plain text?

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

Re: Security Loophole

Post by daoyama »

Dread wrote:Why not use a hash of the password in the config file ?
It's simply reason.
We cannot re-create samba password without plain password.
Other password should convert to hash.
Also system(ssh and other) and samba don't not use same hash.
(filemanager used other hash in 9.3 but 10.x was changed to same hash of system)
If all hashed, you must have multiple user and hash in config.
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

chris.shelton
Starter
Starter
Posts: 36
Joined: 08 May 2015 12:01
Status: Offline

Re: Security Loophole

Post by chris.shelton »

daoyama wrote:
Dread wrote:Why not use a hash of the password in the config file ?
It's simply reason.
We cannot re-create samba password without plain password.
Other password should convert to hash.
Also system(ssh and other) and samba don't not use same hash.
(filemanager used other hash in 9.3 but 10.x was changed to same hash of system)
If all hashed, you must have multiple user and hash in config.
So, how come FreeNAS doesn't suffer from this problem?

Post Reply

Return to “Install XigmaNAS”