Courseiva
Cloud And Hybrid Infrastructure SecurityhardMultiple ChoiceObjective-mapped

CPENT Cloud And Hybrid Infrastructure Security Practice Question

A security engineer discovers that an AWS IAM user has an active access key and permissions to run ec2:RunInstances, iam:PassRole, and iam:CreateRole. What privilege escalation path does this permission combination represent?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The user can launch a new EC2 instance and attach a privileged IAM role via iam:PassRole, then access the instance to obtain temporary security credentials.

An attacker with iam:PassRole and ec2:RunInstances can spin up an EC2 instance passing an elevated IAM role, then log into the instance via SSH or session manager to extract the role's temporary credentials.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The user can launch a new EC2 instance and attach a privileged IAM role via iam:PassRole, then access the instance to obtain temporary security credentials.

    Why this is correct

    Passing a high-privilege role to an EC2 instance allows full access to that role's permissions.

  • The user can modify the trust policy of the root user account using iam:CreateRole.

    Why it's wrong here

    Root user trust policies cannot be modified by standard IAM roles.

  • The user can inject malicious code into the AWS Nitro Enclave hypervisor layer.

    Why it's wrong here

    Nitro Enclaves are hardware-isolated and not vulnerable to IAM-based privilege escalation.

  • The user can escalate privileges by updating their own MFA device via the EC2 metadata service.

    Why it's wrong here

    MFA configuration is managed via IAM, not EC2 metadata.

About these practice questions

Courseiva writes every CPENT question from scratch — 274 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official EC-Council exam blueprint

This CPENT practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CPENT exam.