diff --git a/client/command/generate.go b/client/command/generate.go index ddf206bab5..e696699103 100644 --- a/client/command/generate.go +++ b/client/command/generate.go @@ -426,10 +426,10 @@ func getTargets(targetOS string, targetArch string) (string, string) { targetOS = "linux" } - if targetArch == "x64" || strings.HasPrefix(targetArch, "64") { + if targetArch == "amd64" || targetArch == "x64" || strings.HasPrefix(targetArch, "64") { targetArch = "amd64" } - if targetArch == "x86" || strings.HasPrefix(targetArch, "32") { + if targetArch == "386" || targetArch == "x86" || strings.HasPrefix(targetArch, "32") { targetArch = "386" } diff --git a/client/console/console.go b/client/console/console.go index 064eb1e5dc..40d318dbec 100644 --- a/client/console/console.go +++ b/client/console/console.go @@ -283,5 +283,14 @@ var asciiLogos = []string{ ╚════██║██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██╗ ███████║███████╗██║ ╚████╔╝ ███████╗██║ ██║ ╚══════╝╚══════╝╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝ +` + normal, + + bold + gray + ` +.------..------..------..------..------..------. +|S.--. ||L.--. ||I.--. ||V.--. ||E.--. ||R.--. | +| :/\: || :/\: || (\/) || :(): || (\/) || :(): | +| :\/: || (__) || :\/: || ()() || :\/: || ()() | +| '--'S|| '--'L|| '--'I|| '--'V|| '--'E|| '--'R| +` + "`------'`------'`------'`------'`------'`------'" + ` ` + normal, } diff --git a/go-assets.sh b/go-assets.sh index 15918f05bc..e1cb7d6c71 100755 --- a/go-assets.sh +++ b/go-assets.sh @@ -20,7 +20,7 @@ # Creates the static go asset archives GO_VER="1.16.3" -GARBLE_VER="1.16.2" +GARBLE_VER="1.16.3" GO_ARCH_1="amd64" GO_ARCH_2="arm64" diff --git a/implant/sliver/handlers/handlers.go b/implant/sliver/handlers/handlers.go index 860ac07d06..9a73bd6f9d 100644 --- a/implant/sliver/handlers/handlers.go +++ b/implant/sliver/handlers/handlers.go @@ -309,8 +309,17 @@ func uploadHandler(data []byte, resp RPCResponse) { return } - uploadPath, _ := filepath.Abs(uploadReq.Path) + uploadPath, err := filepath.Abs(uploadReq.Path) + if err != nil { + // {{if .Config.Debug}} + log.Printf("upload path error: %v", err) + // {{end}} + resp([]byte{}, err) + } + + // Process Upload upload := &sliverpb.Upload{Path: uploadPath} + f, err := os.Create(uploadPath) if err != nil { upload.Response = &commonpb.Response{ @@ -318,14 +327,22 @@ func uploadHandler(data []byte, resp RPCResponse) { } } else { + // Create file, write data to file system defer f.Close() - data, err := gzipRead(uploadReq.Data) + var uploadData []byte + var err error + if uploadReq.Encoder == "gzip" { + uploadData, err = gzipRead(uploadReq.Data) + } else { + uploadData = uploadReq.Data + } + // Check for decode errors if err != nil { upload.Response = &commonpb.Response{ Err: fmt.Sprintf("%v", err), } } else { - f.Write(data) + f.Write(uploadData) } } @@ -580,9 +597,12 @@ func gzipWrite(w io.Writer, data []byte) error { func gzipRead(data []byte) ([]byte, error) { bytes.NewReader(data) - reader, _ := gzip.NewReader(bytes.NewReader(data)) + reader, err := gzip.NewReader(bytes.NewReader(data)) + if err != nil { + return nil, err + } var buf bytes.Buffer - _, err := buf.ReadFrom(reader) + _, err = buf.ReadFrom(reader) if err != nil { return nil, err }