Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
I realize some binaries between systems have different checksums even they have the same package.
In fact, copying the binaries from each system to another machine running a live distro (based on a DVD) and calculating the checksums, they are different. (this is just to be sure theses calculations are done in a machine not compromised)
the facts: (below, I will show only two files from distinct packages from 2 systems - but in fact, this happens with several files, from several packages, in at least 4 systems)
server A and server B both have the same output: (there is no output from the last command)
As additional information, both systems have chkrootkit and rkhunter (with a check followed by a --propupd after each system update) and none inform any problem.
I don't have a exhaustive list of different checksums in all 4 systems. But some files I randomly check are:
Also, the machines I got the data above were off (unplugged from outlet) since Feb 15 2010 (they are spares) with the last system update in Feb 10 2010, and all 4 have SELinux enable and in enforcing mode, not directly attached to internet, not serving anything outside our restricted LAN, with firewall enabled and allowing only DNS, DHCP, SAMBA, SSH.
so, the verify rpm returns ok, the files have the same size, the packages are the same but even so, they have different checksums (also using md5). How this is possible ? What is the explanation ?
IIRC, prelink does change the cryptographic hash. (At very least it changes mtime.) On your test above, you may be comparing already "prelinked" binaries.
For this reason, prelink is disabled (/etc/sysconfig/prelink) on my systems that are running a HIDS.
so, the md5 returned by rpm and by prelink ARE THE SAME in both systems ! uff...a relief indeed !
What remains strange is the md5 (sha1) returned by /usr/bin/md5sum (or /usr/bin/sha1sum) be different in each system (I've prelinked /usr/bin/md5sum and /usr/bin/sha1sum and /usr/bin/elinks just in case)
@anonie: this is new for me, thanks to make it clear. Let me understand: If I update a library in this system but not re-link a binary which depends on that library, the binary will return different hashs before and after prelink on the binary, that is right ?
anyway, why md5sum or sha1sum are returning different hashs in each system ? (of course, at this point we can assume the system is not compromised - at least the 2 systems were off for a long time - they were turned on for this investigation a few hours ago and unplugged from the network, just in case)
this is new for me, thanks to make it clear. Let me understand: If I update a library in this system but not re-link a binary which depends on that library, the binary will return different hashs before and after prelink on the binary, that is right ?
Dunno if I can definitely speak to that exact scenario. I recommend that you test and check the results.
I can demonstrate this much (Fedora 13 system, BTW):
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.