LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Help, server hacked!!! how do i restore system binaries? (https://www.linuxquestions.org/questions/linux-software-2/help-server-hacked-how-do-i-restore-system-binaries-161907/)

abefroman 03-24-2004 02:32 PM

Help, server hacked!!! how do i restore system binaries?
 
Help, server hacked!!! how do i restore system binaries?

A root kit was uploaded an replaced a number of the server binaries such as w, netstat, ps, etc. How can I restore those but keep everything in /home, /usr/local/apache/, /etc/localdomain, etc?

Jelle 03-24-2004 03:02 PM

Do not think you can get away with just reinstalling some binaries. Your system has been compromised, you cannot know the full breadth of the incursion. The best thing to do is reinstall from trusted media, and restore your data to that. If you need to make backups, boot with a trustable livecd like knoppix, and make sensible backups. You will have to do some heavy scrutinizing on all data you restore.

if you have a rpm-based system, check out the --verify option to rpm. this will give you some indication what is wrong. Oh and do a 'service network panic' to isolate yourself from the net. (or just pull the canble)

Kovacs 03-24-2004 05:16 PM

Time for a full reformat and reinstall. :(

unSpawn 03-24-2004 05:52 PM

Help, server hacked!!! how do i restore system binaries?
Please check out the LQ FAQ: Security references. The "Compromise, breach of security, detection" part. Like the rest already said: you don't. Use the three R's: repartition, reformat and reinstall from scratch.


How can I restore those but keep everything in /home, /usr/local/apache/, /etc/localdomain, etc?
Verify those files manually, then backup if necessary. Don't backup binaries unless you have external and untaintable means of verifying integrity.


You will have to do some heavy scrutinizing on all data you restore.
Please don't use backups unless you have external and untaintable means of verifying integrity.


if you have a rpm-based system, check out the --verify option to rpm. this will give you some indication what is wrong.
...that is, if the system, binaries and rpm database can be trusted (which you can't unless you boot FIRE/PSK/Knoppix/distro bootcd with the rpm and (verified clean) db's on ro media). besides the rpm db doesn't pick up stuff installed or added outside of it. That's where Aide, Samhain or tripwire come in...


All times are GMT -5. The time now is 05:15 PM.