Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implant Crash on mTLS with Abrupt Server Termination #749

Closed
moloch-- opened this issue Jul 18, 2022 · 1 comment
Closed

Implant Crash on mTLS with Abrupt Server Termination #749

moloch-- opened this issue Jul 18, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@moloch--
Copy link
Member

The implant will occasionally crash if the server impolitely terminates the mtls connection in session mode:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10127f7fc]

goroutine 50 [running]:
github.com/bishopfox/sliver/implant/sliver/transports.(*Tunnel).Close(0x140000b7720)
	/Users/moloch/.sliver/slivers/darwin/arm64/DISGUSTED_LOGIC/src/github.com/bishopfox/sliver/implant/sliver/transports/tunnel.go:62 +0xac
github.com/bishopfox/sliver/implant/sliver/transports.(*Connection).removeAndCloseAllTunnels(0x140000960c0)
	/Users/moloch/.sliver/slivers/darwin/arm64/DISGUSTED_LOGIC/src/github.com/bishopfox/sliver/implant/sliver/transports/connection.go:80 +0x110
github.com/bishopfox/sliver/implant/sliver/transports.(*Connection).Cleanup.func1()
	/Users/moloch/.sliver/slivers/darwin/arm64/DISGUSTED_LOGIC/src/github.com/bishopfox/sliver/implant/sliver/transports/connection.go:48 +0x48
sync.(*Once).doSlow(0x14000090040, 0x140000f3e68)
	/Users/moloch/.sliver/go/src/sync/once.go:68 +0xf0
sync.(*Once).Do(0x14000090040, 0x140000f3e68)
	/Users/moloch/.sliver/go/src/sync/once.go:59 +0x48
github.com/bishopfox/sliver/implant/sliver/transports.(*Connection).Cleanup(0x140000960c0)
	/Users/moloch/.sliver/slivers/darwin/arm64/DISGUSTED_LOGIC/src/github.com/bishopfox/sliver/implant/sliver/transports/connection.go:45 +0x60
github.com/bishopfox/sliver/implant/sliver/transports.mtlsConnect.func3.2()
	/Users/moloch/.sliver/slivers/darwin/arm64/DISGUSTED_LOGIC/src/github.com/bishopfox/sliver/implant/sliver/transports/session.go:220 +0x128
created by github.com/bishopfox/sliver/implant/sliver/transports.mtlsConnect.func3
	/Users/moloch/.sliver/slivers/darwin/arm64/DISGUSTED_LOGIC/src/github.com/bishopfox/sliver/implant/sliver/transports/session.go:212 +0x43c
@moloch-- moloch-- added the bug Something isn't working label Jul 18, 2022
@moloch--
Copy link
Member Author

moloch-- commented Jul 25, 2022

Occurs in the tunnel clean up code; only triggered when a tunnel was used during the session and wasn't cleaned up properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant