試験PT0-003 トピック4 問題119 スレッド

CompTIA PT0-003のリアル試験問題集
問題 #: 119
トピック #: 4
openssl passwd password
$1$OjxLvZ85$Fdr51vn/Z4zXWsQR/Xrj.
The tester then adds the following line to the world-writable script:
echo ' root2:$1$0jxLvZ85$Fdr51vn/Z4zXWsQR/Xrj .: 1001:1001:,,,:/root:/bin/bash " > > /etc/passwd Which of the following should the penetration tester do to enable this exploit to work correctly?

おすすめの解答:D 解答を投票する

The attacker's goal is to create an account entry in /etc/passwd that grants root privileges. In Unix/Linux, the UID and GID determine privileges; UID 0 is the root account. The line the tester appended sets UID/GID to
1001:1001, which does not grant root privileges. Changing those numeric fields to 0:0 (UID 0, GID 0) will cause the new account to be treated as root when the entry is parsed by the system, enabling a root-level login with the supplied hash.
Additional correctness notes (non-exploitating guidance):
* The appended line must match the exact /etc/passwd format (no stray spaces or malformed punctuation).
* The password hash must match the system's expected scheme; openssl passwd produced an MD5-style hash ($1$...) - ensure the hash is correctly copied (case/character fidelity matters).
* Modifying /etc/passwd in this way is destructive and illegal without explicit authorization; in an authorized testing engagement, these details are taught to illustrate how misconfigurations lead to privilege escalation.
Why other choices are incorrect:
* A: The redirect > > /etc/passwd (append) is appropriate for adding a line; switching to a single redirect is not the central issue.
* B: md5sum would produce a raw MD5 digest, not the salted hash format expected by /etc/shadow//etc
/passwd entries.
* C: Logging in via SSH does not enable the exploit; creating the user with UID 0 is the required change.
CompTIA PT0-003 Mapping:
* Domain 3.0 Attacks and Exploits - local privilege escalation techniques and understanding of OS account mechanics.

Suzuki 2026-06-10 09:52:37

コメント

正解:
?」こちらは投票コメントになっております。普通のコメントに切り替えます。
ニックネーム: 送信 キャンセル
投票コメントをあげるごとに、選択した解答の投票数を1つ増やすことができます。

他人の解答コメントを賛成するのも、その解答に一票を入れることになります。したがって、すでに同じ意見の投票コメントが存在する場合、新規コメントをする代わりに賛成することもできます。

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