Command line tool to generate secure computing mode
Project description
A straightforward command line tool for generate seccomp json profile
Overview
Seccomp (short for secure computing mode) is a computer security facility in the Linux kernel. Seccomp allows a process to make a one-way transition into a “secure” state where it cannot make any system calls except exit(), sigreturn(), read() and write() to already-open file descriptors. Should it attempt any other system calls, the kernel will terminate the process with SIGKILL or SIGSYS. In this sense, it does not virtualize the system’s resources but isolates the process from them entirely.
Generated seccomp profile can be use with a lot of applications like:
docker
firefox
systemd
openssh
chrome
and more…
Install
$ pip install cerber
Usage
$ cerber docker run hello-world # a seccomp_profil.json was created in the current directory
$ ls
seccomp_profil.json
$ cat seccomp_profil.json
{
"defaultAction": "SCMP_ACT_ERRNO",
"architecture": [
"SCMP_ARCH_X86_64",
"SCMP_ARCH_X86",
"SCMP_ARCH_X32"
],
"syscalls": [
{
"action": "SCMP_ACT_ALLOW",
"args": [],
"name": "read"
},
...
{
"action": "SCMP_ACT_ALLOW",
"args": [],
"name": "execve"
},
{
"action": "SCMP_ACT_ALLOW",
"args": [],
"name": "arch_prctl"
}
]
}
and now you can assign this security profil to your container at run:
$ docker run \
--rm \
--security-opt="no-new-privileges" \
--security-opt seccomp=seccomp_profile.json \
hello-world # you can get the following output for docker hello world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
...
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
Contribute
$ git clone https://github.com/gr0und-s3ct0r/cerber
$ cd cerber
$ pipenv install pbr
$ pipenv shell # generate a virtual environment
$ python setup.py develop # install cerber in development mode
$ pip install -e .[test] # install testing dependencies
$ # make your changes
$ tox
Further readings
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cerber-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3647118ed8f75df4c3e5bea8ca93bcd0e7a33e75e023dac0fcc3f5874195c823 |
|
MD5 | 5c17e445dd597a59a69d0241f20302e0 |
|
BLAKE2b-256 | 2148b7fc373f7f6657b5c4533dfdfecc1766edd817eb8e7edb69a53b651a4ee8 |