Ceplin Command Identifier

Identifier / Programs / Linux and Unix

pdflatex

Compile a PDF document from LaTeX source files. tldr-pages

GTFOBins shell 1 ATT&CK technique 3 documented commands

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

How pdflatex is abused

documented by GTFOBins

shell T1059.004 Command and Scripting Interpreter: Unix Shell

--shell-escape

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

3 documented commands

from GTFOBins, each read by the identifier

file-read unprivileged, with sudo, as SUID

The read file will be part of the PDF output.

pdflatex '\documentclass{article}\usepackage{verbatim}\begin{document}\verbatiminput{/path/to/input-file}\end{document}'
pdftotext texput.pdf -
Identify

file-write unprivileged, with sudo, as SUID

The file can only be written in the current directory, and the .tex extension is mandatory.

pdflatex '\documentclass{article}\newwrite\tempfile\begin{document}\immediate\openout\tempfile=output-file.tex\immediate\write\tempfile{DATA}\immediate\closeout\tempfile\end{document}'
Identify

shell unprivileged, with sudo, as SUID

pdflatex --shell-escape '\documentclass{article}\begin{document}\immediate\write18{/bin/sh}\end{document}'
Identify

None of the 3 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 pdflatex. The identifier reads the line of each that runs pdflatex.

What detects it

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

Everyday use

from tldr-pages, CC BY 4.0

Compile a PDF document

pdflatex source.texIdentify

Compile a PDF document specifying an output directory

pdflatex -output-directory=path/to/directory source.texIdentify

Compile a PDF document, exiting on each error

pdflatex -halt-on-error source.texIdentify

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