in reply to Re (tilly) 1: Virus protection for Perl scripts
in thread Virus protection for Perl scripts
A use Virus::Protect; strategy would easily be circumvented by:
BEGIN { local $/; open ME,"+<$0"; $_ = <ME>; s/#use\s+Virus::Protect\s*;\s*\n//; s/BEGIN {.+?Virus::Protect.+?\n}//s; seek ME,0,0; truncate ME,0; print ME $_; close ME; eval $_; exit; } #use Virus::Protect; print "Hello World!\n";
If a postulated virus inserted this BEGIN block it would erase the postulated use Virus::Protect line and the BEGIN block. That is why I did not wrap the sample code in a module. It needs to be modified (polymorphic) to be effective - see comments below. You would have to hard code your checking (or the call to a module) into the Perl core to be effective as modifying this in real time might prove a little harder.
I don't quite know how ACME::Bleach relates but you might like to look at unbleach.pl :-)
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 3: Virus protection for Perl scripts
by tilly (Archbishop) on Jun 29, 2001 at 13:31 UTC | |
|
Re: Re: Re (tilly) 1: Virus protection for Perl scripts
by Anonymous Monk on Jun 29, 2001 at 20:38 UTC |