Hello everybody,
every now and then I read that it would be 'easy' to get the plain source code of a Perl file that has been scrambled and is decoded by a Filter::decrypt like tool.
Then I got curious and tested it on an application that uses something like this. It does not seem easy to me at all, I have to admit.
The encrypters seem to have done some things right:
- The encryption algorithm is not the Filter::decrypt one, so let's assume it is not easy to find it by guessing, brute force etc
- The encryption extension is no Shared Object (not an .so file, but an .a file, and running it with a Perl executable different from that one provided with the extension ends up in 'Can't find shared object file for ... in @INC'). So it seems it is not possible to use this extension with a patched version of Perl to get the code. But I'm a C beginner, perhaps there IS a way?
- The Perl executable provided is build without -DDEBUGGING.
- A check for Perl compiler is included, so the process dies if you try something like perl -MO=Deparse
The only 'weaknesses' I see is that the presence of another filter is not checked, as it seems. Perhaps one could add another filter to get the code, but how?
Also, both the extension and the perl executable are not stripped. But I'm not so deep into things that this would help in any way...
So, does anyone have a clue why and how it is so 'easy' to get the source code out of this?
Cheers,
Ole