LoginSignup
6
2

More than 5 years have passed since last update.

有償脆弱性データベースvFeedの調査その1

Last updated at Posted at 2017-12-11

はじめに

AdventCalendarドリブンで普段調査してくてもできていなかったことを調べてメモっていくシリーズ。
2017年12月時点でのVulsは、インターネット上に公開されているNVD, JVN, OVALの脆弱性データベースを利用している。これらの脆弱性データベースは、対応しているアプリケーションなどの種類が多ければ多いほど、脆弱性情報の掲載が早ければ早いほどVulsにとっては有益であり、具体的には

  • 検知精度が向上(CPENameを使った脆弱性情報の検索時)する
  • レポートに表示する情報がリッチになる

という利点がある。
今回はvFeedという脆弱性データベースがあるという情報を入手したので、vFeedについて調べた結果をメモ代わりに書いておく。

vFeedとは?

vFeedIO

https://vfeed.io/about/
各種脆弱性データベースの集約した脆弱性DB。
非商用、非商用のWebサービス、OSSへの組み込みは無料で使える。
社内での利用、有償の仕事、SaaSへの組み込みは有料。

脆弱性情報はSQLite3形式で提供され、アクセスするためのPyhon Clientが提供されている。
https://github.com/toolswatch/vFeed

vFeedは、CPE形式にもとづいて19万プロダクト以上の脆弱性情報が登録されている。Largest databaseと書いて有るけどVulnDBよりもカバー範囲広いのかは不明。

誰向け?

  • CVEを分析したいペネトレーションテスター
  • 正確にレポートしたいセキュリティ監査な人
  • セキュリティツールベンダー、OSSのセキュリティツール作ってる人
  • ハッカー、研究者

無料?有料?

  • Community Edition
    • $0
    • 非商用、OSSへの組み込み、無料のWebサービスへの組み込み、public researcyやsurvyで使う Community Edition
  • Consultancy
    • $149/month
    • 社内ソフトウェアへの組み込み、報酬が発生する仕事
  • Integrator
    • お値段は問合せ
    • SaaS組み込みたい人、3rd Party Libraryとして組み込みたい人

Vuls OSSへの組み込みはCommunity Editionで良さげ。
SaaSに組み込むにはIntegratorライセンスが必要。
Vuls OSSに組み込んだとして、各々が社内で使うためにはConsultancyライセンスが必要なのかな??

特徴

まずは、 https://vfeed.io/features/ を読んでみる

Mitigations and workarounds based on the CAPEC standard

CAPEC standardってなんぞや

The Common Attack Pattern Enumeration and Classification (CAPEC™) effort provides a publicly available catalog of attack patterns along with a comprehensive schema and classification taxonomy. The entire list of CAPEC entries developed to date is accessible below for review or download.

CAPECは、公開されてるカタログ、攻撃パターン。分類された、スキーマ形式で。

CWEは個々の脆弱性が発生する原因部分に焦点を当てています。このため、どのような攻撃が行われるのか解りずらい構成になっています。MITRE社の方も解りやすい攻撃パターンのカタログが必要と考えたようです。CAPEC(Common Attack Pattern Enumeration and Classification – 共通攻撃パターンタイプと分類)が用意されています。

どうやら、CWEを補完するもののようだ。
攻撃の分類とサマリ、攻撃のステップ、防止策が載ってる。
https://capec.mitre.org/data/definitions/333.html

ふむふむ、レポートにこのリンクを貼ってもいいかもな。

Risk and impact scoring based on CVSS and other criteria

other criteriaって具体的に何のことだろう。CVSSのスコアだけじゃなくて、それ以外の要素も鑑みて独自スコアリングしてるよってことなんだろうな。

Aligned with application threat classification such as WASC

WASCってなんだろ?
- 本家
The Web Application Security Consortiumってところで提供されているそうだ。その略かな。

"The Threat Classification is an effort to classify the weaknesses, and attacks that can lead to the compromise of a website, its data, or its users."

ってことなのでWeb Site向けの脆弱性の分類のようだ。CWEとにてるけどWebアプリに特化したものんだんだろうな。

Document

vFeedのDatabaseはSQLite3形式。

有償のConsultancy and IntegratorはUpdate Moduleをつかって自動的にアップデート可能。
Community Editionのユーザは手動でダウンロードしてunzipしないといけない。

