panic: runtime error: index out of range [1] with length 1
Source code from https://github.com/BishopFox/sliver.git, version 1.6.0 , kali OS: └─$ cat /etc/os-release PRETTY_NAME="Kali GNU/Linux Rolling" NAME="Kali GNU/Linux" VERSION_ID="2024.2" VERSION="2024.2" VERSION_CODENAME=kali-rolling ID=kali ID_LIKE=debian HOME_URL="https://www.kali.org/" SUPPORT_URL="https://forums.kali.org/" BUG_REPORT_URL="https://bugs.kali.org/" ANSI_COLOR="1;31" Compile: └─$ make linux-amd64
checking sliver server version, no feedback └─# . /sliver-server version , no hints Also check the sliver client version, again no feedback
Run └─# . /sliver-server ,does not work and prompts: Unpacking assets ... panic: runtime error: index out of range [1] with length 1
goroutine 52 [running]: github.com/bishopfox/sliver/server/rpc.(*Server).GetVersion(0xd5e0270?, {0x2a2f2e0?, 0x2a86288?}, 0xf?) github.com/bishopfox/sliver/server/rpc/rpc.go:90 +0x13d github.com/bishopfox/sliver/protobuf/rpcpb._SliverRPC_GetVersion_Handler.func1({0xc01bb28?, 0xc0004eb680?}, {0x27b7ea0?, 0xc0004eb1d0?}) github.com/bishopfox/sliver/protobuf/rpcpb/services_grpc.pb.go:3006 +0xce github.com/bishopfox/sliver/server/transport.initMiddleware.PayloadUnaryServerInterceptor.func16({0xc01bb28, 0xc0004eb680}, {0x27b7ea0, 0xc0004eb1d0}, 0x0?, 0xc003326300) github.com/grpc-ecosystem/[email protected]/logging/logrus/payload_interceptors.go:29 +0x179 google.golang.org/grpc.getChainUnaryHandler.func1({0xc01bb28, 0xc0004eb680}, {0x27b7ea0, 0xc0004eb1d0}) google.golang.org/[email protected]/server.go:1196 +0xb2 github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus.UnaryServerInterceptor.func1({0xc01bb28, 0xc0004eb590}, {0x27b7ea0, 0xc0004eb1d0}, 0xc01ddd0220, 0xc00038fcc0) github.com/grpc-ecosystem/[email protected]/logging/logrus/server_interceptors.go:31 +0xfe google.golang.org/grpc.getChainUnaryHandler.func1({0xc01bb28, 0xc0004eb590}, {0x27b7ea0, 0xc0004eb1d0}) google.golang.org/[email protected]/server.go:1196 +0xb2 github.com/grpc-ecosystem/go-grpc-middleware/tags.UnaryServerInterceptor.func1({0xc01bb28?, 0xc0004eb230?}, {0x27b7ea0, 0xc0004eb1d0}, 0xc01ddd0220, 0xc00038fc80) github.com/grpc-ecosystem/[email protected]/tags/interceptors.go:23 +0x9c google.golang.org/grpc.getChainUnaryHandler.func1({0xc01bb28, 0xc0004eb230}, {0x27b7ea0, 0xc0004eb1d0}) google.golang.org/[email protected]/server.go:1196 +0xb2 github.com/bishopfox/sliver/server/transport.initMiddleware.auditLogUnaryServerInterceptor.func14({0xc01bb28, 0xc0004eb230}, {0x27b7ea0, 0xc0004eb1d0}, 0xc01ddd0220, 0xc00038fc00) github.com/bishopfox/sliver/server/transport/middleware.go:317 +0x3e8 google.golang.org/grpc.getChainUnaryHandler.func1({0xc01bb28, 0xc0004eb230}, {0x27b7ea0, 0xc0004eb1d0}) google.golang.org/[email protected]/server.go:1196 +0xb2 github.com/bishopfox/sliver/server/transport.initMiddleware.UnaryServerInterceptor.func13({0xc01bb28?, 0xc0004eb1a0?}, {0x27b7ea0, 0xc0004eb1d0}, 0xc01ddd0220?, 0xc00038fbc0) github.com/grpc-ecosystem/[email protected]/auth/auth.go:47 +0x91 google.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1({0xc01bb28, 0xc0004eb1a0}, {0x27b7ea0, 0xc0004eb1d0}, 0xc01ddd0220, 0x80?) google.golang.org/[email protected]/server.go:1187 +0x85 github.com/bishopfox/sliver/protobuf/rpcpb._SliverRPC_GetVersion_Handler({0x2a2f2e0, 0xd6b7540}, {0xc01bb28, 0xc0004eb1a0}, 0xc00027c200, 0xc0003c6980) github.com/bishopfox/sliver/protobuf/rpcpb/services_grpc.pb.go:3008 +0x143 google.golang.org/grpc.(*Server).processUnaryRPC(0xc00067fc00, {0xc01bb28, 0xc0004eb110}, {0xc02c660, 0xc000158300}, 0xc0033287e0, 0xc0004533e0, 0xd640d00, 0x0) google.golang.org/[email protected]/server.go:1379 +0xdf8 google.golang.org/grpc.(*Server).handleStream(0xc00067fc00, {0xc02c660, 0xc000158300}, 0xc0033287e0) google.golang.org/[email protected]/server.go:1790 +0xe8b google.golang.org/grpc.(*Server).serveStreams.func2.1() google.golang.org/[email protected]/server.go:1029 +0x8b created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 9 google.golang.org/[email protected]/server.go:1040 +0x125
The runtime version of go is: kali-$ go version go version go1.22.3 linux/amd64
You're maybe missing the .git directory?
I analyzed it, I downloaded the source zip from the web, version 1.60, and it compiled and run with errors, plus there was no .git directory after the compiled. I also tried a lower version, and it works fine after the same mutation. It should be a problem with the source code.
I have the same problem on 6.3.0-kali1-cloud-amd64. I tried doing fresh install on pure Debian and on Arch and both work. Only Kali seems to have issue.
You're maybe missing the
.gitdirectory?
i have the same issue. What does that mean? in $HOME? does it need to be empty, or not?
Edit: I used the .tar.gz from the releases. Using git with checkout v1.5.42 seems to work
The .git directory needs to be present in the directory from which you compile the binary, as the build script needs to pull version information from git.