Giter VIP home page Giter VIP logo

restricted-shell's People

Contributors

codacy-badger avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

restricted-shell's Issues

Global Bash Variable Bug!

If installing user decides to change the install-dir, modules that take advantage of the Src/global_bash_var file, will be unable to access it...

As the absolute file location of the global_bash_var file is assumed to be in the default location fo the shell @ /etc/Restricted-Shell/.

Security Vulnerability!

A user inside the "R-Shell" can no longer access the shells files via the cd command...

Although it is still possible to modify the shells files while in use through the nano command...
For example: nano /etc/Restricted-Shell/Src/shell.c...

A fix is underway!

Can't CD into any directory

The cd command doesn't work with any directory. For example,

cd /tmp

returns:

File Access Error[FAE]...
Error 1001...

even though any user can access /tmp.

Bin/nano is using rnano instead of nano

In Bin/nano, the script checks the location of rnano, and then runs it. However, there is no point in doing this as rnano is just a symbolic link to nano:

file $(which rnano)

returns:

/bin/rnano: symbolic link to nano

which is just /bin/nano:

file /bin/nano

returns:

/bin/nano: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=e87c5ab33de1e9e225244efd8e2a03f55892c98f, stripped

README.md recommendations

/etc/passwd

Please DO NOT directly edit /etc/passwd, as this can break your OS. Instead, please recommend using the built-in chsh command:

sudo chsh [desired user] -s /etc/Restricted-Shell/run.sh

Also, this allows for you to change your own shell without being root.

Location

Storing executables in /etc/ is not standard, and probably not a good idea. Instead, please use /usr/local/:

The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable among a group of hosts, but not found in /usr.

source

Severe Security Vulrenability

When the shell has been compiled and the user is in the "Restricted-Shell", they can execute unauthorized executable files...

For example; if the user wanted to re-run the shell script that enables and disables all their commands... They could simply run something such as the following:

Command[Src]: ../run.sh

Vulnerability

A non-admin user within the R-Shell can potentially gain admin access if they modify the source files... They can do so by running something similar to:

nano /etc/Restricted-Shell/cmd_src/...

Cannot install on Kali Linux / No commands when manually compiled

Attempting to run bash run.sh yields an error reading "run.sh: line 71: Kali GNU/Linux: No such file or directory." By copying into the Src directory and compiling with gcc shell.c globals.h -o rshell and running with ./rshell results in no commands being executable aside from the "cmds" command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.