APIの一覧

  • lib.core.methods.info.py:
    • Used to render information about CVE alongside other open standards (CWE, CPE, WASC, CAPEC) and categories such as CERT C++, CWE/SANS Top 25, OWASP Top lists etc.
  • lib.core.methods.ref.py:

    • Can be leveraged to get information about references and cross-linked sources (IAVM, SCIP..)

      • IAVMとはinformation assurance vulnerability alert (IAVA)の略
      • DISA releases IAVA-to-CVE mappingに詳細を見ると、どうやらMITRE管理のCVEと同じことをしようとしていたが、IAVMはオワコンでCVE-ID一本になったってことぽい。IAVMとCVE-IDの変換ツールがRedHatから提供されているが、2017/2月に更新は終わっているそうだ。
      • https://access.redhat.com/labs/iavmmapper/

      This application is not able to update the IAVM list and related CVEs it provides since February 2017. The reason is that a public service that published the IAVM information on IASE (Information Assurance Support Environment) needed by this application stopped working in February. We have been urging the group managing the service to fix problems with the service and make it work again.

  • lib.core.methods.risk.py:

    • Used to display the CVSS scores and severity.
      • CVSS, Severity
  • lib.core.methods.patches.py:

    • Mostly used to enumerate hotfixes from third party vendors such as Microsoft, Redhat, Suse etc
      • MS, RedHat, SUSEなどのhotfixの情報
  • lib.core.methods.scanners.py :

    • Leveraged to list information about scanners and attack scripts related to CVEs such as Nessus, OpenVAS, OVAL.
      • Nessus, OpenVAS, OVALの情報
  • lib.core.methods.exploit.py :

    • Used to list information about exploits PoC related to CVEs such as Metasploit, Exploit-DB.
      • Metasploit, ExploitDBなどのPoC情報のリスト
  • lib.core.methods.rules.py :

    • Can be leveraged to display the IDS/IPS rules to prevent from the attack such as Snort or Suricata
      • Snort, Suricataのルールを表示

2.4 Database update

  • 有償
    • Consultancy & Integrator plans database is updated at daily basis.
    • 一日一回ぽい
  • 無償(Community Edition)
    • The community edition database is updated once per month.
      • 一ヶ月に一回!!

1ヶ月に1回だと実質遅すぎるので、基本有償版が必要だろう

使ってみる

vFeedからデータベースをダウンロード

https://vfeed.io/pricing/
ここから登録してDBをダウンロードする。
メールアドレスを登録して送付されるアドレスからダウンロード可能。

CLIから使ってみる

setup

3.1 CVE information from CLI

https://vfeed.io/docs/#3-1-getting-cve-information

python vfeedcli.py -m get_cve CVE-2013-1347                                                      
[
  {
    "url": "http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1347",
    "summary": "Microsoft Internet Explorer 8 does not properly handle objects in memory, which allows remote attackers to execute arbitrary code by accessing an object that (1) was not properly allocated or (2) is deleted, as exploited in the wild in May 2013.",
    "id": "CVE-2013-1347",
    "modified": "2017-09-18T21:36:04.687-04:00",
    "published": "2013-05-05T07:07:00.527-04:00"
  }
]

3.2 CAPEC information from CLI

CVE-IDとCAPECのマッピングをAPIで引ける
(緩和策も実装上の緩和策だしなぁ。言語ライブラリの脆弱性の場合なら使えるのかもな)

$ python vfeedcli.py --method get_capec CVE-2016-5195                                               [
  {
    "attack_method": [
      [
        "Time and State"
      ],
      [
        "Modification of Resources"
      ]
    ],
    "id": "CAPEC-26",
    "mitigations": [
      [
        "Use safe libraries to access resources such as files."
      ],
      [
        "Be aware that improper use of access function calls such as chown(), tempfile(), chmod(), etc. can cause a race condition."
      ],
      [
        "Use synchronization to control the flow of execution."
      ],
      [
        "Use static analysis tools to find race conditions."
      ],
      [
        "Pay attention to concurrency problems related to the access of resources."
      ]
    ],
    "title": "Leveraging Race Conditions",
    "url": "https://capec.mitre.org/data/definitions/CAPEC-26.html"
  },
  {
    "attack_method": [
      [
        "Time and State"
      ],
      [
        "Modification of Resources"
      ]
    ],
    "id": "CAPEC-29",
    "mitigations": [
      [
        "Use safe libraries to access resources such as files."
      ],
      [
        "Be aware that improper use of access function calls such as chown(), tempfile(), chmod(), etc. can cause a race condition."
      ],
      [
        "Use synchronization to control the flow of execution."
      ],
      [
        "Use static analysis tools to find race conditions."
      ],
      [
        "Pay attention to concurrency problems related to the access of resources."
      ]
    ],
    "title": "Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions",
    "url": "https://capec.mitre.org/data/definitions/CAPEC-29.html"
  }
]

