Step 1: Cert
Generating a cert:
msf5 > use auxiliary/gather/impersonate_ssl
msf5 auxiliary(gather/impersonate_ssl) > set RHOSTS www.google.com
msf5 auxiliary(gather/impersonate_ssl) > run
Copy the cert from ~/.msf4/loot to wherever you need it, in this case C:\tools\socat
OR use a legit letsencrypt cert:
We begin by adding the certbot
repository to apt
:
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
Once added, we can install the required package:
sudo apt-get install certbot apache2 python-certbot-apache
Make sure that Apache2 is running on port 80
and ready to receive connections by starting the service:
sudo service apache2 start
With the dependencies set up, we're ready to generate the certificate. This is as simple as running the following command (and following the prompts):
certbot --apache -d example.com
$ cd /etc/letsencrypt/live/example.com
$ cat privkey.pem fullchain.pem > /tools/MSF.pem