[33209] in bugtraq

home help back first fref pref prev next nref lref last post

Re: Hijacking Apache 2 via mod_perl

daemon@ATHENA.MIT.EDU (jon schatz)
Fri Jan 23 17:39:01 2004

Message-ID: <40109B2A.90901@divisionbyzero.com>
Date: Thu, 22 Jan 2004 19:55:22 -0800
From: jon schatz <jon@divisionbyzero.com>
MIME-Version: 1.0
To: Steve G <linux_4ever@yahoo.com>
Cc: =?ISO-8859-1?Q?=22=5C=22Andr=E9=5C=22_Malo=22?= <nd@perlig.de>,
        3APA3A <3APA3A@SECURITY.NNOV.RU>, Ben Laurie <ben@algroup.co.uk>,
        bugtraq@securityfocus.com, httpd security <security@httpd.apache.org>
In-Reply-To: <20040122180400.6151.qmail@web9609.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Steve G wrote:

>>Then one just writes a perl extension in C. Who's responsible 
>>then? 
> But don't you need root to add extentions?

>>Who's responsible if you just write a C module which hijacks the
>>descriptors? 
> Again, you need an admin to update apache's config.

you need an admin to update the config file if you're trying to use the 
LoadModule directive. but if mod_perl's already running (and if 
.htaccess files aren't locked down enough), you can use the SetHandler 
to load up any (malicous) modules you might need. afaik, loading a 
module once in mod_perl will make it available to every child process. 
if i've been reading this thread right (and there's a good chance i 
haven't) then this would give EvilModule.pm access to the leaked fd's.

(i haven't tested this for httpd2/mod_perl2, but i know it holds true 
for httpd1.3.x/mod_perl, and the new docs don't indicate any changes).

-jon
-- 
jon@divisionbyzero.com || www.divisionbyzero.com
gpg key: www.divisionbyzero.com/pubkey.asc
think i have a virus? www.divisionbyzero.com/pgp.html
"You are in a twisty little maze of Sendmail rules, all confusing."


home help back first fref pref prev next nref lref last post