mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-11-04 14:49:53 +08:00
Sandbox implemented in GO with container / ptrace / seccomp
| runner | ||
| tracee | ||
| tracer | ||
| .gitignore | ||
| README.md | ||
go-judger
Under developing.
Goal is to reimplement uoj-judger/run_program in GO language using libseccomp.
Features (same as uoj-judger):
- Restricted computing resource: Time / Memory (Stack) / Output
- Restricted syscall access (by libseccomp / ptrace)
- Restricted file access (read / write / access / exec)
Planed features:
- Enhanced memory allocation check (e.g. trace brk rtval)
- More architectures
- ...
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
Build dependency:
- install libseccomp-dev:
apt install libseccomp-devon ubuntu - ...
Packages:
- Tracee: fork-exec with seccomp loaded
- Tracer: ptrace tracee and provides syscall trap
Executable:
- Runner: demo