sliver icon indicating copy to clipboard operation
sliver copied to clipboard

Add linux-arm64 support for sliver client/server

Open cr7pt0pl4gu3 opened this issue 3 years ago • 9 comments

Would be really nice if you could add linux-arm64 arch support for client/server. Currently it was not possible for me to build sliver client/server from source for that architecture

cr7pt0pl4gu3 avatar Feb 18 '22 18:02 cr7pt0pl4gu3

@moloch-- wasn't the plan to ditch CGO and use the pure Go implementation of sqlite? That would solve this kind of problems methinks.

rkervella avatar Feb 18 '22 20:02 rkervella

Yes, but I ran into db lock issues with GORM/pure go SQLite so I reverted to CGO by default.

@cr7pt0pl4gu3 in the short term you should be able to manually compile a linux/arm version by doing the following:

  • Download a copy of golang linux/arm and add it to /server/assets/fs (see go-assets.sh for details)
  • Compile using TAGS=-tags osusergo,netgo,gosqlite,sqlite_omit_load_extension make (note the use of gosqlite instead of the default cgosqlite

You may encounter some of the same compatibility problems I encountered with the pure Go version of sqlite, but it should mostly work.

I'll continue to test with the pure go SQLite from time to time, once the compatibility is there we'll be able to more easily support other platforms like this.

moloch-- avatar Feb 19 '22 17:02 moloch--

@moloch-- I think I need garble to compile successfully, there is no ARM64 version as far as I understand though: image image Do I also compile it from source?

cr7pt0pl4gu3 avatar Feb 19 '22 18:02 cr7pt0pl4gu3

Yes sounds like you need to compile garble from source too

lesnuages avatar Feb 19 '22 18:02 lesnuages

Thank you, built successfully: image Also had to create this file: image However, when generating implant: image

cr7pt0pl4gu3 avatar Feb 19 '22 22:02 cr7pt0pl4gu3

Fixed with those commands, after that implant generated successfully: image

cr7pt0pl4gu3 avatar Feb 19 '22 22:02 cr7pt0pl4gu3

Awesome! Like I said, we'll have an official version once we sort out some of the quirks with the pure Go SQLite dependency.

moloch-- avatar Feb 19 '22 22:02 moloch--

It's available in kali repo btw for both amd64 and arm64 and works great (at least as of the writing of this comment) - https://www.kali.org/tools/sliver/

valy0 avatar Jan 19 '23 12:01 valy0

Yes, the makefiles and everything now support ARM64, however the ARM64 version uses the pure Go version of Sqlite3 which we've encountered a couple bugs with in the past so there's no "official" release yet, but it should compile and (mostly) work.

moloch-- avatar Jan 19 '23 16:01 moloch--