There's more...

When testing payloads, we should never use online scanners, such as VirusTotal. They will share the samples with antivirus vendors and security companies, so they can improve their services and products. This is why, when testing your payloads, you should do a proper reconnaissance of your target, identify the security solutions used, then install the product on a virtual machine, disable client telemetry submissions, and safely test your payloads. In this recipe, I have installed and tested the payloads against Symantec Endpoint Protection 12:

This time, we were able to successfully bypass the antivirus solution:\

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.