privilege

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2026 License: GPL-3.0 Imports: 14 Imported by: 2

README

client/command/privilege

Overview

Implements the 'privilege' command group for the Sliver client console. Handlers map Cobra invocations to privilege workflows such as getprivs, getsystem, impersonate, and make token.

Go Files

  • commands.go – Registers privilege escalation commands and binds platform restrictions.
  • getprivs.go – Queries and prints token privileges for the current user context.
  • getsystem.go – Attempts to obtain SYSTEM privileges via built-in escalation techniques.
  • impersonate.go – Handles impersonation of other logon sessions using available tokens.
  • make-token.go – Creates new logon tokens with supplied credentials for the implant.
  • rev2self.go – Reverts impersonation back to the implant's original security context.
  • runas.go – Runs commands under alternate credentials or integrity levels through runas-like workflows.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands added in v1.6.0

func Commands(con *console.SliverClient) []*cobra.Command

Commands returns the “ command and its subcommands.

func GetPrivsCmd added in v1.4.21

func GetPrivsCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

GetPrivsCmd - Get the current process privileges (Windows only)

func GetSystemCmd

func GetSystemCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

GetSystemCmd - Windows only, attempt to get SYSTEM on the remote system

func ImpersonateCmd

func ImpersonateCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ImpersonateCmd - Windows only, impersonate a user token

func MakeTokenCmd

func MakeTokenCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

MakeTokenCmd - Windows only, create a token using "valid" credentails

func PrintGetPrivs added in v1.5.0

func PrintGetPrivs(privs *sliverpb.GetPrivs, pid int32, con *console.SliverClient)

PrintGetPrivs - Print the results of the get privs command

func PrintGetSystem added in v1.5.0

func PrintGetSystem(getsystemResp *sliverpb.GetSystem, con *console.SliverClient)

PrintGetSystem - Print the results of get system

func PrintImpersonate added in v1.5.0

func PrintImpersonate(impersonate *sliverpb.Impersonate, username string, con *console.SliverClient)

PrintImpersonate - Print the results of the attempted impersonation

func PrintMakeToken added in v1.5.0

func PrintMakeToken(makeToken *sliverpb.MakeToken, domain string, username string, con *console.SliverClient)

PrintMakeToken - Print the results of attempting to make a token

func PrintRev2Self added in v1.5.0

func PrintRev2Self(revert *sliverpb.RevToSelf, con *console.SliverClient)

PrintRev2Self - Print the result of revert to self

func PrintRunAs added in v1.5.0

func PrintRunAs(runAs *sliverpb.RunAs, process string, args string, name string, con *console.SliverClient)

PrintRunAs - Print the result of run as

func RevToSelfCmd

func RevToSelfCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

RevToSelfCmd - Drop any impersonated tokens

func RunAsCmd

func RunAsCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

RunAsCmd - Run a command as another user on the remote system

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL