The Samhain Host Integrity Monitoring System the Samhain Host Integrity Monitoring System This Is Version 2.4.3 of the Samhain Manual

Total Page:16

File Type:pdf, Size:1020Kb

The Samhain Host Integrity Monitoring System the Samhain Host Integrity Monitoring System This Is Version 2.4.3 of the Samhain Manual The Samhain Host Integrity Monitoring System The Samhain Host Integrity Monitoring System This is version 2.4.3 of the Samhain manual. Copyright © 2002-2019 Rainer Wichmann Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation Licensefrom the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. This manual refers to version 4.4.0 of Samhain. Table of Contents 1. Introduction .............................................................................................................. 1 1. Backward compatibility ...................................................................................... 1 2. Compiling and installing ............................................................................................. 2 1. Overview ......................................................................................................... 2 2. Requirements .................................................................................................... 3 3. Download and extract ......................................................................................... 3 4. Configuring the source ....................................................................................... 4 4.1. Some more configuration options ............................................................... 5 5. Build ............................................................................................................... 6 6. Install .............................................................................................................. 6 6.1. Important make targets ............................................................................. 7 7. Customize ........................................................................................................ 7 8. Initialize the baseline database ............................................................................. 8 9. Run samhain ..................................................................................................... 8 10. Files and directory layout .................................................................................. 9 10.1. Trusted users and trusted paths ................................................................ 9 10.2. Directory layout .................................................................................... 9 10.3. Runtime files ...................................................................................... 10 10.4. Installed files ...................................................................................... 10 11. The testsuite .................................................................................................. 11 3. General usage notes ................................................................................................. 13 1. How to invoke ................................................................................................ 13 2. Using daemontool (or similar utilities) ................................................................. 13 3. Controlling the daemon ..................................................................................... 13 4. Signals ........................................................................................................... 14 5. PID file .......................................................................................................... 14 6. Wait on file check ........................................................................................... 15 7. Log file rotation .............................................................................................. 15 8. Updating the file signature database .................................................................... 16 9. Improving the signal-to-noise ratio ...................................................................... 16 10. Runtime options: command-line & configuration file ............................................ 17 11. Remarks on the dnmalloc allocator .................................................................... 17 12. Support / Bugs / Problems ................................................................................ 18 12.1. If samhain appears to hang indefinitely .................................................... 18 4. Configuration of logging facilities ............................................................................... 19 1. General .......................................................................................................... 19 1.1. Severity levels ...................................................................................... 19 1.2. Classes ................................................................................................ 20 1.3. Error message customization ................................................................... 21 2. Available logging facilities ................................................................................ 21 3. Activating logging facilities and filtering messages ................................................ 22 4. E-mail ............................................................................................................ 23 4.1. E-mail reports and their integrity .............................................................. 26 5. Log file .......................................................................................................... 27 5.1. The log file and its integrity .................................................................... 27 6. Log server ...................................................................................................... 29 6.1. Details ................................................................................................. 29 7. External facilities ............................................................................................. 29 8. Console .......................................................................................................... 29 9. Prelude ........................................................................................................... 30 9.1. Prelude-specific command-line options ...................................................... 30 9.2. Registering to a Prelude manager ............................................................. 31 10. Using samhain with nagios .............................................................................. 31 11. Syslog .......................................................................................................... 32 12. SQL Database ................................................................................................ 33 iii The Samhain Host In- tegrity Monitoring System 12.1. Upgrade to samhain 2.3 ........................................................................ 34 12.2. Upgrade to samhain 2.4.4 ...................................................................... 35 12.3. Upgrade to samhain 2.8.0+ .................................................................... 35 12.4. Upgrade to samhain 4.0 ........................................................................ 36 12.5. MySQL configuration details ................................................................. 36 5. Configuring samhain, the host integrity monitor ............................................................ 37 1. Usage overview ............................................................................................... 37 2. Available checksum functions ............................................................................ 38 3. File signatures ................................................................................................. 38 4. Defining file check policies: what, and how, to monitor .......................................... 38 4.1. Monitoring policies ................................................................................ 39 4.2. File/directory specification ...................................................................... 40 4.3. Suppress messages about new/deleted/modified files .................................... 42 4.4. Dynamic database update (modified/disappeared/new files) ........................... 43 4.5. Recursion depth(s) ................................................................................. 43 4.6. Hardlink check ...................................................................................... 44 4.7. Check for weird filenames ...................................................................... 44 4.8. Support for prelink ................................................................................ 45 4.9. SELinux attributes and Posix ACLs .......................................................... 45 4.10. Codes in messages about reported files .................................................... 46 4.11. Loose directory checking ...................................................................... 46 4.12. Storing the full content of a file ............................................................. 46 4.13. Who made changes to a file? ................................................................. 46 4.14. Skip checksumming for particular
Recommended publications
  • Cloaker: Hardware Supported Rootkit Concealment
    Cloaker: Hardware Supported Rootkit Concealment Francis M. David, Ellick M. Chan, Jeffrey C. Carlyle, Roy H. Campbell Department of Computer Science University of Illinois at Urbana-Champaign 201 N Goodwin Ave, Urbana, IL 61801 {fdavid,emchan,jcarlyle,rhc}@uiuc.edu Abstract signers resorted to more complex techniques such as modi- fying boot sectors [33, 51] and manipulating the in-memory Rootkits are used by malicious attackers who desire to image of the kernel. These rootkits are susceptible to de- run software on a compromised machine without being de- tection by tools that check kernel code and data for alter- tected. They have become stealthier over the years as a ation [43, 13, 42, 21]. Rootkits that modify the system consequence of the ongoing struggle between attackers and BIOS or device firmware [25, 26] can also be detected by system defenders. In order to explore the next step in rootkit integrity checking tools. More recently, virtualization tech- evolution and to build strong defenses, we look at this issue nology has been studied as yet another means to conceal from the point of view of an attacker. We construct Cloaker, rootkits [31, 44]. These rootkits remain hidden by running a proof-of-concept rootkit for the ARM platform that is non- the host OS in a virtual machine environment. To counter persistent and only relies on hardware state modifications the threat from these Virtual Machine Based Rootkits (VM- for concealment and operation. A primary goal in the de- BRs), researchers have detailed approaches to detect if code sign of Cloaker is to not alter any part of the host oper- is executing inside a virtual machine [20].
    [Show full text]
  • A Brief Study and Comparison Of, Open Source Intrusion Detection System Tools
    International Journal of Advanced Computational Engineering and Networking, ISSN: 2320-2106, Volume-1, Issue-10, Dec-2013 A BRIEF STUDY AND COMPARISON OF, OPEN SOURCE INTRUSION DETECTION SYSTEM TOOLS 1SURYA BHAGAVAN AMBATI, 2DEEPTI VIDYARTHI 1,2Defence Institute of Advanced Technology (DU) Pune –411025 Email: [email protected], [email protected] Abstract - As the world becomes more connected to the cyber world, attackers and hackers are becoming increasingly sophisticated to penetrate computer systems and networks. Intrusion Detection System (IDS) plays a vital role in defending a network against intrusion. Many commercial IDSs are available in marketplace but with high cost. At the same time open source IDSs are also available with continuous support and upgradation from large user community. Each of these IDSs adopts a different approaches thus may target different applications. This paper provides a quick review of six Open Source IDS tools so that one can choose the appropriate Open Source IDS tool as per their organization requirements. Keywords - Intrusion Detection, Open Source IDS, Network Securit, HIDS, NIDS. I. INTRODUCTION concentrate on the activities in a host without considering the activities in the computer networks. Every day, intruders are invading countless homes On the other hand, NIDS put its focus on computer and organisations across the country via virus, networks without examining the hosts’ activities. worms, Trojans, DoS/DDoS attacks by inserting bits Intrusion Detection methodologies can be classified of malicious code. Intrusion detection system tools as Signature based detection, Anomaly based helps in protecting computer and network from a detection and Stateful Protocol analysis based numerous threats and attacks.
    [Show full text]
  • The Forseti Distributed File Integrity Checker
    Cluster Security with NVisionCC: The Forseti Distributed File Integrity Checker Adam J. Lee†‡, Gregory A. Koenig†‡, and William Yurcik† †National Center for Supercomputing Applications ‡Department of Computer Science University of Illinois at Urbana-Champaign {adamlee, koenig, byurcik}@ncsa.uiuc.edu Abstract for a number of malicious actions. In many cases, the password used to log into a single node can be used Attackers who are able to compromise a single node to access a large number of nodes in the system, al- in a high performance computing cluster can use that lowing the attacker to utilize the vast computing and node as a launch point for a number of malicious ac- storage capabilities of the compromised cluster to carry tions. In many cases, the password used to log into out brute-force password cracking, launch distributed a single node can be used to access a large number of denial of service attacks, or serve illegal digital content. nodes in the system, allowing the attacker to utilize the Additionally, an attacker can listen to network traffic vast computing and storage capabilities of the compro- for other users to log into their compromised nodes in mised cluster to sniff network traffic, carry out brute- hopes of learning passwords for other accounts on these force password cracking, launch distributed denial of systems. service attacks, or serve illegal digital content. Often, The recent rise in popularity of grid computing has these types of attackers modify important system files exacerbated this problem by increasing the amount to collect passwords to other accounts, disable certain of damage that can be caused with a single compro- logging facilities, or create back-doors into the system.
    [Show full text]
  • I3FS: an In-Kernel Integrity Checker and Intrusion Detection File System Swapnil Patil, Anand Kashyap, Gopalan Sivathanu, and Erez Zadok Stony Brook University
    I3FS: An In-Kernel Integrity Checker and Intrusion Detection File System Swapnil Patil, Anand Kashyap, Gopalan Sivathanu, and Erez Zadok Stony Brook University Appears in the proceedings of the 18th USENIX Large Installation System Administration Conference (LISA 2004) Abstract System administrators must stay alert to protect their systems against the effects of malicious intrusions. In Today, improving the security of computer systems this process, the administrators must first detect that an has become an important and difficult problem. Attack- intrusion has occurred and that the system is in an in- ers can seriously damage the integrity of systems. At- consistent state. Second, they have to investigate the tack detection is complex and time-consuming for sys- damage done by attackers, like data deletion, adding in- tem administrators, and it is becoming more so. Current secure Trojan programs, etc. Finally, they have to fix integrity checkers and IDSs operate as user-mode utili- the vulnerabilities to avoid future attacks. These steps ties and they primarily perform scheduled checks. Such are often too difficult and hence machines are mostly re- systems are less effective in detecting attacks that hap- installed and then reconfigured. Our work does not aim pen between scheduled checks. These user tools can be at preventing malicious intrusions, but offers a method easily compromised if an attacker breaks into the sys- of notifying administrators and restricting access once tem with administrator privileges. Moreover, these tools an intrusion has happened, so as to minimize the effects result in significant performance degradation during the of attacks. Our system uses integrity checking to detect checks.
    [Show full text]
  • SM User Guide
    Oracle® Communications Tekelec Virtual Operating Environment Licensing Information User Manual Release 3.5 E93070-01 November 2017 Copyright ©2010, 2017 Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S.
    [Show full text]
  • How Attackers Break Programs, and How to Write Programs More Securely
    How Attackers Break Programs, and How To Write Programs More Securely Matt Bishop Department of Computer Science University of California at Davis Davis, CA 95616-8562 United States of America email: [email protected] www: http://seclab.cs.ucdavis.edu/~bishop phone: +1 (530) 752-8060 © 2002 by Matt Bishop This page deliberately left blank. That is, this page would have been blank except that we had to put the notice "this page deliberately left blank" on it. Otherwise, you might have seen the blank page and worried that someone left a page out of your booklets. So, we put a note on the blank page to assure you that no-one forgot to put something on this page; indeed, we intended for it to be blank. But we could not live up to our intentions, for the reason stated above, so we couldn't put a blank page in here. We had to put a page with some writing on it. So we couldn't put the notice "this page deliberately left blank" because it's not true and, if we couldn't tell when a page is blank, you'd doubt the veracity of everything we did. So we wrote this paragraph to ... oh, heck, forget it. Table of Contents sections slides Overview..................................... 1— 13 Attacking Programs ........................... 14—123 Overview .......................14 — 20 Users and Privilege ...............21 — 29 Environment ....................30 — 48 Buffer Overflow ..................49 — 70 Numeric Overflow ................71 — 76 Validation and Verification .........77 — 92 Race Conditions..................93—112 Denial of Service ............... 113—121 Environment .................. 122—123 Writing Better Programs ......................124—379 Overview ....................
    [Show full text]
  • Designing a New Infrastructure for ATLAS Online Web Services
    EPJ Web of Conferences 245, 07030 (2020) https://doi.org/10.1051/epjconf/202024507030 CHEP 2019 Designing a New Infrastructure for ATLAS Online Web Ser- vices Sergio Ballestrero1, Franco Brasolin2, Arturo Sanchez Pineda3, Diana Alessandra Scannicchio4;∗, and Matthew Shaun Twomey5 1University of Johannesburg, South Africa 2Istituto Nazionale di Fisica Nucleare Sezione di Bologna, Italy 3INFN Gruppo Collegato di Udine and Università di Udine, Italy 4University of California Irvine, United States of America 5University of Washington, United States of America Abstract. Within the ATLAS detector, the Trigger and Data Acquisition system is responsible for the online processing of data streamed from the detector dur- ing collisions at the Large Hadron Collider (LHC) at CERN. The online farm is composed of ∼4000 servers processing the data read out from ∼100 million detector channels through multiple trigger levels. The capability to monitor the ongoing data taking and all the involved applications is essential to debug and intervene promptly to ensure efficient data taking. The base of the current web service architecture was designed a few years ago, at the beginning of the AT- LAS operation (Run 1). It was intended to serve primarily static content from a Network-attached Storage, and privileging strict security, using separate web servers for internal (ATLAS Technical and Control Network - ATCN) and exter- nal (CERN General Purpose Network and public internet) access. During these years, it has become necessary to add to the static content an increasing number of dynamic web-based User Interfaces, as they provided new functionalities and replaced legacy desktop UIs. These are typically served by applications on VMs inside ATCN and made accessible externally via chained reverse HTTP proxies.
    [Show full text]
  • Ecryptfs: an Enterprise-Class Encrypted Filesystem for Linux
    eCryptfs: An Enterprise-class Encrypted Filesystem for Linux Michael Austin Halcrow International Business Machines [email protected] Abstract the integrity of the data in jeopardy of compro- mise in the event of unauthorized access to the media on which the data is stored. eCryptfs is a cryptographic filesystem for Linux that stacks on top of existing filesys- While users and administrators take great tems. It provides functionality similar to that of pains to configure access control mecha- GnuPG, except the process of encrypting and nisms, including measures such as user ac- decrypting the data is done transparently from count and privilege separation, Mandatory Ac- the perspective of the application. eCryptfs cess Control[13], and biometric identification, leverages the recently introduced Linux ker- they often fail to fully consider the circum- nel keyring service, the kernel cryptographic stances where none of these technologies can API, the Linux Pluggable Authentication Mod- have any effect – for example, when the me- ules (PAM) framework, OpenSSL/GPGME, dia itself is separated from the control of its the Trusted Platform Module (TPM), and the host environment. In these cases, access con- GnuPG keyring in order to make the process trol must be enforced via cryptography. of key and authentication token management When a business process incorporates a cryp- seamless to the end user. tographic solution, it must take several issues into account. How will this affect incremental backups? What sort of mitigation is in place to address key loss? What sort of education is 1 Enterprise Requirements required on the part of the employees? What should the policies be? Who should decide them, and how are they expressed? How dis- Any cryptographic application is hard to imple- ruptive or costly will this technology be? What ment correctly and hard to effectively deploy.
    [Show full text]
  • The Samhain HIDS
    Features The Samhain HIDS Overview of available features Rainer Wichmann November 1, 2011 Rainer Wichmann The Samhain HIDS Supported Platforms PCI DSS Compliance Centralized Management File Integrity Checks Features Host Integrity Monitoring Integration with other Systems / Active Response Integrity of the Samhain System Documentation Supported Platforms POSIX (e.g. Linux, *BSD, Solaris 2.x, AIX 5.x, HP-UX 11, and Mac OS X. Windows 2000 / WindowsXP with POSIX emulation (e.g. Cygwin). Please note that this is tested for the Samhain monitoring agent only, not for the server. Rainer Wichmann The Samhain HIDS Supported Platforms PCI DSS Compliance Centralized Management File Integrity Checks Features Host Integrity Monitoring Integration with other Systems / Active Response Integrity of the Samhain System Documentation PCI DSS Compliance The Payment Card Industry (PCI) Data Security Standard (DSS) mandates the use of file integrity monitoring software. Version 1.1 of the PCI DSS includes the following two requirements: Sect. 11.5: “Deploy file integrity monitoring software to alert personnel to unauthorized modification of critical system or content files; and configure the software to perform critical file comparisons at least weekly.” Sect. 10.5.5: “Use file integrity monitoring and change detection software on logs to ensure that existing log data cannot be changed without generating alerts (although new data being added should not cause an alert).” While weekly checks can be done with any open-source file integrity checker, to the best of our knowledge Samhain is the only one that can perform incremental checks on growing logfiles (i.e. verify at each check that the data present at the preceding check have not been modified meanwhile), as required by Sect.
    [Show full text]
  • What Is Network Monitoring?
    Advanced Registry Operations Curriculum Introduction to Networking Monitoring and Management These materials are licensed under the Creative Commons Attribution-Noncommercial 3.0 Unported license (http://creativecommons.org/licenses/by-nc/3.0/) as part of the ICANN, ISOC and NSRC Registry Operations Curriculum. Part I: Overview Core concepts presented: – What is network monitoring – What is network management – Getting started – Why network management – Attack detection – Consolidating the data – The big picture What is network monitoring? Anyone have some ideas? Monitoring an active communications network in order to diagnose problems and gather statistics for administration and fine tuning. The term network monitoring describes the use of a system that constantly monitors a computer network for slow or failing components and that notifies the network administrator in case of outages via email, pager or other alarms. It is a subset of the functions involved in network management. What is network management? Refers to the broad subject of managing computer networks. There exists a wide variety of software and hardware products that help network system administrators manage a network. Network management covers a wide area, including: - Security: Ensuring that the network is protected from unauthorized users. - Performance: Eliminating bottlenecks in the network. - Reliability: Making sure the network is available to users and responding to hardware and software malfunctions. What is network management? System & Service monitoring - Reachability, availability Resource measurement/monitoring - Capacity planning, availability Performance monitoring (RTT, throughput) Statistics & Accounting/Metering Fault Management (Intrusion Detection) - Fault detection, troubleshooting, and tracking - Ticketing systems, help desk Change management and configuration monitoring Getting started Make sure that the network is up and running.
    [Show full text]
  • Security Power Tools.Pdf
    www.dbebooks.com - Free Books & magazines SECURITY POWER TOOLS ® Other computer security resources from O’Reilly Related titles Security Warrior SSH, The Secure Shell: The Snort Cookbook™ Definitive Guide Practical Unix and Internet TCP/IP Network Security Administration Essential System Network Security Hacks™ Administration Security Books security.oreilly.com is a complete catalog of O’Reilly’s books on Resource Center security and related technologies, including sample chapters and code examples. oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, pro- gramming languages, and operating systems. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit con- ferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. SECURITY POWER TOOLS ® Bryan Burns, Jennifer Stisa Granick, Steve Manzuik, Paul Guersch, Dave Killion, Nicolas Beauchesne, Eric Moret, Julien Sobrier, Michael Lynn, Eric Markham, Chris Iezzoni, and Philippe Biondi Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo Security Power Tools® by Bryan Burns, Jennifer Stisa Granick, Steve Manzuik, Paul Guersch, Dave Killion, Nicolas Beauchesne, Eric Moret, Julien Sobrier, Michael Lynn, Eric Markham, Chris Iezzoni, and Philippe Biondi Copyright © 2007 O’Reilly Media, Inc.
    [Show full text]
  • The Samhain Host Integrity Monitoring System the Samhain Host Integrity Monitoring System This Is Version 2.4.3 of the Samhain Manual
    The Samhain Host Integrity Monitoring System The Samhain Host Integrity Monitoring System This is version 2.4.3 of the Samhain manual. Copyright © 2002-2019 Rainer Wichmann Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation Licensefrom the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. This manual refers to version 4.4.0 of Samhain. Table of Contents 1. Introduction .............................................................................................................. 1 1. Backward compatibility ...................................................................................... 1 2. Compiling and installing ............................................................................................. 2 1. Overview ......................................................................................................... 2 2. Requirements .................................................................................................... 3 3. Download and extract ......................................................................................... 3 4. Configuring the source ......................................................................................
    [Show full text]