jail-shell | linux security tool mainly using chroot , namespaces | Identity Management library

 by   pymumu C Version: Current License: GPL-2.0

kandi X-RAY | jail-shell Summary

kandi X-RAY | jail-shell Summary

jail-shell is a C library typically used in Security, Identity Management applications. jail-shell has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

through the configuration file jail-shell automatically generates the chroot running environment. through jail-shell management commands it’s very easy to add, list, delete, restrict users, and easy to install, delete chroot running environment. the linux chroot technology is used to restrict the user’s directory access, to avoid users accessing restricted directories and to prevent users from destroying the system. the chroot running enviroment is readonly, this prevents users from deleting protected directories and files, creating device files, and accessing restricted files. use linux namespace technology, limit the visible range of user pid, mount directories, and avoid information leakage. provides a system command-and-proxy channel that allows users to execute a real system’s restricted command in a chroot environment, protecting the system in the event that it provides the necessary functionality. only a list of commands is required to automatically copy the dynamic library that the command relies on to the chroot environment, avoiding the cumbersome work of copying the dynamic library manually. discard critical capabilities privileges to avoid the system, and the chroot running environment, being cracked by rootkit. supports redhat, sles, debian and their derivative operating systems. when using jail-shell, the minimum security authorization principle should be adopted. in the premise of ensuring the use of
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              jail-shell has a low active ecosystem.
              It has 74 star(s) with 12 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 7 open issues and 4 have been closed. On average issues are closed in 28 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of jail-shell is current.

            kandi-Quality Quality

              jail-shell has 0 bugs and 0 code smells.

            kandi-Security Security

              jail-shell has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              jail-shell code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              jail-shell is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              jail-shell releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jail-shell
            Get all kandi verified functions for this library.

            jail-shell Key Features

            No Key Features are available at this moment for jail-shell.

            jail-shell Examples and Code Snippets

            No Code Snippets are available at this moment for jail-shell.

            Community Discussions

            QUESTION

            Can someone help me understand the chroot escape exploit?
            Asked 2021-Nov-23 at 11:16

            I am trying to understand the chroot escape exploitation. I was reading this article: https://tbhaxor.com/breaking-out-of-chroot-jail-shell-environment/

            From this website, I found this graph:

            Chroot escape process

            I am confused about the step where it says

            "multiple chdir will change the kernel cwd to / using n times chdir("..") syscall"

            Why is this true? Like chdir("..") from chrooted root directory should just return itself, right? But if you do it n times, it will take you to the host root? Why do you have to do it "n" times and then it works?

            ...

            ANSWER

            Answered 2021-Nov-23 at 11:16

            I am the author of the post you mentioned here,

            Because you don't know where exactly CWD was when the user has executed chroot syscall. It could be at /home/test/john or /home/test/john/mydir and so on.

            But when you do chdir("..") syscall for let's say 5 times here. In the first case, it will take back to you on root in 3 chdir and when you perform .. on the root directory it is ineffective read more.

            Now in the second case, it will take you to the root directory in 4 chdir("..") syscalls. So again .. on the root directory is ineffective. Generally, exploits use 1000 chdirs just because they don't want to take any chance to miss the actual root directory. Here from "actual root directory" I mean working directory or CWD.

            When you do chroot it doesn't change the working directory or cwd for kernel but only changes for the applications running inside it. That is why when you don't drop the privileges and perform double chroot in the already chrooted environment it breaks you out of the chroot jail. I have understood this working from this post. I hope you will too find it useful.

            Here is one more resource for you to understand difference between CWD and ROOT directory: https://github.com/earthquake/chw00t#got-that-but-how-does-it-work.

            Source https://stackoverflow.com/questions/70049320

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install jail-shell

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/pymumu/jail-shell.git

          • CLI

            gh repo clone pymumu/jail-shell

          • sshUrl

            git@github.com:pymumu/jail-shell.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Identity Management Libraries

            vault

            by hashicorp

            k9s

            by derailed

            keepassxc

            by keepassxreboot

            keycloak

            by keycloak

            uuid

            by uuidjs

            Try Top Libraries by pymumu

            smartdns

            by pymumuC

            luci-app-smartdns

            by pymumuJavaScript

            tinylog

            by pymumuC

            pymumu.github.io

            by pymumuCSS