Using the paranoid meterpreter
Sometime during 2015, hackers realized it was possible to steal/hijack someone's meterpreter session by simply playing around with the victim's DNS and launching their own handler to connect. This then led to the development and release of meterpreter paranoid mode. They introduced an API that verified the SHA1 hash of the certificate presented by the msf at both ends. In this recipe, we will see how to use the paranoid mode.
How to do it...
We will need an SSL certificate to begin with:
- We can generate our own using the following commands:
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509
-keyout meterpreter.key -out meterpreter.crt
The following screenshot shows the output for the preceding command:
We fill in the information such as country code and other information accordingly:
cat meterpreter.key meterpreter.crt > meterpreter.pem
- The previous command basically opens two files before and writes them into a single file. We then...