GithubHelp home page GithubHelp logo

hhy5277 / sandboxed-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/sandboxed-api

0.0 1.0 0.0 619 KB

Sandboxed API automatically generates sandboxes for C/C++ libraries

License: Apache License 2.0

Python 13.87% C++ 83.81% C 2.25% Shell 0.07%

sandboxed-api's Introduction

Sandboxed API

Copyright 2019 Google LLC

Sandbox

What is Sandboxed API?

The Sandboxed API project (SAPI) aims to make sandboxing of C/C++ libraries less burdensome: after initial setup of security policies and generation of library interfaces, an almost-identical stub API is generated (using a templated based programming variable hierarchy system), transparently forwarding calls using a custom RPC layer to the real library running inside a sandboxed environment.

Additionally, each SAPI library utilizes a tightly defined security policy, in contrast to typical sandboxed project, where security policies must cover total syscall/resource footprint of all utilized libraries.

Intended audience

SAPI is designed to help you sandbox only a part of binary. That is, a library or some other code with an unknown security posture.

See Sandboxing Code to make sure this is the type of sandboxing you are looking for.

How does it work?

Navigate to our How it works page.

Motivation

Sandboxes available for use in Google required additional implementation work with each new instance of project which was intended to be sandboxed, even if it reused the same software library. Sandbox security policies and other restrictions applied to the sandboxed process had to be reimplemented each time, and data exchange mechanisms between trusted and untrusted parts of the code had to be designed from the scratch.

While designing the Sandboxed API project, our goal was to make this process easy and straightforward. Our working motto is: Sandbox once, use anywhere.

Is it proven technology?

The project has been designed, developed and is maintained by members of the Google Sandbox Team. It also uses our field-tested Sandbox 2.

Currently, many internal projects are already using SAPI to isolate their production workloads. You can read more about them in the Examples section.

We've also prepared some more example SAPI implementations for your reference.

Quick Start

Install the required dependencies, this assumes you are running Debian 10 "Buster":

echo "deb http://storage.googleapis.com/bazel-apt stable jdk1.8" | \
  sudo tee /etc/apt/sources.list.d/bazel.list
wget -qO - https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
sudo apt-get install -qy python-typing python-clang-7 libclang-7-dev
sudo apt-get install -qy build-essential linux-libc-dev bazel

Clone and run the build:

git clone github.com/google/sandboxed-api && cd sandboxed-api
bazel build ...

Try out one of the examples:

bazel run //sandboxed_api/examples/stringop:main_stringop

There are also a more detailed instructions that should help you getting started with SAPI.

Getting Involved

If you want to contribute, please read CONTRIBUTING.md and send us pull requests. You can also report bugs or file feature requests.

If you'd like to talk to the developers or get notified about major product updates, you may want to subscribe to our mailing list.

sandboxed-api's People

Contributors

cblichmann avatar disconnect3d avatar fluxchief avatar happycoder92 avatar

Watchers

 avatar

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.