nicocha30 / ligolo-ng

An advanced, yet simple, tunneling/pivoting tool that uses a TUN interface.
GNU General Public License v3.0
2.61k stars 260 forks source link

Add terminate command to proxy #89

Closed jvinnedge closed 1 month ago

jvinnedge commented 1 month ago

Add a terminate command to the proxy that will cause the agent to exit (and optionally unlink its executable file). I think this would be a nice little quality of life feature for users.

This also includes some other changes, such as changing the protocol encoding for messages to use big endian, and adding mips/mipsle to the goreleaser config. I can back out the changes and do separate PRs if desired (or omit them completely).

nicocha30 commented 1 month ago

Hey, Thanks for the PR, a few remarks:

jvinnedge commented 1 month ago

Sorry, I should have provided more context for this PR. I have a private fork of this tool which I’ve been maintaining. This fork is primarily designed to provide enhancements to the agent when it’s running on Unix-based platforms.

Regarding unlinking the exe, for windows platforms you’re correct. For Unix-based platforms, it works fine as-is. I can update the code to work on Windows as well.

The switch from little to big endian was done because we have a custom suite of tools designed to run on embedded systems that integrate with the ligolo-ng proxy. Development of these custom tools was done in C, and it was easier to develop them if the message encoding was big endian.

Like I said, happy to make any adjustments you feel are needed.

nicocha30 commented 1 month ago

Closing this PR, too many hacks on the code.