Ceplin Command Identifier

Identifier / Programs / Linux and Unix

cp

Copy files and directories. tldr-pages

GTFOBins privilege-escalation 2 Sigma rules name it 4 documented commands

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

How cp is abused

documented by GTFOBins

privilege-escalation

--attributes-only
--preserve

Each abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for cp.

4 documented commands

from GTFOBins, each read by the identifier

file-read unprivileged, with sudo, as SUID

cp /path/to/input-file /dev/stdout
Identify

file-write unprivileged, with sudo, as SUID

echo DATA | cp /dev/stdin /path/to/output-file
Identify

privilege-escalation with sudo, as SUID

This can be used to copy and then read or write files from a restricted file systems or with elevated privileges. (The GNU version of cp has the --parents option that can be used to also create the directory hierarchy specified in the source path, to the destination folder.)

cp /path/to/input-file /path/to/output-file
Identify

privilege-escalation with sudo, as SUID

This can copy SUID permissions from any SUID binary (e.g., /path/to/input-file) to another.

cp --attributes-only --preserve=all /path/to/input-file /path/to/output-file
Identify

None of the 4 commands the identifier reads trips a Sigma process-creation rule. These commands are, with GTFOBins’ notes, 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 cp. The identifier reads the line of each that runs cp.

What detects it

Sigma process creation rules
highSyslog Clearing or Removal Via System UtilitiesMax Altgelt (Nextron Systems), Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC
highCopy Passwd Or Shadow From TMP PathJoseliyo Sanchez, @Joseliyo_Jstnk

Everyday use

from tldr-pages, CC BY 4.0

Copy a file to another location

cp path/to/source_file path/to/target_fileIdentify

Copy a file into another directory, keeping the filename

cp path/to/source_file path/to/target_parent_directoryIdentify

Recursively copy a directory's contents to another location (if the destination exists, the directory is copied inside it)

cp --recursive path/to/source_directory path/to/target_directoryIdentify

None of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.

Options

19 in toybox
Show every option of cp
-aSame as -dpr
-DCreate leading dirs under DEST (--parents)
-dDon't dereference symlinks
-FDelete any existing DEST first (--remove-destination)
-fDelete destination files we can't write to
-HFollow symlinks listed on command line
-iInteractive, prompt before overwriting existing DEST
-LFollow all symlinks
-lHard link instead of copy
-nNo clobber (don't overwrite DEST)
-PDo not follow symlinks
-pPreserve timestamps, ownership, and mode
-RRecurse into subdirectories (DEST must be a directory)
-rSynonym for -R
-sSymlink instead of copy
-TDEST always treated as file, max 2 arguments
-t TARGETCopy to TARGET dir (no DEST)
-uUpdate (keep newest mtime)
-vVerbose