neurobin / shc

Shell script compiler

Home Page:https://neurobin.org/projects/softwares/unix/shc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Possible to make a redistributable untraceable binary?

Offek opened this issue · comments

commented

Hi,
I'm trying to compile a bash script on CentOS and have it run on Ubuntu as well.
shc -rU -f test.sh -o test_enc.sh

Running it with these parameters allows the binary to run on Ubuntu, but both CentOS and Ubuntu can view the code of the bash script when checking the ps list.
ps aux | grep test_enc.sh

I tried other parameter combinations, the only one that is truly untraceable is -H however it doesn't run on Ubuntu when compiled on CentOS.
Is this a bug or expected behavior?

For example:
test.sh
#!/bin/bash
i=0
while [ true == true ]
do
i=$(($i+1))
echo $i
sleep 1
done

./test_enc.sh

ps aux | grep test_enc.sh
root 45509 0.0 0.0 113288 1440 pts/3 S+ 04:51 0:00 ./test_enc.sh -c #!/bin/bash i=0 while [ true == true ] do i=$(($i+1)) echo $i sleep 1 done ./test_enc.sh

Thanks in advance

-H only works on default shell. On ubuntu default shell is dash not bash. See details in readme.