Discussion:
Found way to change directory in rbash!
b***@gmail.com
2018-10-01 12:04:51 UTC
Permalink
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux bobi-HP-xw4300-Workstation 4.15.0-34-generic #37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 4.4
Patch Level: 12
Release Status: release

Description:
As you know, the cd command is restricted when running rbash.Well,
the PWD variable can be modified, so directory can be changed.
Repeat-By:
I ran rbash, so cd was restricted.Then I tried to modify the PWD
variable, and I changed the current working directory successfully.
Fix:
Restrict modifying the PWD variable.
Chet Ramey
2018-10-01 13:06:12 UTC
Permalink
Post by b***@gmail.com
Bash Version: 4.4
Patch Level: 12
Release Status: release
As you know, the cd command is restricted when running rbash.Well,
the PWD variable can be modified, so directory can be changed.
I ran rbash, so cd was restricted.Then I tried to modify the PWD
variable, and I changed the current working directory successfully.
That doesn't change the current working directory. The shell is still in
the same directory it was before.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ***@case.edu http://tiswww.cwru.edu/~chet/
Loading...