exam questions

Exam CS0-002 All Questions

View all questions & answers for the CS0-002 exam

Exam CS0-002 topic 1 question 223 discussion

Actual exam question from CompTIA's CS0-002
Question #: 223
Topic #: 1
[All CS0-002 Questions]

A user receives a potentially malicious attachment that contains spelling errors and a PDF document. A security analyst reviews the email and decides to download the attachment to a Linux sandbox for review. Which of the following commands would MOST likely indicate if the email is malicious?

  • A. sha256sum ~/Desktop/file.pdf
  • B. file ~/Desktop/file.pdf
  • C. strings ~/Desktop/file.pdf | grep –i “
  • D. cat < ~/Desktop/file.pdf | grep –i .exe
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
Comptia_Secret_Service
Highly Voted 2 years, 5 months ago
Selected Answer: C
I believe C should be - strings ~/Desktop/file.pdf | grep "<script" I cannot believe the incompetence of these guys maintaining these dumps, blatant wrong answers are common, but literally copy-pasting questions and still failing to uphold its quality? is outright ridiculous, cannot believe I paid for this dump.
upvoted 13 times
Orean
2 years, 2 months ago
Some of these questions are deliberately misanswered in the hopes that it'll make certification-providers like CompTIA less inclined to crack down on them. It's why we have to burrow through the discussions, which usually—if not always—establish the correct answer.
upvoted 5 times
saci_frosty
2 years, 1 month ago
I always assume it is because this is how the person who took the test answered them, and they managed to pass the test.
upvoted 2 times
...
...
...
bob12356
Highly Voted 2 years, 4 months ago
Selected Answer: C
C - - strings ~/Desktop/file.pdf | grep "<script" Explanation: The strings command is used to extract the human-readable strings from a binary file, such as a PDF document. By piping the output of the strings command to the grep command with the -i flag, the security analyst can search for specific keywords or phrases that are commonly used in malicious PDF documents, such as "malware" or "Trojan." This will allow the analyst to quickly identify potential indicators of malicious activity in the PDF document.
upvoted 7 times
...
JakeH
Most Recent 1 year, 6 months ago
Selected Answer: B
Got this question on exam. Was going to choose cat but went with Strings at last minute. Tough questions
upvoted 1 times
...
skibby16
1 year, 7 months ago
Selected Answer: B
The "file" command is commonly used to determine the type of file based on its content and characteristics. When you run the "file" command on a file, it examines the file's magic number and other indicators to identify the file type. This can be helpful in identifying potentially malicious files. In the case of a PDF file, it should report that it's a PDF document.
upvoted 2 times
...
johndoe69
1 year, 8 months ago
Selected Answer: B
The command file ~/Desktop/file.pdf is used to determine the type of a file by examining its contents and metadata. It can help identify the format of the file, whether it's a PDF, an image, a text file, etc. In this context, using this command on the potentially malicious PDF attachment would provide information about the format of the file. If the file is actually a PDF as expected, it would provide more confidence that it's not just a disguised executable or malicious content. It's a preliminary step to understand the nature of the file before further analysis is performed.
upvoted 2 times
...
khrid4
2 years, 1 month ago
Selected Answer: B
"The most likely command to indicate if the email is malicious when reviewing a potentially malicious attachment on a Linux sandbox is B. The command file ~/Desktop/file.pdf is used to determine the type of file, which can help to determine if the file is malicious or not. The output of the command will display information about the file type, such as the file format, encoding, and other details." -This is common in the field, whereas to trick the end-user, TAs usually change the file format. Meanwhile, simply grep <script would not be the best answer because what if the contents of the pdf contains plaintext word "<script because it is a guide in how to do scripting? and this has been false positively captured?
upvoted 2 times
khrid4
2 years, 1 month ago
this is where the "file signatures" come into play.
upvoted 1 times
...
...
slcc99
2 years, 1 month ago
This question was put on the exam.
upvoted 3 times
...
2Fish
2 years, 1 month ago
Selected Answer: C
C. While A would work in the sense the hash of file.pdf was malicious and you could compare it to another Hash (say on VirusTotal), you still may not be able to find the matching malicious Hash. Check here for more discussions. https://www.examtopics.com/discussions/comptia/view/41563-exam-cs0-002-topic-1-question-67-discussion/
upvoted 1 times
...
knister
2 years, 2 months ago
Selected Answer: C
The answer C is incomplete, as bob says, there is a <script missing there. This should allow you to detect whether there are some scripts embedded in the pdf file.
upvoted 1 times
...
f3lix
2 years, 4 months ago
Selected Answer: A
I tried all 4 answers on a Kali box, by creating a malicious PDF file (with a reverse shell code) using Metasploit. B - Returned the file type as PDF (that makes my comment above incorrect) C - No output D - No output Only remaining option is to get the Hash value and query from a service like VirusTotal. Answer: A
upvoted 3 times
saci_frosty
2 years, 1 month ago
Try this instead C. strings ~/Desktop/file.pdf | grep "<script"
upvoted 2 times
...
...
marc4354345
2 years, 4 months ago
None of the given answers make a lot of sense.
upvoted 1 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