Help, server hacked!!! how do i restore system binaries?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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)
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.