CentOS7下的AIDE入侵檢測配置

CentOS7下的AIDE入侵檢測配置

時間:2017-06-22 16:31:31      閱讀:961      評論:0      收藏:0      [點我收藏+]mysql

標籤:linux   服務器   數據庫   配置文件   入侵檢測   linux

一、AIDE的簡單介紹git

  AIDE經過掃描一臺(未被篡改)的Linux服務器的文件系統來構建文件屬性數據庫,之後將服務器文件屬性與數據庫中的進行校對,而後在服務器運行時對被修改的索引了的文件發出警告。出於這個緣由,AIDE必須在系統更新後或其配置文件進行合法修改後從新對受保護的文件作索引。sql

二、安裝並簡單配置aide數據庫

[root@LVS-DR01 ~]# yum -y install aide
[root@LVS-DR01 ~]# vim /etc/aide.conf 
# 添加下列行:
/molewan        NORMAL
[root@LVS-DR01 ~]# aide --init
AIDE, version 0.15.1
### AIDE database at /var/lib/aide/aide.db.new.gz initialized.
初始化的時間會比較長,耐心等待下
[root@LVS-DR01 ~]# mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
說明:根據/etc/aide.conf生成的/var/lib/aide/aide.db.new.gz文件須要重命名
爲/var/lib/aide/aide.db.gz,以便讓AIDE能讀取它

三、模擬在aide監管的目錄下,新添加一個文件vim

[root@LVS-DR01 ~]# cd /molewan/
[root@LVS-DR01 molewan]# cp /etc/passwd .
[root@LVS-DR01 molewan]# ls
passwd

四、執行aide進行檢查服務器

[root@LVS-DR01 molewan]# aide --check
Entry /root/.mysql_history in databases has different attributes: 20000001d 20020001d
AIDE 0.15.1 found differences between database and filesystem!!
Start timestamp: 2017-06-22 10:35:10
Summary:
  Total number of files:272614
  Added files:1
  Removed files:0
  Changed files:3
---------------------------------------------------
Added files:
---------------------------------------------------
added: /molewan/passwd
---------------------------------------------------
Changed files:
---------------------------------------------------
changed: /opt/gitlab/sv/logrotate/supervise/pid
changed: /opt/gitlab/sv/logrotate/supervise/status
changed: /root/.mysql_history
---------------------------------------------------
Detailed information about changes:
---------------------------------------------------
File: /opt/gitlab/sv/logrotate/supervise/pid
SHA256   : 1JSst6Quw/tdtJftiGt/21jUIBRbzOcQ , NUB/zWnJypaqQW2QQcC/Mx5e1QInQn+0
File: /opt/gitlab/sv/logrotate/supervise/status
SHA256   : A/GkExLS7Y1JyYVE4N7/I1pUxRH/xj1P , BKuJ49lWHu2kprL//4A+AO/lJZS7evFx
File: /root/.mysql_history
Perm     : lrwxrwxrwx                       , -rw-------
說明:能夠發現,新添加哪些文件,修改了哪些參數

參考資料:http://os.51cto.com/art/201411/457358.htmide

相關文章
相關標籤/搜索