in reply to perlsec question
#!/usr/bin/perl -w -T use strict; print "hello ($0)\n"; #delete $ENV{$_} for qw(PATH BASH_ENV); # may need to add more to list, PATH and BASH_ENV # were all that drove my system crazy exec "$1 foo" if ! @ARGV && $0 =~ m|^([\w\/\.]+)$|;
Save this into a file and try to run it. It will fail until you uncomment that line. Otherwise, you could be syscalling or execing using unsecure information in the PATH and BASH_ENV variables.
my @a=qw(random brilliant braindead); print $a[rand(@a)];
|
---|