CatalogGTFOBins

GTFO · Tool

ln

1 techniqueLinuxGTFOBinsGPL-3.0

privilege-escalation

Privilege EscalationLinux

This overrides `ln` itself with a symlink to a shell (or any other executable) that is to be executed as root, useful in case a `sudo` rule allows to only run `ln` by path. Warning, this is a destructive action.

ln -fs /bin/sh /bin/ln
ln
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
privilege-escalation
MITRE
T1548