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!
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!
Shellshock vulnerability
-
wimr
- NewUser

- Posts: 1
- Joined: 25 Sep 2014 11:29
- Status: Offline
Shellshock vulnerability
I tested bash in NAS4Free and it is vulnerable for Shellshock. Can you give an update on when we can expect a patch for this serious issue?
-
ku-gew
- Advanced User

- Posts: 172
- Joined: 29 Nov 2012 09:02
- Location: Den Haag, The Netherlands
- Status: Offline
Re: Shellshock vulnerability
Well first there has to be a patch in bash itself, then you can have a patch in NAS4free.
I really hope the patch to N4F will come quickly after the bash patch.
I really hope the patch to N4F will come quickly after the bash patch.
HP Microserver N40L, 8 GB ECC, 2x 3TB WD Red, 2x 4TB WD Red
XigmaNAS stable branch, always latest version
SMB, rsync
XigmaNAS stable branch, always latest version
SMB, rsync
-
mekonghigh
- Starter

- Posts: 39
- Joined: 13 Oct 2013 18:03
- Status: Offline
Re: Shellshock vulnerability
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
Code: Select all
nas4free ~/ root~$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
nas4free ~/ root~$ -
Martino
- NewUser

- Posts: 4
- Joined: 05 May 2013 23:46
- Location: Vercelli, Italy
- Status: Offline
Re: Shellshock vulnerability
I suppose that this kind of test has not be executed with root privileges...
- zambogiulio
- experienced User

- Posts: 82
- Joined: 15 Sep 2012 22:36
- Status: Offline
Re: Shellshock vulnerability
We did it without root privileges but the respons is the same. Who have a solution help us, please!
-
kenZ71
- Advanced User

- Posts: 379
- Joined: 27 Jun 2012 20:18
- Location: Northeast, USA
- Status: Offline
Re: Shellshock vulnerability
I saw one comment on stackoverflow that suggested a symbolic link from sh to ksh since korn shell don't support symbolic links.
I think I am going to let this be as is for another 24 hours then see what the people smarter than me have come up with. I am smart enough to know there are many way smarter than I
I think I am going to let this be as is for another 24 hours then see what the people smarter than me have come up with. I am smart enough to know there are many way smarter than I
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
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
- MikeMac
- Forum Moderator

- Posts: 429
- Joined: 07 Oct 2012 23:12
- Location: Moscow, Russia
- Contact:
- Status: Offline
Re: Shellshock vulnerability
I have compiled patched bash at chroot, see https://translate.google.ru/translate?s ... edit-text=
(and blog4avatar did the same in jail)
But I could not transfer patched bash to host system - see comment https://translate.googleusercontent.com ... w#t1337680
(and blog4avatar did the same in jail)
But I could not transfer patched bash to host system - see comment https://translate.googleusercontent.com ... w#t1337680
-
maxpower
- NewUser

- Posts: 3
- Joined: 22 Sep 2014 05:16
- Status: Offline
Re: Shellshock vulnerability
I don't know much of anything compared to most on this board. From what I've read though, to exploit "shellshock" through SSH, it would have to be from an authenticated user (so far as we know), correct? As a follow-up to that: if your authenticated users are given "SCP only" login for example, can they get to bash to use the vulnerability? If you're running a webserver of course it's much more dire. Apologies if these are dumb questions, I'm a n00b.
-
kenZ71
- Advanced User

- Posts: 379
- Joined: 27 Jun 2012 20:18
- Location: Northeast, USA
- Status: Offline
Re: Shellshock vulnerability
Actually this sounds like a great idea. Since this bug is limited to bash set all user accounts to use ksh instead.maxpower wrote:I don't know much of anything compared to most on this board. From what I've read though, to exploit "shellshock" through SSH, it would have to be from an authenticated user (so far as we know), correct? As a follow-up to that: if your authenticated users are given "SCP only" login for example, can they get to bash to use the vulnerability? If you're running a webserver of course it's much more dire. Apologies if these are dumb questions, I'm a n00b.
Not a perfect fix but better than nothing.
Also, unless you get malware on your machine not much chance of infection. Of course torrents could have malware or other bad stuff.
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
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
- ava1ar
- NewUser

