exam questions

Exam CAS-004 All Questions

View all questions & answers for the CAS-004 exam

Exam CAS-004 topic 1 question 148 discussion

Actual exam question from CompTIA's CAS-004
Question #: 148
Topic #: 1
[All CAS-004 Questions]

An organization's finance system was recently attacked. A forensic analyst is reviewing the contents of the compromised files for credit card data. Which of the following commands should the analyst run to BEST determine whether financial data was lost?

  • A. grep ג€"v '^4 [0ג€"9] {12} (?:[0ג€"9]{3}) ?$' file
  • B. grep '^4 [0ג€"9]{12}(?:[0ג€"9]{3})?$' file
  • C. grep '^6(?:011|5[0ג€"9]{2}) [0ג€"9] {12} ?' file
  • D. grep ג€"v '^6(?:011|5[0ג€"9]{2})[0ג€"9]{12}?' file
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
imather
Highly Voted 1 year, 11 months ago
Selected Answer: B
Hard to tell with the characters, but ^4[0-9]{12}(?:[0-9]{3})?$ is regex to find visa cards, which aligns closely with B.
upvoted 9 times
...
b49eb27
Highly Voted 1 year, 2 months ago
I'll help out future peeps: A: grep -v '^4[0-9] {12}(?:[0-9]{3})?$' file B grep '^4[0-9]{12}(?:[0-9]{3})?$' file C grep '^6(?:011|5[0-9]{2})[0-9]{12}?'file D grep -v '^6(?:011|5[0-9]{2})[0-9]{12}?' file If you are wondering how i found this, I put the question into google and looked on chegg. They grey out the answer but the photo of the lines are there. Also, if you do an f12 in chegg you can sometimes find the greyed/obscured section and see what's there.
upvoted 7 times
...
IT_Master_Tech
Most Recent 6 months, 3 weeks ago
ChatGPT states that could be B or C. Visa cards start with 4 and Discovery cards with 60 or 65.
upvoted 1 times
...
Anarckii
1 year, 6 months ago
Selected Answer: B
After research, I am going to go with B because VISA is more common
upvoted 1 times
...
OdinAtlasSteel
1 year, 6 months ago
Selected Answer: B
After opening my wallet, pulling out my personal credit card, and noting that the card number starts with '4', I've decided to change my answer to B.
upvoted 2 times
SangSang
1 year ago
same here lol
upvoted 1 times
...
...
Sam1289
1 year, 10 months ago
Selected Answer: B
chatgpt
upvoted 1 times
...
BiteSize
1 year, 11 months ago
Selected Answer: C
The correct answer is C. The command grep '^6(?:011|5[09"€ 2}[ג }) [ 0ג€" 9 ] {12} ?' file is used to find credit card data in a file. This command searches for the pattern of credit card numbers that start with either 011 or 5 and are followed by either 0, 9, or 2. The pattern is then followed by any 12 digits
upvoted 6 times
jt2oux
1 year, 9 months ago
Interesting. You understand the command but come up short in understanding credit card numbering systems. Please tell me which major credit card vendor publishes account numbers starting with 011 or 5? Now look at answer B. Definately an expression representing a Credit card number but this one specifies "4" as the starting number. All VISA card numbers start with a 4.
upvoted 5 times
jt2oux
1 year, 9 months ago
upon review it Turns out I didn't completely understand the full expression of C. Lol. Answer still B of course
upvoted 2 times
...
OdinAtlasSteel
1 year, 7 months ago
Mastercard starts with 5. The answer is C.
upvoted 1 times
...
...
...
javier051977
2 years, 2 months ago
(^4[0-9]{12}(?:[0-9]{3})?$)|(^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$)|(3[47][0-9]{13})|(^3(?:0[0-5]|[68][0-9])[0-9]{11}$)|(^6(?:011|5[0-9]{2})[0-9]{12}$)|(^(?:2131|1800|35\d{3})\d{11}$)
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 ...