Re: Systems compromised with ShellBOT perl script - part 2

From: Stephen J. Smoogen (smooge_at_gmail.com)
Date: 10/20/04

  • Next message: Poof: "RE: Systems compromised with ShellBOT perl script - part 2"
    Date: Wed, 20 Oct 2004 11:02:03 -0600
    To: "security@kemhosting.com" <security@kemhosting.com>
    
    

    On Wed, 20 Oct 2004 00:04:36 -0500, security@kemhosting.com
    <security@kemhosting.com> wrote:
    > This thread is a couple months old, but I'm having issues with this hack, found
    > it in the archives and thought it'd be helpful if I 'resusitated' it. See
    > bottom of email for rest of thread.
    >
    > Today, hackers used the ShellBOT perl script to bring down Apache and start up
    > their IRC listener. They (somehow) copied it into /tmp and executed it. This
    > confuses me because I have my /tmp directory mounted rw,noexec,nosuid. Does
    > Perl somehow bypass this?
    >
    > While the script was running, I ran lsof and found that it had recursively
    > accessed all my (virtual host) httpd logs (probably in an attempt to delete
    > it's tracks = the reason I can't see how they copied the script into /tmp)
    > which are owned by root. this is also confusing since the process the script
    > spawned was owned by user apache.
    >
    > Some info on my box:
    > Redhat ES kernel 2.4.21-9.0.1.ELsmp
    > httpd-2.0.46-32.ent
    > php-4.3.2-11.ent
    >
    > Anyone have any ideas on how this can happen? Mainly the executing of a script
    > on a noexec mount! Obviously I'm not a guru, so it's probably something simple
    > - so please, share!
    >

    I think you may have other issues. As of 2004/10/18, the packages for
    Red Hat Enterprise are the following:

    kernel-2.4.21-20.EL
    php-4.3.2-14.ent
    httpd-2.0.46-40.ent
    perl-5.8.0-88.7

    There have been several security updates to php and httpd since the
    versions you have installed. The attackers may have been able to use
    this to say upload items into /var/tmp and execute it there. If you no
    longer have a Red Hat Enterprise License you should be able to get
    updates from WhiteBox and several other of the RHEL clones.

    /var/tmp gets overlooked a lot. I have also seen some webcoders use it
    as a default for their scripts because /tmp is too small/restricted
    for some reason. I would check to make sure that none of the
    PHP/perl/etc are defaulting to using /tmp as their "temp space" as
    that would avoid the noexec,nosuid.

    I would also check that some other listening service (ssh, etc) wasnt
    initially used to get the compromise and they havent installed a
    kernel root kit that silently ignores noexec,nosuid when it mounts
    disks. That would be what I would do to make sure I could come back in
    later :).

    -- 
    Stephen J Smoogen.
    CSIRT/Linux System Administrator
    

  • Next message: Poof: "RE: Systems compromised with ShellBOT perl script - part 2"

    Relevant Pages

    • Re: Something fried the color coding in FrontPage 2003
      ... install those security fixes for Windows 2000 in October 2004. ... security updates messed up the system that has been known to happen. ... in a test script tag. ... > |> in a script tag or not is effected. ...
      (microsoft.public.frontpage.client)
    • Re: global objects in wsh
      ... that didn't recieve the latest security updates. ... It's been a production script for about 8 Month and never faild to do the job. ... Since this update the script fails to run on theese servers. ... >> the script debugger and walk through the code looking for problems. ...
      (microsoft.public.scripting.wsh)
    • Re: java applet screenshot
      ... I recommend, BTW, that you drop all plans to use ... the particular script you were looking at.. ... [Security updates in IE might quash it's usefullness ...
      (comp.lang.java.programmer)
    • refreshing the rhel4 gnome menu
      ... Does anyone know a command to execute to get the gnome menu to ... refresh itself once the applications.menu has been modified by ... script (under Red Hat Enterprise Linux 4)? ...
      (RedHat)
    • No script output to stdout,stderr
      ... I am using a new installation of Red Hat Enterprise 4. ... in that when I run a script from the command line I do not get any ... I have tried a shell script and a perl script, ...
      (RedHat)

  • Quantcast