- Posts: 3
- Joined: 18 Apr 2014 08:16
- Location: New York City, USA
- Status: Offline
Re: Shellshock vulnerability
MiceMac, thanks for sharing! I will copy my instruction here in English for those who are interested.
Part 1 - building new bash inside jail
1) Create new full jail в TheBrig. Do not forget to select
FreeBSD-amd64-9.2-RELEASE-src.txz to work with ports tree.
Start jail after creation.
2) Enter newly created jail:
jexec <jail_id> $SHELL
3) Update ports tree:
portsnap fetch
portsnap extract
4) Configure pkg:
rm /usr/local/etc/pkg.conf
mkdir -p /usr/local/etc/pkg/repos/
Create file /usr/local/etc/pkg/repos/FreeBSD.conf with content:
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
mkdir -p /usr/share/keys/pkg/trusted/
Create file /usr/share/keys/pkg/trusted/pkg.freebsd.org with content:
function: "sha256"
fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"
5) Build new bash (may take a while, since dependencies are also being built (i.e. perl).
Use all default options when asked:
cd /usr/ports/shells/bash
make install clean
Check bash version:
/usr/local/bin/bash --version
At the monent of writing, it is 4.3.27(0)-release
6) Exit jail and shut it down
Part 2 - replace system bash with new one
1) Create a temporary folder somewhere inside the pool:
mkdir /mnt/data/tmp
2) Copy system image to this folder and unpack it:
cp /cf/mfsroot.gz /mnt/data/tmp/
cd /mnt/data/tmp/
gzip -d ./mfsroot.gz
3) Mount the unpacked image:
mdconfig -a -t vnode -f ./mfsroot -u 2
mkdir md
mount /dev/md2 ./md
4) Replace bash binary inside mounted image. Be sure to replace file inside /usr/local/bin,
since /bin folder holds just symlink to the bash, not the binary itself:
cp /mnt/data/jail/dev/usr/local/bin/bash ./md/usr/local/bin/
5) Unmount updated image and pack it:
umount ./md
mdconfig -d -u md2
gzip -9 ./mfsroot
6) Replace packed image on usb flash, remounting card as read-write:
mount -uw /cf
rm /cf/mfsroot.gz
mv ./mfsroot.gz /cf
mount -ur /cf
7) Remove temporary directory and reboot the system
rm -rf /mnt/data/tmp/
reboot
8) Check the bash version after reboot
bash --version
Should get 4.3.27(0)-release
9) Done!
Please, be sure to make a backup before doing this and check yourself you are understanding what is happening here. If you are not sure, better wait for official build, otherwise you may break your system.
Part 1 - building new bash inside jail
1) Create new full jail в TheBrig. Do not forget to select
FreeBSD-amd64-9.2-RELEASE-src.txz to work with ports tree.
Start jail after creation.
2) Enter newly created jail:
jexec <jail_id> $SHELL
3) Update ports tree:
portsnap fetch
portsnap extract
4) Configure pkg:
rm /usr/local/etc/pkg.conf
mkdir -p /usr/local/etc/pkg/repos/
Create file /usr/local/etc/pkg/repos/FreeBSD.conf with content:
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
mkdir -p /usr/share/keys/pkg/trusted/
Create file /usr/share/keys/pkg/trusted/pkg.freebsd.org with content:
function: "sha256"
fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"
5) Build new bash (may take a while, since dependencies are also being built (i.e. perl).
Use all default options when asked:
cd /usr/ports/shells/bash
make install clean
Check bash version:
/usr/local/bin/bash --version
At the monent of writing, it is 4.3.27(0)-release
6) Exit jail and shut it down
Part 2 - replace system bash with new one
1) Create a temporary folder somewhere inside the pool:
mkdir /mnt/data/tmp
2) Copy system image to this folder and unpack it:
cp /cf/mfsroot.gz /mnt/data/tmp/
cd /mnt/data/tmp/
gzip -d ./mfsroot.gz
3) Mount the unpacked image:
mdconfig -a -t vnode -f ./mfsroot -u 2
mkdir md
mount /dev/md2 ./md
4) Replace bash binary inside mounted image. Be sure to replace file inside /usr/local/bin,
since /bin folder holds just symlink to the bash, not the binary itself:
cp /mnt/data/jail/dev/usr/local/bin/bash ./md/usr/local/bin/
5) Unmount updated image and pack it:
umount ./md
mdconfig -d -u md2
gzip -9 ./mfsroot
6) Replace packed image on usb flash, remounting card as read-write:
mount -uw /cf
rm /cf/mfsroot.gz
mv ./mfsroot.gz /cf
mount -ur /cf
7) Remove temporary directory and reboot the system
rm -rf /mnt/data/tmp/
reboot
8) Check the bash version after reboot
bash --version
Should get 4.3.27(0)-release
9) Done!
Please, be sure to make a backup before doing this and check yourself you are understanding what is happening here. If you are not sure, better wait for official build, otherwise you may break your system.
NAS: NAS4Free 9.2.0.1 - Shigawire (revision 972) x64 embedded
HP MicroServer N40L: RAID-Z1 on 5xWD20EFRX 2Tb (Red series), KVR1333D3E9SK2/16G, HP NC360T Dual Port Gigabit Ethernet Card (with LAGG on), HP MicroServer Remote Access Card
HP MicroServer N40L: RAID-Z1 on 5xWD20EFRX 2Tb (Red series), KVR1333D3E9SK2/16G, HP NC360T Dual Port Gigabit Ethernet Card (with LAGG on), HP MicroServer Remote Access Card
-
Martino
- NewUser

