nerdexam
CompTIA

XK0-005 · Question #682

A security team discovers that a web server has been running with elevated privileges and identifies it as a security violation. Which of the following items needs to be added to the…

The correct answer is A. In the [Service] section of the webserver.service file, add User=comptia. Adding User=comptia in the [Service] section ensures that the web server runs as a non-root user, which enhances security by reducing the risk of elevated privileges being exploited. This follows the principle of least privilege, a best practice for system services.

Security

Question

A security team discovers that a web server has been running with elevated privileges and identifies it as a security violation. Which of the following items needs to be added to the webserver.service file to remediate the issue?

Options

  • AIn the [Service] section of the webserver.service file, add User=comptia.
  • BIn the [Unit] section of the webserver.service file, add AllowIsolate=true.
  • CIn the [Install] section of the webserver.service file, add WantedBy=single.target.
  • DAdd After=network.target to the [Install] section of the webserver.service file.

How the community answered

(20 responses)
  • A
    80% (16)
  • B
    5% (1)
  • C
    10% (2)
  • D
    5% (1)

Explanation

Adding User=comptia in the [Service] section ensures that the web server runs as a non-root user, which enhances security by reducing the risk of elevated privileges being exploited. This follows the principle of least privilege, a best practice for system services.

Topics

#systemd#security hardening#least privilege#service configuration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice