liberize / ssc

Convert shell script to binary
GNU General Public License v3.0
66 stars 21 forks source link

hide process name from ps / top? #10

Closed nyxaria closed 9 months ago

nyxaria commented 9 months ago

Hi, love the project, thank you so much for it!

I am trying to use this to hide a process from myself such that I cannot kill it. Using this project I was able to get rid of the script name being listed (and greppable) in ps output. However, all processes spawned that were compiled using ssc are now called /bin/zsh /dev/fd/3. Is there any way I can change this? Ideally I would set it to a random string that mimic or closely resemble existing processes on my PC.

image

Thanks!

liberize commented 9 months ago

It's not possible unless you compile a modified version of zsh on your own.

liberize commented 9 months ago

However, it's possible to hide /bin/zsh (but not /dev/fd/3) from command line. Read REAME.md and examples for -e flag.

liberize commented 9 months ago

And currently no other option to do this without embedding.

liberize commented 9 months ago

By the way, /bin/zsh /dev/fd/3 is a normal process name. It's the same name as shell process substitution. Try /bin/zsh <(cat script.sh) and grep the process name.

liberize commented 8 months ago

Added -i flag to specify real interpreter path which can be different from shebang.