jsmikari has asked for the wisdom of the Perl Monks concerning the following question:

I'm looking for it!
My friend send me a game control-robot(convert by perl2exe).
There is a trojan-like code in it, and I want to crack it.
But I can't find the "UnPerl" or other correct tools.
Is anyone could help me!? (>_<)

Replies are listed 'Best First'.
Re: UnPerl!? decompiler!?
by rob_au (Abbot) on Nov 08, 2002 at 11:51 UTC
    While I am unsure as to the real merit of this endeavour, I would direct your attention to some excellent work which has been carried out by tachyon in reverting compiled perl executables back to source code here and here.

    It may also be useful to execute the code on a test machine behind a firewall and use a packet sniffer to examine the data transferred to this distant host.

     

    perl -e 'print+unpack("N",pack("B32","00000000000000000000000111011010")),"\n"'

Re: UnPerl!? decompiler!?
by dingus (Friar) on Nov 08, 2002 at 10:25 UTC
    As usual google is our friend - a search for 'perl2exe reverse' pops up some C code which you could undoubtedly use. Dunno if it works and if you have no C compiler the conversion of the code from C to perl is also required, but looks fairly trivial.

    Dingus


    Enter any 47-digit prime number to continue.
Re: UnPerl!? decompiler!?
by Zaxo (Archbishop) on Nov 08, 2002 at 07:51 UTC

    Some friend.

    What you probably want is the command-line perl -MO=Deparse badstuff.pl

    The code is likely to be in source form to start with. If so, just open it in a text editor. If the code is 'compiled' as a stand-alone executable, don't run it. Don't fool with it as 'root' or 'admin', or as a user with essential data to lose or be snooped.

    After Compline,
    Zaxo

      I've checked the file. It's a stand-alone executable binary file,and it trys to connect a web-site in China, then sent some "message". But I really want to use other functions of this program. So, I'm trying to decompile it.
      Thankx anyway. (^_^)