Which command turns the program you want to run into a service on a target machine?

Study for the SANS560 GIAC Penetration Tester (GPEN) Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

Which command turns the program you want to run into a service on a target machine?

Explanation:
Managing Windows services is done with the Service Control tool. The command that turns a program into a service is the one that manages service definitions directly, letting you create a new service from an executable, set its startup behavior, and control it like any other Windows service. Using sc create with a binPath to your program, for example, registers that program as a service and can set start= auto so it launches at boot. This approach makes the program run in the background as a proper service, with the usual service lifecycle (start, stop, restart) and the ability to run without a logged-in user. Other options serve different purposes: WMIC can interact with services but is not as direct or straightforward for registering a new service. PsExec runs commands on remote systems but doesn’t install or register services. The at command schedules one-time tasks, not persistent services.

Managing Windows services is done with the Service Control tool. The command that turns a program into a service is the one that manages service definitions directly, letting you create a new service from an executable, set its startup behavior, and control it like any other Windows service. Using sc create with a binPath to your program, for example, registers that program as a service and can set start= auto so it launches at boot. This approach makes the program run in the background as a proper service, with the usual service lifecycle (start, stop, restart) and the ability to run without a logged-in user.

Other options serve different purposes: WMIC can interact with services but is not as direct or straightforward for registering a new service. PsExec runs commands on remote systems but doesn’t install or register services. The at command schedules one-time tasks, not persistent services.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy