exec

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: GPL-3.0 Imports: 28 Imported by: 4

README

client/command/exec

Overview

Implements the 'exec' command group for the Sliver client console. Handlers map Cobra invocations to exec workflows such as execute assembly, execute shellcode, execute, and migrate.

Go Files

  • commands.go – Registers the exec command family and binds shared flags across execution techniques.
  • execute-assembly.go – Uploads .NET assemblies and triggers in-memory execution, handling results and loot capture.
  • execute-shellcode.go – Executes raw shellcode via RPC, supporting interactive injection and task result printing.
  • execute.go – Runs arbitrary commands, streams combined stdout/stderr, and persists output as loot when requested.
  • migrate.go – Implements process migration, moving implants into new host processes and reporting completion.
  • msf-inject.go – Coordinates Metasploit payload injection tasks and prints remote execution responses.
  • msf.go – Launches Metasploit jobs on targets and tracks their beacon callbacks.
  • psexec.go – Provides PsExec-style remote service deployment using generated binaries and random filenames.
  • sideload.go – Executes unmanaged DLL exports in a remote process and summarizes task output.
  • spawndll.go – Spawns new processes with DLL injection, capturing returned handles and statuses.
  • ssh.go – Runs remote commands over SSH, sourcing credentials from loot and presenting command output.

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 ExecuteAssemblyCmd

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

ExecuteAssemblyCmd - Execute a .NET assembly in-memory.

func ExecuteCmd

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

ExecuteCmd - Run a command on the remote system.

func ExecuteShellcodeCmd

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

ExecuteShellcodeCmd - Execute shellcode in-memory.

func HandleExecuteAssemblyResponse added in v1.5.13

func HandleExecuteAssemblyResponse(execAssembly *sliverpb.ExecuteAssembly, assemblyPath string, hostName string, cmd *cobra.Command, con *console.SliverClient)

func HandleExecuteResponse added in v1.5.13

func HandleExecuteResponse(exec *sliverpb.Execute, cmdPath string, hostName string, cmd *cobra.Command, con *console.SliverClient)

func HandleSideloadResponse added in v1.5.13

func HandleSideloadResponse(sideload *sliverpb.Sideload, binPath string, hostName string, cmd *cobra.Command, con *console.SliverClient)

func HandleSpawnDLLResponse added in v1.5.13

func HandleSpawnDLLResponse(spawndll *sliverpb.SpawnDll, binPath string, hostName string, cmd *cobra.Command, con *console.SliverClient)

func LootExecute added in v1.5.13

func LootExecute(commandOutput []byte, lootName string, sliverCmdName string, cmdName string, hostName string, con *console.SliverClient)

func MigrateCmd

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

MigrateCmd - Windows only, inject an implant into another process

func MsfCmd

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

MsfCmd - Inject a metasploit payload into the current remote process.

func MsfInjectCmd

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

MsfInjectCmd - Inject a metasploit payload into a remote process.

func PrintExecute added in v1.5.0

func PrintExecute(exec *sliverpb.Execute, cmd *cobra.Command, con *console.SliverClient)

PrintExecute - Print the output of an executed command.

func PrintExecuteShellcode added in v1.5.0

func PrintExecuteShellcode(task *sliverpb.Task, con *console.SliverClient)

PrintExecuteShellcode - Display result of shellcode execution.

func PrintExecutionOutput added in v1.5.13

func PrintExecutionOutput(executionOutput string, saveOutput bool, commandName string, hostName string, con *console.SliverClient)

func PrintMsfRemote added in v1.5.0

func PrintMsfRemote(msfRemote *sliverpb.Task, con *console.SliverClient)

PrintMsfRemote - Print the results of the remote injection attempt.

func PrintSSHCmd added in v1.5.0

func PrintSSHCmd(sshCmd *sliverpb.SSHCommand, con *console.SliverClient)

PrintSSHCmd - Print the ssh command response.

func PsExecCmd

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

PsExecCmd - psexec command implementation.

func SSHCmd

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

SSHCmd - A built-in SSH client command for the remote system (doesn't shell out).

func SaveExecutionOutput added in v1.5.13

func SaveExecutionOutput(executionOutput string, commandName string, hostName string, con *console.SliverClient)

func SideloadCmd

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

SideloadCmd - Sideload a shared library on the remote system.

func SpawnDllCmd

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

SpawnDllCmd - Spawn execution of a DLL 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