Metasploit is a software that tests whether a system is vulnerable to certain security issues. To do this, Metasploit exploits the same vulnerabilities as common malware and hacking software. This is what your anti-virus (AV) program detects and warns you about, so in this sense your anti-virus software is doing its job.
To use Metasploit, you should either exclude the Metasploit directory from your AV scans or install Metasploit on a machine that does not have anti-virus installed (typically a dedicated laptop or virtual machine).
Here is a list of links to descriptions on how to create an exception for the Metasploit directory (typically c:\metasploit) for the most common anti-virus solutions:
- Avast Internet Security
- G Data
- Kaspersky Internet Security
- Microsoft Security Essentials (aka Windows Defender in Windows 7)
- McAfee VirusScan
- Norton Antivirus
- Symantec AntiVirus
- You must also turn off the anti-virus service in addition to the settings in the console or UI