sliver
sliver copied to clipboard
How to generate softfloat mips implants?
I would like to generate a mips implants with softfloat. The generals ways to build a golang programe with softfloat is:
CC=mips-linux-gcc GOARCH=mips GOMIPS=softfloat CGO_ENABLED=1 /usr/local/go/bin/go build -ldflags="-w -s"
So, this issue can also be "Is it possible to add golang arguments during implant's generation?"
I generated the implant with the follow command below:
$ GOMIPS=softfloat sliver # I tried to start the server with GOMIPS environment
> generate --mtls <REDACTED> --os linux --arch mips -s mips-r
and the binary info is as below (readelf -A ./mips-r):
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Hard float (double precision)
MIPS ABI Flags Version: 0
ISA: MIPS32
GPR size: 32
CPR1 size: 32
CPR2 size: 0
FP ABI: Hard float (double precision)
ISA Extension: None
ASEs:
None
FLAGS 1: 00000000
FLAGS 2: 00000000
We should probably add a general feature to pas GO ENV vars