dawnscanner 1.2.99
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +4 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +19 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +8 -0
- data/Changelog.md +412 -0
- data/Gemfile +4 -0
- data/KnowledgeBase.md +213 -0
- data/LICENSE.txt +22 -0
- data/README.md +354 -0
- data/Rakefile +250 -0
- data/Roadmap.md +59 -0
- data/bin/dawn +210 -0
- data/certs/paolo_at_codesake_dot_com.pem +21 -0
- data/checksum/.placeholder +0 -0
- data/checksum/codesake-dawn-1.1.0.gem.sha512 +1 -0
- data/checksum/codesake-dawn-1.1.0.rc1.gem.sha512 +1 -0
- data/checksum/codesake-dawn-1.1.1.gem.sha512 +1 -0
- data/checksum/codesake-dawn-1.1.2.gem.sha512 +1 -0
- data/checksum/codesake-dawn-1.1.3.gem.sha512 +1 -0
- data/checksum/codesake-dawn-1.2.0.gem.sha512 +1 -0
- data/checksum/codesake-dawn-1.2.99.gem.sha512 +1 -0
- data/dawnscanner.gemspec +43 -0
- data/doc/codesake-dawn.yaml.sample +26 -0
- data/doc/dawn_1_0_announcement.md +139 -0
- data/doc/dawn_1_1_announcement.md +67 -0
- data/doc/dawn_1_2_announcement.md +69 -0
- data/features/dawn_complains_about_an_incorrect_command_line.feature.disabled +21 -0
- data/features/dawn_scan_a_secure_sinatra_app.feature.disabled +31 -0
- data/features/dawn_scan_a_vulnerable_sinatra_app.feature.disabled +36 -0
- data/features/step_definition/dawn_steps.rb +19 -0
- data/features/support/env.rb +1 -0
- data/lib/codesake-dawn.rb +12 -0
- data/lib/codesake/dawn/core.rb +175 -0
- data/lib/codesake/dawn/engine.rb +380 -0
- data/lib/codesake/dawn/gemfile_lock.rb +12 -0
- data/lib/codesake/dawn/kb/basic_check.rb +228 -0
- data/lib/codesake/dawn/kb/combo_check.rb +64 -0
- data/lib/codesake/dawn/kb/cve_2004_0755.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2004_0983.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2005_1992.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2005_2337.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2006_1931.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2006_2582.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2006_3694.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2006_4112.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2006_5467.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2006_6303.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2006_6852.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2006_6979.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2007_0469.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2007_5162.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2007_5379.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2007_5380.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2007_5770.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2007_6077.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2007_6612.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2008_1145.rb +40 -0
- data/lib/codesake/dawn/kb/cve_2008_1891.rb +40 -0
- data/lib/codesake/dawn/kb/cve_2008_2376.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2008_2662.rb +35 -0
- data/lib/codesake/dawn/kb/cve_2008_2663.rb +34 -0
- data/lib/codesake/dawn/kb/cve_2008_2664.rb +35 -0
- data/lib/codesake/dawn/kb/cve_2008_2725.rb +33 -0
- data/lib/codesake/dawn/kb/cve_2008_3655.rb +39 -0
- data/lib/codesake/dawn/kb/cve_2008_3657.rb +39 -0
- data/lib/codesake/dawn/kb/cve_2008_3790.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2008_3905.rb +38 -0
- data/lib/codesake/dawn/kb/cve_2008_4094.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2008_4310.rb +103 -0
- data/lib/codesake/dawn/kb/cve_2008_5189.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2008_7248.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2009_4078.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2009_4124.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2009_4214.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2010_1330.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2010_2489.rb +62 -0
- data/lib/codesake/dawn/kb/cve_2010_3933.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2011_0188.rb +69 -0
- data/lib/codesake/dawn/kb/cve_2011_0446.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2011_0447.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2011_0739.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2011_0995.rb +63 -0
- data/lib/codesake/dawn/kb/cve_2011_1004.rb +36 -0
- data/lib/codesake/dawn/kb/cve_2011_1005.rb +33 -0
- data/lib/codesake/dawn/kb/cve_2011_2197.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2011_2686.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2011_2705.rb +34 -0
- data/lib/codesake/dawn/kb/cve_2011_2929.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2011_2930.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2011_2931.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2011_2932.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2011_3009.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2011_3186.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2011_3187.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2011_4319.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2011_4815.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2011_5036.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2012_1098.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2012_1099.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_1241.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_2139.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2012_2140.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_2660.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2012_2661.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_2671.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2012_2694.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2012_2695.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_3424.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2012_3463.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_3464.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_3465.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2012_4464.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_4466.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_4481.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2012_4522.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_5370.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_5371.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_5380.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2012_6109.rb +27 -0
- data/lib/codesake/dawn/kb/cve_2012_6134.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_6496.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2012_6497.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_0155.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2013_0156.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_0162.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_0175.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_0183.rb +27 -0
- data/lib/codesake/dawn/kb/cve_2013_0184.rb +27 -0
- data/lib/codesake/dawn/kb/cve_2013_0233.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_0256.rb +61 -0
- data/lib/codesake/dawn/kb/cve_2013_0262.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_0263.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_0269.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_0276.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_0277.rb +27 -0
- data/lib/codesake/dawn/kb/cve_2013_0284.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_0285.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_0333.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_1607.rb +27 -0
- data/lib/codesake/dawn/kb/cve_2013_1655.rb +67 -0
- data/lib/codesake/dawn/kb/cve_2013_1656.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_1756.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_1800.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_1801.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_1802.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_1812.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_1821.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_1854.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_1855.rb +27 -0
- data/lib/codesake/dawn/kb/cve_2013_1856.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_1857.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_1875.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_1898.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_1911.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_1933.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_1947.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_1948.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_2065.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2013_2090.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_2105.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_2119.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_2512.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_2513.rb +27 -0
- data/lib/codesake/dawn/kb/cve_2013_2516.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_2615.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_2616.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_2617.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_3221.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_4164.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2013_4203.rb +27 -0
- data/lib/codesake/dawn/kb/cve_2013_4389.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_4413.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_4457.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2013_4478.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_4479.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_4489.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_4491.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_4492.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2013_4562.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_4593.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_5647.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2013_5671.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_6414.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2013_6415.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_6416.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2013_6417.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2013_6421.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_6459.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_6460.rb +55 -0
- data/lib/codesake/dawn/kb/cve_2013_6461.rb +59 -0
- data/lib/codesake/dawn/kb/cve_2013_7086.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2014_0036.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2014_0080.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2014_0081.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2014_0082.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2014_0130.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2014_1233.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2014_1234.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2014_2322.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2014_2525.rb +61 -0
- data/lib/codesake/dawn/kb/cve_2014_2538.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2014_3482.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2014_3483.rb +29 -0
- data/lib/codesake/dawn/kb/dependency_check.rb +86 -0
- data/lib/codesake/dawn/kb/deprecation_check.rb +40 -0
- data/lib/codesake/dawn/kb/not_revised_code.rb +24 -0
- data/lib/codesake/dawn/kb/operating_system_check.rb +98 -0
- data/lib/codesake/dawn/kb/osvdb_105971.rb +31 -0
- data/lib/codesake/dawn/kb/osvdb_108530.rb +29 -0
- data/lib/codesake/dawn/kb/osvdb_108563.rb +30 -0
- data/lib/codesake/dawn/kb/osvdb_108569.rb +30 -0
- data/lib/codesake/dawn/kb/osvdb_108570.rb +29 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet.rb +41 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/check_for_backup_files.rb +22 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/check_for_safe_redirect_and_forward.rb +59 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/command_injection.rb +30 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/csrf.rb +31 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/mass_assignment_in_model.rb +35 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/security_related_headers.rb +38 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/sensitive_files.rb +31 -0
- data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/session_stored_in_database.rb +33 -0
- data/lib/codesake/dawn/kb/pattern_match_check.rb +129 -0
- data/lib/codesake/dawn/kb/ruby_version_check.rb +91 -0
- data/lib/codesake/dawn/kb/simpleform_xss_20131129.rb +30 -0
- data/lib/codesake/dawn/kb/version_check.rb +418 -0
- data/lib/codesake/dawn/knowledge_base.rb +513 -0
- data/lib/codesake/dawn/padrino.rb +82 -0
- data/lib/codesake/dawn/rails.rb +17 -0
- data/lib/codesake/dawn/railtie.rb +9 -0
- data/lib/codesake/dawn/reporter.rb +280 -0
- data/lib/codesake/dawn/sinatra.rb +129 -0
- data/lib/codesake/dawn/tasks.rb +27 -0
- data/lib/codesake/dawn/utils.rb +21 -0
- data/lib/codesake/dawn/version.rb +28 -0
- data/lib/tasks/codesake-dawn_tasks.rake +1 -0
- data/spec/lib/dawn/codesake_core_spec.rb +9 -0
- data/spec/lib/dawn/codesake_knowledgebase_spec.rb +940 -0
- data/spec/lib/dawn/codesake_padrino_engine_disabled.rb +45 -0
- data/spec/lib/dawn/codesake_rails_engine_disabled.rb +12 -0
- data/spec/lib/dawn/codesake_sinatra_engine_disabled.rb +128 -0
- data/spec/lib/kb/codesake_cve_2013_0175_spec.rb +35 -0
- data/spec/lib/kb/codesake_cve_2013_4457_spec.rb +41 -0
- data/spec/lib/kb/codesake_dependency_version_check_spec.rb +76 -0
- data/spec/lib/kb/codesake_deprecation_check_spec.rb +56 -0
- data/spec/lib/kb/codesake_ruby_version_check_spec.rb +40 -0
- data/spec/lib/kb/codesake_version_check_spec.rb +165 -0
- data/spec/lib/kb/cve_2011_2705_spec.rb +35 -0
- data/spec/lib/kb/cve_2011_2930_spec.rb +31 -0
- data/spec/lib/kb/cve_2011_3009_spec.rb +25 -0
- data/spec/lib/kb/cve_2011_3187_spec.rb +24 -0
- data/spec/lib/kb/cve_2011_4319_spec.rb +44 -0
- data/spec/lib/kb/cve_2011_5036_spec.rb +95 -0
- data/spec/lib/kb/cve_2012_1098_spec.rb +36 -0
- data/spec/lib/kb/cve_2012_2139_spec.rb +20 -0
- data/spec/lib/kb/cve_2012_2671_spec.rb +23 -0
- data/spec/lib/kb/cve_2012_6109_spec.rb +112 -0
- data/spec/lib/kb/cve_2013_0162_spec.rb +23 -0
- data/spec/lib/kb/cve_2013_0183_spec.rb +54 -0
- data/spec/lib/kb/cve_2013_0184_spec.rb +115 -0
- data/spec/lib/kb/cve_2013_0256_spec.rb +34 -0
- data/spec/lib/kb/cve_2013_0262_spec.rb +44 -0
- data/spec/lib/kb/cve_2013_0263_spec.rb +11 -0
- data/spec/lib/kb/cve_2013_1607_spec.rb +15 -0
- data/spec/lib/kb/cve_2013_1655_spec.rb +31 -0
- data/spec/lib/kb/cve_2013_1756_spec.rb +23 -0
- data/spec/lib/kb/cve_2013_2090_spec.rb +15 -0
- data/spec/lib/kb/cve_2013_2105_spec.rb +11 -0
- data/spec/lib/kb/cve_2013_2119_spec.rb +27 -0
- data/spec/lib/kb/cve_2013_2512_spec.rb +15 -0
- data/spec/lib/kb/cve_2013_2513_spec.rb +15 -0
- data/spec/lib/kb/cve_2013_2516_spec.rb +15 -0
- data/spec/lib/kb/cve_2013_4203_spec.rb +15 -0
- data/spec/lib/kb/cve_2013_4413_spec.rb +16 -0
- data/spec/lib/kb/cve_2013_4489_spec.rb +63 -0
- data/spec/lib/kb/cve_2013_4593_spec.rb +16 -0
- data/spec/lib/kb/cve_2013_5647_spec.rb +19 -0
- data/spec/lib/kb/cve_2013_5671_spec.rb +27 -0
- data/spec/lib/kb/cve_2013_6416_spec.rb +31 -0
- data/spec/lib/kb/cve_2013_6459_spec.rb +15 -0
- data/spec/lib/kb/cve_2013_7086_spec.rb +22 -0
- data/spec/lib/kb/cve_2014_0036_spec.rb +15 -0
- data/spec/lib/kb/cve_2014_0080_spec.rb +28 -0
- data/spec/lib/kb/cve_2014_0081_spec.rb +68 -0
- data/spec/lib/kb/cve_2014_0082_spec.rb +52 -0
- data/spec/lib/kb/cve_2014_0130_spec.rb +19 -0
- data/spec/lib/kb/cve_2014_1233_spec.rb +15 -0
- data/spec/lib/kb/cve_2014_1234_spec.rb +16 -0
- data/spec/lib/kb/cve_2014_2322_spec.rb +15 -0
- data/spec/lib/kb/cve_2014_2538_spec.rb +15 -0
- data/spec/lib/kb/cve_2014_3482_spec.rb +15 -0
- data/spec/lib/kb/cve_2014_3483_spec.rb +23 -0
- data/spec/lib/kb/osvdb_105971_spec.rb +15 -0
- data/spec/lib/kb/osvdb_108530_spec.rb +22 -0
- data/spec/lib/kb/osvdb_108563_spec.rb +18 -0
- data/spec/lib/kb/osvdb_108569_spec.rb +17 -0
- data/spec/lib/kb/osvdb_108570_spec.rb +17 -0
- data/spec/lib/kb/owasp_ror_cheatsheet_disabled.rb +56 -0
- data/spec/spec_helper.rb +11 -0
- data/support/bootstrap.js +2027 -0
- data/support/bootstrap.min.css +9 -0
- data/support/codesake.css +63 -0
- metadata +659 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
# Automatically created with rake on 2014-05-06
|
5
|
+
class CVE_2014_0130
|
6
|
+
include DependencyCheck
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
message = "The implicit render functionality allows controllers to render a template, even if there is no explicit action with the corresponding name. This module does not perform adequate input sanitization which could allow an attacker to use a specially crafted request to retrieve arbitrary files from the rails application server."
|
10
|
+
super({
|
11
|
+
:name=>"CVE-2014-0130",
|
12
|
+
:cvss=>"AV:N/AC:M/Au:N/C:P/I:N/A:N",
|
13
|
+
:release_date => Date.new(2014, 5, 6),
|
14
|
+
:cwe=>"",
|
15
|
+
:owasp=>"A9",
|
16
|
+
:applies=>["rails"],
|
17
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
18
|
+
:message=>message,
|
19
|
+
:mitigation=>"Please upgrade rails version up to version 3.2.18, 4.0.5 or 4.1.1.",
|
20
|
+
:aux_links=>["https://groups.google.com/forum/#!msg/rubyonrails-security/NkKc7vTW70o/NxW_PDBSG3AJ"]
|
21
|
+
})
|
22
|
+
self.safe_dependencies = [{:name=>"rails", :version=>['3.2.18', '4.0.5', '4.1.1']}]
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
# Automatically created with rake on 2014-02-05
|
5
|
+
class CVE_2014_1233
|
6
|
+
include DependencyCheck
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
message = "The paratrooper-pingdom gem 1.0.0 for Ruby allows local users to obtain the App-Key, username, and password values by listing the curl process."
|
10
|
+
|
11
|
+
super({
|
12
|
+
:name=>"CVE-2014-1233",
|
13
|
+
:cvss=>"AV:L/AC:L/Au:N/C:P/I:N/A:N",
|
14
|
+
:release_date => Date.new(2014, 01, 10),
|
15
|
+
:cwe=>"200",
|
16
|
+
:owasp=>"A9",
|
17
|
+
:applies=>["rails", "sinatra", "padrino"],
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
19
|
+
:message=>message,
|
20
|
+
:mitigation=>"Please upgrade paratrooper-pingdom version up to version 1.0.0.",
|
21
|
+
:aux_links=>["http://www.vapid.dhs.org/advisories/paratrooper-api-key-pingdom.html"]
|
22
|
+
})
|
23
|
+
|
24
|
+
self.safe_dependencies = [{:name=>"paratrooper-pingdom", :version=>['1.0.1']}]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
# Automatically created with rake on 2014-02-05
|
5
|
+
class CVE_2014_1234
|
6
|
+
include DependencyCheck
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
message = "The paratrooper-newrelic gem 1.0.1 for Ruby allows local users to obtain the X-Api-Key value by listing the curl process."
|
10
|
+
super({
|
11
|
+
:name=>"CVE-2014-1234",
|
12
|
+
:cvss=>"AV:L/AC:L/Au:N/C:P/I:N/A:N",
|
13
|
+
:release_date => Date.new(2014, 01, 10),
|
14
|
+
:cwe=>"200",
|
15
|
+
:owasp=>"A9",
|
16
|
+
:applies=>["rails", "sinatra", "padrino"],
|
17
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
18
|
+
:message=>message,
|
19
|
+
:mitigation=>"Please upgrade paratrooper-newrelic version up to version 1.0.1.",
|
20
|
+
:aux_links=>["http://www.vapid.dhs.org/advisories/paratrooper-newrelic-api.html"]
|
21
|
+
})
|
22
|
+
|
23
|
+
self.safe_dependencies = [{:name=>"paratrooper-newrelic", :version=>['1.0.2']}]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
# Automatically created with rake on 2014-03-14
|
5
|
+
class CVE_2014_2322
|
6
|
+
# Include the testing skeleton for this CVE
|
7
|
+
include DependencyCheck
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
message = "Arabic Prawn Gem for Ruby contains a flaw in the ib/string_utf_support.rb file. The issue is due to the program failing to sanitize user input. This may allow a remote attacker to inject arbitrary commands."
|
11
|
+
|
12
|
+
super({
|
13
|
+
:name=>"CVE-2014-2322",
|
14
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
15
|
+
:release_date => Date.new(2014, 3, 10),
|
16
|
+
:cwe=>"",
|
17
|
+
:owasp=>"A9",
|
18
|
+
:applies=>["sinatra", "padrino", "rails"],
|
19
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
20
|
+
:message=>message,
|
21
|
+
:mitigation=>"At March, 14 2014 a fixed Arabic-Prawn release is not available. Please sanitize your input before passing it to this gem and upgrade to higher versions as soon as possible",
|
22
|
+
:aux_links=>["http://packetstormsecurity.com/files/125679/Ruby-Gem-Arabic-Prawn-0.0.1-Command-Injection.html"]
|
23
|
+
})
|
24
|
+
|
25
|
+
self.safe_dependencies = [{:name=>"Arabic-Prawn", :version=>['0.0.2']}]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
class CVE_2014_2525_a
|
5
|
+
include BasicCheck
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
message = "When relying on system wide libyaml, this must be > 0.1.5"
|
9
|
+
super({
|
10
|
+
:name=>"CVE-2014-2525-a",
|
11
|
+
:kind=>Codesake::Dawn::KnowledgeBase::CUSTOM_CHECK,
|
12
|
+
})
|
13
|
+
end
|
14
|
+
def vuln?
|
15
|
+
require 'yaml'
|
16
|
+
lyv = Psych.libyaml_version.join(".")
|
17
|
+
c = Codesake::Dawn::Kb::VersionCheck.new
|
18
|
+
return c.is_vulnerable_version?('0.1.6', lyv)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
class CVE_2014_2525_b
|
22
|
+
include DependencyCheck
|
23
|
+
|
24
|
+
def initialize
|
25
|
+
message = "When non relying on system wide libyaml, psych gem must be > 2.0.5"
|
26
|
+
super({
|
27
|
+
:name=>"CVE-2014-2525-b",
|
28
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
29
|
+
})
|
30
|
+
self.safe_dependencies = [{:name=>"psych", :version=>['2.0.5']}]
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
# Automatically created with rake on 2014-03-31
|
36
|
+
class CVE_2014_2525
|
37
|
+
include ComboCheck
|
38
|
+
|
39
|
+
def initialize
|
40
|
+
message = ""
|
41
|
+
|
42
|
+
super({
|
43
|
+
:name=>"CVE-2014-2525",
|
44
|
+
:cvss=>"",
|
45
|
+
:release_date => Date.new(2014, 3, 28),
|
46
|
+
:cwe=>"",
|
47
|
+
:owasp=>"A9",
|
48
|
+
:applies=>["rails", "sinatra", "padrino"],
|
49
|
+
:kind=>Codesake::Dawn::KnowledgeBase::COMBO_CHECK,
|
50
|
+
:message=>message,
|
51
|
+
:mitigation=>"Please upgrade your system libyaml or upgrade psych gem to version 2.0.5 or higher that is linked with a safe libyaml version.",
|
52
|
+
:aux_links=>["https://www.ruby-lang.org/en/news/2014/03/29/heap-overflow-in-yaml-uri-escape-parsing-cve-2014-2525"],
|
53
|
+
:severity=>:high,
|
54
|
+
:prority=>:high,
|
55
|
+
:checks=>[CVE_2014_2525_a.new, CVE_2014_2525_b.new]
|
56
|
+
})
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
# Automatically created with rake on 2014-03-23
|
5
|
+
class CVE_2014_2538
|
6
|
+
include DependencyCheck
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
message = "rack-ssl Gem for Ruby contains a flaw that allows a reflected cross-site scripting (XSS) attack. This flaw exists because the program does not validate input passed via error messages before returning it to users. This may allow a context-dependent attacker to create a specially crafted request that would execute arbitrary script code in a user's browser session within the trust relationship between their browser and the server."
|
10
|
+
super({
|
11
|
+
:name=>"CVE-2014-2538",
|
12
|
+
:cvss=>"AV:N/AC:M/Au:N/C:N/I:P/A:N",
|
13
|
+
:release_date => Date.new(2014, 3, 25),
|
14
|
+
:cwe=>"79",
|
15
|
+
:owasp=>"A3",
|
16
|
+
:applies=>["rails"],
|
17
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
18
|
+
:message=>message,
|
19
|
+
:mitigation=>"A new version for rack-ssl version it has been released. Pleas upgrade at least to version 1.4.0 or higher.",
|
20
|
+
:aux_links=>["http://seclists.org/oss-sec/2014/q1/594"]
|
21
|
+
})
|
22
|
+
|
23
|
+
self.safe_dependencies = [{:name=>"rack-ssl", :version=>['1.4.0']}]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
# Automatically created with rake on 2014-07-04
|
5
|
+
class CVE_2014_3482
|
6
|
+
include DependencyCheck
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
message = "Ruby on Rails contains a flaw that may allow carrying out an SQL injection attack. The issue is due to the PostgreSQL adapter for Active Record not properly sanitizing user-supplied input when quoting bitstrings. This may allow a remote attacker to inject or manipulate SQL queries in the back-end database, allowing for the manipulation or disclosure of arbitrary data."
|
10
|
+
super({
|
11
|
+
:name=> "CVE-2014-3482",
|
12
|
+
:cve=>"CVE-2014-3482",
|
13
|
+
:osvdb=>"108664",
|
14
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
15
|
+
:release_date => Date.new(2014, 7, 2),
|
16
|
+
:cwe=>"",
|
17
|
+
:owasp=>"A1",
|
18
|
+
:applies=>["rails"],
|
19
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
20
|
+
:message=>message,
|
21
|
+
:mitigation=>"Please upgrade rails version at least to 3.2.19. As a general rule, using the latest stable version is recommended.",
|
22
|
+
:aux_links=>["http://weblog.rubyonrails.org/2014/7/2/Rails_3_2_19_4_0_7_and_4_1_3_have_been_released/"]
|
23
|
+
})
|
24
|
+
self.safe_dependencies = [{:name=>"rails", :version=>['3.2.19']}]
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
# Automatically created with rake on 2014-07-07
|
5
|
+
class CVE_2014_3483
|
6
|
+
include DependencyCheck
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
message = "Ruby on Rails contains a flaw that may allow carrying out an SQL injection attack. The issue is due to the PostgreSQL adapter for Active Record not properly sanitizing user-supplied input when quoting ranges. This may allow a remote attacker to inject or manipulate SQL queries in the back-end database, allowing for the manipulation or disclosure of arbitrary data."
|
10
|
+
super({
|
11
|
+
:name=>"CVE-2014-3483",
|
12
|
+
:cve=>"2014-3483",
|
13
|
+
:osvdb=>"108665",
|
14
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
15
|
+
:release_date => Date.new(2014, 7, 2),
|
16
|
+
:cwe=>"",
|
17
|
+
:owasp=>"A1",
|
18
|
+
:applies=>["rails"],
|
19
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
20
|
+
:message=>message,
|
21
|
+
:mitigation=>"Please upgrade rails at least to version 4.0.7 or 4.1.3. As a general rule, using the latest stable rails version is recommended.",
|
22
|
+
:aux_links=>["http://weblog.rubyonrails.org/2014/7/2/Rails_3_2_19_4_0_7_and_4_1_3_have_been_released/"]
|
23
|
+
})
|
24
|
+
self.safe_dependencies = [{:name=>"rails", :version=>['4.0.7', '4.1.3']}]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
module DependencyCheck
|
5
|
+
include BasicCheck
|
6
|
+
|
7
|
+
attr_accessor :dependencies
|
8
|
+
|
9
|
+
# This attribute replaces fixed_dependency in 20130521.
|
10
|
+
# There are cve checks like
|
11
|
+
# http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-0175 that
|
12
|
+
# addresses two different gems firing up the vulnerability. You can
|
13
|
+
# read this like, "if you use gem A version A1 or if you use gem B
|
14
|
+
# version B1 you can occur in this issue".
|
15
|
+
attr_accessor :safe_dependencies
|
16
|
+
attr_accessor :aux_mitigation_gem
|
17
|
+
|
18
|
+
attr_accessor :not_affected
|
19
|
+
|
20
|
+
# Tells a version is not vulnerable even if in the fixes array that has
|
21
|
+
# a minor version number higher than the current.
|
22
|
+
# This is useful especially for rails version where 3.0.x, 3.1.y, 3.2.z
|
23
|
+
# are separated branches and the patch is provided for all of those. So
|
24
|
+
# if version 3.1.10 is safe and you have it, you don't be prompted
|
25
|
+
# about 3.2.x.
|
26
|
+
attr_accessor :save_minor
|
27
|
+
attr_accessor :save_major
|
28
|
+
|
29
|
+
def initialize(options)
|
30
|
+
super(options)
|
31
|
+
@save_minor ||= options[:save_minor]
|
32
|
+
@save_major ||= options[:save_major]
|
33
|
+
end
|
34
|
+
|
35
|
+
def vuln?
|
36
|
+
ret = false
|
37
|
+
@mitigated = false
|
38
|
+
message = ""
|
39
|
+
|
40
|
+
|
41
|
+
@dependencies.each do |dep|
|
42
|
+
# don't care about gem version when it mitigates a vulnerability... this can be risky, maybe I would reconsider in the future.
|
43
|
+
@mitigated = true if dep[:name] == @aux_mitigation_gem[:name] unless @aux_mitigation_gem.nil?
|
44
|
+
|
45
|
+
@safe_dependencies.each do |safe_dep|
|
46
|
+
if safe_dep[:name] == "rails"
|
47
|
+
debug_me "Forcing save_minor flag for rails gem dependency check"
|
48
|
+
self.save_minor = true
|
49
|
+
end
|
50
|
+
|
51
|
+
if dep[:name] == safe_dep[:name]
|
52
|
+
v = Codesake::Dawn::Kb::VersionCheck.new(
|
53
|
+
{
|
54
|
+
:safe=>safe_dep[:version],
|
55
|
+
:detected=>dep[:version],
|
56
|
+
:save_minor => self.save_minor,
|
57
|
+
:save_major => self.save_major,
|
58
|
+
}
|
59
|
+
)
|
60
|
+
v.debug = self.debug
|
61
|
+
v.excluded = self.not_affected[:version] unless self.not_affected.nil?
|
62
|
+
|
63
|
+
vuln = v.vuln?
|
64
|
+
if vuln && @ruby_vulnerable_versions.empty?
|
65
|
+
message = "Vulnerable #{dep[:name]} gem version found: #{dep[:version]}"
|
66
|
+
ret = vuln
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
if ret && @mitigated
|
73
|
+
ret = false
|
74
|
+
message += "Vulnerability has been mitigated by gem #{@aux_mitigation_gem[:name]}. Don't remove it from your Gemfile"
|
75
|
+
end
|
76
|
+
|
77
|
+
self.evidences << message unless message.empty?
|
78
|
+
|
79
|
+
@status = ret
|
80
|
+
|
81
|
+
ret
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
class DeprecationCheck
|
5
|
+
include BasicCheck
|
6
|
+
|
7
|
+
DEPRECATION_MATRIX = [
|
8
|
+
# {:gem=>"rails", :versions=>['0.x', '1.x', '2.x']},
|
9
|
+
# {:gem=>"sinatra", :versions=>['0.x', '1.x', '2.x']},
|
10
|
+
# {:gem=>"padrino", :versions=>['0.x', '1.x', '2.x']},
|
11
|
+
{:gem=>"ruby", :versions=>['1.1.x', '1.2.x', '1.3.x', '1.4.x', '1.5.x', '1.6.x', '1.7.x', '1.8.7']},
|
12
|
+
]
|
13
|
+
|
14
|
+
attr_accessor :detected
|
15
|
+
attr_accessor :enable_warning
|
16
|
+
|
17
|
+
def initialize(options={})
|
18
|
+
super(options)
|
19
|
+
@enable_warning ||= options[:enable_warning]
|
20
|
+
debug_me "DeprecationCheck initialized"
|
21
|
+
$logger.warn "MVC deprecation check is disable by now" unless self.enable_warning.nil?
|
22
|
+
end
|
23
|
+
|
24
|
+
def vuln?
|
25
|
+
debug_me "vuln? @detected is #{@detected}"
|
26
|
+
v = Codesake::Dawn::Kb::VersionCheck.new
|
27
|
+
v.debug = self.debug
|
28
|
+
v.detected = @detected[:version]
|
29
|
+
|
30
|
+
DEPRECATION_MATRIX.each do |dm|
|
31
|
+
v.deprecated = dm[:versions] if dm[:gem] == @detected[:gem]
|
32
|
+
end
|
33
|
+
return false if v.deprecated.nil?
|
34
|
+
return v.is_detected_deprecated?
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
class NotRevisedCode
|
5
|
+
include PatternMatchCheck
|
6
|
+
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
super({:name=>"Not revised code",
|
10
|
+
:cvss=>"",
|
11
|
+
:release_date=>nil,
|
12
|
+
:cwe=>"",
|
13
|
+
:owasp=>"",
|
14
|
+
:applies=>["sinatra", "rails", "padrino"],
|
15
|
+
:kind=>Codesake::Dawn::KnowledgeBase::PATTERN_MATCH_CHECK,
|
16
|
+
:message=>"Analyzing comments, it seems your code is waiting from some review from you. Please consider take action before putting it in production.\nThis check will analyze the source code looking for the following patterns: XXX, TO_CHECK, CHECKME, CHECK and FIXME",
|
17
|
+
:mitigation=>"Please review the file fixing the issue.",
|
18
|
+
:attack_pattern => ["XXX", "TO_CHECK", "CHECKME", "CHECK", "FIXME"]
|
19
|
+
})
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
module Codesake
|
2
|
+
module Dawn
|
3
|
+
module Kb
|
4
|
+
module OperatingSystemCheck
|
5
|
+
include BasicCheck
|
6
|
+
|
7
|
+
# safe_os is an Hash with this form {:family=>"", :vendor=>"", :version=>""}
|
8
|
+
#
|
9
|
+
# family can be one of the following:
|
10
|
+
# "linux"
|
11
|
+
# "windows"
|
12
|
+
# "unix"
|
13
|
+
# "osx"
|
14
|
+
# "freebsd"
|
15
|
+
# "netbsd"
|
16
|
+
# "openbsd"
|
17
|
+
# "unknown"
|
18
|
+
# vendor will be either "microsoft", "apple", unix flavour or linux distribution accordingly
|
19
|
+
attr_accessor :safe_os
|
20
|
+
attr_accessor :target_os
|
21
|
+
|
22
|
+
|
23
|
+
def initialize(options={})
|
24
|
+
super(options)
|
25
|
+
os_detect
|
26
|
+
end
|
27
|
+
|
28
|
+
def vuln?
|
29
|
+
|
30
|
+
return false if different_family?
|
31
|
+
return false if different_vendor?
|
32
|
+
return vulnerable_os?
|
33
|
+
end
|
34
|
+
|
35
|
+
def different_family?
|
36
|
+
ret = false
|
37
|
+
@safe_os.each do |sos|
|
38
|
+
ret = true if ! ret && sos[:family] == @target_os[:family]
|
39
|
+
end
|
40
|
+
ret
|
41
|
+
end
|
42
|
+
|
43
|
+
def different_vendor?
|
44
|
+
ret = false
|
45
|
+
@safe_os.each do |sos|
|
46
|
+
ret = true if ! ret && sos[:vendor] == @target_os[:vendor]
|
47
|
+
end
|
48
|
+
ret
|
49
|
+
end
|
50
|
+
|
51
|
+
def vulnerable_os?
|
52
|
+
ret = false
|
53
|
+
@safe_os.each do |sos|
|
54
|
+
ret = true if ! ret && sos[:version] = 'none'
|
55
|
+
ret = true if ! ret && is_vulnerable_version?(@target_os[:family], sos[:version])
|
56
|
+
end
|
57
|
+
ret
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
def os_detect
|
62
|
+
platform = RUBY_PLATFORM
|
63
|
+
|
64
|
+
@target_os = {}
|
65
|
+
|
66
|
+
@target_os[:family] = "osx"; @target_os[:vendor]="apple" unless /darwin/.match(platform).nil?
|
67
|
+
@target_os[:family] = "windows"; @target_os[:vendor]="microsoft" unless /win32/.match(platform).nil?
|
68
|
+
@target_os[:family] = "linux" unless /linux/.match(platform).nil?
|
69
|
+
@target_os[:family] = "unix"; @target_os[:vendor]="freebsd" unless /freebsd/.match(platform).nil?
|
70
|
+
@target_os[:family] = "unix"; @target_os[:vendor]="openbsd" unless /openbsd/.match(platform).nil?
|
71
|
+
@target_os[:family] = "unix"; @target_os[:vendor]="netbsd" unless /netbsd/.match(platform).nil?
|
72
|
+
|
73
|
+
begin
|
74
|
+
require 'sys/uname'
|
75
|
+
@target_os[:version]= [Sys::Uname.release]
|
76
|
+
rescue # otherwise use shell
|
77
|
+
@target_os[:version] = [`uname -r`.strip]
|
78
|
+
end
|
79
|
+
|
80
|
+
tmp = ""
|
81
|
+
if File.exist?("/etc/SuSE-release")
|
82
|
+
tmp = File.readlines("/etc/SuSE-release");
|
83
|
+
@target_os[:vendor]="suse"
|
84
|
+
end
|
85
|
+
|
86
|
+
if File.exist?("/etc/redhat_release")
|
87
|
+
tmp = File.readlines("/etc/redhat_release");
|
88
|
+
@target_os[:vendor]="redhat"
|
89
|
+
end
|
90
|
+
if File.exist?("/etc/debian_release")
|
91
|
+
tmp = File.readlines("/etc/debian_release");
|
92
|
+
@target_os[:vendor]="debian"
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|