Ceplin Command Identifier

Identifier / Programs / Linux and Unix

vi

Vim (Vi IMproved), a command-line text editor, provides several modes for different kinds of text manipulation. Pressing <i> in normal mode enters insert mode. Pressing <Esc> goes back to normal mode, which enables the use of Vim commands. tldr-pages

GTFOBins shell 4 Sigma rules name it 3 ATT&CK techniques 6 documented commands

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

How vi is abused

documented by GTFOBins

shell T1059.004 Command and Scripting Interpreter: Unix Shell

-c

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

6 documented commands

from GTFOBins, each read by the identifier

file-read unprivileged, with sudo, as SUID

vi /path/to/input-file
Identify

Trips no Sigma process-creation rule.

file-write unprivileged, with sudo, as SUID

Where ^[ is the escape key.

vi /path/to/output-file
iDATA
^[
w
Identify

Trips no Sigma process-creation rule.

shell unprivileged, with sudo, as SUID

vi -c ':!/bin/sh' /dev/null
Identify

Trips 1 Sigma rule: highVim GTFOBin Abuse - Linux by Nasreddine Bencherchali (Nextron Systems), Luc Génaux

shell unprivileged, with sudo, as SUID

vi -c ':shell'
Identify

Trips 1 Sigma rule: highVim GTFOBin Abuse - Linux by Nasreddine Bencherchali (Nextron Systems), Luc Génaux

shell unprivileged, with sudo, as SUID

vi -c ':set shell=/bin/sh | shell'
Identify

As SUID:

vi -c ':set shell=/bin/sh\ -p | shell'

Trips 1 Sigma rule: highVim GTFOBin Abuse - Linux by Nasreddine Bencherchali (Nextron Systems), Luc Génaux

shell unprivileged, with sudo, as SUID

vi -c :terminal /bin/sh
Identify

As SUID:

vi -c ':terminal /bin/sh -p'

Trips 1 Sigma rule: highVim GTFOBin Abuse - Linux by Nasreddine Bencherchali (Nextron Systems), Luc Génaux

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

What detects it

Sigma process creation rules
highVim GTFOBin Abuse - LinuxNasreddine Bencherchali (Nextron Systems), Luc Génaux
lowLocal System Accounts Discovery - LinuxAlejandro Ortuno, oscd.community, CheraghiMilad
lowLocal Groups Discovery - LinuxÖmer Günal, Alejandro Ortuno, oscd.community
T1059Command and Scripting Interpreter
T1059.004Command and Scripting Interpreter: Unix Shell
T1083File and Directory Discovery

Everyday use

from tldr-pages, CC BY 4.0

Open a file

vim path/to/fileIdentify

Open a file at a specified line number

vim +line_number path/to/fileIdentify

View Vim's help manual

<:>help<Enter>

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