wish to add timestamp to bash history?
$ echo 'export HISTTIMEFORMAT="%F %T "' >>
/etc/bashrc
|
Logout and re-login, and you shall be able to see timestamp on your "history" command.
$ echo 'export HISTTIMEFORMAT="%F %T "' >>
/etc/bashrc
|
OS/Software
|
Vulnerable?
|
RHEL
|
Vulnerable
|
CentOS
|
Vulnerable
|
Amazon Linux AMI
|
Vulnerable
|
Fedora
|
Vulnerable
|
Ubuntu
|
Vulnerable
|
Debian
|
Vulnerable
|
Novel/SuSE
|
Vulnerable
|
Mac OS X
|
Vulnerable
|
Juniper JunOS
(SecureVPN) |
Junos OS used by
SecureVPN devices is not vulnerable
http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10648&actp=SUBSCRIPTION |
NGINX
|
This bug does not
affect the NGINX or NGINX Plus software directly, but if you are running on an affected host system, we
recommend that you upgrade the copy of bash on that system as soon as
possible.
http://nginx.com/blog/nginx-cve-2014-6271-bash-advisory/ |
VMWare ESXi
hypervisor
|
ESXi is not
affected as it uses the ash shell (through busybox)
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2090740 |
VMWare Vcenter Server
and other VMWare products
|
Products that run
on Linux or Mac OS (excluding Virtual Appliances) may use the bash shell that
is part of the operating system.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2090740 |
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release
5.4 (Tikanga)
$ uname -a
Linux abc.rhs.net 2.6.18-164.el5 #1
SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
|
$ chsh -l
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/ksh
|
$ chsh
Current available shells:
/bin/sh
/bin/bsh
/bin/csh
/bin/ksh
/bin/tsh
/bin/ksh93
/usr/bin/sh
/usr/bin/bsh
/usr/bin/csh
/usr/bin/ksh
/usr/bin/tsh
/usr/bin/ksh93
/usr/bin/rksh
/usr/bin/rksh93
/usr/sbin/uucp/uucico
/usr/sbin/sliplogin
/usr/sbin/snappd
/opt/mastersam/bin/msh
gzchin's current login
shell:
/usr/bin/ksh
Change (yes) or (no)? >
no
Login shell not changed.
|
$ echo $0
-bash
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Sep 26 15:01
/bin/sh -> bash
[root@abc installer]# rpm -qa |
grep -i bash
bash-3.2-24.el5
|
$ lslpp -L bash
Fileset
Level State Type
Description (Uninstaller)
----------------------------------------------------------------------------
bash 4.1-4 C
R The GNU Bourne Again shell
(bash) version %{version}
(/bin/rpm)
State codes:
A
-- Applied.
B
-- Broken.
C
-- Committed.
E
-- EFIX Locked.
O
-- Obsolete. (partially migrated to
newer version)
?
-- Inconsistent State...Run lppchk -v.
Type codes:
F
-- Installp Fileset
P
-- Product
C
-- Component
T
-- Feature
R
-- RPM Package
|
$ env 'x=() { :;}; echo vulnerable'
'BASH_FUNC_x()=() { :;}; echo vulnerable' bash -c "echo test"
vulnerable
bash: BASH_FUNC_x(): line 0: syntax
error near unexpected token `)'
bash: BASH_FUNC_x(): line 0:
`BASH_FUNC_x() () { :;}; echo vulnerable'
bash: error importing function
definition for `BASH_FUNC_x'
test
|
$ sh
sh-3.2$ env x='() { :;}; echo
vulnerable' bash -c "echo this is
a test"
vulnerable
this is a test
$ tcsh
$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
$ csh
$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
]$ ksh
$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
|
$ env 'x=() { :;}; echo vulnerable'
'BASH_FUNC_x()=() { :;}; echo vulnerable' bash -c "echo test"
bash: warning: x: ignoring function
definition attempt
bash: error importing function
definition for `x'
bash: error importing function
definition for `BASH_FUNC_x()'
test
|
$ env 'x=() { :;}; echo vulnerable'
'BASH_FUNC_x()=() { :;}; echo vulnerable' bash -c "echo test"
bash: warning: x: ignoring function
definition attempt
bash: error importing function
definition for `BASH_FUNC_x'
test
|
$ cd /tmp; rm -f /tmp/echo; env 'x=()
{ (a)=>\' bash -c "echo date"; cat /tmp/echo
bash: x: line 1: syntax error near
unexpected token `='
bash: x: line 1: `'
bash: error importing function
definition for `x'
Fri Sep 26 11:49:58 GMT 2014
|
$ grep -l -z '[^)]=() {' /proc/[1-9]*/environ
| cut -d/ -f3
|
$ systemctl status
|