{"id":24055644,"url":"https://github.com/voidvxvt/enablealltokenprivs","last_synced_at":"2025-04-22T21:42:29.386Z","repository":{"id":223177472,"uuid":"758964174","full_name":"voidvxvt/EnableAllTokenPrivs","owner":"voidvxvt","description":"Enable or Disable TokenPrivilege(s)","archived":false,"fork":false,"pushed_at":"2024-05-17T12:43:43.000Z","size":20,"stargazers_count":13,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T19:04:05.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voidvxvt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-17T15:39:25.000Z","updated_at":"2025-03-18T17:59:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"755a6acd-047c-4a70-b8a4-64700a1170d5","html_url":"https://github.com/voidvxvt/EnableAllTokenPrivs","commit_stats":null,"previous_names":["xvt-void/enablealltokenprivs","voidvxvt/enablealltokenprivs"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidvxvt%2FEnableAllTokenPrivs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidvxvt%2FEnableAllTokenPrivs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidvxvt%2FEnableAllTokenPrivs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidvxvt%2FEnableAllTokenPrivs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidvxvt","download_url":"https://codeload.github.com/voidvxvt/EnableAllTokenPrivs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250330246,"owners_count":21412947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-09T04:09:16.290Z","updated_at":"2025-04-22T21:42:29.308Z","avatar_url":"https://github.com/voidvxvt.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# EnableAllTokenPrivs\n\nEnable or Disable TokenPrivilege(s)\n\nThis program is actually pretty useless as it is just a wrapper for the [`AdjustTokenPrivileges()`](https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-adjusttokenprivileges) WinAPI function and enables or disables privileges on processes.  \nTypically, when a program needs to perform a privileged task, it will simply call `AdjustTokenPrivileges` to enable the privileges it needs, or disable the privileges when it is done performing that privileged task.\n\n## Usage\n\n```cmd\nC:\\tools\u003e.\\EnableAllTokenPrivs.exe\nEnableAllTokenPrivs.exe -\u003e Enable/Disable TokenPrivilege(s)\n\n-p --pid 6969                           enable/disable privilege(s) of a process\n-d --disable                            disable privilege(s)\n-P --privilege SeDebugPrivilege         enable/disable a single privilege\n-l --list                               list privileges\n-h --help                               print help (this output)\n```\n\n**Examples**\n\nenable all disabled TokenPrivileges of the calling/parent process:\n```cmd\nEnableAllTokenPrivs.exe\n```\n\nlist the TokenPrivileges of the calling/parent process (`whoami /priv`):\n```cmd\nEnableAllTokenPrivs.exe -l\n```\n\nenable the SeDebugPrivilege of the calling/parent process:\n```cmd\nEnableAllTokenPrivs.exe -P SeDebugPrivilege\n```\n\ndisabled the SeDebugPrivilege of the process with PID 6969:\n```cmd\nEnableAllTokenPrivs.exe --pid 6969 --disable --privilege SeDebugPrivilege\n```\n\nlist the TokenPrivileges of the process with PID 6969:\n```cmd\nEnableAllTokenPrivs.exe --pid 6969 --list\n```\n\ndisable all enabled privileges of the process with PID 6969:\n```cmd\nEnableAllTokenPrivs.exe --pid 6969 --disable\n```\n\ndisable the SeDebugPrivilege of the process with PID 6969:\n```cmd\nEnableAllTokenPrivs.exe --pid 6969 --disable --privilege SeDebugPrivilege\n```\n\n\n## Usage in sliver implant with `execute-assembly`\n\nexecute the assembly in a sacrifical process which enables all TokenPrivileges of the implant process (idk why you would do this but you can):\n```sliver\nexecute-assembly -c EnableAllTokenPrivs.EnableAllTokenPrivs -m Main /tmp/EnableAllTokenPrivs.exe\n```\n\n___\nif you just want to enable all privileges for your powershell process, you can use:\n[EnableAllTokenPrivs.ps1](https://github.com/fashionproof/EnableAllTokenPrivs/blob/master/EnableAllTokenPrivs.ps1)\n\n___\n## Sources\n\n[MSDN - OpenProcessToken](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocesstoken)  \n[MSDN - AdjustTokenPrivileges](https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-adjusttokenprivileges)  \n[antonioCoco/RunasCs](https://github.com/antonioCoco/RunasCs/blob/master/RunasCs.cs)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidvxvt%2Fenablealltokenprivs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidvxvt%2Fenablealltokenprivs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidvxvt%2Fenablealltokenprivs/lists"}