I tried to encode my tool, which was developed by me with Ruby, by using msfvenom of Metasploit Framework and I succeed. My source code was encoded completely. But, when I tried to use my encoded tool, I met an error "command not found". What is the problem? As with encoded payloads work, why didn't my encoded tool work? Here are my steps which I follow:
cat Desktop/lugat | msfvenom -p - -a x86 --platform linux -e x86/shikata_ga_nai -f raw > /home/hefese/Desktop/test
./test -h
Output:
./test: line 1: buf: command not found
./test: line 2: \xb8\xad\x4e\x1d\x84\xdb\xc5\xd9\x74\x24\xf4\x5d\x33\xc9: command not found
[...]
./test: line 2961: \xb6\x03: command not found
Could anyone explain my fault?
Thanks in advance.