Нема описа

wazuh_manager.conf 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <ossec_config>
  2. <global>
  3. <jsonout_output>yes</jsonout_output>
  4. <alerts_log>yes</alerts_log>
  5. <logall>yes</logall>
  6. <logall_json>no</logall_json>
  7. <email_notification>no</email_notification>
  8. <smtp_server>smtp.example.wazuh.com</smtp_server>
  9. <email_from>wazuh@example.wazuh.com</email_from>
  10. <email_to>recipient@example.wazuh.com</email_to>
  11. <email_maxperhour>12</email_maxperhour>
  12. <email_log_source>alerts.log</email_log_source>
  13. <agents_disconnection_time>10m</agents_disconnection_time>
  14. <agents_disconnection_alert_time>0</agents_disconnection_alert_time>
  15. </global>
  16. <alerts>
  17. <log_alert_level>3</log_alert_level>
  18. <email_alert_level>12</email_alert_level>
  19. </alerts>
  20. <!-- Choose between "plain", "json", or "plain,json" for the format of internal logs -->
  21. <logging>
  22. <log_format>plain</log_format>
  23. <rotation>
  24. <enabled>yes</enabled>
  25. <max_size>500M</max_size>
  26. <interval>1d</interval>
  27. <compress>yes</compress>
  28. <saved>7</saved>
  29. </rotation>
  30. </logging>
  31. <remote>
  32. <connection>secure</connection>
  33. <port>1514</port>
  34. <protocol>tcp</protocol>
  35. <queue_size>131072</queue_size>
  36. </remote>
  37. <remote>
  38. <connection>syslog</connection>
  39. <port>514</port>
  40. <protocol>udp</protocol>
  41. <allowed-ips>172.16.22.253/24</allowed-ips>
  42. <allowed-ips>172.16.61.254/24</allowed-ips>
  43. <allowed-ips>172.17.10.253/24</allowed-ips>
  44. <allowed-ips>172.16.164.254/24</allowed-ips>
  45. <allowed-ips>172.16.162.1/24</allowed-ips>
  46. <allowed-ips>172.16.160.253/24</allowed-ips>
  47. <allowed-ips>172.16.165.254/24</allowed-ips>
  48. <allowed-ips>172.16.0.107/32</allowed-ips> <!-- VMware ESXi 8.0 -->
  49. <allowed-ips>172.16.0.108/32</allowed-ips> <!-- VMware ESXi 8.0 -->
  50. <allowed-ips>172.16.0.109/32</allowed-ips> <!-- VMware ESXi 7.0 -->
  51. <allowed-ips>172.16.0.110/32</allowed-ips> <!-- VMware ESXi 7.0 -->
  52. <allowed-ips>172.19.0.0/16</allowed-ips> <!-- Docker bridge — local test only -->
  53. <allowed-ips>127.0.0.1/32</allowed-ips> <!-- loopback — local test only -->
  54. </remote>
  55. <!-- Policy monitoring -->
  56. <rootcheck>
  57. <disabled>no</disabled>
  58. <check_files>yes</check_files>
  59. <check_trojans>yes</check_trojans>
  60. <check_dev>yes</check_dev>
  61. <check_sys>yes</check_sys>
  62. <check_pids>yes</check_pids>
  63. <check_ports>yes</check_ports>
  64. <check_if>yes</check_if>
  65. <!-- Frequency that rootcheck is executed - every 12 hours -->
  66. <frequency>43200</frequency>
  67. <rootkit_files>etc/rootcheck/rootkit_files.txt</rootkit_files>
  68. <rootkit_trojans>etc/rootcheck/rootkit_trojans.txt</rootkit_trojans>
  69. <skip_nfs>yes</skip_nfs>
  70. </rootcheck>
  71. <wodle name="cis-cat">
  72. <disabled>yes</disabled>
  73. <timeout>1800</timeout>
  74. <interval>1d</interval>
  75. <scan-on-start>yes</scan-on-start>
  76. <java_path>wodles/java</java_path>
  77. <ciscat_path>wodles/ciscat</ciscat_path>
  78. </wodle>
  79. <!-- Osquery integration -->
  80. <wodle name="osquery">
  81. <disabled>yes</disabled>
  82. <run_daemon>yes</run_daemon>
  83. <log_path>/var/log/osquery/osqueryd.results.log</log_path>
  84. <config_path>/etc/osquery/osquery.conf</config_path>
  85. <add_labels>yes</add_labels>
  86. </wodle>
  87. <!-- System inventory -->
  88. <wodle name="syscollector">
  89. <disabled>no</disabled>
  90. <interval>1h</interval>
  91. <scan_on_start>yes</scan_on_start>
  92. <hardware>yes</hardware>
  93. <os>yes</os>
  94. <network>yes</network>
  95. <packages>yes</packages>
  96. <ports all="yes">yes</ports>
  97. <processes>yes</processes>
  98. <!-- Database synchronization settings -->
  99. <synchronization>
  100. <max_eps>10</max_eps>
  101. </synchronization>
  102. </wodle>
  103. <sca>
  104. <enabled>yes</enabled>
  105. <scan_on_start>yes</scan_on_start>
  106. <interval>12h</interval>
  107. <skip_nfs>yes</skip_nfs>
  108. </sca>
  109. <vulnerability-detection>
  110. <enabled>yes</enabled>
  111. <index-status>yes</index-status>
  112. <feed-update-interval>60m</feed-update-interval>
  113. </vulnerability-detection>
  114. <indexer>
  115. <enabled>yes</enabled>
  116. <hosts>
  117. <host>https://wazuh.indexer:9200</host>
  118. </hosts>
  119. <ssl>
  120. <certificate_authorities>
  121. <ca>/etc/ssl/root-ca.pem</ca>
  122. </certificate_authorities>
  123. <certificate>/etc/ssl/filebeat.pem</certificate>
  124. <key>/etc/ssl/filebeat.key</key>
  125. </ssl>
  126. </indexer>
  127. <!-- File integrity monitoring -->
  128. <syscheck>
  129. <disabled>no</disabled>
  130. <!-- Frequency that syscheck is executed default every 12 hours -->
  131. <frequency>43200</frequency>
  132. <scan_on_start>yes</scan_on_start>
  133. <!-- Generate alert when new file detected -->
  134. <alert_new_files>yes</alert_new_files>
  135. <!-- Don't ignore files that change more than 'frequency' times -->
  136. <auto_ignore frequency="10" timeframe="3600">no</auto_ignore>
  137. <!-- Directories to check (perform all possible verifications) -->
  138. <directories>/etc,/usr/bin,/usr/sbin</directories>
  139. <directories>/bin,/sbin,/boot</directories>
  140. <!-- Files/directories to ignore -->
  141. <ignore>/etc/mtab</ignore>
  142. <ignore>/etc/hosts.deny</ignore>
  143. <ignore>/etc/mail/statistics</ignore>
  144. <ignore>/etc/random-seed</ignore>
  145. <ignore>/etc/random.seed</ignore>
  146. <ignore>/etc/adjtime</ignore>
  147. <ignore>/etc/httpd/logs</ignore>
  148. <ignore>/etc/utmpx</ignore>
  149. <ignore>/etc/wtmpx</ignore>
  150. <ignore>/etc/cups/certs</ignore>
  151. <ignore>/etc/dumpdates</ignore>
  152. <ignore>/etc/svc/volatile</ignore>
  153. <!-- File types to ignore -->
  154. <ignore type="sregex">.log$|.swp$</ignore>
  155. <!-- Check the file, but never compute the diff -->
  156. <nodiff>/etc/ssl/private.key</nodiff>
  157. <skip_nfs>yes</skip_nfs>
  158. <skip_dev>yes</skip_dev>
  159. <skip_proc>yes</skip_proc>
  160. <skip_sys>yes</skip_sys>
  161. <!-- Nice value for Syscheck process -->
  162. <process_priority>10</process_priority>
  163. <!-- Maximum output throughput -->
  164. <max_eps>100</max_eps>
  165. <!-- Database synchronization settings -->
  166. <synchronization>
  167. <enabled>yes</enabled>
  168. <interval>5m</interval>
  169. <max_interval>1h</max_interval>
  170. <max_eps>10</max_eps>
  171. </synchronization>
  172. </syscheck>
  173. <!-- Active response -->
  174. <global>
  175. <white_list>127.0.0.1</white_list>
  176. <white_list>^localhost.localdomain$</white_list>
  177. </global>
  178. <command>
  179. <name>disable-account</name>
  180. <executable>disable-account</executable>
  181. <timeout_allowed>yes</timeout_allowed>
  182. </command>
  183. <command>
  184. <name>restart-wazuh</name>
  185. <executable>restart-wazuh</executable>
  186. </command>
  187. <command>
  188. <name>firewall-drop</name>
  189. <executable>firewall-drop</executable>
  190. <timeout_allowed>yes</timeout_allowed>
  191. </command>
  192. <command>
  193. <name>host-deny</name>
  194. <executable>host-deny</executable>
  195. <timeout_allowed>yes</timeout_allowed>
  196. </command>
  197. <command>
  198. <name>route-null</name>
  199. <executable>route-null</executable>
  200. <timeout_allowed>yes</timeout_allowed>
  201. </command>
  202. <command>
  203. <name>win_route-null</name>
  204. <executable>route-null.exe</executable>
  205. <timeout_allowed>yes</timeout_allowed>
  206. </command>
  207. <command>
  208. <name>netsh</name>
  209. <executable>netsh.exe</executable>
  210. <timeout_allowed>yes</timeout_allowed>
  211. </command>
  212. <!--
  213. <active-response>
  214. active-response options here
  215. </active-response>
  216. -->
  217. <!-- Log analysis -->
  218. <localfile>
  219. <log_format>command</log_format>
  220. <command>df -P</command>
  221. <frequency>360</frequency>
  222. </localfile>
  223. <localfile>
  224. <log_format>full_command</log_format>
  225. <command>netstat -tulpn | sed 's/\([[:alnum:]]\+\)\ \+[[:digit:]]\+\ \+[[:digit:]]\+\ \+\(.*\):\([[:digit:]]*\)\ \+\([0-9\.\:\*]\+\).\+\ \([[:digit:]]*\/[[:alnum:]\-]*\).*/\1 \2 == \3 == \4 \5/' | sort -k 4 -g | sed 's/ == \(.*\) ==/:\1/' | sed 1,2d</command>
  226. <alias>netstat listening ports</alias>
  227. <frequency>360</frequency>
  228. </localfile>
  229. <localfile>
  230. <log_format>full_command</log_format>
  231. <command>last -n 20</command>
  232. <frequency>360</frequency>
  233. </localfile>
  234. <ruleset>
  235. <!-- Default ruleset -->
  236. <decoder_dir>ruleset/decoders</decoder_dir>
  237. <rule_dir>ruleset/rules</rule_dir>
  238. <rule_exclude>0215-policy_rules.xml</rule_exclude>
  239. <list>etc/lists/audit-keys</list>
  240. <list>etc/lists/amazon/aws-eventnames</list>
  241. <list>etc/lists/security-eventchannel</list>
  242. <list>etc/lists/malicious-ioc/malicious-ip</list>
  243. <list>etc/lists/malicious-ioc/malicious-domains</list>
  244. <list>etc/lists/malicious-ioc/malware-hashes</list>
  245. <!-- User-defined ruleset -->
  246. <decoder_dir>etc/decoders</decoder_dir>
  247. <rule_dir>etc/rules</rule_dir>
  248. </ruleset>
  249. <rule_test>
  250. <enabled>yes</enabled>
  251. <threads>1</threads>
  252. <max_sessions>64</max_sessions>
  253. <session_timeout>15m</session_timeout>
  254. </rule_test>
  255. <!-- Configuration for wazuh-authd -->
  256. <auth>
  257. <disabled>no</disabled>
  258. <port>1515</port>
  259. <use_source_ip>no</use_source_ip>
  260. <purge>yes</purge>
  261. <use_password>no</use_password>
  262. <ciphers>HIGH:!ADH:!EXP:!MD5:!RC4:!3DES:!CAMELLIA:@STRENGTH</ciphers>
  263. <!-- <ssl_agent_ca></ssl_agent_ca> -->
  264. <ssl_verify_host>no</ssl_verify_host>
  265. <ssl_manager_cert>etc/sslmanager.cert</ssl_manager_cert>
  266. <ssl_manager_key>etc/sslmanager.key</ssl_manager_key>
  267. <ssl_auto_negotiate>no</ssl_auto_negotiate>
  268. </auth>
  269. <cluster>
  270. <name>wazuh</name>
  271. <node_name>node01</node_name>
  272. <node_type>master</node_type>
  273. <key>aa093264ef885029653eea20dfcf51ae</key>
  274. <port>1516</port>
  275. <bind_addr>0.0.0.0</bind_addr>
  276. <nodes>
  277. <node>wazuh.manager</node>
  278. </nodes>
  279. <hidden>no</hidden>
  280. <disabled>yes</disabled>
  281. </cluster>
  282. </ossec_config>
  283. <ossec_config>
  284. <localfile>
  285. <log_format>syslog</log_format>
  286. <location>/var/ossec/logs/active-responses.log</location>
  287. </localfile>
  288. </ossec_config>