CEH Practice Question: Advanced Topics: Wireless, Cloud, IoT, Cryptography
During a cloud penetration test, you discover an S3 bucket that allows listing objects. You find a file named 'config.json' that contains an IAM access key and secret key. Which of the following is the BEST next step?
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
✓
Use the keys to call sts:GetCallerIdentity and then enumerate permissions via IAM
The correct action is to use the discovered credentials to enumerate permissions via the AWS CLI, as they may grant further access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Delete the bucket to prevent further data exposure
Why it's wrong here
Deleting an S3 bucket is a highly destructive action that falls outside the scope of a standard penetration test. Such an action would disrupt legitimate business operations, potentially cause irreversible data loss for the client, and violate the agreed-upon rules of engagement. Penetration testers are authorized to identify and report vulnerabilities, not to perform remediation actions that could impact system availability or data integrity.
- ✓
Use the keys to call sts:GetCallerIdentity and then enumerate permissions via IAM
Why this is correct
After discovering AWS access keys, the immediate and most prudent step is to validate their authenticity and determine the associated identity using sts:GetCallerIdentity. This API call confirms the keys are active and reveals the IAM user or role they belong to. Following this, enumerating the permissions attached to that identity via IAM policies is critical to understand the full scope of access, identify potential escalation paths, and discover other high-value targets within the AWS environment.
- ✗
Download all objects from the bucket and exfiltrate them
Why it's wrong here
Downloading all objects from the bucket is premature because the discovered IAM credentials in `config.json` likely grant broader access than the bucket’s public listing permission; the correct next step is to first test those credentials against the cloud provider’s API to enumerate privileges and identify high-value targets. This action is tempting because exfiltration is the ultimate goal of a data breach, and in a scenario where the bucket already contains sensitive data and no credentials are present, bulk download would be the correct choice.
- ✗
Immediately rotate the keys in the AWS console
Why it's wrong here
Immediately rotating the discovered AWS access keys in the console is an inappropriate action during a penetration test. Such an action would prematurely alert the client to the compromise, potentially triggering incident response procedures before the full extent of the vulnerability can be assessed. Furthermore, rotating the keys would revoke the tester's access, preventing further enumeration, privilege escalation attempts, or discovery of additional sensitive assets, thereby hindering the test's objectives.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This CEH question is part of Courseiva's 870-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CEH 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 CEH exam.