3.3 WASC information from CLI

https://vfeed.io/docs/#3-3-wasc-information
The support to the Web Application Security Consortium (WASC) has been introduced with API release 0.6.8 and reflected through a new method get_wasc.

python vfeedcli.py --method get_wasc CVE-2014-0160                                                
[
  {
    "id": "WASC-7",
    "title": "Buffer Overflow",
    "url": "http://projects.webappsec.org/Buffer-Overflow"
  }
]

3.4 Nessus Information from CLI

Nessusの情報にCLIからアクセス可能

[
    {
        "family": "Windows", 
        "file": "smb_kb2847140.nasl", 
        "id": "66329", 
        "name": "MS KB2847140: Vulnerability in Internet Explorer 8 Could Allow Remote Code Execution (deprecated)"
    }, 
    {
        "family": "Windows : Microsoft Bulletins", 
        "file": "smb_nt_ms13-038.nasl", 
        "id": "66413", 
        "name": "MS13-038: Security Update for Internet Explorer (2847204)"
    }
]

3.5 Metasploit Information from CLI

Metasploitの情報を検索可能。
Exploitコード有無を判別できそう。

 [
    {
        "file": "metasploit-framework/modules/exploits/windows/browser/ie_cgenericelement_uaf.rb", 
        "id": "ie_cgenericelement_uaf.rb", 
        "title": "MS13-038 Microsoft Internet Explorer CGenericElement Object Use-After-Free Vulnerability"
    }
]

CVE-IDに該当するCPE情報

Vuls内でcpenamesで指定する、NW機器やライブラリの脆弱性検索が捗りそう。

 ~/g/s/g/t/vFeed   master …  python vfeedcli.py --method get_cpe CVE-2017-9805                                                [
  {
    "id": "cpe:/a:apache:struts:2.1.2"
  },
  {
    "id": "cpe:/a:apache:struts:2.1.3"
  },

CVE-IDに該当するCWE情報

今のVulsはCWE-IDのIDしか出してないけど、コレ使えば説明も出せる。
ただ、CWE-IDの情報は固定なので、go-cve-dictionaryに日本語と一緒に入れてもいいのか。

python vfeedcli.py --method get_cwe CVE-2017-9805                                                 [
  {
    "id": "CWE-502",
    "title": "Deserialization of Untrusted Data",
    "url": "https://cwe.mitre.org/data/definitions/502.html"
  }
]

CVE-IDのseverity

exploitability, topvulnerable, topAlertあたり使えそうやん!

python vfeedcli.py --method get_severity CVE-2017-10000                                           [
  {
    "cvss2": [
      {
        "impact": "2.9",
        "vector": "AV:N/AC:L/Au:S/C:N/I:N/A:P",
        "confidentiality": "none",
        "accessComplexity": "low",
        "authentication": "single_instance",
        "base": "4.0",
        "exploitability": "8.0",
        "integrity": "none",
        "availability": "partial",
        "accessVector": "network"
      }
    ],
    "topVulnerable": false,
    "severity": "moderate",
    "topAlert": false
  }
]

CVE-IDのCVSS

Impactってのが使えるかも?要調査。

python vfeedcli.py --method get_cvss CVE-2017-9805                                                [
  {
    "accessComplexity": "medium",
    "accessVector": "network",
    "authentication": "none",
    "availability": "partial",
    "base": "6.8",
    "confidentiality": "partial",
    "exploitability": "8.6",
    "impact": "6.4",
    "integrity": "partial",
    "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"
  }
]

第2回調査にむけてのメモ

NVD, JVN, OVALには存在しない、使えそうなデータソースがありそう。特に、
- Exploitある無し
- Nessusの情報
- WASC,CAPECの情報をCWEを補足する情報として使う
- Severity情報の、exploitability, topvulnerable, topAlert使えるかも。
- CVSSのImpactの値

次回は、Pythonからライブラリとして使うところをやってみるとともに、全部のAPIを叩いてみて、Vulsで使えそうな項目を詳しく調べてみる。
https://vfeed.io/docs/#3614

6
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2