Identifier / Programs / Linux and Unix
qpdf
Versatile PDF transformation software. tldr-pages
GTFOBins file-read 1 documented command
How qpdf is abused
file-read
--empty--add-attachment--key--show-attachmentEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for qpdf.
1 documented command
file-read unprivileged, with sudo, as SUID
qpdf --empty --add-attachment /path/to/input-file --key=x -- /path/to/output-file
qpdf --show-attachment=x /path/to/output-fileIdentifyThe command the identifier reads trips no Sigma process-creation rule. This command is 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 qpdf. The identifier reads the line that runs qpdf.
Everyday use
Extract pages 1-3, 5, and 6-10 from a PDF file and save them as another one
qpdf --empty --pages path/to/input.pdf 1-3,5,6-10 -- path/to/output.pdfIdentifyMerge (concatenate) all the pages of multiple PDF files and save the result as a new PDF
qpdf --empty --pages path/to/file1.pdf file2.pdf ... -- path/to/output.pdfIdentifyMerge (concatenate) given pages from a list of PDF files and save the result as a new PDF
qpdf --empty --pages path/to/file1.pdf 1,6-8 path/to/file2.pdf 3,4,5 -- path/to/output.pdfIdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.