Slashdot Mirror


Host Integrity Monitoring Using Osiris and Samhain

nazarijo (Jose Nazario) writes "When you arrive to work one morning, you find that your coworker's workstation is acting funny. A quick forensic examination reveals it's been compromised and used to scan the network for more vulnerabilities. When did this happen, and where else is this going on in you domain? With a host integrity monitoring solution, you'll be a lot further along at answering those questions than piecing it all together after the fact. And you can accomplish this with two freeware tools, as described in Host Integrity Monitoring Using Osiris and Samhain, a new book from Syngress Publishing." Read on for the rest of Nazario's review. Host Integrity Monitoring Using Osiris and Samhain author Brian Wotring, with Bruce Potter and Rainer Wichmann pages 450 publisher Syngress rating 8 reviewer Jose Nazario ISBN 1597490180 summary Use freeware tools to ensure your site's security is intact

Host integrity monitoring is the process by which system and network administrators validate and enforce the security of their systems. This can be a complex suite of approaches, tools, and methodologies, and it can be as simple as looking at loggin output. In the past, tools like Tripwire were used to check the configurations on hosts. The freeware version of this tool was limited in its manageability, which was available mainly in the commercial version.

Tools like Osiris and Samhain came along to fill the gap and have since evolved into mature projects themselves. Like any existing software tool out there, any new book should be evaluated not only on its own but also in he context of the existing documentation. Both Osiris and Samhain have decent amounts of documentation available already (Samhain seems to have a larger user documentation repository online than the Osiris tool does), and the book contributes to these docs quite well.

Host Integrity Monitoring shows you how to set up these tools and put them into production on Windows, UNIX, and OS X. Wotring's writing is fairly good, and his examples are usually pretty clear. The pace of the material is good, and there's not a whole lot of domain-specific expertise beyond system administration skills required to make use of the book. At times some of the formatting of the text gets in the way, but that's trivial compared to the quality of writing (which is pretty good).

Overall the material in the book is decent. The book opens with an overview of what host integrity monitoring is, why you should use it, and some of the basic premises. Then it goes on to discuss Samhain and Osiris, starting with their basic installation and then on to their advanced usage. They differ enough that each project merits its own pieces of documentation, even though they're similar in spirit. You'll learn how to schedule scans, integrate with other tools like Swatch, and in general administer a site installation.

The author of the book, Brian Wotring, is more familiar with Osiris than he is with Samhain, and it shows. More material (100 pages) is devoted to using Osiris than is given to Samhain (60 pages), which is to be expected. The coverage of both is sufficient, though, and fills the major parts of the book.

There are three major strengths to this book over the existing docs. The first is seeing not just the tools themselves covered but also the threats they cover in place. The second is having the two tools covered side by side, allowing you to see how to accomplish the same task with each. And thirdly, there are two appendices that are true gems of this book. The first covers how to get your Linksys Linux based AP device monitored using the Osiris tool, which isn't a small feat. The second is how to write your own modules for Osiris and Samhain, for which this appears to be the only documentation for Osiris (Samhain's website has a How To on writing modules). Again, these add value to the book over the freely available documentation.

I would have liked to have seen the chapters devoted specifically to Osiris and Samhain, chapters 6 (Osiris) and 7 (Samhain) broken up into two or three chapters covering their installation and use. The length of these chapters can make finding some material difficult at times. I would have also have liked to see the use of the "bold is input, normal text is output" technical book convention. In many examples finding the user input text can be challenging.

Host Integrity Monitoring Using Osiris and Samhain is not only about these tools but about how to accomplish host integrity monitoring on the cheap (since the code is freely available). While you can find docs on each project, this book complements those docs nicely and provides a nicely wrapped package about how to get the most out of each tool. If you've been thinking about how to ensure that no one is tampering with your system, these tools, and this book, should definitely make your solutions list.

You can purchase Host Integrity Monitoring Using Osiris and Samhain from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

