Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Oct 08, 2005 5:45 am 
Offline
Newbie

Joined: Fri Sep 16, 2005 3:44 am
Posts: 4
Hi all, I am trying to lock down my linode and already done a buch of adjustements. Among others, I have tiger running periodically integrit as file integrity checker: I am wondering what would be a good strategy to store known hashes and integrit binaries to prevent their modification?

I was wondering if creating and mouting a read-only device (e.g. as /readonly) in my linode configuration wizard would be sufficient? Is there anyway that intruders that gained shell access will remount the device with rw?

Cheers,

~pimu


Top
   
 Post subject:
PostPosted: Mon Oct 10, 2005 11:01 am 
Offline
Junior Member

Joined: Mon Apr 26, 2004 5:03 pm
Posts: 47
I suggest storing the checksums off of your linode, and have them protected on the other machine. Somone rooting your box would be able to remount the device rw.


Top
   
 Post subject:
PostPosted: Tue Oct 11, 2005 12:03 pm 
Offline
Senior Newbie

Joined: Sat Sep 24, 2005 10:09 am
Posts: 6
You probably know this, but modern versions of tripwire can lock the database with a key, so it's relatively safe locally. I think tripwire's licence is slightly evil these days, but aide is a drop-in replacement that may have the same functionality - and samhain is a much larger package that covers the same and more ground.


Top
   
 Post subject:
PostPosted: Tue Oct 11, 2005 12:47 pm 
Offline
Junior Member

Joined: Mon Apr 26, 2004 5:03 pm
Posts: 47
I'm going to retract my earlier statement. It is quite possible that setting a device readonly in LPM would prohibit it from being remounted rw. On a normal unix machine, HD's can be mounted ro and then remounted r/w (every time you boot this is done to /), however if done via LPM then the device may very well be treated as a hardware readonly device.

I suppose the easiest answer is to try it :>

Using a key to encrypt the tripwire database is a good idea, however if your box is rooted and the tripwire database is deleted then it still doesn't help much. The tripwire binary could be trojaned as well to capture the key and not report the rootkit.


Top
   
 Post subject:
PostPosted: Tue Oct 11, 2005 3:46 pm 
Offline
Senior Newbie

Joined: Sat Sep 24, 2005 10:09 am
Posts: 6
Very true jhm - if they delete it, it's gone. However at least that night's tripwire will alert you that you've been compromised, and we all reinstall if compromised, right! But yes, it wouldn't help you recover the audit trail of how you were compromised.

Surely if you create a readonly drive on a Linode, it needs a reboot to make it writable? Not that I've tried, but I presume. This would mean you'd need to reboot whenever you updated... anything unless you had a tolerance for long reports of false positives.

I sometimes use old tripwire by writing checksums to a remote NFS mount that was readonly: and having another restricted area that was writable on the same remote server (by root) for changed databases. That way, root on the remote server was required to "activate" (i.e. mv) the checksum databases into place for the next night's tripwire run. But as ever, caveat NFS - wouldn't want to do this with a linode unless I had a VPN I really trusted between my Linode and me...


Top
   
 Post subject:
PostPosted: Sat Oct 15, 2005 6:49 am 
Offline
Newbie

Joined: Fri Sep 16, 2005 3:44 am
Posts: 4
Ideally, I would run file integrity check from a remote host storing both binaries and database (over ssh). However, this is not possible for me.

I created a read-only device in LPM and, as pointed out by jhm, it is apparently treated as hardware read-only. To update integrit and its DB, I need to change disk settings in LPM, reboot the linode, apply changes to /readonly (after remounting r/w), set the device back to r/o in LPM, and finally reboot.

One word: painfull, but works for me since I have a rather small system (mail and svn server) that does'nt get updated very often. I am just keeping track of what have been updated recently (through the cron-apt reports) and analyse integrit report consequently.

~pimu


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: dobriain and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group