User Tools

Site Tools


сервис_ossec

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
сервис_ossec [2019/03/15 16:07]
val
сервис_ossec [2024/05/15 09:20]
val
Line 3: Line 3:
   * [[https://​ru.wikipedia.org/​wiki/​OSSEC|OSSEC — Википедия]]   * [[https://​ru.wikipedia.org/​wiki/​OSSEC|OSSEC — Википедия]]
  
-  * [[http://forum.lissyara.su/viewtopic.php?​t=9588|www.lissyara.su - статья об OSSEC]] +  * [[https://habr.com/​ru/​post/​262479/|Инструкция: внедряем HIDS OSSEC]]
-  * [[http://​ossec-docs.readthedocs.io/​en/​latest/​manual/​agent/​agent-management.html|Managing Agents]] +
-  * [[http://​ossec-docs.readthedocs.io/​en/​latest/​faq/​syscheck.html|Syscheck:​ FAQ - How to force an immediate syscheck scan?]]+
  
   * [[http://​www.ossec.net/​downloads.html|OSSEC Downloads]]   * [[http://​www.ossec.net/​downloads.html|OSSEC Downloads]]
Line 11: Line 9:
 ===== Debian ===== ===== Debian =====
  
-==== Подключение =====+==== Подключение ​репозитория ​=====
 <​code>​ <​code>​
 # wget -q -O - https://​updates.atomicorp.com/​installers/​atomic | bash # wget -q -O - https://​updates.atomicorp.com/​installers/​atomic | bash
Line 21: Line 19:
 ==== Установка и запуск сервера ==== ==== Установка и запуск сервера ====
 <​code>​ <​code>​
-# apt install ossec-hids-server+lan# apt install ossec-hids-server
  
-# /​var/​ossec/​bin/​ossec-control start +lan# /​var/​ossec/​bin/​agent_control ​-l 
-возможно, ​лучше +... 
-systemctl status ​ossec.service+</​code>​ 
 + 
 +==== Настройка сервера для подключения агента ==== 
 +<​code>​ 
 +lan/var/ossec/​bin/​manage_agents 
 +... 
 +   (A)dd an agent (A). 
 +... 
 +Agent information:​ 
 +   ​ID:​001 
 +   ​Name:​server 
 +   IP Address:​192.168.X.10 
 +... 
 +   ​(E)xtract key for an agent (E). 
 +... 
 + 
 +lan# /​var/​ossec/​bin/​ossec-control restart
  
-# ss -panu | grep 1514+lan# ss -panu | grep 1514
 </​code>​ </​code>​
  
-==== Установка ​и запуск агента ====+==== Установказапуск ​и подключение ​агента ====
  
-Похоже,​ нельзя ставить вместе с сервером.+=== Windows === 
 + 
 +  * [[https://​www.ossec.net/​docs/​docs/​manual/​installation/​installation-windows.html|Windows Agent Installation]] 
 + 
 +=== Debian/​Ubuntu ===
  
 <​code>​ <​code>​
-# apt install ossec-hids-agent+server# apt install ossec-hids-agent
  
-# vim /​var/​ossec/​etc/​ossec.conf+server# vim /​var/​ossec/​etc/​ossec.conf 
 +</​code><​code>​
 <​ossec_config>​ <​ossec_config>​
   <​client>​   <​client>​
-    <​server-ip>​192.168.155.10</​server-ip>​+    <​server-ip>​192.168.100+X.10</​server-ip>​
 ... ...
 +</​code><​code>​
 +server# /​var/​ossec/​bin/​manage_agents
 +...
 +   ​(I)mport key from the server (I).
 +...
 +
 +server# /​var/​ossec/​bin/​ossec-control start
 </​code>​ </​code>​
  
-==== Подключение агента ==== +==== Проверка подключения агента ====
-С двух сторон запускаем:​+
 <​code>​ <​code>​
-# /​var/​ossec/​bin/​manage_agents+lan# /​var/​ossec/​bin/​agent_control -i 001 
 +...
 </​code>​ </​code>​
 +==== Контроль целостности файлов ====
 +<​code>​
 +server# cat /​var/​ossec/​etc/​ossec.conf
 +</​code><​code>​
 +...
 +  <​syscheck>​
 +    <!-- Frequency that syscheck is executed (default every 2 hours) -->
 +    <​frequency>​300</​frequency>​
 +    <​auto_ignore>​no</​auto_ignore>​
 +    <​directories check_all="​yes">/​usr/​local/​sbin</​directories>​
 +...
 +</​code><​code>​
 +server# /​var/​ossec/​bin/​ossec-control restart
 +</​code>​
 +
 ==== Просмотр отчетов ==== ==== Просмотр отчетов ====
  
-https://​ossec-docs.readthedocs.io/en/latest/​programs/​ossec-reportd.html+  * [[https://www.ossec.net/docs/docs/​programs/​ossec-reportd.html|ossec-reportd]] 
 +  * [[https://​www.ossec.net/​docs/​manual/​output/​reports-email-output.html|Daily E-Mail Reports]]
  
 <​code>​ <​code>​
-# cat /​var/​ossec/​logs/​alerts/​alerts.log | /​var/​ossec/​bin/​ossec-reportd -f level 1+lan# cat /​var/​ossec/​logs/​alerts/​alerts.log 
 + 
 +lan# cat /​var/​ossec/​logs/​alerts/​alerts.log | /​var/​ossec/​bin/​ossec-reportd -f level 
 + 
 +lan# cat /​var/​ossec/​logs/​alerts/​alerts.log | /​var/​ossec/​bin/​ossec-reportd -f group authentication -r user srcip
 </​code>​ </​code>​
сервис_ossec.txt · Last modified: 2024/05/15 10:32 by val