26 lines
735 B
Bash
26 lines
735 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
(
|
|
exec bwrap \
|
|
--ro-bind /usr/bin /usr/bin/ \
|
|
--ro-bind /usr/share /usr/share \
|
|
--ro-bind /usr/lib /usr/lib \
|
|
--ro-bind /usr/lib64 /usr/lib64 \
|
|
--symlink /usr/lib64 /lib64 \
|
|
--symlink /usr/lib /lib \
|
|
--symlink /usr/bin /bin \
|
|
--symlink /usr/bin /sbin \
|
|
--proc /proc \
|
|
--dev /dev \
|
|
--bind "$PWD" "$PWD" \
|
|
--unshare-all \
|
|
--new-session \
|
|
--seccomp 10 \
|
|
10< /usr/local/bin/seccomp_default_filter.bpf \
|
|
/usr/bin/atool "$@"
|
|
)
|
|
|
|
# Status: Incomplete
|
|
# This script mounts the current working directory to extract and write new files
|
|
# Depending in the execution path, this may be dangerous and can lead to sandbox escape
|