Skip to content

glibc errors and CGO_ENABLED #50

@exploide

Description

@exploide

First of all let me thank you for this ridiculously awesome reverse shell. 😄 It's so useful!

But I discovered a problem after transferring the client to another machine and running it:

$ ./rssh -h
./rssh: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./rssh)
./rssh: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./rssh)

This is because the glibc version on my build machine is another than the glibc version available on the target. I'm not a Go programmer and was a bit confused, why C and isn't it supposed to be a single static binary?

I found an answer then and CGO_ENABLED=0 make client produces a perfectly functioning client, statically compiled, without C dependencies.

I think it is crucial for the reverse_ssh client to be compatible with environments you don't control. So I would like to propose adding CGO_ENABLED=0 to the Makefile (or at least document it for people not familiar with Go internals).

I don't know if this has any drawbacks. I expected the client to be larger in size, but actually it is smaller than the client linked to glibc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions