らっちゃいブログ

日々の学びと気づきを発信するブログ

Apache HTTPDに認証なしでコンテンツにアクセスできてしまう脆弱性

Apacheにクライアント認証を設定していても認証なしでアクセスできてしまう脆弱性が見つかりました。

JVNVU#97485903: Apache HTTPD の HTTP/2 通信における X.509 クライアント証明書の認証処理の問題

影響を受けるバージョンは2.4.18 から 2.4.20 までになります。

これだけだと非常に影響範囲が広い事案となりますが、本件は HTTP/2 でのアクセスに限られるそうです。というわけで、影響するバージョンでHTTP/2とクライアント認証をご利用の方は最新バージョンにアップデートしましょう。

racchai.hatenablog.com

racchai.hatenablog.com

racchai.hatenablog.com

libcurlに任意のコードを実行される脆弱性

https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4802

記事によると、SSPIまたは Telnet を使用してビルドされている場合に検索パスに関する脆弱性が複数存在するとのこと。この脆弱性を悪用することで、任意のコード実行が可能となるそうです。

影響を受けるバージョンは 7.49.1 未満になります。以下でパッチが公開されていますので、ご利用の方は忘れずに適用しましょう。

cURL - Windows DLL hijacking

racchai.hatenablog.com

racchai.hatenablog.com

racchai.hatenablog.com

NginxにDoS攻撃が可能となる脆弱性!

朝起きたら脆弱性情報がメーリングリストにてアナウンスされていました。JSTだと本日(2016/6/1)の公開となります。

[nginx-announce] nginx security advisory (CVE-2016-4450)

A problem was identified in nginx code responsible for saving client request body to a temporary file. A specially crafted request might result in worker process crash due to a NULL pointer dereference while writing client request body to a temporary file (CVE-2016-4450).

これによると、リクエストボディを一時ファイルへ保存する際の処理に問題があり、ワーカープロセスがクラッシュしてしまうケースがあるそうです。具体的な攻撃方法については記載されていません。

この脆弱性の影響を受けるバージョンは、1.3.9 - 1.11.0 で、修正版として 1.11.1 と 1.10.1 がすでにリリース済みです。

一応変更内容も記載しておきます。

http://nginx.org/en/CHANGES

Changes with nginx 1.11.1                                        31 May 2016

*) Security: a segmentation fault might occur in a worker process while
   writing a specially crafted request body to a temporary file
   (CVE-2016-4450); the bug had appeared in 1.3.9.

1.11.1/1.10.1 にアップデートできない方は、バージョン毎にパッチが提供されていますので、自身で適用しましょう。

Patch for nginx 1.9.13 - 1.11.0 can be found here:

http://nginx.org/download/patch.2016.write.txt

Patch for older nginx versions (1.3.9 - 1.9.12):

http://nginx.org/download/patch.2016.write2.txt

IntelliJ に重大な脆弱性!至急アップデートせよ

最近脆弱性情報が頻発してますね。

今度は JetBrains 社のIntelliJベースの製品群に critical な脆弱性が見つかったそうです。セキュリティアップデートはすでにリリースされている模様。

Security update for IntelliJ-based IDEs v2016.1 and older versions | Company Blog

同社によると「現時点で本脆弱性を利用した攻撃は報告されていないが、可能な限り早くアップデートすることを強く推奨する」とあります。よっぽどやばい脆弱性なんでしょうか。。

内容を見てみると、2つあるようです。

Built-in web server vulnerabilities

The cross-site request forgery (CSRF) flaw in the IDE’s built-in webserver allowed an attacker to access local file system from a malicious web page without user consent.

Internal RPC vulnerabilities

Over-permissive CORS settings allowed attackers to use a malicious website in order to access various internal API endpoints, gain access to data saved by the IDE, and gather various meta-information like IDE version or open a project.

ローカルファイルへのアクセスと任意の内部API実行ですか。なるほど、確かにやばそうですね。

最新のバージョンだけでなく、古いバージョンも対象とのことですので影響範囲は広そうです。

