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

External builder fails silently when compiling generic implants. #1820

Open
catmandx opened this issue Nov 19, 2024 · 3 comments
Open

External builder fails silently when compiling generic implants. #1820

catmandx opened this issue Nov 19, 2024 · 3 comments
Labels
bug Something isn't working investigating

Comments

@catmandx
Copy link

catmandx commented Nov 19, 2024

Describe the bug
I am customizing the sliver implant for an engagement, per this url, I should modify the source code under implant and register the resulting sliver-server binary as an external builder. The targets of this engagement is running ARMv7 Linux (which is not a supported compiler target, I know).

To Reproduce
Steps to reproduce the behavior:

  1. Register the default sliver-server binary as an external builder
$ ./sliver-server builder -c custom-builder-multiplayer-profile.cfg --log-level 5
....
INFO[2024-11-19T21:53:22+07:00] [sliver/server/builder/builder.go:56] Attempting to register builder: sliver-dev 
  1. Generate an implant using an unsupported combo of OS / Arch:
sliver > generate beacon --arch arm --os linux --http http://test.c2.com -s /tmp/custom-implant --external-builder

⚠️  Unsupported compiler target linux/arm, but we can try to compile a generic implant.
⚠️  Generic implants do not support all commands/features.
? Attempt to build generic implant? Yes

sliver>....

On the external builder side, I don't see it outputting anything

Expected behavior
The external builder should be able to build generic implants. If not, it should tell the operator.

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux AMD64
  • Version 1.5.42

Additional context
Add any other context about the problem here.

@catmandx
Copy link
Author

This can be worked around by manually inserting the desired combo to this function: /root/sliver/server/generate/binaries.go GetCompilerTargets()

	targets = append(targets, &clientpb.CompilerTarget{
		GOOS:   "linux",
		GOARCH: "arm",
		Format: clientpb.OutputFormat_EXECUTABLE,
	})

@rkervella rkervella added bug Something isn't working investigating labels Nov 19, 2024
@rkervella
Copy link
Member

I think this has been fixed in master but I'll need to double check.

@catmandx
Copy link
Author

I'll recompile using the master branch and try again

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

No branches or pull requests

2 participants