LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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


Closed Thread
  Search this Thread
Old 08-28-2004, 05:08 PM   #1
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Rep: Reputation: 30
help! machine was hacked and cannot reboot or shutdown.


I am unable to reboot/shutdown my machine after I found that
it was hacked by someone from romania. I am running FC2, kernel 2.6.7-1. Currently, I have changed the firewall rule. I turned off requests by all means, no ssh, www, etc. And do not trust eth0 either. So I cannot login
to this machine from outside, but I still feel uncomfortable to work right now. I guess there must be some program running monitoring me.
Since I just cannot reboot or shutdown the machine except for turnning off the power.

What shall I do now? I have no much experience fighting with damn BS hackers!

Thanks so much for your advice.
 
Old 08-28-2004, 05:26 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
First try switching to run level 1 using:
init 1
If it works, run the checks I describe below. If you have a file integrity scanner like Tripwire, then run a check now. If you have chkrootkit/rootkit hunter installed, then run a check as well. Also take a look at the currently running processes for anything suspicious with with ps aux. Try looking for any suspicious daemons with netstat -pantu or lsof -i.

Second, pull the plug. Download a 'live' cdrom distro like knoppix, knoppix-std, or FIRE on a differnet computer and burn it to a cdrom. Then set the BIOS on the compromised machine to boot off the cdrom. Then boot the cdrom (DO NOT BOOT THE COMPROMISED SYSTEMS KERNEL). Once the cdrom distro is up and running, mount the harddrive on the compromised system as read-only. You can then feel free to analyze the system without worrying about a rootkit. Checkout /etc/passwd and the system logs on the compromised drive. Also look for any suspicious files or directories and run a check for SUID root files.

Also you have not said exactly why you think you were hacked aside from not being able to shutdown the system, are there any other reasons?
 
Old 08-28-2004, 05:29 PM   #3
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
drat... beat me.
 
