Skip to content

drank40/copyfail-golf-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

copyfail-golf-cli

Local sandbox runner for copy.golf submissions. Runs a candidate binary or python script inside the same QEMU verifier the platform uses, so you can test before submitting — no HTTP, no queue.

Requirements

  • Linux, x86_64
  • qemu-system-x86_64, qemu-img (apt install qemu-system-x86 qemu-utils)
  • ssh-keygen, ssh
  • uv
  • /dev/kvm for fast resets (~10 s); falls back to TCG (~80 s) without it

Quickstart

git clone https://github.com/renato-osec/copy-fail-tiny-elf-CVE-2026-31431.git
cd copy-fail-tiny-elf-CVE-2026-31431
uv sync --frozen --no-dev

# run any artifact through the sandbox VM (kind auto-detected from extension)
uv run python -m golf_platform.cli ./your-elf
uv run python -m golf_platform.cli ./your-script.py

# explicit kind / different port (if a server is already running on 2299)
uv run python -m golf_platform.cli ./your-elf --kind binary \
  --ssh-port 2399 --state-dir /tmp/cli-vm

First run downloads the Ubuntu 24.04 minimal cloud image (~260 MiB) into the state dir, builds a cloud-init seed, and boots the VM. Subsequent runs reuse it.

What the verifier does

  1. Plants a root-only file containing a random 128-bit nonce.
  2. Runs your artifact as nobody under prlimit (cpu=30, nproc=64).
  3. Pipes id -u + cat <flag> into your candidate's stdin.
  4. Pass = candidate's stdout contains both 0 and the nonce — i.e. an actual privesc to root inside the guest.

Same code path as the public platform; what passes here passes there.


made by @Renny

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors