exam questions

Exam PT1-002 All Questions

View all questions & answers for the PT1-002 exam

Exam PT1-002 topic 1 question 40 discussion

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

A penetration tester has obtained root access to a Linux-based file server and would like to maintain persistence after reboot. Which of the following techniques would BEST support this objective?

  • A. Create a one-shot systemd service to establish a reverse shell.
  • B. Obtain /etc/shadow and brute force the root password.
  • C. Run the nc -e /bin/sh <...> command.
  • D. Move laterally to create a user account on LDAP
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
BinarySoldier
Highly Voted 3 years, 5 months ago
C is not right as the netcat shell will be terminated on reboot. I would go with option A. You can check this link here that describes how to abuse the systemd user service: https://hosakacorp.net/p/systemd-user.html
upvoted 6 times
...
ShinobiGrappler
Most Recent 2 years, 8 months ago
Selected Answer: A
A, you can create persistence with systemd -https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/
upvoted 2 times
...
some_specialist
3 years, 1 month ago
Selected Answer: A
as mentioned before, the correct answer is A
upvoted 3 times
...
brandonl
3 years, 1 month ago
C is not correct. Establish persistence - abuse service, set cron job to start
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