Identifier / Programs / Linux and Unix
csplit
Split a file into pieces. This generates files named xx00, xx01, and so on. tldr-pages
GTFOBins file-write 2 documented commands
How csplit is abused
file-write
-z-bEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for csplit.
2 documented commands
file-read unprivileged, with sudo, as SUID
csplit /path/to/input-file 1
cat xx01Identifyfile-write unprivileged, with sudo, as SUID
Writes the data to xx0output-file in the current working directory. If needed, a different prefix can be specified with -f (instead of xx).
echo DATA >/path/to/temp-file
csplit -z -b '%doutput-file' /path/to/temp-file 1IdentifyNone 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 csplit. The identifier reads the line of each that runs csplit.
Everyday use
Split a file in two parts, starting the second one at line 10
csplit path/to/file 10IdentifySplit a file in three parts, starting the latter parts in lines 7 and 23
csplit path/to/file 7 23IdentifyStart a new part at every 5th line (will fail if number of lines is not divisible by 5)
csplit path/to/file 5 {*}IdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.