Link Search Menu Expand Document

On this page

A reference in a Metasploit module is a source of information related to the module. This can be a link to the vulnerability advisory, a news article, a blog post about a specific technique the module uses, a specific tweet, etc. The more you have the better. However, you should not use this as a form of advertisement.

List of supported reference identifiers

IDSourceCode Example
CVEcvedetails.com['CVE', '2014-9999']
CWEcwe.mitre.org['CWE', '90']
BIDsecurityfocus.com['BID', '1234']
MSBtechnet.microsoft.com['MSB', 'MS13-055']
EDBexploit-db.com['EDB', '1337']
US-CERT-VUkb.cert.org['US-CERT-VU', '800113']
ZDIzerodayinitiative.com['ZDI', '10-123']
WPVDBwpvulndb.com['WPVDB', '7615']
PACKETSTORMpacketstormsecurity.com['PACKETSTORM', '132721']
URLanything['URL', 'http://example.com/blog.php?id=123']
AKA (deprecated*)anything['AKA', 'shellshock']

Good to know
AKA names for modules are no longer stored as a reference identifier, but rather in the Notes metadata field as shown in the example below.

Code example of references in a module

class MetasploitModule < Msf::Exploit::Remote
  Rank = NormalRanking

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Code Example',
        'Description' => %q{
          This is an example of a module using references
        },
        'License' => MSF_LICENSE,
        'Author' => [ 'Unknown' ],
        'References' => [
          [ 'CVE', '2014-9999' ],
          ['BID', '1234'],
          ['URL', 'http://example.com/blog.php?id=123']
        ],
        'Platform' => 'win',
        'Targets' => [
          [ 'Example', { 'Ret' => 0x41414141 } ]
        ],
        'Payload' => {
          'BadChars' => "\x00"
        },
        'Privileged' => false,
        'DisclosureDate' => '2014-04-01',
        'DefaultTarget' => 0,
        'Notes' => {
          'AKA' => [ 'shellshock' ]
        }
      )
    )
  end

  def exploit
    print_debug('Hello, world')
  end

end