Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Determining privilege levels of running process

Determining privilege levels of running process

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hyien
    wrote on last edited by
    #1

    On WinNT/2K/XP, how do determine what privilege level a process is executing in (eg whether the process has LocalSystem privileges)? Is there any API call to use?

    A 1 Reply Last reply
    0
    • H Hyien

      On WinNT/2K/XP, how do determine what privilege level a process is executing in (eg whether the process has LocalSystem privileges)? Is there any API call to use?

      A Offline
      A Offline
      adara
      wrote on last edited by
      #2

      Look for OpenProcessToken and GetTokenInformation

      H 1 Reply Last reply
      0
      • A adara

        Look for OpenProcessToken and GetTokenInformation

        H Offline
        H Offline
        Hyien
        wrote on last edited by
        #3

        Does the process calling these functions require any special access rights? My application can only execute with normal user privileges.

        A 1 Reply Last reply
        0
        • H Hyien

          Does the process calling these functions require any special access rights? My application can only execute with normal user privileges.

          A Offline
          A Offline
          adara
          wrote on last edited by
          #4

          the calling process needs the SE_DEBUG_NAME privilege,that can be achieve using AdjustTokenPrivileges

          D 1 Reply Last reply
          0
          • A adara

            the calling process needs the SE_DEBUG_NAME privilege,that can be achieve using AdjustTokenPrivileges

            D Offline
            D Offline
            Daniel Lohmann
            wrote on last edited by
            #5

            A usual user account should never have assigned SeDebugPrivilege. This is one of the most powerful privileges and can easily be used to make yourself an Admin! UGenn, what exactly do you want to do? Do you try to get this informations about a foreign process or about your own process? And what information do you need? "Privilege level" is a bit ambigious, because the access rights of a process are spread over a couple of places. Do you just want to know if the process is running under the LocalSystem account? Or if the user account the process is running under is a member of the Admins group? Anything about assigned and enabled privileges? I am quite sure I can help you, but I need more input :rolleyes: -- Daniel Lohmann http://www.losoft.de (Hey, this page is worth looking! You can find some free and handy NT tools there :-D )

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups