Identifier / Programs / Linux and Unix
redis
GTFOBins file-write 1 documented command
How redis is abused
file-write
Each abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for redis.
1 documented command
file-write unprivileged, with sudo, as SUID
Write files on the server running Redis at the specified location. Written data will appear amongst the database dump.
Keep in mind that it's actually the server to perform the file write.
redis-cli -h 127.0.0.1
config set dir /path/to/output-dir/
config set dbfilename output-file
set x "DATA"
saveThis command is, 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 redis. The identifier reads the line that runs redis.