Sandbox implemented in GO with container / ptrace / seccomp
Go to file
2019-04-15 18:29:08 -04:00
run_program add process_vm_readv for blocked read 2019-04-15 18:29:08 -04:00
tracee add more command line arguments 2019-04-01 03:05:24 -04:00
tracer add process_vm_readv for blocked read 2019-04-15 18:29:08 -04:00
.gitignore first commit 2019-03-26 20:55:28 -04:00
LICENSE Create LICENSE 2019-04-01 14:28:20 -04:00
README.md update documentation 2019-04-06 21:32:09 -04:00

go-judger

Under developing.

Goal is to reimplement uoj-judger/run_program in GO language using libseccomp.

Install:

  • install go compiler: apt install golang-go
  • install libseccomp-dev: apt install libseccomp-dev
  • install: go get -d github.com/criyle/go-judger

Features (same as uoj-judger/run_program):

  1. Restricted computing resource: Time / Memory (Stack) / Output
  2. Restricted syscall access (by libseccomp / ptrace)
  3. Restricted file access (read / write / access / exec)

Default file access action:

  • check file read / write: open, openat
  • check file read: readlink, readlinkat
  • check file write: unlink, unlinkat, chmod, rename
  • check file access: stat, lstat, access
  • check file exec: execve

Packages:

  • Tracee: fork-exec with seccomp loaded
  • Tracer: ptrace tracee and provides syscall trap

Executable:

  • run_program: under construction

TODO:

Planned example config file format(yaml):

python2:
  + extra_syscall_allow:
    - clone
  + extra_syscall_count:
    - set_tid_address: 1
  + extra_syscall_ban:
    - socket
  + extra_file_read:
    - /usr/bin
  + extra_file_write:
    - ./
  + extra_file_stat:
    - /usr/bin
  • allow multiple traced programs
  • FD table instead of file names and allow pipes
  • Percise resource limits (s -> ms, mb -> kb)
  • More architectures (arm32, x86)
  • ...