diff --git a/data/plugin_vulns.xml b/data/plugin_vulns.xml index 0b6be541..fdffe0f3 100644 --- a/data/plugin_vulns.xml +++ b/data/plugin_vulns.xml @@ -1388,9 +1388,10 @@ XSS - [CVE-2013-1636] WordPress pretty-link plugin XSS in SWF + WordPress pretty-link plugin XSS in SWF http://seclists.org/bugtraq/2013/Feb/100 http://packetstormsecurity.com/files/120433/wpprettylink163-xss.txt + 2013-1636 XSS @@ -1467,8 +1468,11 @@ - CVE-2013-5098, CVE-2013-3262: Download Monitor < 3.3.6.2 Cross Site Scripting - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-5098 + Download Monitor < 3.3.6.2 Cross Site Scripting + http://www.securityfocus.com/bid/61407 + http://secunia.com/advisories/53116 + 2013-5098 + 2013-3262 XSS 3.3.6.2 @@ -2290,9 +2294,10 @@ MULTI - NextGEN Gallery 1.9.12 Arbitrary File Upload (CVE-2013-3684) + NextGEN Gallery 1.9.12 Arbitrary File Upload http://wordpress.org/plugins/nextgen-gallery/changelog/ http://osvdb.org/94232 + 2013-3684 UPLOAD 1.9.13 @@ -4128,223 +4133,249 @@ - CVE-2013-1808: zopim-live-chat <= 1.2.5 XSS in ZeroClipboard + zopim-live-chat <= 1.2.5 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: ed2k-link-selector <= 1.1.7 XSS in ZeroClipboard + ed2k-link-selector <= 1.1.7 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: wppygments <= 0.3.2 XSS in ZeroClipboard + wppygments <= 0.3.2 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: copy-in-clipboard <= 0.8 XSS in ZeroClipboard + copy-in-clipboard <= 0.8 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: search-and-share <= 0.9.3 XSS in ZeroClipboard + search-and-share <= 0.9.3 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: placester <= 0.3.12 XSS in ZeroClipboard + placester <= 0.3.12 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: drp-coupon <= 2.1 XSS in ZeroClipboard + drp-coupon <= 2.1 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: coupon-code-plugin <= 2.1 XSS in ZeroClipboard + coupon-code-plugin <= 2.1 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: q2w3-inc-manager <= 2.3.1 XSS in ZeroClipboard + q2w3-inc-manager <= 2.3.1 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: scorerender <= 0.3.4 XSS in ZeroClipboard + scorerender <= 0.3.4 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: wp-link-to-us <= 2.0 XSS in ZeroClipboard + wp-link-to-us <= 2.0 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: buckets <= 0.1.9.2 XSS in ZeroClipboard + buckets <= 0.1.9.2 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: java-trackback <= 0.2 XSS in ZeroClipboard + java-trackback <= 0.2 XSS in ZeroClipboard http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: slidedeck2 <= 2.1.20130228 XSS in ZeroClipboard + slidedeck2 <= 2.1.20130228 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: wp-clone-by-wp-academy <= 2.1.1 XSS in ZeroClipboard + wp-clone-by-wp-academy <= 2.1.1 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: tiny-url <= 1.3.2 XSS in ZeroClipboard + tiny-url <= 1.3.2 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: thethe-layout-grid <= 1.0.0 XSS in ZeroClipboard. + thethe-layout-grid <= 1.0.0 XSS in ZeroClipboard. http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: paypal-digital-goods-monetization-powered-by-cleeng <= 2.2.13 XSS in ZeroClipboard + paypal-digital-goods-monetization-powered-by-cleeng <= 2.2.13 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: mobileview <= 1.0.7 XSS in ZeroClipboard + mobileview <= 1.0.7 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: jaspreetchahals-coupons-lite <= 2.1 XSS in ZeroClipboard + jaspreetchahals-coupons-lite <= 2.1 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: geshi-source-colorer <= 0.13 XSS in ZeroClipboard + geshi-source-colorer <= 0.13 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: click-to-copy-grab-box <= 0.1.1 XSS in ZeroClipboard + click-to-copy-grab-box <= 0.1.1 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: cleeng <= 2.3.2 XSS in ZeroClipboard + cleeng <= 2.3.2 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2013-1808: bp-code-snippets <= 2.0 XSS in ZeroClipboard + bp-code-snippets <= 2.0 XSS in ZeroClipboard http://www.openwall.com/lists/oss-security/2013/03/10/2 http://1337day.com/exploit/20396 + 2013-1808 XSS - CVE-2009-4168: snazzy-archives <= 1.7.1 XSS vulnerability + snazzy-archives <= 1.7.1 XSS vulnerability http://www.openwall.com/lists/oss-security/2013/03/10/3 + 2009-4168 XSS - CVE-2009-4168: vkontakte-api XSS vulnerability + vkontakte-api XSS vulnerability http://www.openwall.com/lists/oss-security/2013/03/11/1 + 2009-4168 XSS @@ -4436,7 +4467,7 @@ ofc_upload_image.php Arbitrary File Upload Vulnerability http://www.exploit-db.com/exploits/24492/ http://secunia.com/advisories/37903 - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4140 + 2009-4140 UPLOAD 0.5 @@ -4538,7 +4569,7 @@ facebook-members CSRF https://secunia.com/advisories/52962/ - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2703 + 2013-2703 CSRF 5.0.5 @@ -4548,7 +4579,7 @@ foursquare-checkins CSRF https://secunia.com/advisories/53151/ - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2709 + 2013-2709 CSRF 1.3 @@ -4567,7 +4598,7 @@ all-in-one-webmaster CSRF https://secunia.com/advisories/52877/ - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2696 + 2013-2696 CSRF 8.2.4 @@ -4619,7 +4650,7 @@ easy-adsense-lite CSRF https://secunia.com/advisories/52953/ - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2702 + 2013-2702 CSRF 6.10 @@ -4627,27 +4658,31 @@ - CVE-2012-5856: uk-cookie plugin XSS + uk-cookie plugin XSS http://osvdb.org/87561 http://seclists.org/bugtraq/2012/Nov/50 + 2012-5856 XSS - CVE-2013-2180: uk-cookie CSRF + uk-cookie CSRF http://www.openwall.com/lists/oss-security/2013/06/06/10 http://osvdb.org/94032 + 2013-2180 CSRF - CVE-2013-2108|CVE-2013-2109: wp-cleanfix Remote Command Execution, CSRF and XSS + wp-cleanfix Remote Command Execution, CSRF and XSS https://github.com/wpscanteam/wpscan/issues/186 http://wordpress.org/support/topic/plugin-wp-cleanfix-remote-code-execution-warning http://osvdb.org/93450 http://secunia.com/advisories/53395/ http://osvdb.org/93468 + 2013-2108 + 2013-2109 MULTI 3.0.2 @@ -4811,10 +4846,11 @@ - CSRF in WordPress underConstruction plugin (CVE-2013-2699) + CSRF in WordPress underConstruction plugin http://wordpress.org/plugins/underconstruction/changelog/ http://secunia.com/advisories/52881/ http://osvdb.org/93857 + 2013-2699 CSRF 1.09 @@ -4971,16 +5007,18 @@ - CVE-2013-4692: Xorbin Analog Flash Clock 1.0 Flash-based XSS + Xorbin Analog Flash Clock 1.0 Flash-based XSS http://advisory.prakharprasad.com/xorbin_afc_wp.txt + 2013-4692 XSS - CVE-2013-4693: Xorbin Digital Flash Clock 1.0 Flash-based XSS + Xorbin Digital Flash Clock 1.0 Flash-based XSS http://advisory.prakharprasad.com/xorbin_dfc_wp.txt + 2013-4693 XSS @@ -5020,8 +5058,9 @@ - CVE-2013-4625: Duplicator installer.cleanup.php package Parameter XSS + Duplicator installer.cleanup.php package Parameter XSS http://osvdb.org/95627 + 2013-4625 XSS 0.4.5 @@ -5056,8 +5095,9 @@ - CVE-2013-3253: CSRF in admin/setting.php in Xhanch - https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-3253 + CSRF in admin/setting.php in Xhanch + http://secunia.com/advisories/53133 + 2013-3253 CSRF 2.7.7 @@ -5065,8 +5105,9 @@ - CVE-2013-3256: CSRF in sexybookmarks + CSRF in sexybookmarks http://wordpress.org/plugins/sexybookmarks/changelog/ + 2013-3256 CSRF 6.1.5.0 diff --git a/data/vuln.xsd b/data/vuln.xsd index 6c344184..8b2404a9 100644 --- a/data/vuln.xsd +++ b/data/vuln.xsd @@ -52,6 +52,7 @@ + diff --git a/lib/common/models/vulnerability.rb b/lib/common/models/vulnerability.rb index 1fb412a7..7ca7cf1e 100755 --- a/lib/common/models/vulnerability.rb +++ b/lib/common/models/vulnerability.rb @@ -5,22 +5,24 @@ require 'vulnerability/output' class Vulnerability include Vulnerability::Output - attr_accessor :title, :references, :type, :fixed_in, :metasploit_modules + attr_accessor :title, :references, :type, :fixed_in, :metasploit_modules, :cve # # @param [ String ] title The title of the vulnerability # @param [ String ] type The type of the vulnerability # @param [ Array ] references References urls # @param [ Array ] metasploit_modules Metasploit modules for the vulnerability - # @param [ String ] fixed_in Vuln fixed in Version X + # @param [ String ] fixed_in Vuln fixed in Version X + # @param [ Array ] cve CVE numbers for the vulnerability # # @return [ Vulnerability ] - def initialize(title, type, references, metasploit_modules = [], fixed_in = '') + def initialize(title, type, references, metasploit_modules = [], fixed_in = '', cve = []) @title = title @type = type @references = references @metasploit_modules = metasploit_modules - @fixed_in = fixed_in + @fixed_in = fixed_in + @cve = cve end # @param [ Vulnerability ] other @@ -32,6 +34,7 @@ class Vulnerability type == other.type && references == other.references && fixed_in == other.fixed_in && + cve == other.cve && metasploit_modules == other.metasploit_modules end # :nocov: @@ -47,7 +50,8 @@ class Vulnerability xml_node.search('type').text, xml_node.search('reference').map(&:text), xml_node.search('metasploit').map(&:text), - xml_node.search('fixed_in').text + xml_node.search('fixed_in').text, + xml_node.search('cve').map(&:text) ) end diff --git a/lib/common/models/vulnerability/output.rb b/lib/common/models/vulnerability/output.rb index 5c5baff5..789e1161 100644 --- a/lib/common/models/vulnerability/output.rb +++ b/lib/common/models/vulnerability/output.rb @@ -10,6 +10,9 @@ class Vulnerability references.each do |r| puts ' | ' + red("* Reference: #{r}") end + cve.each do |c| + puts ' | ' + red("* CVE-#{c} - #{Output.cve_url(c)}") + end metasploit_modules.each do |m| puts ' | ' + red("* Metasploit module: #{Output.metasploit_module_url(m)}") end @@ -22,5 +25,9 @@ class Vulnerability "http://www.metasploit.com/modules/#{module_path}" end + def self.cve_url(cve) + "http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE#{cve}" + end + end end diff --git a/spec/lib/common/models/vulnerability/output_spec.rb b/spec/lib/common/models/vulnerability/output_spec.rb index ad92af62..db21773a 100644 --- a/spec/lib/common/models/vulnerability/output_spec.rb +++ b/spec/lib/common/models/vulnerability/output_spec.rb @@ -19,7 +19,13 @@ describe Vulnerability::Output do @module = 'gathering/yolo' @expected = modules_url + @module end - end + end + + describe '::cve_url' do + it 'returns the correct url' do + Vulnerability::Output.cve_url('1111-1111').should == 'http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1111-1111' + end + end describe '#output' do # How to test it ? oO diff --git a/spec/lib/common/models/vulnerability_spec.rb b/spec/lib/common/models/vulnerability_spec.rb index ca0cf959..391a9028 100644 --- a/spec/lib/common/models/vulnerability_spec.rb +++ b/spec/lib/common/models/vulnerability_spec.rb @@ -18,6 +18,7 @@ describe Vulnerability do its(:type) { should be type } its(:metasploit_modules) { should be_empty } its(:fixed_in) { should be_empty } + its(:cve) { should be_empty } end context 'with metasploit modules argument' do @@ -26,6 +27,7 @@ describe Vulnerability do its(:metasploit_modules) { should be modules } its(:fixed_in) { should be_empty } + its(:cve) { should be_empty } end context 'with metasploit modules and fixed version argument' do @@ -33,8 +35,19 @@ describe Vulnerability do let(:fixed_version) { '1.0' } its(:metasploit_modules) { should be modules } - its(:fixed_in) { should == '1.0' } + its(:fixed_in) { should == '1.0' } + its(:cve) { should be_empty } end + + context 'with cve argument' do + subject(:vulnerability) { Vulnerability.new(title, type, references, [], '', cve) } + let(:cve) { %w{2011-001 2011-002} } + + its(:metasploit_modules) { should be_empty } + its(:fixed_in) { should be_empty } + its(:cve) { should be cve } + end + end describe '::load_from_xml_node' do @@ -47,6 +60,7 @@ describe Vulnerability do its(:type) { should == 'CSRF' } its(:references) { should == ['Ref 1', 'Ref 2'] } its(:metasploit_modules) { should == %w{exploit/ex1} } + its(:cve) { should == %w{2011-001} } its(:fixed_in) { should == '1.0'} end diff --git a/spec/samples/common/models/vulnerability/xml_node.xml b/spec/samples/common/models/vulnerability/xml_node.xml index f02ec5d2..24a1fb2e 100644 --- a/spec/samples/common/models/vulnerability/xml_node.xml +++ b/spec/samples/common/models/vulnerability/xml_node.xml @@ -2,6 +2,7 @@ Vuln Title Ref 1 Ref 2 + 2011-001 CSRF exploit/ex1 1.0