Full Disclosure mailing list archives

Re: ActivePerl Perl2Exe [was] Buffer Overflow in ActivePerl ?


From: "morning_wood" <se_cur_ity () hotmail com>
Date: Fri, 21 May 2004 00:50:03 -0700

further testing...

c:\>type test1.pl
#test1.pl
$a="A" x 256; system($a);

http://[host]/test1.pl
[host - output ]
The instruction at "0x28073f63" referenced memory at "0x01c42ce0".
The memory could not be "read"

c:\>type test2.pl
#test2.pl
$a="A" x 261; system($a);

http://[host]/test2.pl
[host - output ]
The instruction at "0x28073f63" referenced memory at "0x42c42ce0".
The memory could not be "read"

Donnie Werner
http://exploitlabs.com


----- Original Message -----
From: "Stephen Blass" <Stephen.Blass () asu edu>
To: <full-disclosure () lists netsys com>
Sent: Thursday, May 20, 2004 2:15 PM
Subject: RE: [Full-disclosure] ActivePerl Perl2Exe [was] Buffer Overflow in
ActivePerl ?


Perl2Exe rolls the interpreter up into the exe so if the interpreter is
vulnerable, then the exe will be too.  With the service compiler you will have
the same situation in services compiled as 'standalone'; if you compile
'dependent' services you are at the mercy of the perl interpreter on the system
you deploy the service on.

You can change the behavior of the perl 'system' in a perl script like so.

use subs qw (system);
sub system { my ($cmd)=@_; print"what, me run $cmd ? "; }
$a="A" x 256; system($a);

You can reach out from your custom system subroutine to the real thing if
you'd like by calling CORE::system if you want to scrub arguments some more
before passing them to the system.

-
Steve Blass




-----Original Message-----
From: full-disclosure-admin () lists netsys com
[mailto:full-disclosure-admin () lists netsys com]On Behalf Of Clint
Bodungen
Sent: Thursday, May 20, 2004 12:44 PM
To: morning_wood; 0day; full-disclosure () lists netsys com
Subject: Re: [Full-disclosure] ActivePerl Perl2Exe [was] Buffer Overflow
in ActivePerl ?


I haven't tested it yet but this also probably means that the msi/Microsoft
service compilor in the Activeperl Developer's Kit is as well then.


----- Original Message -----
From: "morning_wood" <se_cur_ity () hotmail com>
To: "0day" <0day () nothackers org>; <full-disclosure () lists netsys com>
Sent: Thursday, May 20, 2004 2:08 PM
Subject: [Full-disclosure] ActivePerl Perl2Exe [was] Buffer Overflow in
ActivePerl ?


binaries created via perl2exe also are affected.

C:\>type 1.pl
#
$a="A" x 256; system($a);

C:\>perl2exe -v 1.pl
Perl2Exe V7.02 Copyright (c) 1997-2003 IndigoSTAR Software
Cmd = -v 1.pl
CWD = C:\
Known platforms: Win32
Target platform = Win32 5.006001
$I =
$ENV{'PERL5LIB'} =
Found perl.exe at C:\Perl\bin
LibList = C:\Perl\lib,C:\Perl\site\lib,.
Converting '1.pl' to 1.exe
Compiling 1.pl

C:\>1.exe
[BIG CRASH]

C:\>



Donnie Werner
http://exploitlabs.com

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.netsys.com/full-disclosure-charter.html


Current thread: