Skip to content

Instantly share code, notes, and snippets.

View mingshun's full-sized avatar

mingshun

View GitHub Profile
@mingshun
mingshun / jailer.c
Created September 2, 2023 12:00 — forked from SBell6hf/jailer.c
A ptrace-based syscall jailer that runs on arm64, x86_64 and i386
// SPDX-License-Identifier: CC0-1.0+
#include <sys/syscall.h>
#include <sys/user.h>
#include <errno.h>
#include <sys/procfs.h>
#include <sys/wait.h>
#include <stdbool.h>
#include <stdlib.h>
#include <sys/ptrace.h>
#include <string.h>