50 comments

  1. Article Text in case of Slashdotting by Anonymous Coward · · Score: 0, Funny

    Host integrity monitoring is the process by which system and network administrators validate and enforce the security of their systems. This can be a complex suite of approaches, tools, and methodologies, and it can be as simple as looking at loggin output. In the past, tools like Tripwire were used to check the configurations on hosts. The freeware version of this tool was limited in its manageability, which was available mainly in the commercial version.

    Tools like Osiris and Samhain came along to fill the gap and have since evolved into mature projects themselves. Like any existing software tool out there, any new book should be evaluated not only on its own but also in he context of the existing documentation. Both Osiris and Samhain have decent amounts of documentation available already (Samhain seems to have a larger user documentation repository online than the Osiris tool does), and the book contributes to these docs quite well.

    Host Integrity Monitoring shows you how to set up these tools and put them into production on Windows, UNIX, and OS X. Wotring's writing is fairly good, and his examples are usually pretty clear. The pace of the material is good, and there's not a whole lot of domain-specific expertise beyond system administration skills required to make use of the book. At times some of the formatting of the text gets in the way, but that's trivial compared to the quality of writing (which is pretty good).

    Overall the material in the book is decent. The book opens with an overview of what host integrity monitoring is, why you should use it, and some of the basic premises. Then it goes on to discuss Samhain and Osiris, starting with their basic installation and then on to their advanced usage. They differ enough that each project merits its own pieces of documentation, even though they're similar in spirit. You'll learn how to schedule scans, integrate with other tools like Swatch, and in general administer a site installation.

    The author of the book, Brian Wotring, is more familiar with Osiris than he is with Samhain, and it shows. More material (100 pages) is devoted to using Osiris than is given to Samhain (60 pages), which is to be expected. The coverage of both is sufficient, though, and fills the major parts of the book.

    There are three major strengths to this book over the existing docs. The first is seeing not just the tools themselves covered but also the threats they cover in place. The second is having the two tools covered side by side, allowing you to see how to accomplish the same task with each. And thirdly, there are two appendices that are true gems of this book. The first covers how to get your Linksys Linux based AP device monitored using the Osiris tool, which isn't a small feat. The second is how to write your own modules for Osiris and Samhain, for which this appears to be the only documentation for Osiris (Samhain's website has a How To on writing modules). Again, these add value to the book over the freely available documentation.

    I would have liked to have seen the chapters devoted specifically to Osiris and Samhain, chapters 6 (Osiris) and 7 (Samhain) broken up into two or three chapters covering their installation and use. The length of these chapters can make finding some material difficult at times. I would have also have liked to see the use of the "bold is input, normal text is output" technical book convention. In many examples finding the user input text can be challenging.

    Host Integrity Monitoring Using Osiris and Samhain is not only about these tools but about how to accomplish host integrity monitoring on the cheap (since the code is freely available). While you can find docs on each project, this book complements those docs nicely and provides a nicely wrapped package about how to get the most out of each tool. If you've been thinking about how to ensure that no one is tampering with your system, these tools, and this book, should definitely make your solutions list.

    1. Re:Article Text in case of Slashdotting by lee1026 · · Score: 0

      um... isn't the text part of slashdot itself? so that if the text goes down, then no one will be able to read your version either?

    2. Re:Article Text in case of Slashdotting by TheRaven64 · · Score: 1
      Whoosh! That was the sound of a joke[1] going right over your head.

      Sad really, since someone does the same thing for most book reviews.

      [1] Although, I admit, this one barely qualifies.

      --
      I am TheRaven on Soylent News
  2. "Samhain" by fiannaFailMan · · Score: 2, Informative

    "Samhain" (pronounced "SAOW-an") is "November" in Irish.

    --
    Drill baby drill - on Mars
    1. Re:"Samhain" by Anonymous Coward · · Score: 0

      Tip: The 'm' is just an upside down 'w'.

      I suppose I'm also pronouncing "Osiris" completely wrong.

    2. Re:"Samhain" by macrom · · Score: 1

      I sometimes wonder if OSS wouldn't be taken more seriously if the names were more...grown up. It might be hard to convince your manager that you need to use open source software that tips its hat to the Egyptian Lord of the Dead.

      What's next? Releases of Linux codenamed "Gozer" and "Zuul".

    3. Re:"Samhain" by Anonymous Coward · · Score: 0

      Yes, it's just terrible- I mean nothing serious could have a name from mythology. Who'd ever be able to take a space missions called Apollo seriously? And, sticking to a space theme, celestial bodies being named for err... celestial beings, that'd be ludicrous....

    4. Re:"Samhain" by hostyle · · Score: 1

      Like Vista?

      --
      Caesar si viveret, ad remum dareris.
    5. Re:"Samhain" by Anonymous Coward · · Score: 0
      Great, now pretty soon we are going to have space probes with wacky names like Mercury...

      ps : Hey Slashdot is now using a 'touring test'

      down mit spam!

    6. Re:"Samhain" by homesteader · · Score: 1

      I guess Glenn Danzig was a moron after all

    7. Re:"Samhain" by Darby · · Score: 1

      I'm sorry, I believe that you have been misinformed ;-)
      Samhain was the band that Glenn Danzig formed after the Misfits broke up.

    8. Re:"Samhain" by Anonymous Coward · · Score: 0

      How do you pronounce SAOW?

    9. Re:"Samhain" by fiannaFailMan · · Score: 1

      To ryhme with the way an Englishman would pronounce 'wow.'

      --
      Drill baby drill - on Mars
  3. no comment by rd4tech · · Score: 0, Redundant

    Host Integrity Monitoring Using Osiris and Samhain is not only about these tools but about how to accomplish host integrity monitoring on the cheap (since the code is freely available)

  4. Links would have been nice by Nos. · · Score: 5, Informative

    I had to look them up:
    Osiris
    Samhain

    1. Re:Links would have been nice by Anonymous Coward · · Score: 0

      Oh how awful! I guess that took you around one second each, valueable time which is lost now!
      +1 insightful, of course, to this magnificent contribution to slashdot!

    2. Re:Links would have been nice by georgewilliamherbert · · Score: 2, Informative
      I'm curious as to whether the book mentions
      AIDE
      or Radmind.


      I haven't personally heard of anyone using Osiris or Samhain in production.

    3. Re:Links would have been nice by Anonymous Coward · · Score: 0
      I haven't personally heard of anyone using Osiris or Samhain in production.

      I personally filled my bank account by consulting for someone who wanted to have samhain installed, and was willing to pay for the job.

      Samhain and Osiris can do centralised logging and management, aide can't. They have a completely different target audience.

  5. "Samhain", Samhuinn, etc: Celtic Quarter Day by fantomas · · Score: 4, Informative

    Samhuinn/ Samhain - Celtic Quarter Day: "The Samhuinn Festival serves the seasonally opposite role to Beltane. It was the Celtic New Year, although its practice far precedes the Celtic culture. It marked the end of summer and the time to bring herds in from summer pastures to lowland fields and enclosures for protection. With the signs of approaching winter, it is understandable that the festival should have a strong association with death. The trees are bare and the land barren of the earlier vegetation - nature itself seems to be dying.

    Thus it was believed that this was the night of the dead - a time for the spirits of the departed from the previous year to pay one last visit to their relatives before departing for the other-world forever. Also taking advantage of this closeness between the land of the living and the dead were the mischievous and malevolent spirits of the underworld, and measures had to be taken to protect against their pranks. Thus evolved the tradition of modern Hallowe'en to wear masks - originally to disguise oneself against the unwanted attentions of spirits and faeries.

    Another Samhuinn tradition was a market fair held in the nearest trading centre. This was a chance to settle business, to trade livestock and produce of the autumn and to revel with friends for one last time before the winter conditions made travel too difficult. Amongst the entertainments were the Goloshan Plays. The main theme of these ancient narratives was the battle between light and dark, summer and winter. The two characters fight to the death, winter overcoming summer as inevitably as the seasons, but the medicine-man steps in to revive the summer figure, thus ensuring the return of spring and light."

  6. Honk! by Stanistani · · Score: 4, Funny

    > When you arrive to work one morning, you find that your coworker's workstation is acting funny.

    Scan results:
    Workstation infected with Circus_Clown_Virus

    1. Re:Honk! by satellite17 · · Score: 1

      Everyone knows that clowns are never funny.
      Never ever ever....

      ever

      A Bill Hicks virus however, Hmmmm.

  7. Link for those who want to purchase the book by Rosco+P.+Coltrane · · Score: 2, Informative

    but don't like the Slashdot whore link: Clickey

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
  8. Arms race by G4from128k · · Score: 4, Insightful

    I wonder how long it will take worm/virus/trojan writers to write payloads that attack, disable, or hide from monitoring applications such as these? I suspect that monitoring apps will need to use the same randomized signature tricks that viruses use to avoid easy detection. Perhaps, the ultimate solution is to go back to non-flash ROMs with unbypassable, built-in integrity checking features.

    --
    Two wrongs don't make a right, but three lefts do.
    1. Re:Arms race by Just+Some+Guy · · Score: 5, Informative
      On a FreeBSD system, you can set the "immutable flag" on a file. Given a high enough system securelevel, that file will be completely resistant to change (including unsetting that flag). This is extremely handy for locking down file signature databases, kernel files, and other likely targets for stealth modification. So long as that portion of the kernel stands intact, the system can never be completely clandestinely owned.

      While that's clearly a last-line-of-defense sort of thing, it's certainly a welcome feature. I assume that Linux has a similar mechanism, although I haven't personally used it.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:Arms race by Anonymous Coward · · Score: 0

      OpenBSD has this too, not sure of NetBSD or Linux though as I've never really used these in a long time.

  9. Define "Acting funny" by Nuclear+Elephant · · Score: 4, Funny

    When you arrive to work one morning, you find that your coworker's workstation is acting funny.

    It won't take my coke. The cup holder keeps spitting it out. And I am expecting to be arrested any moment, as it keeps telling me I'm doing something illegal.

  10. Book author appears to have written Osiris by georgewilliamherbert · · Score: 5, Interesting

    It should be noted that Brian Wotring, the book author, is the lead developer and release manager for Osiris. That probably explains why he knows it better than he knows Samhain...

  11. Note to self by Ice+Station+Zebra · · Score: 4, Funny

    First thing tomorrow morning, get on co-workers workstation. Obviously his is more fun than mine.

  12. But what about... by Anonymous Coward · · Score: 1, Funny

    ...Danzig or the Misfits???

    Don't they deserve equal time?

    1. Re:But what about... by Universal+Indicator · · Score: 1

      Only if today was halloweeeeeeeeeeeeeeeen :-)

  13. These words do not go together by ch-chuck · · Score: 2, Funny

    Microsoft - Integrity - won't fit in the same sentence. More like, "Marginally works - ship it! Patch Later!! Capture Market Share!!!".

    --
    try { do() || do_not(); } catch (JediException err) { yoda(err); }
    1. Re:These words do not go together by bvimo · · Score: 0, Redundant

      'Microsoft integrity' isn't that an oxymoron?

      --
      In either case, here at Microsoft, we feel standards are important. And we have fun, too. Doug Mahugh, Microsoft
  14. I read this once... by Just+Some+Guy · · Score: 1

    ...but back then it was named aide(1). It is a sequel to tripwire(1) - also an excellent choice - and makes a nice adjunct to security(7) and periodic(8). Highly recommended; a real page-turner.

    --
    Dewey, what part of this looks like authorities should be involved?
  15. Save Some Money! by Anonymous Coward · · Score: 0

    Save yourself $15.28 by buying the book here: Host Integrity Monitoring Using Osiris and Samhain

  16. useful links by justforaday · · Score: 3, Funny

    Here's some useful links for those not in the know:

    Osiris
    Samhain

    --
    I'll turn into a supernova and burn up everything. Well I'll turn into a black little hole and you'll turn into string.
  17. Tripwire? by Anonymous Coward · · Score: 2, Interesting

    I've been using tripwire + custom scripts for centralized management for years.

    I'm wondering, why hasn't tripwire been improved or forked? It's GPL right?

    1. Re:Tripwire? by georgewilliamherbert · · Score: 1
      No, tripwire was commercially developed, and though it was licensed for free academic use (including source) commercial users were expected to pay for it for a number of years now.

      I just checked their website and didn't even see the ASR (Academic Source Release) Tripwire version on the website, so it may be gone entirely now. I am sure you can find it out there on the net, but it's not licensed for free commercial usage.

      AIDE was developed to get around that, some years ago.

      For a good reference list:

    2. Re:Tripwire? by Random+Walk · · Score: 1
      a) written in C++, it is noticeable slower than all the open source replacements written in C (this is from an actual benchmark, not just hearsay)

      b) if you ever had a look at the (GPLed) code of the open source tripwire release, you would know that it's a mess. the codebase is MUCH larger than that of any other file integrity scanner, it is void of any useful comments, and simply stated, it is what coders call 'spagetti code'.

      Nobody wants to improve or fork that thing - it is faster and easier to write from scratch. which is what already has been done by several projects.

  18. System Immutable flag & OS X by G4from128k · · Score: 4, Interesting

    On a FreeBSD system, you can set the "immutable flag" on a file. Given a high enough system securelevel, that file will be completely resistant to change (including unsetting that flag). This is extremely handy for locking down file signature databases, kernel files, and other likely targets for stealth modification. So long as that portion of the kernel stands intact, the system can never be completely clandestinely owned

    Very interesting. This FAQ suggest that OS X retains BSD's immutable flag. In theory, the only way to change this flag in OS X is to reboot in single-user mode. I wonder if a rootkit could force a reboot into single user mode, change these flags, and reboot back to remotely own an OS X machine? I would assume that unless the rootkit can insert something into the single-user mode start-up sequence, the system immutable flag should be fairly safe. The big downside would be that System Update would cease to work (and probably create a corrupt partial update) if the wrong file were locked in this way (security vs. ease-of-use again!).

    --
    Two wrongs don't make a right, but three lefts do.
    1. Re:System Immutable flag & OS X by scrod · · Score: 2, Informative

      Mac OS X does indeed retain the BSD user-immutable and system-immutable flags. For example, the command
      sudo chflags schg filename is completely effective on a Mac, requiring either a sudo shutdown +0 command or a reboot into Mac OS 9, where the file can then be unlocked from the Get Info window.

      Similar functionality can be had in Linux with the lcap command--after making a file immutable, simply remove the CAP_LINUX_IMMUTABLE capability to prevent further modification until the next reboot. For added security, add this to an early init script.

      Making files immutable is not the only option in this realm, however. It's often usefl to mark log files as append-only, for example.

    2. Re:System Immutable flag & OS X by Just+Some+Guy · · Score: 2, Interesting
      In theory, the only way to change this flag in OS X is to reboot in single-user mode.

      In FreeBSD, the securelevel is set by one of the rc.d scripts that get executed at boot. You could theoretically insert instructions to run before it gets set. Assuming, of course, that the rc.d scripts themselves haven't been made immutable.

      You nailed the main drawback: upgrading a running system becomes pretty much impossible without a reboot.

      The other one I usually encounter deals with running Aide. Basically, I generate a baseline filesystem checksum database and make that file immutable. When I run periodic verification passes, the list of differences grows over time, and since the baseline can't be altered in any way I can't ever reset it (without a reboot, that is). The workaround is to keep the output of each run in a new immutable file and compare each "diff" with the previous run. Note that with this setup, the size of Aide's database directly can only grow and never shrink. It's a small price to pay, but still one of those little unexpected hurdles.

      --
      Dewey, what part of this looks like authorities should be involved?
    3. Re:System Immutable flag & OS X by devitto · · Score: 2, Informative

      This is an old BSD 4.4 FFS feature, IIRC, and a great one. Solaris has a similar thing too.

      Rebooting and resetting attribs is only possible if the attacker can change one of the programs executed (or utilised) before the runlevel goes out of single user. Consequently if you plan to use this feature serously, you need to examine and protect every file AND DEVICE (/dev/hd* etc) that is read before going into multiuser mode, and their dependants.

      This isn't actually as bad as it seems for an already tight system.

      This feature also makes patching usually require a reboot, as you can live-patch, obviously.

      It's well worth the effort for multiuser systems, at sites with dodgy users like students, and anywhere where jails/chroot are used, to protect the integrity of the jailed/chrooted files.

  19. Advantages to Samhain over Tripwire by Kernel+Kurtz · · Score: 2, Interesting
    I've been using Tripwire (and Tripwire Portable) for years. Recently I have started using Samhain in its place and have been quite happy with it.


    Some useful features that it has which Tripwire doesn't is the ability to monitor kernel system call tables for changes (a common attack vector), and to run as a daemon to alert on changes immediately.


    Its definitely worth a look.

  20. Cute names slow acceptance. by Futurepower(R) · · Score: 1


    MOD PARENT UP!

    "Funny" names slow the acceptance of many OSS packages.

    Marketing is connecting the mind of the prospective customer with the facts of the project. There is as much need for marketing of OSS as for commercial software. However, marketing is an intellectual challenge as big as programming, and most people don't know how to do both.

    1. Re:Cute names slow acceptance. by andreyw · · Score: 1

      You're right. Vista, Longhorn and Millenium and clearly better.

      Oh wait.

    2. Re:Cute names slow acceptance. by SWroclawski · · Score: 1

      If "Marketing" is central to the author, then maybe they'll change the name.

      I know "marketing" isn't part of software I write, at least not mass-market marketing

  21. Don't forget LYING!!!! by Anonymous Coward · · Score: 0

    You forgot Lying to customers

  22. "it can be as simple as looking at logging output" by GringoGoiano · · Score: 1

    Looking at logging output in an enterprise environment can be very difficult. To make this really useful you need to aggregate information in a central repository, from all different servers/apps running on many machines. For true heavy duty log analysis you need to resort to tools such as SenSage's log storage/analysis tool.

    Any other tool will choke on the volume of information you'll be chugging through in an enterprise environment, unless you pay for a multi-million-dollar Oracle deployment.

    A Linux-based product used by Blue Cross/Blue Shield, Yahoo, Lehman Brothers, etc. For true enterprise security you need something like this.

  23. Give it an easily accepted name. by Futurepower(R) · · Score: 1


    The point is that if you want people to use your software, give it a name that is easy for people.