LINUX.ORG.RU
ФорумAdmin

Отслеживание изменений файлов. Дьявол в деталях. Чем пользваться?

 


1

4

Tags: #integrity_check

Посоветуйте софт. Нужно что-то, чтобы умело:

  • считать хеши всех системных каталогов;
  • уведомлять на почту об изменениях;
  • писАть, что где поменялось/добавилось/удалилось;
  • добавлять исключения (например, для логов и media директорий)
  • возможность настройки низкого приорета работы, чтобы не уфигачивала систему в ноль, когда пересчитывает контрольные суммы всего.

Плюсом были бы возможности:

  • /etc/shadow отслеживать. - поменялся хеш, значит перебивался пароль;
  • /etc/passwd - поменялся, значит добавили и/или удалили пользователя;

Типа такого, спасибо.



Последнее исправление: dopedopedope (всего исправлений: 4)

AIDE (https://aide.github.io/) и TRIPWIRE (https://github.com/Tripwire/tripwire-open-source), ну и как посоветовали выше почитать про auditd (он вроде как хеши не считает, но отслеживает изменения файлов на уровне системных вызовов)

Samamy ★★★
()
Последнее исправление: Samamy (всего исправлений: 3)

Лично я не рекомендую, но под твои запросы подходит rkhunter, расшить ему список проверяемых файлов.

anonymous
()
Ответ на: комментарий от anonymous

Оранжевая Книга

Давно читал, призабыл.

Требования к системе Integrity в разных уровнях безопасности сформулированые от 1983 года:

2.1 Class (C1): Discretionary Security Protection

2.1.3.1.1 System Architecture

The TCB shall maintain a domain for its own execution protects it from external interference or tampering (e.g., by modification of its code or data strucutres). Resources controlled by the TCB may be a defined subset of the subjects and objects in the ADP system.

2.1.3.1.2 System Integrity

Hardware and/or software features shall be provided that can be used to periodically validate the correct operation of the on-site hardware and firmware elements of the TCB.

3.0 DIVISION B: MANDATORY PROTECTION

The notion of a TCB that preserves the integrity of sensitivity labels and uses them to enforce a set of mandatory access control rules is a major requirement in this division. Systems in this division must carry the sensitivity labels with major data structures in the system.

3.1 Class (B1): Labeled Security Protection

3.1.1.3.1 Label Integrity

Sensitivity labels shall accurately represent security levels of the specific subjects or objects with which they are associated. When exported by the TCB, sensitivity labels shall accurately and unambiguously represent the internal labels and shall be associated with the information being exported.

4.1 CLASS (A1): VERIFIED DESIGN

4.1.3.2.4 Trusted Distribution

A trusted ADP system control and distribution facility shall be provided for maintaining the integrity of the mapping between the master data describing the current version of the TCB and the on-site master copy of the code for the current version. Procedures (e.g., site security acceptance testing) shall exist for assuring that the TCb software, firmware, and hardware updates distributed to a customer are exactly as specified by the master copies.

Трудно сразу понять что имели ввиду 40 лет назад. C1 явно требует целосность системы и отдельно аппаратной части с ее прошивками. (Интересно как проверить прошивку диска?) Проверку аппаратной части с прошивками по крону. Как трактовать пункт 2.1.3.1.1? Если проверку периодически, то подойдет AIDE, Tripwire, а если при доступе, то надо IMA с профилем ima-sig.

B1 явно требует защиту меток, если покрону, то AIDE с поддержкой xattr,acl,attr, если при доступе, то IMA/EVM да еще и патченное, для поддержки ACL.

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.