sliver icon indicating copy to clipboard operation
sliver copied to clipboard

File Download: rpc error Deadline exceed - Panic runtime error

Open nullsection opened this issue 3 years ago • 6 comments

Describe the bug Running the latest release of sliver. On a beaconing agent, issued a download command on a file < 1MB in size.

Error that gets thrown:

[!] Could not get beacon task content: rpc error: code = DeadlineExceeded desc = context deadline exceeded

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x945297]

goroutine 119 [running]:
github.com/bishopfox/sliver/client/console.(*SliverConsoleClient).triggerBeaconTaskCallback(0xc00050e2d0, {0xc00064d900, 0x76, 0x80})
	github.com/bishopfox/sliver/client/console/console.go:375 +0x457
github.com/bishopfox/sliver/client/console.(*SliverConsoleClient).startEventLoop(0xc00050e2d0)
	github.com/bishopfox/sliver/client/console/console.go:267 +0xfa5
created by github.com/bishopfox/sliver/client/console.Start
	github.com/bishopfox/sliver/client/console/console.go:142 +0x517


Target Linux Version: 3.10.0-1127.19.1.el7.x86_64

nullsection avatar Dec 10 '22 06:12 nullsection

@moloch-- looks like this context expires before the function can handle the callback: https://github.com/BishopFox/sliver/blob/508257f8259c8d559201522711dfb49acfa0e4d2/client/console/console.go#L350

rkervella avatar Dec 12 '22 10:12 rkervella

@rkervella , can confirm this issue seems to only occur when I'm accessing the team server remotely. Issuing the same command on the team server machine completes as expected.

nullsection avatar Dec 12 '22 14:12 nullsection

Odd, I wonder why that gRPC context has a hard coded timeout ... well should be easy to fix.

moloch-- avatar Dec 12 '22 15:12 moloch--

Is this likely to be patched out?

nullsection avatar Jan 01 '23 14:01 nullsection

Is this likely to be patched out?

Yes, when we'll find the time to do it. You can also submit a PR.

rkervella avatar Jan 02 '23 22:01 rkervella

is this related to errors in the sliver.log in the lines of: ERRO[2023-08-24T13:09:36+02:00] [github.com/grpc-ecosystem/[email protected]/logging/logrus/options.go:224] finished unary call with code Unknown

receiving them on large file downloads

realalexandergeorgiev avatar Aug 24 '23 11:08 realalexandergeorgiev