Giter Site home page Giter Site logo

capsh's Introduction

capsh

The capability-aware shell starts applications from inside Capsicum's capability mode. This allows for untrusted applications to be sandboxed from inception.

Note: currently, this software only works on a version of FreeBSD that supports direct execution of ld-elf.so.1 with an explicit file descriptor argument, i.e., 12-CURRENT post-r318431.

Build it:

  1. Download, build and install libpreopen
  2. Build capsh with CMake and (optionally) Ninja:
    $ git clone https://github.com/musec/capsh
    $ cd capsh
    $ mkdir build
    $ cd build
    $ cmake -G Ninja ..    # or leave out Ninja to generate Makefiles
    $ ninja                # or make, or gmake

Use it:

Currently, capsh can only do one thing: execute a single binary, specified by absolute path, from within a Capsicum sandbox. Also, the binaries it can execute aren't very interesting (we aren't really leveraging much of libpreopen yet), so you may have to content yourself with:

$ ./src/capsh /bin/echo "hi"
hi

capsh's People

Contributors

trombonehero avatar shubhgupta2125 avatar oshogbo avatar

Stargazers

await avatar  avatar pwrdwnsys avatar Alex Arslan avatar Val Packett avatar

Watchers

 avatar Brian Kidney avatar  avatar James Cloos avatar Stanley Uche Godfrey avatar

capsh's Issues

Policy files

We need a mechanism to specify what things a program should always be able to access (e.g., where a compiler will find header files).

Resource integration?

While we're thinking about how to execute applications within sandboxes with security constraints, we might think about how to integrate resource constraints as well.

This will probably depend on #3 (policy files).

Create libsandbox

Once we've explored the values that need to go into sandboxes, we should wrap up in the work with a generic libsandbox (which may require a new name, as openjudge/sandbox is unfortunately taken โ€” and it doesn't provide the security properties that it claims).

Pre-open files named at command line

When the user gives a command like cat foo bar, we should try to pre-open foo and bar and pass them into the sandbox (probably read-only by default).

Create simple test

We should have an llvm-lit-based unit test framework. The first test could simply run capsh echo "hi" and ensure that it outputs hi.

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.