vpelss has asked for the wisdom of the Perl Monks concerning the following question:
It is my understanding, that perl -MO=Deparse does not actually run the PERL code. Is that correct?
If so, then why is the following run on a website able to be attacked?
open (TXTFILE , ">obf.txt"); print TXTFILE $string; close(TXTFILE); #deparse $string = `perl -MO=Deparse -f obf.txt`;
I thought I read somewhere that "eval" (or was it an other PERL command?) actually ran the code during PERL's compiling phase, and therefore before the rest of the PERL code ran. Is that accurate? If so, maybe that is why it is unsafe.
I have tried many different attempts to attack that code on my home environment but with no success. So obviously the interent is safe from the likes of me.
For all the angry Perl Monks out there don't jump all over me because my previous searches on this topic came up empty ;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why is perl -MO=Deparse -f obf.txt unsafe?
by LanX (Saint) on Feb 06, 2016 at 17:53 UTC | |
by vpelss (Initiate) on Feb 06, 2016 at 19:13 UTC | |
by LanX (Saint) on Feb 06, 2016 at 19:54 UTC | |
by Anonymous Monk on Feb 06, 2016 at 19:24 UTC | |
|
Re: Why is perl -MO=Deparse -f obf.txt unsafe?
by davido (Cardinal) on Feb 06, 2016 at 19:06 UTC |