【注意】このサイトに記載されていることを他人に試すことは「不正アクセス禁止法」に該当する場合があります。詳しくはこちらから

ハッカーはunix-privesc-checkで特権の昇格を試みる(Kali Linuxツール説明)

ホワイトハッカーの知識座学,Kali Linuxツール,unix-privesc-check

Linux上で特権の昇格を試みる行うツールを理解するためにまとめてみました。
このunix-privesc-checkの動作確認は自分のドメインでテストを行っています。

unix-privesc-checkとは

unix-privesc-checkは、ローカルの非特権ユーザが他のユーザに特権を昇格したり、ローカルアプリケーション (データベースなど) にアクセスしたりすることを可能にするような、誤った設定を調査するツールです。

機能

  • 特権を昇格の確認
  • ローカルアプリケーション (データベースなど) にアクセスするための確認

ツールの場所

[Applications]→[02-Vulnerability Analysis]→[Fuzzing Tools]→[unix-privesc-check]

ツールと使用方法

unix-privesc-check { standard | detailed }

例 unix-privesc-check standard

【実行イメージ】少し端折って整形しています。

┌──(root__kali)-[/home/kali]
└─# unix-privesc-check standard
Assuming the OS is: linux
Starting unix-privesc-check v1.4 ( http://pentestmonkey.net/tools/unix-privesc-check )

This script checks file permissions and other settings that could allow
local users to escalate privileges.

Use of this script is only permitted on systems which you have been granted
legal permission to perform a security assessment of. Apart from this
condition the GPL v2 applies.

Search the output below for the word 'WARNING'. If you don't see it then
this script didn't find any problems.


############################################
Recording hostname
############################################
kali

############################################
Recording uname
############################################
Linux kali 5.10.0-kali3-amd64 #1 SMP Debian 5.10.13-1kali1 (2021-02-08) x86_64 GNU/Linux

############################################
Recording Interface IP addresses
############################################
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::a00:27ff:fea6:1f86 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:a6:1f:86 txqueuelen 1000 (Ethernet)
RX packets 20 bytes 2597 (2.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 31 bytes 2955 (2.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
:
:

オプション

standard モード

Speed-optimised check of lots of security settings.
多くのセキュリティ設定のチェックをスピード重視で行います。

detailed モード

Same as standard mode, but also checks perms of open file handles and called files (e.g. parsed from shell scripts,linked .so files).
This mode is slow and prone to false positives but might help you find more subtle flaws in 3rd party programs.
標準モードと同じですが、開いているファイルハンドルや呼び出されたファイル(シェルスクリプトから解析されたファイルやリンクされた.soファイルなど)のパーマもチェックします。
このモードは速度が遅く、誤検出しやすいのですが、サードパーティ製プログラムのより微妙な欠陥を見つけるのに役立つかもしれません。


This script checks file permissions and other settings that could allow local users to escalate privileges.
このスクリプトは、ローカルユーザーが特権を昇格できる可能性のあるファイルのパーミッションやその他の設定をチェックします。

Use of this script is only permitted on systems which you have been granted legal permission to perform a security assessment of. Apart from this condition the GPL v2 applies.
このスクリプトの使用は、セキュリティ評価を行う法的な許可を得たシステムでのみ許可されます。 この条件以外では、GPL v2が適用されます。

Search the output for the word 'WARNING’. If you don’t see it then this script didn’t find any problems.
出力を検索して「WARNING」という単語を探します。 もしそれが見当たらなければ、このスクリプトは何の問題も発見できなかったことになります。

unix-privesc-checkツールのまとめ

権限の低いアカウントでハッキングしても攻撃できる範囲が決まっています。
攻撃するためには管理者ユーザーに権限を変更する必要があります。
このツールはこのような事態を招かないために、設定などの不備をチェックして対策を練るのですね。