- Posts: 4
- Joined: 05 May 2013 23:46
- Location: Vercelli, Italy
- Status: Offline
Re: Shellshock vulnerability
Point is: bash is vulnerable, nothing to do.
BUT is there a chance that someone WITHOUT ACCESS to the shell or to the webgui can hack into the system?
My system is behind a router, only port 80 (for webgui with https), transmission and another one for SSH (not the traditional one) are available outside.
No webserver, no root ssh access.
Assuming that my passwords are safe, is there any real threat? I highly doubt that.
BUT is there a chance that someone WITHOUT ACCESS to the shell or to the webgui can hack into the system?
My system is behind a router, only port 80 (for webgui with https), transmission and another one for SSH (not the traditional one) are available outside.
No webserver, no root ssh access.
Assuming that my passwords are safe, is there any real threat? I highly doubt that.
- b0ssman
- Forum Moderator

- Posts: 2438
- Joined: 14 Feb 2013 08:34
- Location: Munich, Germany
- Status: Offline
Re: Shellshock vulnerability
i am confused. you say port 80 is available outside.
but then go on to say no webserver. the webgui is a webserver.
but then go on to say no webserver. the webgui is a webserver.
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.
-
maxpower
- NewUser

- Posts: 3
- Joined: 22 Sep 2014 05:16
- Status: Offline
Re: Shellshock vulnerability
I think I follow, but I'm completely ignorant on how the webgui works. Does it use CGI scripts? I think if the answer is no, you have nothing to worry about.b0ssman wrote:i am confused. you say port 80 is available outside.
but then go on to say no webserver. the webgui is a webserver.
- b0ssman
- Forum Moderator

- Posts: 2438
- Joined: 14 Feb 2013 08:34
- Location: Munich, Germany
- Status: Offline
Re: Shellshock vulnerability
I would strongly suggest to disable the access to the web gui. If you need remote access to the web use ssh port forwarding.
Also for security I would strongly suggest disabling ssh password authentication and use public private key authentication. You would not believe the amount of brute force attacks you get on open ports.
Sent from my iPhone using Tapatalk
Also for security I would strongly suggest disabling ssh password authentication and use public private key authentication. You would not believe the amount of brute force attacks you get on open ports.
Sent from my iPhone using Tapatalk
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.
-
fumantsu
- Starter

- Posts: 69
- Joined: 04 Mar 2014 12:15
- Location: Athens->Brno
- Status: Offline
Re: Shellshock vulnerability
Well I tried this way (not difficult, needs only backup and pay attention) but the updated mfsroot.gz is little bigger that the old one, enough not to be able to be copied back to /cf. Any advice?ava1ar wrote:MiceMac, thanks for sharing! I will copy my instruction here in English for those who are interested.
.
.
.
Please, be sure to make a backup before doing this and check yourself you are understanding what is happening here. If you are not sure, better wait for official build, otherwise you may break your system.
EDIT:
for some reason with cp and not mv it worked.
Fractal Node 304, Avoton C2550 Quad-Core Processor, 8GB RAM ECC, 4 x 4TB WD RED in mirrors , NAS4Free 9.2.0.1 build 972
-
Martino
- NewUser