Old 08-28-2004, 05:50 PM   #4
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
when i tried to reboot/shutdown the machine, i got this:
[===== SucKIT version 1.3a, Jul 1 2003 <http://sd.g-art.nl/sk> =====]
[====== (c)oded by sd <sd@cdi.cz> & devik <devik@cdi.cz>, 2002 ======]
RK_Init: idt=0xffffb000, FUCK: IDT table read failed (offset 0xffffb000)

i also checked the system log, and found the guy was from Romania.
i will try the method you mentioned later as i am away from my machine now.

by the way, after turning off all trust devices and trusted services, is it safe to use the machine for a short while?
i mean, before i feel comfortable to formally work in that system again.

thanks for your message very much!

Quote:
Originally posted by Capt_Caveman
First try switching to run level 1 using:
init 1
If it works, run the checks I describe below. If you have a file integrity scanner like Tripwire, then run a check now. If you have chkrootkit/rootkit hunter installed, then run a check as well. Also take a look at the currently running processes for anything suspicious with with ps aux. Try looking for any suspicious daemons with netstat -pantu or lsof -i.

Second, pull the plug. Download a 'live' cdrom distro like knoppix, knoppix-std, or FIRE on a differnet computer and burn it to a cdrom. Then set the BIOS on the compromised machine to boot off the cdrom. Then boot the cdrom (DO NOT BOOT THE COMPROMISED SYSTEMS KERNEL). Once the cdrom distro is up and running, mount the harddrive on the compromised system as read-only. You can then feel free to analyze the system without worrying about a rootkit. Checkout /etc/passwd and the system logs on the compromised drive. Also look for any suspicious files or directories and run a check for SUID root files.

Also you have not said exactly why you think you were hacked aside from not being able to shutdown the system, are there any other reasons?
 
Old 08-28-2004, 06:47 PM   #5
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
No. It would appear that the cracker installed sucKIT ( a common rootkit) on your system. It's possible to un-install sucKit, but a full re-install from trusted media is really the only option once your systems security has been compromised like this (as TruckStuff pointed out). If you need files off the system, I'd highly recommend booting with the cdrom distro, mount the compromised harddrive and backup only files that you can visually inspect (no binaries).

Once you re-install, I'd highly recommend immediately updating the security patches on the system or you'll very likely find sucKIT on there again.

Last edited by Capt_Caveman; 08-28-2004 at 06:50 PM.
 
Old 08-29-2004, 09:13 AM   #6
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
thanks. i think i'd better reinstall the system.
what kind of security patches do i need to install?
are there rpm packages?


Quote:
Originally posted by Capt_Caveman
No. It would appear that the cracker installed sucKIT ( a common rootkit) on your system. It's possible to un-install sucKit, but a full re-install from trusted media is really the only option once your systems security has been compromised like this (as TruckStuff pointed out). If you need files off the system, I'd highly recommend booting with the cdrom distro, mount the compromised harddrive and backup only files that you can visually inspect (no binaries).

Once you re-install, I'd highly recommend immediately updating the security patches on the system or you'll very likely find sucKIT on there again.
 
Old 08-29-2004, 12:35 PM   #7
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
There are RPMs available for upgrading vulnerable packages here. Though you can configure your system to automatically download and install updates nightly use YUM. It's standard on Fedora Core and you can turn it on using: chkconfig yum on. You can manually perform upgrades using: yum upgrade.
 
Old 08-30-2004, 08:48 AM   #8
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
i have reinstalled the system. in order to avoid any further attack, i want to
turn off all requested services and devices, will this be safe enough?
i only need to work on that machine locally.

thanks.
 
Old 08-30-2004, 08:59 AM   #9
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Turn off all services, turn on the firewall, make sure passwords are reasonably complex and that you've changed all passwords on that system, make sure all security updates have been installed, and don't use sensitive passwords on un-encrypted communications (use encyption whenever possible...like ssh instead of telnet, https instead of http, etc). That should significantly help, but if you want to tighten security even further, checkout the section on hardening in unSpawn's security references thread (towards the top of the forum).
 
Old 08-30-2004, 03:25 PM   #10
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
many thanks! after i turn off all services and devices, does it mean the system
can be only accessed locally? i wish only by keying passwd via my kbd can do it ;-)
is it possible?
 
Old 08-30-2004, 08:47 PM   #11
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Shutting of all remote access services (telnet, ssh, etc) should prevent direct access to the machine. Though your system will never be truely inaccessible until you remove any network connections, as even looking at websites can be a threat if there's malicious html/javascript on the page. But that should significantly reduce the risk.
 
Old 08-31-2004, 01:53 PM   #12
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
reinstallation over.
will be more careful in the future.

thanks for all your help
 
Old 04-02-2005, 10:51 PM   #13
pembo13
Member
 
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403

Rep: Reputation: 30
I have just fallen prey to this very thing
 
Old 04-03-2005, 01:05 AM   #14
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
If that's the case, then a format and full re-installation is necessary. What services were you running before the compromise? Was your system fully updated?
 
Old 04-03-2005, 07:14 AM   #15
pembo13
Member
 
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403

Rep: Reputation: 30
I left the poor box facing the internet, forever on, with only a firewall to protect it. I was significantly behind in my updates. It's largely my fault i guess.
 
  


Closed Thread



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
Someone hacked my machine - any recourse? BrianK Linux - Security 9 05-09-2005 09:43 AM
how to know if a machine is hacked rockwell_001 Linux - Security 6 05-04-2005 04:51 AM
How to know if a linux machine been hacked ? juanb Linux - Security 6 07-17-2004 04:44 AM
Reboot Shutdown netlink Mandriva 2 06-13-2004 12:13 AM
Linux Server Hacked, Bandwidth Eating Machine... zerofocus Linux - Security 2 02-07-2004 09:22 PM

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

All times are GMT -5. The time now is 09:53 PM.

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