Ceplin Command Identifier

Identifier / Programs / Linux and Unix

sed

Edit text in a scriptable manner. tldr-pages

GTFOBins file-write, shell 2 Sigma rules name it 1 ATT&CK technique 4 documented commands

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

How sed is abused

documented by GTFOBins

file-write

-nNo default output (use the p command to output matched lines) toybox

shell T1059.004 Command and Scripting Interpreter: Unix Shell

-nNo default output (use the p command to output matched lines) toybox

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

4 documented commands

from GTFOBins, each read by the identifier

file-read unprivileged, with sudo, as SUID

sed '' /path/to/input-file
Identify

Trips no Sigma process-creation rule.

file-write unprivileged, with sudo, as SUID

sed -n '1s/.*/DATA/w /path/to/output-file' /etc/hosts
Identify

Trips 1 Sigma rule: mediumPotential Suspicious Change To Sensitive/Critical Files by @d4ns4n_ (Wuerth-Phoenix)

shell unprivileged, with sudo, as SUID

sed -n '1e exec /bin/sh 1>&0' /etc/hosts
Identify

Trips 1 Sigma rule: mediumPotential Suspicious Change To Sensitive/Critical Files by @d4ns4n_ (Wuerth-Phoenix)

shell unprivileged, with sudo, as SUID

Trips no Sigma process-creation rule.

2 of the 4 commands the identifier reads trip a Sigma process-creation rule; 2 trip none. 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 sed. The identifier reads the line of each that runs sed.

What detects it

Sigma process creation rules
mediumSuspicious Child Process of SAP NetWeaver - LinuxElastic (idea), Swachchhanda Shrawan Poudel (Nextron Systems)
T1059.004Command and Scripting Interpreter: Unix Shell

Everyday use

from tldr-pages, CC BY 4.0

Replace all apple (basic regex) occurrences with mango (basic regex) in all input lines and print the result to stdout

command | sed 's/apple/mango/g'Identify

Execute a specific script file and print the result to stdout

command | sed -f path/to/script.sedIdentify

Print just a first line to stdout

command | sed -n '1p'Identify

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

Options

8 in toybox
Show every option of sed
-e SCRIPTAdd SCRIPT to list
-f SCRIPT_FILEAdd contents of SCRIPT_FILE to list
-iEdit each file in place (-iEXT keeps backup file with extension EXT)
-nNo default output (use the p command to output matched lines)
-rUse extended regular expression syntax
-EPOSIX alias for -r
-sTreat input files separately (implied by -i)
-zUse \0 rather than \n as input line separator