filesystem

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: 39 Imported by: 2

README

client/command/filesystem

Overview

Implements the 'filesystem' command group for the Sliver client console. Handlers map Cobra invocations to filesystem workflows such as CAT, CD, chmod, and chown.

Go Files

  • cat.go – Downloads remote files and prints contents locally with optional ANSI colorization.
  • cd.go – Changes the working directory of the active session or beacon.
  • chmod.go – Adjusts remote file permissions via RPC for Unix-like targets.
  • chown.go – Alters remote file ownership metadata where supported.
  • chtimes.go – Updates remote file access and modification timestamps.
  • commands.go – Assembles the filesystem command group and wires each file operation subcommand.
  • cp.go – Copies files on the remote target, handling overwrite prompts and path validation.
  • download.go – Retrieves files from the target and writes them to the local loot directory.
  • grep.go – Runs server-side grep equivalents with pattern, highlight, and streaming options.
  • head.go – Streams the first bytes or lines of a remote file.
  • ls.go – Lists directory contents with filtering, sorting, and long-format support.
  • memfiles-add.go – Uploads file data into in-memory implants for later retrieval.
  • memfiles-list.go – Enumerates in-memory file entries stored on the implant.
  • memfiles-rm.go – Removes staged in-memory files from the implant cache.
  • mkdir.go – Creates directories on the remote system, with recursive creation if requested.
  • mount.go – Mounts remote filesystem paths for live browsing through the client.
  • mv.go – Moves or renames remote files and directories.
  • pwd.go – Prints the current working directory of the active target.
  • rm.go – Deletes remote files or directories with optional recursive behavior.
  • upload.go – Transfers local files to the target and sets desired permissions.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatCmd

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

CatCmd - Display the contents of a remote file.

func CdCmd

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

CdCmd - Change directory on the remote system.

func ChmodCmd added in v1.5.37

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

ChmodCmd - Change the permissions of a file on the remote file system.

func ChownCmd added in v1.5.37

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

ChownCmd - Change the owner of a file on the remote file system.

func ChtimesCmd added in v1.5.37

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

ChtimesCmd - Change the access and modified time of a file on the remote file system.

func Commands added in v1.6.0

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

Commands returns the “ command and its subcommands.

func CpCmd added in v1.6.0

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

func DownloadCmd

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

func GrepCmd added in v1.6.0

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

func HandleDownloadResponse added in v1.5.16

func HandleDownloadResponse(download *sliverpb.Download, cmd *cobra.Command, args []string, con *console.SliverClient)

func HeadCmd added in v1.6.0

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

func LsCmd

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

LsCmd - List the contents of a remote directory.

func MemfilesAddCmd added in v1.5.40

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

MemfilesAddCmd - Add memfile.

func MemfilesListCmd added in v1.5.40

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

MemfilesListCmd - List memfiles.

func MemfilesRmCmd added in v1.5.40

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

MemfilesRmCmd - Remove a memfile.

func MkdirCmd

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

MkdirCmd - Make a remote directory.

func MountCmd added in v1.6.0

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

MountCmd - Print information about mounted filesystems

func MvCmd added in v1.5.10

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

func PrintAddMemfile added in v1.5.40

func PrintAddMemfile(memfilesAdd *sliverpb.MemfilesAdd, con *console.SliverClient)

PrintAddMemfile - Print the memfiles response.

func PrintCat added in v1.5.0

func PrintCat(originalFileName string, download *sliverpb.Download, cmd *cobra.Command, con *console.SliverClient)

PrintCat - Print the download to stdout.

func PrintChmod added in v1.5.37

func PrintChmod(chmod *sliverpb.Chmod, con *console.SliverClient)

PrintChmod - Print the chmod response.

func PrintChown added in v1.5.37

func PrintChown(chown *sliverpb.Chown, con *console.SliverClient)

PrintChown - Print the chown response.

func PrintChtimes added in v1.5.37

func PrintChtimes(chtimes *sliverpb.Chtimes, con *console.SliverClient)

PrintChtimes - Print the Chtimes response.

func PrintCp added in v1.6.0

func PrintCp(cp *sliverpb.Cp, con *console.SliverClient)

func PrintLs

func PrintLs(ls *sliverpb.Ls, flags *pflag.FlagSet, con *console.SliverClient)

PrintLs - Display an sliverpb.Ls object.

func PrintMemfiles added in v1.5.40

func PrintMemfiles(ls *sliverpb.Ls, con *console.SliverClient)

PrintMemfiles - Display an sliverpb.Ls object.

func PrintMkdir added in v1.5.0

func PrintMkdir(mkdir *sliverpb.Mkdir, con *console.SliverClient)

PrintMkdir - Print make directory.

func PrintMount added in v1.6.0

func PrintMount(os string, mount *sliverpb.Mount, con *console.SliverClient)

PrintMount - Print a table containing information on mounted filesystems

func PrintMv added in v1.5.10

func PrintMv(mv *sliverpb.Mv, con *console.SliverClient)

PrintMv - Print the renamed file.

func PrintPwd added in v1.5.0

func PrintPwd(pwd *sliverpb.Pwd, con *console.SliverClient)

PrintPwd - Print the remote working directory.

func PrintRm added in v1.5.0

func PrintRm(rm *sliverpb.Rm, con *console.SliverClient)

PrintRm - Print the rm response.

func PrintRmMemfile added in v1.5.40

func PrintRmMemfile(memfilesList *sliverpb.MemfilesRm, con *console.SliverClient)

PrintRmMemfile - Remove a memfile.

func PrintUpload added in v1.5.0

func PrintUpload(upload *sliverpb.Upload, con *console.SliverClient)

PrintUpload - Print the result of the upload command.

func PwdCmd

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

PwdCmd - Print the remote working directory.

func RmCmd

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

RmCmd - Remove a directory from the remote file system.

func UploadCmd

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

UploadCmd - Upload a file to 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