LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-18-2007, 04:32 PM   #1
andyarchy
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 4

Rep: Reputation: 0
My server appears to have been hacked, advice needed.


I was experiencing some strange problems with my server today, so I restarted (something I am not used to having to do with Linux.) When Ubuntu started booting, it suddenly stopped and gave me a command line that looked very different from the terminal window I am used to. At this point I was very suspicious, so I started browsing around. I opened the /usr directory and there was only a folder called "lib", and the folders for the normal users were gone. I opened this folder and inside was a folder called "usplash", which has a file inside called "usplash-artwork.so". Almost everything on the hard drive is gone, and in the /var folder as well as almost every folder, there is just another folder called "lock". I am really confused as to why my server was hacked, as well as how the person did it (if it wasn't hacked then I am even more confused.) The server had only been up for 2 days and no popular web sites were hosted on it. Any help would be appreciated, as I don't want this to happen again. I haven't formatted the system yet, in case some of the files might be useful in helping me figure out what happened.

Thanks in advance for any help,

andyarchy

Last edited by andyarchy; 04-18-2007 at 04:36 PM.
 
Old 04-18-2007, 04:57 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Are you getting any kind of errors displayed on the screen during the boot process that might suggest it's a hardware failure or filesystem corruption? Try booting using the installation CD s and see if it can identify the linux install.

Also could you describe some of the "problems" that you experienced before rebooting?
 
Old 04-18-2007, 05:10 PM   #3
andyarchy
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the fast reply,

The message I get when booting up is:

"BusyBox v1.01 (Debian 1:1.01-4ubuntu3) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off"

Before I restarted, the strange things started happening in the GUI (I was using the GUI for a few minutes because I am somewhat new to Linux.) Pictures were disappearing, programs started running very slow, and normal commands such as "apt-get" weren't working.

-andyarchy

Last edited by andyarchy; 04-18-2007 at 05:21 PM.
 
Old 04-18-2007, 05:49 PM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Are there any other messages displayed when the system is booting?

What where you doing prior to the system acting weird? Did you modify anything or change any configs?
 
Old 04-18-2007, 06:09 PM   #5
andyarchy
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
There are no other messages when booting. Prior to the problems, I was just sitting down to the computer and opening the terminal. I didn't type any commands (in fact I had just gotten home from school at the time) and everything was working fine in the morning when I left.
 
Old 04-18-2007, 07:59 PM   #6
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Yeah, I would definitely try to reboot using your install CDs and go into repair mode. From there you can try to find any linux installations already on the disk and repair them if necessary. If the filesystem was hosed by an attacker, then it's unlikely that there is really going to be any evidence to try to find, unless you recovered the deleted filesystem off the disk but that is a fairly complex procedure that is not particularly user friendly. I think a hardware (disk) failure or filesystem corruption is equally as likely as a hack (if not more so).
 
Old 04-18-2007, 08:17 PM   #7
chrisortiz
Member
 
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
try rebuilding the partition
Code:
fsck.reiserfs --rebuild-tree /dev/hda1
 
Old 04-18-2007, 08:27 PM   #8
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
it sounds like you might have been dropped to an initial ramdisk's shell... this would explain why all your stuff seemed to be gone... maybe check to see what "df -hT" shows to verify you are on the filesystem you think you are in... that said, there's a thread here with several accounts of the same issue on ubuntu... it seems to me like at least 2 people were able to fix this by editing their /boot/grub/menu.lst file (the idea being that it was automatically edited in an erroneous manner by an apt-get upgrade or something of that nature)...

Last edited by win32sux; 04-18-2007 at 08:30 PM.
 
Old 04-19-2007, 04:13 AM   #9
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
I see nothing strange. As Win32sux said, you are in your initramfs so it is not your harddisk that you see, just an archive containing the minimal things for /sbin/init to run.
 
Old 04-19-2007, 08:41 AM   #10
Road_map
Member
 
Registered: Jan 2007
Distribution: Slackware
Posts: 341

Rep: Reputation: 31
Did you play with USplash before that error? Try running
Code:
sudo update-alternatives --config usplash-artwork.so
 
Old 04-19-2007, 03:02 PM   #11
andyarchy
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
The command prompt I get doesn't recognize the sudo command, or any of the other commands that have been suggested to me as part of a fix. At this point I'm not worried about fixing the problem, just preventing it from happening again (I'm just going to reformat since I was planning on moving to a different hard drive anyways.) Also, after I format should I use Ubuntu 6.06 again or is it worth the download to use the new 7.04?

Thanks again for the help,
andyarchy

Last edited by andyarchy; 04-19-2007 at 03:04 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sshd appears not to start sftp-server leontini Linux - Networking 11 01-23-2007 12:51 AM
Server hacked cpanelskindepot Linux - Security 46 07-05-2004 06:19 PM
server hacked!?!?! vittibaby Linux - Security 1 03-27-2004 12:31 PM
Wolfenstine --- X Server appears irreperible... xconspirisist Linux - Software 1 09-07-2003 12:49 PM
I successfully installed redhat 7.1. It appears my server has no activity for a perio adamrau Linux - Software 1 09-18-2001 08:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration