0

How to list all services (daemons) on a Unix system that can be started by current user, but that will run as root?

I'm studying cyber security and plays with capture-the-flag machines to enhance my skills.

I've encountered a system that don't seems vulnerability, but may have vulnerable non-running daemons.

I'm looking for a way to enumerate daemons that can be started by the current (low-privileged) user, but that will run as root once started. I would prefer Debian or Red Hat commands.

Currenly, I only know of service --status-all and systemctl, but I can't seem to get the info I'm looking for - and systemctl is not available on Red Hat.

  • A dæmon is a program being run in a specific way. It is not just any old program whatsoever. How did you determine that you are looking for dæmons? When you invoke programs under the aegis of your account (and in non-dæmon context, to boot) how are you expecting these programs to run as the superuser? And what on Earth makes you think that "systemctl is not available" on RHEL? It has been available for half a decade. – JdeBP Apr 26 at 8:54
  • @JdeBP - The systemctl command is not found on CentOS (RHEL derivative). Isn't a daemon the equivalent of a service in Windows? I thought that daemons could be configured to always run as a specific user, still may be stopped/started by other users? Am I wrong? – Shuzheng Apr 26 at 9:03
  • The systemctl command has been available on CentOS for roughly the same half a decade that it has been available on RHEL. And you haven't explained how you have determined that you are in fact looking for dæmons in the first place. – JdeBP Apr 26 at 10:42
  • I'm looking for daemons, since I want to exploit them. My hope is that I can start them as my current user (RunAs in Windows) and they will run as root. – Shuzheng Apr 26 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.