sliver icon indicating copy to clipboard operation
sliver copied to clipboard

panic: runtime error: index out of range [1] with length 1

Open 05t3 opened this issue 1 year ago • 2 comments

Describe the bug This specific issue started when I updated and upgraded my kali VM over the weekend. I have used sliver for the last 4months without any issues till recently.

Steps to reproduce the behavior:

  1. Running sliver-server, I get this error:
➜  sliver-server 
panic: runtime error: index out of range [1] with length 1

goroutine 99 [running]:
github.com/bishopfox/sliver/server/rpc.(*Server).GetVersion(0x9c13430a51?, {0x19551b2?, 0x6?}, 0x196775a?)
	github.com/bishopfox/sliver/server/rpc/rpc.go:90 +0x165
github.com/bishopfox/sliver/protobuf/rpcpb._SliverRPC_GetVersion_Handler.func1({0x9629490, 0xc000973230}, {0x17d7720?, 0xc000972e10})
	github.com/bishopfox/sliver/protobuf/rpcpb/services_grpc.pb.go:2113 +0x7b
github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus.PayloadUnaryServerInterceptor.func1({0x9629490, 0xc000973230}, {0x17d7720, 0xc000972e10}, 0x0?, 0xc00036aeb8)
	github.com/grpc-ecosystem/[email protected]/logging/logrus/payload_interceptors.go:29 +0x17d
google.golang.org/grpc.getChainUnaryHandler.func1({0x9629490, 0xc000973230}, {0x17d7720, 0xc000972e10})
	google.golang.org/[email protected]/server.go:1164 +0xb9
github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus.UnaryServerInterceptor.func1({0x9629490, 0xc000973140}, {0x17d7720, 0xc000972e10}, 0xc00032fda0, 0xc0003a1580)
	github.com/grpc-ecosystem/[email protected]/logging/logrus/server_interceptors.go:31 +0x102
google.golang.org/grpc.getChainUnaryHandler.func1({0x9629490, 0xc000973140}, {0x17d7720, 0xc000972e10})
	google.golang.org/[email protected]/server.go:1164 +0xb9
github.com/grpc-ecosystem/go-grpc-middleware/tags.UnaryServerInterceptor.func1({0x9629490?, 0xc000972e70?}, {0x17d7720, 0xc000972e10}, 0xc00032fda0, 0xc0003a1540)
	github.com/grpc-ecosystem/[email protected]/tags/interceptors.go:23 +0xa6
google.golang.org/grpc.getChainUnaryHandler.func1({0x9629490, 0xc000972e70}, {0x17d7720, 0xc000972e10})
	google.golang.org/[email protected]/server.go:1164 +0xb9
github.com/bishopfox/sliver/server/transport.auditLogUnaryServerInterceptor.func1({0x9629490, 0xc000972e70}, {0x17d7720, 0xc000972e10}, 0xc00032fda0, 0xc0003a1480)
	github.com/bishopfox/sliver/server/transport/middleware.go:223 +0x395
google.golang.org/grpc.getChainUnaryHandler.func1({0x9629490, 0xc000972e70}, {0x17d7720, 0xc000972e10})
	google.golang.org/[email protected]/server.go:1164 +0xb9
github.com/grpc-ecosystem/go-grpc-middleware/auth.UnaryServerInterceptor.func1({0x9629490, 0xc000972de0}, {0x17d7720, 0xc000972e10}, 0xc00032fda0, 0xc0003a1440)
	github.com/grpc-ecosystem/[email protected]/auth/auth.go:47 +0xba
google.golang.org/grpc.chainUnaryInterceptors.func1({0x9629490, 0xc000972de0}, {0x17d7720, 0xc000972e10}, 0xc00007ba20?, 0x173d400?)
	google.golang.org/[email protected]/server.go:1155 +0x8f
github.com/bishopfox/sliver/protobuf/rpcpb._SliverRPC_GetVersion_Handler({0x1946a20?, 0xa27bad0}, {0x9629490, 0xc000972de0}, 0xc000486c40, 0xc0001eb260)
	github.com/bishopfox/sliver/protobuf/rpcpb/services_grpc.pb.go:2115 +0x138
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003463c0, {0x9632f80, 0xc00027b380}, 0xc000966900, 0xc000182c90, 0xa1a7a60, 0x0)
	google.golang.org/[email protected]/server.go:1345 +0xdf0
google.golang.org/grpc.(*Server).handleStream(0xc0003463c0, {0x9632f80, 0xc00027b380}, 0xc000966900, 0x0)
	google.golang.org/[email protected]/server.go:1722 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
	google.golang.org/[email protected]/server.go:966 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/[email protected]/server.go:964 +0x28a

I tried uninstalling, purging & re-installing sliver with no fix yet.

I also tried installing the one liner from your README.md , but still couldn't get it to work

My system specifications are as follows:

➜  cat /etc/os-release 
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
VERSION_ID="2023.2"
VERSION="2023.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"
➜  uname -a
Linux oste 6.3.0-kali1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.3.7-1kali1 (2023-06-29) x86_64 GNU/Linux

My Go version is as follows:

➜  go version
go version go1.20.6 linux/amd64

My Sliver version

➜  sliver version 
v1.5.41 - f2a3915c79b31ab31c0c2f0428bbd53d9e93c54b
➜  sliver-server version
 - kali
➜  sliver-client version 
v1.5.41 - f2a3915c79b31ab31c0c2f0428bbd53d9e93c54b

@rkervella, i hope this answers the questions raised on issue #1361

05t3 avatar Jul 26 '23 10:07 05t3

@05t3 I think you have the Kali packaged version of Sliver installed as well as the official release. I suggest running apt remove sliver and sticking with the official releases since the version Kali has in its repos is old.

RafBishopFox avatar Jul 26 '23 14:07 RafBishopFox

@05t3 thanks for the details. Please try the following steps, and reopen the issue if that does not fix it:

  • delete any sliver version you might have installed via apt (apt remove sliver)
  • remove any sliver data from the system ($HOME/.sliver, /root/.sliver)
  • install the latest release from this page

rkervella avatar Jul 26 '23 15:07 rkervella