LoginSignup
24
23

More than 5 years have passed since last update.

脆弱性検知ツールVulsのレポート日本語化

Last updated at Posted at 2016-05-18

Vulsのレポート日本語化についてscanオプションに「-lang=ja」を指定するように書いてありますが、事前にJVNデータの取り込みが必要です。

というのも英語のほうのマニュアルしか見てなくて、日本語のほうのマニュアルにあるのを見落として嵌っていました。

JVN取り込み前

# curl -s http://127.0.0.1:1323/cves/CVE-2014-0001 | jq "."
{
  "Jvn": {  ↓↓★ 初期はJVNのほうはデータが入っていない★↓↓
    "LastModifiedDate": "0001-01-01T00:00:00Z",
    "PublishedDate": "0001-01-01T00:00:00Z",
    "Cpes": null,
    "References": null,
    "Vector": "",
    "Severity": "",
    "Score": 0,
    "JvnID": "",
    "ID": 0,
    "CreatedAt": "0001-01-01T00:00:00Z",
    "UpdatedAt": "0001-01-01T00:00:00Z",
    "DeletedAt": null,
    "CveDetailID": 0,
    "Title": "",
    "Summary": "",
    "JvnLink": ""
  }, ↑↑★ 初期はJVNのほうはデータが入っていない★↑↑
  "Nvd": { ↓↓★ NVDのほうは色々入っている★↓↓
    "LastModifiedDate": "2014-06-30T13:58:53.547-04:00",
    "AccessVector": "NETWORK",
    "Score": 7.5,
    "Summary": "Buffer overflow in client/mysql.cc in Oracle MySQL and MariaDB before 5.5.35 allows remote database servers to cause a denial of service (crash) and possibly execute arbitrary code via a long server version string.",
    "CveDetailID": 55663,
    "DeletedAt": null,
    "UpdatedAt": "2016-05-12T15:07:39.095673026+09:00",
    "CreatedAt": "2016-05-12T15:07:39.095673026+09:00",
    "ID": 55663,
    "AccessComplexity": "LOW",
    "Authentication": "NONE",
    "ConfidentialityImpact": "PARTIAL",
    "IntegrityImpact": "PARTIAL",
    "AvailabilityImpact": "PARTIAL",
    "Cpes": null,
    "References": [
      {
        "Link": "http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/2502.565.64",
        "Source": "CONFIRM",
        "NvdID": 55663,
        "JvnID": 0,
        "DeletedAt": null,
        "UpdatedAt": "2016-05-12T15:07:39.096101914+09:00",
        "CreatedAt": "2016-05-12T15:07:39.096101914+09:00",
        "ID": 293616
      },
           ~~途中省略~~
    "PublishedDate": "2014-01-31T18:55:04.503-05:00"
  },
  "CveID": "CVE-2014-0001",
  "CveInfoID": 0,
  "DeletedAt": null,
  "UpdatedAt": "2016-05-12T15:07:39.095307933+09:00",
  "CreatedAt": "2016-05-12T15:07:39.095307933+09:00",
  "ID": 55663
}

”JVN”のすべての期間の脆弱性情報を取得

  • -entireは全件取ってくるので、時間かかります
$ go-cve-dictionary fetchjvn -entire
[May 17 12:43:08]  INFO Fetching CVE information from JVN.
 1210 / 1210 [==========================================================================================]  100.00%
14s[May 17 14:22:46]  INFO Fetched 60476 CVEs
[May 17 14:22:46]  INFO Opening DB. datafile: /root/cve.sqlite3
[May 17 14:22:46]  INFO Migrating DB
[May 17 14:22:46]  INFO Inserting fetched CVEs...
 60053 / 60053 [=====================================================================================] 100.00%
10m51s[May 17 14:33:39]  INFO Refreshed 59992 Jvns.

JVN取り込み後

# curl -s http://127.0.0.1:1323/cves/CVE-2014-0001 | jq "."
{
  "Jvn": {  ↓↓★Title、Summaryが日本語で入っている★↓↓
{
  "Jvn": {
    "LastModifiedDate": "2014-02-04T14:31:36+09:00",
    "PublishedDate": "2014-02-04T14:31:36+09:00",
    "Cpes": null,
    "References": [
           ~~途中省略~~
    ],
    "Vector": "(AV:N/AC:L/Au:N/C:P/I:P/A:P)",
    "Severity": "High",
    "Score": 7.5,
    "JvnID": "JVNDB-2014-001301",
    "ID": 16853,
    "CreatedAt": "2016-05-17T14:26:25.513063861+09:00",
    "UpdatedAt": "2016-05-17T14:26:25.513063861+09:00",
    "DeletedAt": null,
    "CveDetailID": 55663,
    "Title": "Oracle MySQL および MariaDB の client/mysql.cc におけるバッファオーバーフローの脆弱性",
    "Summary": "Oracle MySQL および MariaDB の client/mysql.cc には、バッファオーバーフローの脆弱性が存在します。",
    "JvnLink": "http://jvndb.jvn.jp/ja/contents/2014/JVNDB-2014-001301.html"
  },
  "Nvd": {
    "LastModifiedDate": "2014-06-30T13:58:53.547-04:00",
    "AccessVector": "NETWORK",
    "Score": 7.5,
    "Summary": "Buffer overflow in client/mysql.cc in Oracle MySQL and MariaDB before 5.5.35 allows remote database servers to cause a denial of service (crash) and possibly execute arbitrary code via a long server version string.",
    "CveDetailID": 55663,
    "DeletedAt": null,

      ~~途中省略~~

スキャン

 $ vuls scan -lang=ja

結果

  • 日本語で表示できました。
CVE-2016-3714   10.0 (High)     ImageMagick に入力値検証不備の脆弱性                                                
CVE-2016-0705   10.0 (High)     OpenSSL の crypto/dsa/dsa_ameth.c の sa_priv_decode                                 
                                関数におけるメモリ二重解放の脆弱性                                                  

           ~~途中省略~~

CVE-2016-3714  
-------------  
Score           10.0 (High)                                                                                         
Vector          (AV:N/AC:L/Au:N/C:C/I:C/A:C)                                                                        
Title           ImageMagick に入力値検証不備の脆弱性                                                                
Description     ImageMagick は、delegate                                                                            
                の仕組みを使って入力データの処理を行う前の検証が適切に実行されていないため、結果として任意のコード...                "ImageTragick" としても知られています。  不適切な入力検査 (CWE-20) - CVE-2016-3714  CWE-20: Improper
                Input Validation http://cwe.mitre.org/data/definitions/20.html                                      
                研究者は、メーリングリストに次のように投稿しています:    Insufficient filtering for filename passed
                to delegate's command allows remote code execution during conversion of several file formats.       
                ImageMagick allows to process files with external libraries. This feature is called 'delegate'. It  
                is implemented as a system() with command string ('command') from the config file delegates.xml with
                actual value for different params (input/output filenames etc). Due to insufficient %M param        
                filtering it is possible to conduct shell command injection.   delegate                            
                先のコマンドに渡す前のファイル名のフィルタリングが不十分なため、ファイル形式の変換中に任意のコード...                ImageMagick には外部ライブラリを使用してファイルを処理する 'delegate'                               
                と呼ばれる機能が存在する。この機能は、設定ファイル delegates.xml で指定されたコマンド名 ('command') 
                と、入力ファイル名や出力ファイル名などのパラメータの値を使って組み立てられた文字列を system()       
                関数に渡して実行する形で実装されている。パラメータ %M                                               
                に当てはめる入力値のフィルタリングが不十分なため、シェルコマンドインジェクションが可能である。      
                ImageMagick に画像ファイルを処理させることで、攻撃者は ImageMagick                                  
                が動作しているシステム上で任意のコマンドを実行することが可能です。本脆弱性の影響を受ける典型的な構...                ImageMagick で処理しているケースが考えられます。                                                    
                本脆弱性を使用した攻撃コードが公開されています。ウェブサイト ImageTragick (imagetragick.com)        
                によれば、既に本脆弱性を使用した攻撃活動が観測されているとのことです。  ImageTragick                
                https://imagetragick.com/                                                                           
JVN             http://jvndb.jvn.jp/ja/contents/2016/JVNDB-2016-002443.html                                         
NVD             https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3714                                      
MITRE           https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3714                                        
CVE Details     http://www.cvedetails.com/cve/CVE-2016-3714                                                         
CVSS Claculator https://nvd.nist.gov/cvss/v2-calculator?name=CVE-2016-3714&vector=(AV:N/AC:L/Au:N/C:C/I:C/A:C)      
RHEL-CVE        https://access.redhat.com/security/cve/CVE-2016-3714                                                
Package/CPE     ImageMagick-6.5.4.7-7.el6_5 -> ImageMagick-6.7.2.7-4.el6_7                                          
                ImageMagick-devel-6.5.4.7-7.el6_5 -> ImageMagick-devel-6.7.2.7-4.el6_7                              

結果ログについて

scanを実行したあと、標準出力に該当するCVEの一覧が出力されますが、同じものが「/var/log/vuls/report.log」に出力されます。

24
23
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
24
23