- Posts: 4
- Joined: 05 May 2013 23:46
- Location: Vercelli, Italy
- Status: Offline
Re: Shellshock vulnerability
Good point, problem is that I can not establish a direct connection to that port when I'm at work (our firewall filters everything except 80 and 443 as far as I know), my only precaution is forcing https on port 80.b0ssman wrote:I would strongly suggest to disable the access to the web gui. If you need remote access to the web use ssh port forwarding.
BUT: with only access to the webgui login screen you can exploit the bug?
True, anyway they have to "guess" port, username and password (a complex one) to get in, and then guess the root password; I've not seen any login attempt since I've changed the port.b0ssman wrote:Also for security I would strongly suggest disabling ssh password authentication and use public private key authentication. You would not believe the amount of brute force attacks you get on open ports.
- F8BOE
- experienced User

- Posts: 106
- Joined: 03 Jun 2013 23:09
- Location: France
- Status: Offline
Re: Shellshock vulnerability
Hello,
Yes Sir! You can exploit it through the "Advanced | Command line" function... If you get on the Web-GUI anyhow...
Ciao @+
Yes Sir! You can exploit it through the "Advanced | Command line" function... If you get on the Web-GUI anyhow...
Ciao @+
-
Martino
- NewUser

- Posts: 4
- Joined: 05 May 2013 23:46
- Location: Vercelli, Italy
- Status: Offline
Re: Shellshock vulnerability
which is NOT in the login screen. if someone manage to breake my login password, well... the shellshock is the last of my problemsF8BOE wrote:Hello,
Yes Sir! You can exploit it through the "Advanced | Command line" function... If you get on the Web-GUI anyhow...
Ciao @+
- raulfg3
- Site Admin

- Posts: 4865
- Joined: 22 Jun 2012 22:13
- Location: Madrid (ESPAÑA)
- Contact:
- Status: Offline
Re: Shellshock vulnerability
Patched on latest r1004 build, please wait until was compiled and upload for download.
http://sourceforge.net/p/nas4free/code/commit_browser
http://sourceforge.net/p/nas4free/code/1004/
http://sourceforge.net/p/nas4free/code/commit_browser
http://sourceforge.net/p/nas4free/code/1004/
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)
Wiki
Last changes
HP T510
Wiki
Last changes
HP T510
- F8BOE
- experienced User

- Posts: 106
- Joined: 03 Jun 2013 23:09
- Location: France
- Status: Offline
Re: Shellshock vulnerability
Hello,
Ah I see... "9.2.0.1 - Shigawire (revision 972)+1"... Good idea!
Ciao @+
Ah I see... "9.2.0.1 - Shigawire (revision 972)+1"... Good idea!
Ciao @+
- johl
- NewUser

- Posts: 14
- Joined: 29 Jun 2012 07:53
- Location: Örebro
- Status: Offline
Re: Shellshock vulnerability
Hi all, i couldn't wait
I installed FreeBSD 9.2 AMD64 in Parallels Desktop and installed the latest package through the latest os-updated and then move the bash-binary to my N4F with ftp on internal network and tried to start shell and the ran and it all worked as planned.
But first i did a backup of the old bash-binary with
I'll run this for awhile and hope it won't start any problems and errors due to missing libs and others.
I could posted this binary in an URL, but i don't know if you would trust that my binary is pure or if it's against forum rules. I wouldn't download any others
Best J
Code: Select all
pkg install bashCode: Select all
freebsd-update fetch installCode: Select all
/usr/local/bin/bash Code: Select all
bash --versionBut first i did a backup of the old bash-binary with
Code: Select all
mv /usr/local/bin/bash /usr/local/bin/bash.oldI could posted this binary in an URL, but i don't know if you would trust that my binary is pure or if it's against forum rules. I wouldn't download any others
Best J