Files
metasploit-gs/docs/metasploit-framework.wiki/Module-Reference-Identifiers.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
2.4 KiB
Markdown
Raw Normal View History

## On this page
* [List of supported reference identifiers](#list-of-supported-reference-identifiers)
* [Code example of references in a module](#code-example-of-references-in-a-module)
2014-09-05 11:24:47 -07:00
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
2014-09-05 11:24:47 -07:00
ID | Source | Code Example
------------- | ------------- | -------------
CVE | cvedetails.com | ```['CVE', '2014-9999']```
CWE | cwe.mitre.org | ```['CWE', '90']```
BID | securityfocus.com | ```['BID', '1234']```
MSB | technet.microsoft.com | ```['MSB', 'MS13-055']```
EDB | exploit-db.com | ```['EDB', '1337']```
US-CERT-VU | kb.cert.org | ```['US-CERT-VU', '800113']```
ZDI | zerodayinitiative.com | ```['ZDI', '10-123']```
WPVDB | wpvulndb.com | ```['WPVDB', '7615']```
PACKETSTORM | packetstormsecurity.com | ```['PACKETSTORM', '132721']```
URL | anything | ```['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.
2014-09-05 11:24:47 -07:00
## Code example of references in a module
2014-09-05 11:24:47 -07:00
```ruby
class MetasploitModule < Msf::Exploit::Remote
2014-09-05 11:24:47 -07:00
Rank = NormalRanking
2023-02-03 13:31:49 +00:00
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' => [
2014-09-05 11:24:47 -07:00
[ 'CVE', '2014-9999' ],
['BID', '1234'],
['URL', 'http://example.com/blog.php?id=123']
],
2023-02-03 13:31:49 +00:00
'Platform' => 'win',
'Targets' => [
2014-09-05 11:24:47 -07:00
[ 'Example', { 'Ret' => 0x41414141 } ]
],
2023-02-03 13:31:49 +00:00
'Payload' => {
2014-09-05 11:24:47 -07:00
'BadChars' => "\x00"
},
2023-02-03 13:31:49 +00:00
'Privileged' => false,
'DisclosureDate' => '2014-04-01',
'DefaultTarget' => 0,
'Notes' => {
'AKA' => [ 'shellshock' ]
}
2023-02-03 13:31:49 +00:00
)
)
2014-09-05 11:24:47 -07:00
end
def exploit
print_debug('Hello, world')
end
end
2023-02-03 13:31:49 +00:00
```