exam questions

Exam AWS Certified Security - Specialty All Questions

View all questions & answers for the AWS Certified Security - Specialty exam

Exam AWS Certified Security - Specialty topic 1 question 127 discussion

Exam question from Amazon's AWS Certified Security - Specialty
Question #: 127
Topic #: 1
[All AWS Certified Security - Specialty Questions]

A company had one of its Amazon EC2 key pairs compromised. A Security Engineer must identify which current Linux EC2 instances were deployed and used the compromised key pair.
How can this task be accomplished?

  • A. Obtain the list of instances by directly querying Amazon EC2 using: aws ec2 describe-instances --filters "Name=key- name,Values=KEYNAMEHERE".
  • B. Obtain the fingerprint for the key pair from the AWS Management Console, then search for the fingerprint in the Amazon Inspector logs.
  • C. Obtain the output from the EC2 instance metadata using: curl http://169.254.169.254/latest/meta-data/public-keys/0/.
  • D. Obtain the fingerprint for the key pair from the AWS Management Console, then search for the fingerprint in Amazon CloudWatch Logs using: aws logs filter-log-events.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Awraith
Highly Voted 3 years, 6 months ago
A seems indeed the most likely answer but I see that : "key-name : The name of the key pair used when the instance was launched." What if the compromised key is not the key used when the instance was launched ?
upvoted 18 times
elmuste
3 years, 6 months ago
you can't change the key on an ec2 instance
upvoted 4 times
...
Gustava6272
3 years, 6 months ago
A is correct , if we assume the key-name is know and not changed since its launch . But D is correct if the Cloudtrail sends logs to Cloudwatch and query is used . D is more clean.
upvoted 3 times
...
...
NarenG
Highly Voted 3 years, 6 months ago
Got this question in exam
upvoted 7 times
deegadaze1
3 years, 6 months ago
A Correct answer !
upvoted 2 times
...
...
Raphaello
Most Recent 1 year, 2 months ago
Selected Answer: A
A is the correct answer here. Straightforward.
upvoted 1 times
...
michele_scar
1 year, 11 months ago
Selected Answer: A
It's A
upvoted 1 times
...
tobedeleted
2 years, 5 months ago
Selected Answer: A
Following Command gives an output of ALL EC2 Instances in That REGION, which is having a Particular Key: aws ec2 describe-instances --filters "Name=key-name, Values=MyKeyPair1" --region ap-southeast-1 If there would have been another option of Cloud Trail Events, then that too captures the Events around those Keys creation, deletion etc. with its associated Instance Id.
upvoted 1 times
...
KDA33
2 years, 6 months ago
Answer A Check the command below: aws ec2 describe-instances --filters "Name=key-name,Values=keyname"
upvoted 1 times
...
Rja148393
2 years, 8 months ago
Selected Answer: A
A : with below reference https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html
upvoted 2 times
...
Radhaghosh
3 years, 2 months ago
Correct Answer is A Obtain the list of instances by directly querying Amazon EC2 using: aws ec2 describe-instances --filters "Name=key- name,Values=KEYNAMEHERE".
upvoted 1 times
...
Hariru
3 years, 5 months ago
Selected Answer: A
Just clean and fast list of the Key Pairs.
upvoted 1 times
...
IMAHM
3 years, 5 months ago
answer is A
upvoted 1 times
...
ChauPhan
3 years, 5 months ago
You need to find which servers have compromised key so A is correct. C will show you as below [root@ip- ~]# curl http://169.254.169.254/latest/meta-data/public-keys/0/ openssh-key
upvoted 1 times
...
Kdosec
3 years, 5 months ago
Honestly, I can't find this command in my test: aws ec2 describe-instances --filters "Name=key- name,Values=KEYNAMEHERE".
upvoted 1 times
...
Daniel76
3 years, 6 months ago
A - we do not need fingerprint-which is to verify the private key- but just the key name. Refer to this link on how to show the key name of the EC2. https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html
upvoted 2 times
...
chengxu32
3 years, 6 months ago
Why C is not correct ? https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#identify-key-pair-specified-at-launch The public key that you specified when you launched an instance is also available to you through its instance metadata. To view the public key that you specified when launching the instance, use the following command from your instance: TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` \ && curl -H "X-aws-ec2-metadata-token: $TOKEN" –v http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
upvoted 2 times
chengxu32
3 years, 6 months ago
I found the reason why C is not correct. Above command has to be run from the instance. The question asks for the list of EC2s that was deployed using the compromised the key pair, and command in A can be run from AWS CLI, not from the EC2 instance
upvoted 3 times
ChauPhan
3 years, 5 months ago
You need to find which instances have the compromised key, not the content of the key
upvoted 1 times
...
...
...
erezhazan1
3 years, 6 months ago
This is a DUP, it's A
upvoted 1 times
...
gfhbox0083
3 years, 6 months ago
Answer is A
upvoted 1 times
...
xaccan
3 years, 7 months ago
A true, run command
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago