GTFOBins sudo (ejemplo vi)

sudo vi -c ':!/bin/sh'

Abuses a sudo-allowed binary (vi, less, more, awk, find...) to spawn a privileged shell, following GTFOBins documented techniques. With 'sudo vi -c :!/bin/sh' you get a root shell if vi is in your sudoers.

When sudo -l shows a GTFOBins-listed binary with the 'sudo' tag and your user can execute it (ideally NOPASSWD). It's the fastest escalation there is: a single command and you're root.

If the binary isn't in your sudoers or the rule restricts arguments (e.g., sudo vi /var/log/nginx/*.log), the -c may not work: check the restriction first. Also avoid if the system has sudoers with noexec enabled for your user.