Identifier / Programs / Linux and Unix
rlwrap
Add line editing, persistent history, and prompt completion to a REPL command. tldr-pages
GTFOBins file-write, shell 1 ATT&CK technique 2 documented commands
How rlwrap is abused
file-write
echo
-lshell T1059.004 Command and Scripting Interpreter: Unix Shell
Each abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for rlwrap.
2 documented commands
file-write unprivileged, with sudo, as SUID
This adds timestamps to the output file. This relies on the external echo command.
rlwrap -l /path/to/output-file echo DATAIdentifyNone 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 rlwrap. The identifier reads the line of each that runs rlwrap.
What detects it
Everyday use
Run a REPL command with line editing, persistent history, and prompt completion
rlwrap commandIdentifyUse all words seen on input and output for prompt completion
rlwrap --remember commandIdentifyImprove prompt completion if prompts contain ANSI colour codes
rlwrap --ansi-colour-aware commandIdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.