Skip to content

Commit b4b709d

Browse files
author
Brent Cook
committed
Land rapid7#7342, remove OSVDB links and references from library code - leave in modules
2 parents 1016e4d + 5b4f96e commit b4b709d

File tree

9 files changed

+6
-23
lines changed

9 files changed

+6
-23
lines changed

lib/msf/core/db_manager/import/nmap.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ def import_nmap_xml(args={}, &block)
182182
:info => 'Microsoft Windows Server Service Crafted RPC Request Handling Unspecified Remote Code Execution',
183183
:refs =>['CVE-2008-4250',
184184
'BID-31874',
185-
'OSVDB-49243',
186185
'CWE-94',
187186
'MSFT-MS08-067',
188187
'MSF-Microsoft Server Service Relative Path Stack Corruption',
@@ -204,8 +203,6 @@ def import_nmap_xml(args={}, &block)
204203
'BID-18325',
205204
'BID-18358',
206205
'BID-18424',
207-
'OSVDB-26436',
208-
'OSVDB-26437',
209206
'MSFT-MS06-025',
210207
'MSF-Microsoft RRAS Service RASMAN Registry Overflow',
211208
'NSS-21689']
@@ -224,7 +221,6 @@ def import_nmap_xml(args={}, &block)
224221
:info => 'Vulnerability in Windows DNS RPC Interface Could Allow Remote Code Execution',
225222
# Add more refs based on nessus/nexpose .. results
226223
:refs =>['CVE-2007-1748',
227-
'OSVDB-34100',
228224
'MSF-Microsoft DNS RPC Service extractQuotedChar()',
229225
'NSS-25168']
230226
}

lib/msf/core/db_manager/module_cache.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ def remove_module_details(mtype, refname)
158158
# +edb+:: Matches modules with the given Exploit-DB ID.
159159
# +name+:: Matches modules with the given full name or name.
160160
# +os+, +platform+:: Matches modules with the given platform or target name.
161-
# +osvdb+:: Matches modules with the given OSVDB ID.
162161
# +ref+:: Matches modules with the given reference ID.
163162
# +type+:: Matches modules with the given type.
164163
#
@@ -277,7 +276,7 @@ def search_modules(search_string)
277276

278277
query = query.includes(:refs).references(:refs)
279278
union_conditions << Mdm::Module::Ref.arel_table[:name].matches_any(formatted_values)
280-
when 'cve', 'bid', 'osvdb', 'edb'
279+
when 'cve', 'bid', 'edb'
281280
formatted_values = value_set.collect { |value|
282281
prefix = keyword.upcase
283282

lib/msf/core/module/reference.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def self.from_s(str)
7777

7878
#
7979
# Initializes a site reference from an array. ary[0] is the site and
80-
# ary[1] is the site context identifier, such as OSVDB.
80+
# ary[1] is the site context identifier, such as CVE.
8181
#
8282
def self.from_a(ary)
8383
return nil if (ary.length < 2)
@@ -95,9 +95,7 @@ def initialize(in_ctx_id = 'Unknown', in_ctx_val = '')
9595
self.ctx_id = in_ctx_id
9696
self.ctx_val = in_ctx_val
9797

98-
if (in_ctx_id == 'OSVDB')
99-
self.site = "http://www.osvdb.org/#{in_ctx_val}"
100-
elsif (in_ctx_id == 'CVE')
98+
if (in_ctx_id == 'CVE')
10199
self.site = "http://cvedetails.com/cve/#{in_ctx_val}/"
102100
elsif (in_ctx_id == 'CWE')
103101
self.site = "https://cwe.mitre.org/data/definitions/#{in_ctx_val}.html"
@@ -150,7 +148,7 @@ def from_s(str)
150148
#
151149
attr_reader :site
152150
#
153-
# The context identifier of the site, such as OSVDB.
151+
# The context identifier of the site, such as CVE.
154152
#
155153
attr_reader :ctx_id
156154
#

lib/msf/core/module/search.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ def search_filter(search_string)
8686
match = [t,w] if refs.any? { |ref| ref =~ /^cve\-/i and ref =~ r }
8787
when 'bid'
8888
match = [t,w] if refs.any? { |ref| ref =~ /^bid\-/i and ref =~ r }
89-
when 'osvdb'
90-
match = [t,w] if refs.any? { |ref| ref =~ /^osvdb\-/i and ref =~ r }
9189
when 'edb'
9290
match = [t,w] if refs.any? { |ref| ref =~ /^edb\-/i and ref =~ r }
9391
end

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,6 @@ def cmd_search_help
16141614
'cve' => 'Modules with a matching CVE ID',
16151615
'edb' => 'Modules with a matching Exploit-DB ID',
16161616
'name' => 'Modules with a matching descriptive name',
1617-
'osvdb' => 'Modules with a matching OSVDB ID',
16181617
'platform' => 'Modules affecting this platform',
16191618
'ref' => 'Modules with a matching ref',
16201619
'type' => 'Modules of a specific type (exploit, auxiliary, or post)',

spec/support/shared/examples/msf/db_manager/module_cache.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,6 @@ def remove_module_details
301301

302302
it_should_behave_like 'Msf::DBManager#search_modules Mdm::Module::Platform#name or Mdm::Module::Target#name keyword', :os
303303

304-
it_should_behave_like 'Msf::DBManager#search_modules Mdm::Module::Ref#name keyword', :osvdb
305-
306304
it_should_behave_like 'Msf::DBManager#search_modules Mdm::Module::Platform#name or Mdm::Module::Target#name keyword', :platform
307305

308306
context 'with ref keyword' do

spec/support/shared/examples/msf/module/search.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RSpec.shared_examples_for 'Msf::Module::Search' do
22
describe '#search_filter' do
3-
REF_TYPES = %w(CVE BID OSVDB EDB)
3+
REF_TYPES = %w(CVE BID EDB)
44

55
shared_examples "search_filter" do |opts|
66
accept = opts[:accept] || []

tools/dev/msftidy.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ def check_ref_identifiers
178178
case identifier
179179
when 'CVE'
180180
warn("Invalid CVE format: '#{value}'") if value !~ /^\d{4}\-\d{4,}$/
181-
when 'OSVDB'
182-
warn("Invalid OSVDB format: '#{value}'") if value !~ /^\d+$/
183181
when 'BID'
184182
warn("Invalid BID format: '#{value}'") if value !~ /^\d+$/
185183
when 'MSB'
@@ -197,9 +195,7 @@ def check_ref_identifiers
197195
when 'PACKETSTORM'
198196
warn("Invalid PACKETSTORM reference") if value !~ /^\d+$/
199197
when 'URL'
200-
if value =~ /^http:\/\/www\.osvdb\.org/
201-
warn("Please use 'OSVDB' for '#{value}'")
202-
elsif value =~ /^http:\/\/cvedetails\.com\/cve/
198+
if value =~ /^http:\/\/cvedetails\.com\/cve/
203199
warn("Please use 'CVE' for '#{value}'")
204200
elsif value =~ /^http:\/\/www\.securityfocus\.com\/bid\//
205201
warn("Please use 'BID' for '#{value}'")

tools/modules/module_reference.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
def types
2525
{
2626
'ALL' => '',
27-
'OSVDB' => 'http://www.osvdb.org/#{in_ctx_val}',
2827
'CVE' => 'http://cvedetails.com/cve/#{in_ctx_val}/',
2928
'CWE' => 'http://cwe.mitre.org/data/definitions/#{in_ctx_val}.html',
3029
'BID' => 'http://www.securityfocus.com/bid/#{in_ctx_val}',

0 commit comments

Comments
 (0)