2

最近の「rowhammer」エクスプロイトの概念実証の一部として、より細かく調整された概念実証を作成するために、read-suid-exec ツール「ping」が使用されました。

それで、私の質問 - さまざまなディストリビューションが suid (特にルート) 実行可能ファイルを実行可能ファイルと同様に読み取り可能ファイルとして準備するのはなぜですか?

私の推測は次のとおりです。

  1. 「ldd」と併用すると便利
  2. tripwire またはパッケージ更新チェック ソフトウェアを root 以外で実行できるようにするには
  3. ほとんどのディストリビューションは公開されており、ELF バイナリは誰でも入手できる (VM へのインストールなど) ため、問題ありません。
  4. selinux を使用して、これを無関係にすることができます
  5. 怠惰な開発者

(3) を使用すると、パブリック ディストリビューションのバイナリを非表示にすることは、セキュリティのイチジクの葉だけを提供します - そして (5) はほとんど名前の呼び出しです。

4

2 に答える 2

0

It's a mixture of "it doesn't matter" (3) and "lazy developers" (5).

It's good practice to turn off unnecessary permissions such as read access on SUID executables because it can reduce attack surface generally, but in many cases it doesn't make much difference.

As you say for (3), hiding the program data doesn't stop attackers searching for ROP gadgets etc. because the data is typically visible in the public distribution that the binary came from.

Note that that doesn't apply to the rowhammer-based exploit described in the Project Zero blog post. For that, the exploit doesn't want to read the data in the SUID executable, it just wants to use /proc/self/pagemap to learn which physical addresses contain the executable's data.

However, as the blog post says, if the attacker can't open() the SUID executable, it can just open() a library it uses, such as /lib64/ld-linux-x86-64.so.2, and apply the exploit to that. So restricting read permissions on the SUID executable doesn't help. We can't remove the read permission on these libraries otherwise they would be unusable.

于 2015-05-24T16:48:50.973 に答える