Identifier / Programs / Linux and Unix
dos2unix
Change DOS-style line endings to Unix-style. Replaces CRLF with LF. tldr-pages
GTFOBins file-read, file-write 2 documented commands
How dos2unix is abused
file-read
-f-Ofile-write
-f-nEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for dos2unix.
2 documented commands
file-read unprivileged, with sudo, as SUID
dos2unix -f -O /path/to/input-fileIdentifyfile-write unprivileged, with sudo, as SUID
dos2unix -f -n /path/to/input-file /path/to/output-fileIdentifyNone of the 2 commands the identifier reads trips a Sigma process-creation rule. These commands are 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 dos2unix. The identifier reads the line of each that runs dos2unix.
Everyday use
Change the line endings of a file
dos2unix path/to/fileIdentifyCreate a copy with Unix-style line endings
dos2unix --newfile path/to/file path/to/new_fileIdentifyDisplay file information
dos2unix --info path/to/fileIdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.