[Help] > [Check For Updates」からすぐにアップデートできますので、ご利用の方は急いでアップデートしましょう。

【ゼロデイ】Adobe Flash Player に深刻度 "critical" の脆弱性。任意のコード実行が可能でシステムが乗っ取られる可能性も。

5/10 には公式発表が出ていましたね。少し気づくのが遅れてしまいましたが、影響が大きそうなので一応共有しておこうと思います。

https://helpx.adobe.com/security/products/flash-player/apsa16-02.html

要約を転機します。

A critical vulnerability (CVE-2016-4117) exists in Adobe Flash Player 21.0.0.226 and earlier versions for Windows, Macintosh, Linux, and Chrome OS. Successful exploitation could cause a crash and potentially allow an attacker to take control of the affected system.

Adobe is aware of a report that an exploit for CVE-2016-4117 exists in the wild. Adobe will address this vulnerability in our monthly security update, which will be available as early as May 12. For the latest information, users may monitor the Adobe Product Security Incident Response Team blog.

脆弱性が影響するのは Adobe Flash Player 21.0.0.226 およびそれ以前のバージョンとのこと。 対象OSは「Windows, Macintosh, Linux and Chrome OS」ということで、デスクトップOSはすべてと思ってよさそうです。

この脆弱性を悪用した場合、システムをクラッシュさせたり乗っとることが可能なのだそうです。

セキュリティアップデートは早ければ本日 5/12 には出てくるそうですが、本記事の投稿時点ではまだ出ていませんでした。引き続き the Adobe Product Security Incident Response Team blogをウォッチしておく必要がありそうです。

セキュリティアップデートが出るまでの対策としては、一時的に Flash Player をアンインストールするか無効化しておくしかないようです。ご注意ください。

ImageMagickにリモートコード実行が可能となる脆弱性

サムネイル作成でお馴染みの ImageMagick にリモートコード実行が可能となる脆弱性が見つかったようです。

脆弱性には ImageMagick という名前が付けられ(ロゴ画像あり)、以下のサイトで再現方法および対策が公開されています。

ImageTragick

本記事では対策についてだけ簡単にまとめておきます。

  1. Verify that all image files begin with the expected "magic bytes" corresponding to the image file types you support before sending them to ImageMagick for processing. (see FAQ for more info)

  2. Use a policy file to disable the vulnerable ImageMagick coders. The global policy for ImageMagick is usually found in “/etc/ImageMagick”. The below policy.xml example will disable the coders EPHEMERAL, URL, MVG, and MSL.

つまり、ファイルの先頭のマジックバイトで実際に画像ファイルであるかを確認するか、設定ファイル(policy.xml) に次の設定を追加することでEPHEMERAL,URL,HTTPS,MVG,MSLというコーダを無効化すれば良いそう。

<policymap>
  <policy domain="coder" rights="none" pattern="EPHEMERAL" />
  <policy domain="coder" rights="none" pattern="URL" />
  <policy domain="coder" rights="none" pattern="HTTPS" />
  <policy domain="coder" rights="none" pattern="MVG" />
  <policy domain="coder" rights="none" pattern="MSL" />
</policymap>

両方やるのが好ましいとは書いてありますが、前者の対策はプログラムの修正が必要になると思うので、GW中で時間がない企業戦士は取り急ぎ policy.xml での対策を実施するのがよさそうですね。

なお、PoC も公開されていますので、policy.xml で対応された場合はさくっと検証しておくことをおすすめします。

以下は手元で実施した対策前後での検証結果です。ご参考まで。

$ git clone https://github.com/ImageTragick/PoCs
$ cd PoCs
$ ./test.sh 
testing read
UNSAFE

testing delete
UNSAFE

tr: Illegal byte sequence
testing http with nonce: 
SAFE

testing rce1
UNSAFE

testing rce2
SAFE

testing MSL
UNSAFE

$ cat > policy.xml <<EOF
<policymap>
  <policy domain="coder" rights="none" pattern="EPHEMERAL" />
  <policy domain="coder" rights="none" pattern="URL" />
  <policy domain="coder" rights="none" pattern="HTTPS" />
  <policy domain="coder" rights="none" pattern="MVG" />
  <policy domain="coder" rights="none" pattern="MSL" />
</policymap>
EOF

$ ./test.sh 
testing read
SAFE

testing delete
SAFE

tr: Illegal byte sequence
testing http with nonce: 
SAFE

testing rce1
SAFE

testing rce2
SAFE

testing MSL
SAFE

OpenSSLで深刻度"high"な脆弱性を修正したバージョンが公開されるようです

[openssl-announce] Forthcoming OpenSSL releases

The OpenSSL project team would like to announce the forthcoming release of OpenSSL versions 1.0.2h, 1.0.1t.

These releases will be made available on 3rd May 2016 between approximately 1200-1500 UTC. They will fix several security defects with maximum severity "high".

5/3 12:00-15:00(UTC) ということなので JST では 21:00 - 24:00 での公開となるようです。脆弱性の詳細はまだ公開されていないようですが、念のためアップデートの準備はしておいた方がよさそうですね。