{"id":468801,"date":"2025-07-27T21:00:24","date_gmt":"2025-07-27T21:00:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=468801"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=468801","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0434\u043b\u044f PostgreSQL \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 auditd \u0432 Wazuh<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>Wazuh \u2014 \u043c\u043e\u0449\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0434\u043b\u044f \u043b\u043e\u0433\u043e\u0432 PostgreSQL, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 auditd \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043b\u043e\u0433\u043e\u0432. <\/p>\n<h3>\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u043e\u0432 PostgreSQL<\/h3>\n<p>\u041b\u043e\u0433\u0438 PostgreSQL \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 CSV, \u0435\u0441\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 log_line_prefix. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043b\u043e\u0433\u0430:<\/p>\n<pre><code>Jul 13 22:55:56 databases postgresql: 2025-07-13 22:55:55.221 +03,\"testuser\",\"testdb\",67399,\"localhost:35366\",68740f4b.10747,2,\"authentication\",2025-07-13 22:55:55 +03,3\/14,0,LOG,00000,\"connection authenticated: identity=\"\"testuser\"\" method=scram-sha-256 (\/etc\/postgresql\/16\/main\/pg_hba.conf:125)\",,,,,,,,\"set_authn_id, auth.c:369\",\"\",\"client backend\",,0 Jul 13 22:56:56 databases postgresql: 2025-07-13 22:56:56.034 +03,\"testuser\",\"testdb\",67399,\"localhost:35366\",68740f4b.10747,5,\"ALTER ROLE\",2025-07-13 22:55:55 +03,3\/16,0,ERROR,42501,\"permission denied to rename role\",\"Only roles with the CREATEROLE attribute and the ADMIN option on role \"\"testrole\"\" may rename this role.\",,,,,\"ALTER ROLE testrole RENAME TO new_testrole;\",,\"RenameRole, user.c:1430\",\"psql\",\"client backend\",,0<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u043b\u043e\u0433\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0446\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e: \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, IP-\u0430\u0434\u0440\u0435\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043a\u043e\u0434\u044b \u043e\u0448\u0438\u0431\u043e\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b Wazuh \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c CSV-\u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430: \u0430\u0433\u0435\u043d\u0442\u044b \u0438 \u0433\u0440\u0443\u043f\u043f\u044b<\/h3>\n<p>\u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u043e\u0432 Wazuh \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 postgre, \u043a\u0443\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0430\u0433\u0435\u043d\u0442 \u0441 PostgreSQL. \u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 CSV-\u043b\u043e\u0433\u043e\u0432, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 Syslog. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 \/var\/ossec\/etc\/shared\/postgre\/agent.conf \u0447\u0435\u0440\u0435\u0437 CLI, \u043b\u0438\u0431\u043e Agents management-&gt;Groups-&gt;postgre-&gt;Files-&gt;agent.conf \u0447\u0435\u0440\u0435\u0437 Web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/p>\n<pre><code>&lt;agent_config&gt;   &lt;localfile&gt;     &lt;location&gt;\/var\/log\/postgresql\/postgresql-*.csv&lt;\/location&gt;     &lt;log_format&gt;syslog&lt;\/log_format&gt;     &lt;out_format&gt;$(timestamp) $(hostname) postgresql: $(log)&lt;\/out_format&gt;   &lt;\/localfile&gt; &lt;\/agent_config&gt;<\/code><\/pre>\n<ul>\n<li>\n<p>&lt;location&gt; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u043b\u043e\u0433\u0430\u043c PostgreSQL (\u043c\u0430\u0441\u043a\u0430 *.csv \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b).<\/p>\n<\/li>\n<li>\n<p>&lt;log_format&gt;syslog&lt;\/log_format&gt; \u0433\u043e\u0432\u043e\u0440\u0438\u0442 Wazuh \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u043a\u0430\u043a Syslog.<\/p>\n<\/li>\n<li>\n<p>&lt;out_format&gt; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 postgresql, \u0447\u0442\u043e\u0431\u044b \u043b\u043e\u0433\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 Syslog-\u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u0430\u0440\u0441\u0438\u043b\u0438\u0441\u044c \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0438\u043f\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0434\u043b\u044f PostgreSQL<\/h3>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440 \u0434\u043b\u044f PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u0438\u0437 CSV-\u043b\u043e\u0433\u043e\u0432. \u0424\u0430\u0439\u043b \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \/var\/ossec\/etc\/decoders\/postgresql_custom.xml (\u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u0443) \u044d\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 CLI, Server management -&gt; Decoders -&gt; Add new decoders file \u0447\u0435\u0440\u0435\u0437 Web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/p>\n<pre><code>&lt;decoder name=\"postgresql\"&gt;   &lt;program_name&gt;postgresql&lt;\/program_name&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,](.+?)\",&lt;\/regex&gt;   &lt;order&gt;srcuser&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,](.+?)\",&lt;\/regex&gt;   &lt;order&gt;database&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,(\\d+)&lt;\/regex&gt;   &lt;order&gt;process_id&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,\"(\\S+):&lt;\/regex&gt;   &lt;order&gt;srcip&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,\"\\S+:(\\d+)&lt;\/regex&gt;   &lt;order&gt;srcport&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,(.+?),&lt;\/regex&gt;   &lt;order&gt;session_id&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\"(.+?)\"?,&lt;\/regex&gt;   &lt;order&gt;command_tag&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,(.+?),&lt;\/regex&gt;   &lt;order&gt;error_severity&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;(authentication\\s+failed)&lt;\/regex&gt;   &lt;order&gt;message&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\"(.+?):&lt;\/regex&gt;   &lt;order&gt;message&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\"(.+?):&lt;\/regex&gt;   &lt;order&gt;message&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\"\"(.+?);&lt;\/regex&gt;   &lt;order&gt;command&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,(.+?);&lt;\/regex&gt;   &lt;order&gt;command&lt;\/order&gt; &lt;\/decoder&gt;<\/code><\/pre>\n<ul>\n<li>\n<p>\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?  &#8212; \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 YYYY-MM-DD HH:MM:SS.sss.<\/p>\n<\/li>\n<li>\n<p>[^,]* \u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u043e\u043b\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438, \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>(.+?) \u2014 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a (authentication\\s+failed), \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>\u0417\u0430\u0447\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434?<\/h4>\n<p><strong>\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 <\/strong>postgresql: \u0424\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u043b\u043e\u0433\u0438 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b postgresql, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0430\u0433\u0435\u043d\u0442\u0430. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. <strong>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b <\/strong>postgresql-fields: \u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, srcuser, database, srcip) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 PCRE2. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 CSV-\u043b\u043e\u0433\u043e\u0432, \u0433\u0434\u0435 \u043f\u043e\u043b\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f. <strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b?<\/strong> \u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<h3>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 auditd<\/h3>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 \/var\/ossec\/etc\/ossec.conf \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (Server management -&gt; Settings -&gt; Edit configuration) \u0432 \u0431\u043b\u043e\u043a <code>&lt;ruleset&gt; &lt;\/ruleset&gt;<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code>&lt;ruleset&gt;   &lt;rule_exclude&gt;0365-auditd_rules.xml&lt;\/rule_exclude&gt;   &lt;decoder_exclude&gt;ruleset\/decoders\/0040-auditd_decoders.xml&lt;\/decoder_exclude&gt; &lt;\/ruleset&gt;<\/code><\/pre>\n<p><strong>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/strong><\/p>\n<ul>\n<li>\n<p>\u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 auditd (0040-auditd_decoders.xml) \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 (0365-auditd_rules.xml) \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u043e\u043c, \u0442\u0430\u043a \u043a\u0430\u043a Wazuh \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b \u0432 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 Wazuh \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Wazuh \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u043d\u043e\u0434\u0430\u0445 \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 auditd<\/h4>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \/var\/ossec\/ruleset\/decoders\/0040-auditd_decoders.xml \u0432 \/var\/ossec\/etc\/decoders\/0040-auditd_decoders.xml. \u042d\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043f\u0440\u0438 execve:<\/p>\n<pre><code>&lt;!--....--&gt; &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;a6=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a6&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;a7=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a7&lt;\/order&gt; &lt;\/decoder&gt; &lt;!--\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f--&gt; &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;a8=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a8&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;9=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a9&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;a10=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a10&lt;\/order&gt; &lt;\/decoder&gt;  &lt;!--....--&gt;<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0443\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 \/var\/ossec\/etc\/ossec.conf (Server management -&gt; Settings -&gt; Edit configuration) \u0432 \u0431\u043b\u043e\u043a\u0435 <code>&lt;ruleset&gt; &lt;\/ruleset&gt;<\/code>:<\/p>\n<pre><code>&lt;ruleset&gt;   &lt;decoder_exclude&gt;ruleset\/decoders\/0040-auditd_decoders.xml&lt;\/decoder_exclude&gt; &lt;\/ruleset&gt;<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0434\u043b\u044f PostgreSQL \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0434\u0435\u043a\u043e\u0434\u0435\u0440 auditd \u0432 Wazuh. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/931524\/\"> https:\/\/habr.com\/ru\/articles\/931524\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>Wazuh \u2014 \u043c\u043e\u0449\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0434\u043b\u044f \u043b\u043e\u0433\u043e\u0432 PostgreSQL, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 auditd \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043b\u043e\u0433\u043e\u0432. <\/p>\n<h3>\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u043e\u0432 PostgreSQL<\/h3>\n<p>\u041b\u043e\u0433\u0438 PostgreSQL \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 CSV, \u0435\u0441\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 log_line_prefix. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043b\u043e\u0433\u0430:<\/p>\n<pre><code>Jul 13 22:55:56 databases postgresql: 2025-07-13 22:55:55.221 +03,\"testuser\",\"testdb\",67399,\"localhost:35366\",68740f4b.10747,2,\"authentication\",2025-07-13 22:55:55 +03,3\/14,0,LOG,00000,\"connection authenticated: identity=\"\"testuser\"\" method=scram-sha-256 (\/etc\/postgresql\/16\/main\/pg_hba.conf:125)\",,,,,,,,\"set_authn_id, auth.c:369\",\"\",\"client backend\",,0 Jul 13 22:56:56 databases postgresql: 2025-07-13 22:56:56.034 +03,\"testuser\",\"testdb\",67399,\"localhost:35366\",68740f4b.10747,5,\"ALTER ROLE\",2025-07-13 22:55:55 +03,3\/16,0,ERROR,42501,\"permission denied to rename role\",\"Only roles with the CREATEROLE attribute and the ADMIN option on role \"\"testrole\"\" may rename this role.\",,,,,\"ALTER ROLE testrole RENAME TO new_testrole;\",,\"RenameRole, user.c:1430\",\"psql\",\"client backend\",,0<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u043b\u043e\u0433\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0446\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e: \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, IP-\u0430\u0434\u0440\u0435\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043a\u043e\u0434\u044b \u043e\u0448\u0438\u0431\u043e\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b Wazuh \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c CSV-\u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430: \u0430\u0433\u0435\u043d\u0442\u044b \u0438 \u0433\u0440\u0443\u043f\u043f\u044b<\/h3>\n<p>\u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u043e\u0432 Wazuh \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 postgre, \u043a\u0443\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0430\u0433\u0435\u043d\u0442 \u0441 PostgreSQL. \u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 CSV-\u043b\u043e\u0433\u043e\u0432, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 Syslog. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 \/var\/ossec\/etc\/shared\/postgre\/agent.conf \u0447\u0435\u0440\u0435\u0437 CLI, \u043b\u0438\u0431\u043e Agents management-&gt;Groups-&gt;postgre-&gt;Files-&gt;agent.conf \u0447\u0435\u0440\u0435\u0437 Web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/p>\n<pre><code>&lt;agent_config&gt;   &lt;localfile&gt;     &lt;location&gt;\/var\/log\/postgresql\/postgresql-*.csv&lt;\/location&gt;     &lt;log_format&gt;syslog&lt;\/log_format&gt;     &lt;out_format&gt;$(timestamp) $(hostname) postgresql: $(log)&lt;\/out_format&gt;   &lt;\/localfile&gt; &lt;\/agent_config&gt;<\/code><\/pre>\n<ul>\n<li>\n<p>&lt;location&gt; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u043b\u043e\u0433\u0430\u043c PostgreSQL (\u043c\u0430\u0441\u043a\u0430 *.csv \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b).<\/p>\n<\/li>\n<li>\n<p>&lt;log_format&gt;syslog&lt;\/log_format&gt; \u0433\u043e\u0432\u043e\u0440\u0438\u0442 Wazuh \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u043a\u0430\u043a Syslog.<\/p>\n<\/li>\n<li>\n<p>&lt;out_format&gt; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 postgresql, \u0447\u0442\u043e\u0431\u044b \u043b\u043e\u0433\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 Syslog-\u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u0430\u0440\u0441\u0438\u043b\u0438\u0441\u044c \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0438\u043f\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0434\u043b\u044f PostgreSQL<\/h3>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440 \u0434\u043b\u044f PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u0438\u0437 CSV-\u043b\u043e\u0433\u043e\u0432. \u0424\u0430\u0439\u043b \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \/var\/ossec\/etc\/decoders\/postgresql_custom.xml (\u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u0443) \u044d\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 CLI, Server management -&gt; Decoders -&gt; Add new decoders file \u0447\u0435\u0440\u0435\u0437 Web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/p>\n<pre><code>&lt;decoder name=\"postgresql\"&gt;   &lt;program_name&gt;postgresql&lt;\/program_name&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,](.+?)\",&lt;\/regex&gt;   &lt;order&gt;srcuser&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,](.+?)\",&lt;\/regex&gt;   &lt;order&gt;database&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,(\\d+)&lt;\/regex&gt;   &lt;order&gt;process_id&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,\"(\\S+):&lt;\/regex&gt;   &lt;order&gt;srcip&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,\"\\S+:(\\d+)&lt;\/regex&gt;   &lt;order&gt;srcport&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,(.+?),&lt;\/regex&gt;   &lt;order&gt;session_id&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\"(.+?)\"?,&lt;\/regex&gt;   &lt;order&gt;command_tag&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,(.+?),&lt;\/regex&gt;   &lt;order&gt;error_severity&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;(authentication\\s+failed)&lt;\/regex&gt;   &lt;order&gt;message&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\"(.+?):&lt;\/regex&gt;   &lt;order&gt;message&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\"(.+?):&lt;\/regex&gt;   &lt;order&gt;message&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\"\"(.+?);&lt;\/regex&gt;   &lt;order&gt;command&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"postgresql-fields\"&gt;   &lt;parent&gt;postgresql&lt;\/parent&gt;   &lt;regex type=\"pcre2\"&gt;\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,(.+?);&lt;\/regex&gt;   &lt;order&gt;command&lt;\/order&gt; &lt;\/decoder&gt;<\/code><\/pre>\n<ul>\n<li>\n<p>\\d+-\\d+-\\d+\\s+\\d+:\\d+:\\d+\\.\\d+.+?  &#8212; \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 YYYY-MM-DD HH:MM:SS.sss.<\/p>\n<\/li>\n<li>\n<p>[^,]* \u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u043e\u043b\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438, \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>(.+?) \u2014 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a (authentication\\s+failed), \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>\u0417\u0430\u0447\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434?<\/h4>\n<p><strong>\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 <\/strong>postgresql: \u0424\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u043b\u043e\u0433\u0438 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b postgresql, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0430\u0433\u0435\u043d\u0442\u0430. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. <strong>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b <\/strong>postgresql-fields: \u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, srcuser, database, srcip) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 PCRE2. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 CSV-\u043b\u043e\u0433\u043e\u0432, \u0433\u0434\u0435 \u043f\u043e\u043b\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f. <strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b?<\/strong> \u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<h3>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 auditd<\/h3>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 \/var\/ossec\/etc\/ossec.conf \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (Server management -&gt; Settings -&gt; Edit configuration) \u0432 \u0431\u043b\u043e\u043a <code>&lt;ruleset&gt; &lt;\/ruleset&gt;<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code>&lt;ruleset&gt;   &lt;rule_exclude&gt;0365-auditd_rules.xml&lt;\/rule_exclude&gt;   &lt;decoder_exclude&gt;ruleset\/decoders\/0040-auditd_decoders.xml&lt;\/decoder_exclude&gt; &lt;\/ruleset&gt;<\/code><\/pre>\n<p><strong>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/strong><\/p>\n<ul>\n<li>\n<p>\u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 auditd (0040-auditd_decoders.xml) \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 (0365-auditd_rules.xml) \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u043e\u043c, \u0442\u0430\u043a \u043a\u0430\u043a Wazuh \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u044b \u0432 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 Wazuh \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Wazuh \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u043d\u043e\u0434\u0430\u0445 \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 auditd<\/h4>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \/var\/ossec\/ruleset\/decoders\/0040-auditd_decoders.xml \u0432 \/var\/ossec\/etc\/decoders\/0040-auditd_decoders.xml. \u042d\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043f\u0440\u0438 execve:<\/p>\n<pre><code>&lt;!--....--&gt; &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;a6=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a6&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;a7=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a7&lt;\/order&gt; &lt;\/decoder&gt; &lt;!--\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f--&gt; &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;a8=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a8&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;9=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a9&lt;\/order&gt; &lt;\/decoder&gt;  &lt;decoder name=\"auditd-syscall\"&gt;   &lt;parent&gt;auditd&lt;\/parent&gt;   &lt;regex offset=\"after_regex\"&gt;a10=\"(\\.+)\" &lt;\/regex&gt;   &lt;order&gt;audit.execve.a10&lt;\/order&gt; &lt;\/decoder&gt;  &lt;!--....--&gt;<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0443\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 \/var\/ossec\/etc\/ossec.conf (Server management -&gt; Settings -&gt; Edit configuration) \u0432 \u0431\u043b\u043e\u043a\u0435 <code>&lt;ruleset&gt; &lt;\/ruleset&gt;<\/code>:<\/p>\n<pre><code>&lt;ruleset&gt;   &lt;decoder_exclude&gt;ruleset\/decoders\/0040-auditd_decoders.xml&lt;\/decoder_exclude&gt; &lt;\/ruleset&gt;<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0434\u0435\u043a\u043e\u0434\u0435\u0440 \u0434\u043b\u044f PostgreSQL \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0434\u0435\u043a\u043e\u0434\u0435\u0440 auditd \u0432 Wazuh. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/931524\/\"> https:\/\/habr.com\/ru\/articles\/931524\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-468801","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=468801"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468801\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}