LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Linux > 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
 
Thread Tools
Old 08-04-2007, 07:45 AM   #1
leapy
LQ Newbie
 
Registered: Aug 2007
Posts: 10
Thanked: 0
use apt-get to check for altered files?


[Log in to get rid of this advertisement]
Hello

I am not sure if certain executables have been altered on my server. Is there a way to get apt-get to validate (using MD5?) files to show which have been altered since package installation?

Thanks

Leapy
leapy is offline     Reply With Quote
Old 08-04-2007, 11:33 AM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 8.04 / 8.10 / 9.04
Posts: 895
Thanked: 0
Why do you want to do this? If you're concerned about someone hacking in and replacing system binaries with malicious ones, I suggest starting with chkrootkit and rkhunter. If you have reason to believe that someone has hacked in, you should disconnect it from the network, boot it from a live CD and run some rootkit checks from the CD, since a clever enough rootkit can also subvert rootkit checks on the installed system.
Gethyn is offline     Reply With Quote
Old 08-04-2007, 02:52 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,511
Thanked: 0
Quote:
Originally Posted by leapy
Hello

I am not sure if certain executables have been altered on my server. Is there a way to get apt-get to validate (using MD5?) files to show which have been altered since package installation?

Thanks

Leapy
Try debsums.

Code:
apt-cache show debsums
Package: debsums
Priority: optional
Section: admin
Installed-Size: 88
Maintainer: Brendan O'Dea <bod@debian.org>
Architecture: all
Version: 2.0.32
Depends: perl (>= 5.8.0-3), debconf (>= 0.5) | debconf-2.0
Filename: pool/main/d/debsums/debsums_2.0.32_all.deb
Size: 30868
MD5sum: dac5a673dca3cb787bfe0478857c58fa
SHA1: 7da1d063d7d417f7df3a2cf27df14f3e455ef2b8
SHA256: bd7347453a793561ea24829a4906cf6a073658d038947a2f9a45c874cd2defaa
Description: Verify installed package files against MD5 checksums.
 debsums can verify the integrity of installed package files against
 MD5 checksums installed by the package, or generated from a .deb
 archive.
Tag: admin::package-management, role::program, security::integrity, suite::debian, works-with::software:package
HappyTux is offline     Reply With Quote
Old 08-05-2007, 08:51 AM   #4
leapy
LQ Newbie
 
Registered: Aug 2007
Posts: 10
Thanked: 0

Original Poster
Quote:
Originally Posted by HappyTux
Try debsums.

...
Happy - that's exactly what I needed.

Many thanks

Leapy
leapy is offline     Reply With Quote
Old 08-05-2007, 06:41 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Correct me if I got this wrong but I thought debsums ties in with apt as a post-invoke? Meaning that if you install it can only hash whatever comes next. (Meaning it's limited in what it can accomplish) Another way would be to do an off-line install, then install, configure and run Aide or Samhain and then copy the config and database to readonly media.
unSpawn is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
apt-cache version check allelopath Linux - Software 3 04-12-2005 12:40 PM
Gnome altered permissions in /dev Ovalteen Linux - Software 3 03-23-2005 06:38 AM
XF86Config-4 altered after reboot (no glx) Cyrus XIII Mandriva 2 12-02-2004 04:46 AM
Find all system files altered or added by me suguru Linux - Newbie 3 09-19-2004 02:18 PM
anyone have an un-altered smb.conf file? Zaius Linux - Newbie 3 01-13-2004 01:15 PM


All times are GMT -5. The time now is 04:35 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration