Identifier / Programs / Linux and Unix
rustdoc
Generate documentation for a Rust crate. tldr-pages
GTFOBins file-write 2 documented commands
How rustdoc is abused
file-write
-oEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for rustdoc.
2 documented commands
file-read unprivileged, with sudo
Partial content is displayed as error messages.
rustdoc /path/to/input-fileIdentifyfile-write unprivileged, with sudo
This command creates a number of documentation files in the target directory, and the data is written in multiple locations, e.g., src/temp_file/temp-file.html, amidst other content.
echo '//! DATA' >/path/to/temp-file
rustdoc /path/to/temp-file -o /path/to/output-dir/IdentifyNone of the 2 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 rustdoc. The identifier reads the line of each that runs rustdoc.
Everyday use
Generate documentation from the crate's root
rustdoc src/lib.rsIdentifyPass a name for the project
rustdoc src/lib.rs --crate-name nameIdentifyGenerate documentation from Markdown files
rustdoc path/to/file.mdIdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.