Lucene search
K

Windows Installed AntiVirus Enumeration

🗓️ 22 Apr 2022 17:42:47Reported by rageltman <rageltman@sempervictus>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 93 Views

Windows Installed AntiVirus Enumeration module will enumerate the AV products detected by WMI

Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Post
  include Msf::Post::Windows::Priv

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Windows Installed AntiVirus Enumeration',
        'Description' => %q{
          This module will enumerate the AV products detected by WMIC
        },
        'License' => MSF_LICENSE,
        'Author' => [ 'rageltman <rageltman[at]sempervictus>' ],
        'Platform' => %w[win],
        'SessionTypes' => [ 'meterpreter', 'shell' ],
        'Notes' => {
          'Stability' => [CRASH_SAFE],
          'Reliability' => [],
          'SideEffects' => []
        }
      )
    )
  end

  # Run Method for when run command is issued
  def run
    if command_exists?('wmic') == false
      print_error("The 'wmic' command doesn't exist on this host!") # wmic is technically marked as deprecated so this command could very well be removed in future releases.
      return
    end
    avs = {}
    cmd = 'wmic /namespace:\\\\root\\SecurityCenter2 path AntiVirusProduct get * /value'
    resp = cmd_exec(cmd, nil, 6000).to_s
    fail_with(Failure::Unknown, resp) if resp[0..5].upcase == 'ERROR:'
    resp.split("\r\r\n\r\r\n").map do |ent|
      next if ent.strip.empty?

      print_status("Found AV product:\n#{ent}\n")
      av_note = ent.lines.map(&:strip).map.select { |e| e.length > 1 }.map { |e| e.split('=', 2) }.to_h
      avn = av_note.delete('displayName')
      avs[avn] = av_note
    end
    report_note(host: target_host, type: 'windows.antivirus', data: avs, update: :unique_data)
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Apr 2026 19:01Current
7.1High risk
Vulners AI Score7.1
93