Amazon Inspectorでチェックできる共通脆弱性識別子 (CVE) の概要一覧を取得する

2018.07.26

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

こんにちは、コカコーラ大好きカジです。 Amazon Inspectorでチェックできる共通脆弱性識別子 (CVE) の概要一覧を取得してみたいと思います。

Amazon Inspectorとは

Amazon Inspectorはざっくり言うと自動化されたセキュリティ評価サービスです。 EC2インスタンスに対してセキュリティ評価できます。

詳細はこちら AWS入門 Amazon Inspector編

チェックできる内容はこちら「Amazon Inspectorの各OSのチェック内容について」です。

背景

現在利用中のミドルウェアがAmazon Inspectorでチェックできるのか社内で問い合わせがあったので調べてみました。 ただ、Amazon Inspectorの調査できる共通脆弱性識別子 (CVE) のリストは以下のところからダウンロードできますが、CVE番号だけで、概要がわかりません。 チェックとして有効なのか不明なのでそれぞれのCVEの概要について調査することにしました。

Amazon Inspectorの対応CVEリストはこちら

Amazon Inspectorの共通脆弱性識別子についての詳細はこちら

対応方法

Amazon InspectorのCVEリストを取得し、CVE番号をCVEのAPIへリクエストして概要を取得しCSVファイルにするスクリプトを作成しました。

実行環境

MacOSXやAmazon Linuxでも確認できますが、以下が必要となります。

  • bash
  • wget
  • curl
  • jq

スクリプト

$ cat inspector-cve-check.sh
#!/bin/bash
DATE=`date +%Y%m%d_%H-%M-%S`

wget https://s3-us-west-2.amazonaws.com/rules-engine/CVEList.txt -O CVEList-$DATE.txt

echo "CVE Number,Description" > CVECheckList-$DATE.csv
cat CVEList-$DATE.txt | while read line ;
do
echo "# $line"
echo "$line,`curl -s http://cve.circl.lu/api/cve/$line | jq .summary`" >> CVECheckList-$DATE.csv
done
exit

結果

CVE数が多いので、上記スクリプトを1日回しました。(並列処理などすればもう少し早くなると推測していますが、急ぐ必要がなかったので・・・) 一部のCVEについては概要(Summary)の値がなく、nullの値になっていますが、個別に調査してください。 これである程度把握できているので良しとしました。

JDKだけをgrepで抽出した結果の抜粋(2018/6/14に実施)

$ cat CVECheckList-20180614_16-02-40.csv | grep -i jdk
CVE-2009-0217,"The design of the W3C XML Signature Syntax and Processing (XMLDsig) recommendation, as implemented in products including (1) the Oracle Security Developer Tools component in Oracle Application Server 10.1.2.3, 10.1.3.4, and 10.1.4.3IM; (2) the WebLogic Server component in BEA Product Suite 10.3, 10.0 MP1, 9.2 MP3, 9.1, 9.0, and 8.1 SP6; (3) Mono before 2.4.2.2; (4) XML Security Library before 1.2.12; (5) IBM WebSphere Application Server Versions 6.0 through 6.0.2.33, 6.1 through 6.1.0.23, and 7.0 through 7.0.0.1; (6) Sun JDK and JRE Update 14 and earlier; (7) Microsoft .NET Framework 3.0 through 3.0 SP2, 3.5, and 4.0; and other products uses a parameter that defines an HMAC truncation length (HMACOutputLength) but does not require a minimum for this length, which allows attackers to spoof HMAC-based signatures and bypass authentication by specifying a truncation length with a small number of bits."
CVE-2009-0581,"Memory leak in LittleCMS (aka lcms or liblcms) before 1.18beta2, as used in Firefox 3.1beta, OpenJDK, and GIMP, allows context-dependent attackers to cause a denial of service (memory consumption and application crash) via a crafted image file."
CVE-2009-0723,"Multiple integer overflows in LittleCMS (aka lcms or liblcms) before 1.18beta2, as used in Firefox 3.1beta, OpenJDK, and GIMP, allow context-dependent attackers to execute arbitrary code via a crafted image file that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information."
CVE-2009-0733,"Multiple stack-based buffer overflows in the ReadSetOfCurves function in LittleCMS (aka lcms or liblcms) before 1.18beta2, as used in Firefox 3.1beta, OpenJDK, and GIMP, allow context-dependent attackers to execute arbitrary code via a crafted image file associated with a large integer value for the (1) input or (2) output channel, related to the ReadLUT_A2B and ReadLUT_B2A functions."
CVE-2009-0794,"Integer overflow in the PulseAudioTargetDataL class in src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java in Pulse-Java, as used in OpenJDK 1.6.0.0 and other products, allows remote attackers to cause a denial of service (applet crash) via a crafted Pulse Audio source data line."
CVE-2009-0793,"cmsxform.c in LittleCMS (aka lcms or liblcms) 1.18, as used in OpenJDK and other products, allows remote attackers to cause a denial of service (NULL pointer dereference and application crash) via a crafted image that triggers execution of incorrect code for \"transformations of monochrome profiles.\""
CVE-2009-1006,"Unspecified vulnerability in the JRockit component in BEA Product Suite R27.6.2 and earlier, with SDK/JRE 1.4.2, JRE/JDK 5, and JRE/JDK 6, allows remote attackers to affect confidentiality, integrity, and availability via unknown vectors."
CVE-2009-1093,"LdapCtx in the LDAP service in Java SE Development Kit (JDK) and Java Runtime Environment (JRE) 5.0 Update 17 and earlier; 6 Update 12 and earlier; SDK and JRE 1.3.1_24 and earlier; and 1.4.2_19 and earlier does not close the connection when initialization fails, which allows remote attackers to cause a denial of service (LDAP service hang)."
<抜粋>

まとめ

やってみたら意外と簡単にできました。どなたかのお役に立てれば光栄です。