暫無描述

wazuh_manager.conf 8.7KB

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