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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.