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

1.4.3 version fails to generate implant in service format, rpc error: code = Unknown, garble errors in the log #348

Closed
hippich opened this issue Mar 12, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@hippich
Copy link

hippich commented Mar 12, 2021

Trying to generate service binary, getting rpc error in the console, and garble errors in the log:

sliver > generate --http example.com --format service

[*] Generating new windows/amd64 implant binary
[*] Symbol obfuscation is enabled.
[*] This process can take awhile, and consumes significant amounts of CPU/Memory
[!] rpc error: code = Unknown desc = open /root/.sliver/slivers/windows/amd64/BRIGHT_GOBBLER/bin/BRIGHT_GOBBLER.exe: no such file or directory
INFO[2021-03-11T22:53:22-05:00] [sliver/server/generate/binaries.go:582] Created /root/.sliver/slivers/windows/amd64/BRIGHT_GOBBLER/src/github.com/bishopfox/sliver/go.mod 
INFO[2021-03-11T22:53:22-05:00] [sliver/server/gogo/go.go:196] go cmd: '/root/.sliver/go/bin/go mod tidy' 
INFO[2021-03-11T22:53:22-05:00] [sliver/server/gogo/go.go:157] garble cmd: '/root/.sliver/go/bin/garble -literals -tiny -seed=20f371eb0e7a6847c8b36785fcbf99352e9a88b7e2babf9c802ce061abbaf5bc build -trimpath -tags netgo -ldflags -s -w -buildid= -H=windowsgui -o /root/.sliver/slivers/windows/amd64/BRIGHT_GOBBLER/bin/BRIGHT_GOBBLER.exe .' 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:160] --- env ---   
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] CC=           
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] CGO_ENABLED=0 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] GOOS=windows  
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] GOARCH=amd64  
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] GOPATH=/root/.sliver/slivers/windows/amd64/BRIGHT_GOBBLER 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] GOCACHE=/root/.sliver/go/cache 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] GOMODCACHE=/root/.sliver/go/modcache 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] GOPRIVATE=github.com/*,golang.org/* 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:162] PATH=/root/.sliver/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:164] --- stdout ---
 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:165] --- stderr ---
# github.com/bishopfox/sliver
eMg_6MU4.servicemain: relocation target eMg_6MU4.sArgc not defined
eMg_6MU4.servicemain: relocation target eMg_6MU4.sArgv not defined
eMg_6MU4.servicemain: relocation target eMg_6MU4.sName not defined
eMg_6MU4.servicemain: relocation target eMg_6MU4.cRegisterServiceCtrlHandlerExW not defined
eMg_6MU4.servicemain: relocation target eMg_6MU4.ssHandle not defined
eMg_6MU4.servicemain: relocation target eMg_6MU4.goWaitsH not defined
eMg_6MU4.servicemain: relocation target eMg_6MU4.cSetEvent not defined
eMg_6MU4.servicemain: relocation target eMg_6MU4.cWaitsH not defined
eMg_6MU4.servicemain: relocation target eMg_6MU4.cWaitForSingleObject not defined
eMg_6MU4.servicectlhandler: relocation target eMg_6MU4.ctlHandlerExProc not defined
exit status 2
exit status 2
 
INFO[2021-03-11T22:54:42-05:00] [sliver/server/gogo/go.go:166] exit status 1 
ERRO[2021-03-11T22:54:42-05:00] [sliver/server/generate/binaries.go:389] Failed to save build: open /root/.sliver/slivers/windows/amd64/BRIGHT_GOBBLER/bin/BRIGHT_GOBBLER.exe: no such file or directory 
ERRO[2021-03-11T22:54:42-05:00] [github.com/grpc-ecosystem/[email protected]/logging/logrus/options.go:215] finished unary call with code Unknown

To Reproduce
Steps to reproduce the behavior:

  1. generate --http example.com --format service
  2. See error

Expected behavior
Should generate .exe file with service code in it.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version 20.04
@rkervella rkervella added the bug Something isn't working label Mar 12, 2021
@moloch--
Copy link
Member

@rkervella we should add service builds to the unit tests too.

@rkervella
Copy link
Member

Agreed, my thoughts when I saw this issue.

@rkervella
Copy link
Member

@hippich the current workaround is to disable symbol obfuscation (with --skip-symbols). We'll look into it, but it's probably related to garble.

@rkervella
Copy link
Member

This issue is solved by upstream garble, so we'll want to update our version (I tested with an up to date garble build yesterday).

@moloch--
Copy link
Member

I can take care of that.

moloch-- added a commit that referenced this issue Mar 15, 2021
@moloch-- moloch-- mentioned this issue Mar 15, 2021
@moloch--
Copy link
Member

Fixed in v1.4.4

@hippich
Copy link
Author

hippich commented Mar 16, 2021

Seems to work, thank you so much!!

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

3 participants