{"id":366375,"date":"2024-05-21T02:57:55","date_gmt":"2024-05-21T02:57:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=366375"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=366375","title":{"rendered":"<span>\u0423\u0447\u0438\u043c\u0441\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430 Linux<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/84e\/253\/8fc\/84e2538fca68345c8bdccab09dcb5b6b.jpg\" width=\"781\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/84e\/253\/8fc\/84e2538fca68345c8bdccab09dcb5b6b.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435\u0445 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0420\u043e\u043c\u0430, \u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u041e\u0421 Linux \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u043e\u0439 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/www.ptsecurity.com\/ru-ru\/services\/esc\/\">PT Expert Security Center<\/a>.<\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u0438\u0432\u044b \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e \u043e\u0431\u043c\u0435\u043d\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043e\u0431 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u043c\u043d\u043e\u0433\u0438\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Linux-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u041e\u0421 \u2014 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0430\u0443\u0434\u0438\u0442\u0430 Linux (auditd). \u041f\u0440\u0438 \u0434\u043e\u043b\u0436\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c \u043f\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f auditd \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0418\u0411 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430\u043c\u0438\u00a0<a href=\"https:\/\/www.ptsecurity.com\/ru-ru\/products\/mpsiem\/\">MaxPatrol SIEM<\/a>. \u041f\u0440\u0438 \u0438\u0445 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u044b \u0441\u0442\u0430\u0440\u0430\u043b\u0438\u0441\u044c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:<\/p>\n<ol>\n<li>\n<p>\u0421\u0432\u044f\u0437\u0430\u043d\u044b \u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439? \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c?<\/p>\n<\/li>\n<li>\n<p>\u0427\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438\u00a0<code>type=XXX<\/code><em>\u00a0<\/em>\u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435, \u0438 \u043a\u0430\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043d\u0438\u0445?<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0442\u0438\u043f\u0430\u00a0<code>type=USER_*<\/code>\u00a0\u0438\u00a0<code>type=CRED_*<\/code>\u00a0\u043f\u0440\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u044f <code>type<\/code> \u043c\u043e\u0433\u0443\u0442 \u043d\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439 \u0438 \u043a\u0430\u043a \u0438\u0445 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 SIEM?<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u043c\u043d\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0447\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 man (\u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 Linux). \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0436\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b, \u0438 \u0438\u0445 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u044f\u0441\u043d\u044f\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 auditd: audit-kernel\u00a0<a href=\"https:\/\/github.com\/linux-audit\/audit-kernel\/tree\/v6.4\">6.4<\/a>\u00a0\u0438 audit-userspace\u00a0<a href=\"https:\/\/github.com\/linux-audit\/audit-userspace\/tree\/v3.1.2\">3.1.2<\/a>. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 MaxPatrol SIEM. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438\u00a0<a href=\"https:\/\/github.com\/Security-Experts-Community\/open-xp-rules\/tree\/master\/packages\/system\/normalization_formulas\/UNIX_like\/auditd\/syslog_structured\">Security Experts Community<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 <\/summary>\n<div class=\"spoiler__content\">\n<p><a href=\"#1\">\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/a><\/p>\n<p><a href=\"#2\">\u0421\u043e\u0431\u044b\u0442\u0438\u044f<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#2\">\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#2\">LOGIN<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\">DAEMON_START \/ DAEMON_END<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">CONFIG_CHANGE<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p><a href=\"#5\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: SYSCALL<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#6\">\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0437\u043e\u0432\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#8\">\u041f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0430\u043c: SYSCALL \u0438 PATH<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#9\">\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#10\">\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#11\">\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0435\u0441\u0441\u0438\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#12\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#13\">\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0430\u0443\u0434\u0438\u0442\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p><a href=\"#14\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: PROCTITLE<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#15\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: CWD<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#16\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: EXECVE<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#17\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: SOCKADDR<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#18\">\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u041f\u041e (USER_*, CRED_*, etc)<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a href=\"#19\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/h2>\n<p>\u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 Linux\u00a0\u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u044f\u0434\u0440\u0430, \u043d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u043d\u0438\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c06\/860\/a07\/c06860a07ed2b6324f1eb323c40aebc8.png\" alt=\"\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430 Linux\" title=\"\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430 Linux   \" width=\"987\" height=\"573\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c06\/860\/a07\/c06860a07ed2b6324f1eb323c40aebc8.png\"\/><\/p>\n<div><figcaption>\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430 Linux<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u044f\u0434\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 netlink-\u0441\u043e\u043a\u0435\u0442. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 auditd \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0443\u0437\u043b\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u0442.\u043f. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libaudit \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 auditd, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b <em>audit.log<\/em>.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435\u00a0\u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<blockquote>\n<p><code>type=SYSCALL msg=audit(1663937111.702:73702361): arch=c000003e syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 items=2 ppid=1736 pid=3202324 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 tty=(none) ses=4294967295 comm=\"ps\" exe=\"\/usr\/bin\/ps\" key=\"execve_rule\" ARCH=x86_64 SYSCALL=execve AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code><\/p>\n<p><code>type=EXECVE msg=audit(1663937111.702:73702361): argc=5 a0=\"ps\" a1=\"-o\" a2=\"rss=\" a3=\"-p\" a4=\"1736\"<\/code><\/p>\n<p><code>type=CWD msg=audit(1663937111.702:73702361) cwd=\"\/opt\/gitlab\/sv\/gitlab-exporter\"<\/code><\/p>\n<p><code>type=PROCTITLE msg=audit(1663937111.702:73702361): proctitle=7073002D6F007273733D002D700031373336<\/code><\/p>\n<\/blockquote>\n<p>\u041e\u043d\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0447\u0438\u0441\u043b\u0443-\u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0443, \u0438\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f (73702361 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435). \u0411\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e\u00a0<code>audit_id<\/code>. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u201c1\u201d, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 1. \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 MaxPatrol SIEM \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u0443\u0434\u043e\u0431\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438. \u041e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0438\u043c\u0435\u043d\u0430.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c.<\/p>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f<\/h2>\n<h3>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u044b, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<h4>LOGIN<\/h4>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u043e\u0431\u0437\u043e\u0440 \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u00a0<code>LOGIN<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0433\u043e (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439\u00a0<code>auid<\/code>\u00a0\u0438\u00a0<code>ses<\/code>) \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041e\u043d\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:<\/p>\n<blockquote>\n<p><code>type=LOGIN msg=audit(1705079372.663:35922): pid=1868146 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=24982 res=1 UID=\"root\" OLD-AUID=\"unset\" AUID=\"zabbix\"<\/code><\/p>\n<p><code>type=SYSCALL msg=audit(1693231661.663:35922): arch=c000003e syscall=1 success=yes exit=4 a0=3 a1=7ffea4955270 a2=4 a3=7f8fa0234371 items=0 ppid=1429800 pid=1868146 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=24982 comm=\"sshd\" exe=\"\/usr\/sbin\/sshd\" key=(null) ARCH=x86_64 SYSCALL=write AUID=\"zabbix\" UID=\"root\" GID=\"root\" EUID=\"root\" SUID=\"root\" FSUID=\"root\" EGID=\"root\" SGID=\"root\" FSGID=\"root\"<\/code><\/p>\n<p><code>type=PROCTITLE msg=audit(1693231661.663:35922): proctitle=2F7573722F7362696E2F73736864002D44002D52<\/code><\/p>\n<\/blockquote>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/kernel\/audit.c#L2308 static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid, unsigned int oldsessionid, unsigned int sessionid, int rc) { struct audit_buffer *ab; uid_t uid, oldloginuid, loginuid; struct tty_struct *tty;  if (!audit_enabled) return;  ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_LOGIN); if (!ab) return;  uid = from_kuid(&amp;init_user_ns, task_uid(current)); oldloginuid = from_kuid(&amp;init_user_ns, koldloginuid); loginuid = from_kuid(&amp;init_user_ns, kloginuid), tty = audit_get_tty();  audit_log_format(ab, \"pid=%d uid=%u\", task_tgid_nr(current), uid); audit_log_task_context(ab); audit_log_format(ab, \" old-auid=%u auid=%u tty=%s old-ses=%u ses=%u res=%d\", oldloginuid, loginuid, tty ? tty_name(tty) : \"(none)\", oldsessionid, sessionid, !rc     ); audit_put_tty(tty); audit_log_end(ab); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b auditd \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432 \u0438\u0445 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><strong>audit_log_start().<\/strong>\u00a0\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u00a0<code>AUDIT_*<\/code>\u00a0\u0438\u0437 \u0435\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u0434\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f\u00a0<code>type<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>audit_log_format().<\/strong>\u00a0\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u0438. \u0418\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u2014 \u043a\u0430\u0436\u0434\u0430\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0437\u0443\u0447\u0430\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u043e \u0437\u043d\u0430\u043d\u0438\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>audit_log_session_info().<\/strong>\u00a0\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u041d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043e\u043d\u0430 \u0441\u043b\u0443\u0436\u0438\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439\u00a0<code>auid<\/code>\u00a0\u0438\u00a0<code>ses<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438\u00a0<code>LOGIN<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>audit_log_task_context().\u00a0<\/strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f\u00a0<code>subj<\/code>\u00a0\u0432 \u0437\u0430\u043f\u0438\u0441\u044c. \u041e\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043c\u0435\u0442\u043a\u0435 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u043d\u0434\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023<\/code> \u0434\u043b\u044f SELinux).<\/p>\n<\/li>\n<li>\n<p><strong>audit_log_end().<\/strong>\u00a0\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0430\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044e. \u0414\u043b\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b\u00a0<code>auid<\/code>\u00a0\u0438\u00a0<code>ses<\/code>. \u041f\u043e\u043b\u0435\u00a0<code>auid<\/code>\u00a0(audit uid)\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0415\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u0432\u043e\u0437\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0435\u0441\u0441\u0438\u0438. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<strong>su<\/strong>\u00a0\u0438\u043b\u0438\u00a0<strong>sudo,<\/strong>\u00a0\u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>auid<\/code>\u00a0\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445. \u041f\u043e\u043b\u0435\u00a0<code>ses<\/code>\u00a0\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0435\u0441\u0441\u0438\u0438.<\/p>\n<p>Old-\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043f\u043e\u043b\u0435\u0439\u00a0<code>auid<\/code>\u00a0\u0438\u00a0<code>ses<\/code><em>,<\/em>\u00a0\u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 4294967295. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/man7.org\/linux\/man-pages\/man3\/audit_setloginuid.3.html\">\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a>\u00a0<strong>audit_setloginuid()<\/strong>\u00a0\u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ee3\/7dc\/d65\/ee37dcd65b19a09f4499348ca438a19e.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM   \" width=\"755\" height=\"1255\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ee3\/7dc\/d65\/ee37dcd65b19a09f4499348ca438a19e.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435\u00a0<code>SYSCALL<\/code>\u00a0\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043f\u0440\u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u00a0<code>CONFIG_CHANGE<\/code>.<\/p>\n<p><a class=\"anchor\" name=\"#3\" id=\"#3\"><\/a><\/p>\n<h4>DAEMON_START \/ DAEMON_END<\/h4>\n<p>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u044d\u0442\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u044e\u0442 \u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0441\u043b\u0443\u0436\u0431\u044b \u0430\u0443\u0434\u0438\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/p>\n<blockquote>\n<p><code>type=DAEMON_START msg=audit(1695054308.076:7647): op=start ver=3.0.7 format=enriched kernel=5.4.0-137-generic auid=4294967295 pid=751 uid=0 ses=4294967295 subj=unconfined\u00a0 res=success AUID=\"unset\" UID=\"root\"<\/code><\/p>\n<p><code>&lt;...><\/code><\/p>\n<p><code>type=DAEMON_END msg=audit(1695054400.076:7648): op=terminate auid=0 pid=1 subj= res=success AUID=\"root\"<\/code> <\/p>\n<\/blockquote>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u00a0<code>DAEMON_*<\/code>\u00a0\u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0445\u00a0<code>audit_id<\/code>\u00a0\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c\u00a0\u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-userspace\/blob\/572eb7d4fe926e7c1c52166d08e78af54877cbc5\/src\/auditd.c#L306 if (seq_num == 0) { srandom(time(NULL)); seq_num = random() % 10000;  \/\/ \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f } else seq_num++; \/\/ Write event into netlink area like normal events if (gettimeofday(&amp;tv, NULL) == 0) { e->reply.len = snprintf((char *)e->reply.msg.data, DMSG_SIZE, \"audit(%lu.%03u:%u): %s\", tv.tv_sec, (unsigned)(tv.tv_usec\/1000), seq_num, str ); } else { e->reply.len = snprintf((char *)e->reply.msg.data, DMSG_SIZE, \"audit(%lu.%03d:%u): %s\", (unsigned long)time(NULL), 0, seq_num, str ); }<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u0432\u0443\u0445 \u043f\u043e\u0434\u0440\u044f\u0434 \u0438\u0434\u0443\u0449\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<blockquote>\n<p><code>type=DAEMON_START msg=audit(1695054308.076:7647): op=start ver=3.0.7 format=enriched kernel=5.4.0-137-generic auid=4294967295 pid=751 uid=0 ses=4294967295 subj=unconfined\u00a0 res=success AUID=\"unset\" UID=\"root\"<\/code><\/p>\n<p><code>type=CONFIG_CHANGE msg=audit(1695054308.241:5): audit_backlog_limit=8192 old=64 auid=4294967295 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 res=1 AUID=\"unset\"<\/code><\/p>\n<\/blockquote>\n<p>\u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u00a0<code>DAEMON_*<\/code>\u00a0\u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u043d\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0439. \u0412 \u0447\u0435\u043c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043a\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u2014 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439.<\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u00a0<code>DAEMON_START:<\/code><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\"><strong>\u041f\u043e\u043b\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\">op<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>start<\/code><em>. <\/em>\u041f\u043e\u043b\u0435<em> <\/em><code>op<\/code>\u00a0\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 auditd \u2014 \u044d\u0442\u043e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u00a0<code>operation<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\">ver<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0435\u0440\u0441\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u044b auditd<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\">format<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0424\u043e\u0440\u043c\u0430\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u0412\u0441\u0435\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p align=\"left\">\u00b7\u00a0<strong>raw<\/strong>: \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0432\u0438\u0434\u0435, \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438;<\/p>\n<p align=\"left\">\u00b7\u00a0<strong>enriched<\/strong>: \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 UID. \u041e\u0431 \u044d\u0442\u0438\u0445 \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u044f\u0445 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\">kernel<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0435\u0440\u0441\u0438\u044f \u044f\u0434\u0440\u0430 Linux, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0443\u0434\u0438\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\">pid<\/p>\n<\/td>\n<td>\n<p align=\"left\">ID \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 auditd<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\">uid<\/p>\n<\/td>\n<td>\n<p align=\"left\">ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 auditd<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"105\" width=\"105\">\n<p align=\"center\">res<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>success<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/669\/afe\/630\/669afe630624e71fe841e4976eb0bafd.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM   \" width=\"634\" height=\"1109\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/669\/afe\/630\/669afe630624e71fe841e4976eb0bafd.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e \u0436\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u00a0<code>DAEMON_END<\/code>, \u0442\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b auditd \u043e\u043d\u043e \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 SIEM-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u044b \u0435\u0433\u043e \u043d\u0435 \u0443\u0432\u0438\u0434\u0438\u043c. \u041d\u043e \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0441\u0435 \u0436\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"center\"><strong>\u041f\u043e\u043b\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"center\">op<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>terminate<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"center\">pid<\/p>\n<\/td>\n<td>\n<p align=\"left\">ID \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432\u0448\u0435\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b \u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0441\u043b\u0443\u0436\u0431\u044b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"131\" width=\"131\">\n<p align=\"center\">res<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>success<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u0441\u0435\u0431\u0435 \u043d\u0435 \u043d\u0435\u0441\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u0430\u0440\u043a\u0435\u0440 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e, \u043d\u0435\u0436\u0435\u043b\u0438 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435.<\/p>\n<p><a class=\"anchor\" name=\"#4\" id=\"#4\"><\/a><\/p>\n<h4>CONFIG_CHANGE<\/h4>\n<p>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 auditd, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043b\u0443\u0436\u0431\u044b \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0430\u0443\u0434\u0438\u0442\u0430.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e<a href=\"https:\/\/man7.org\/linux\/man-pages\/man8\/auditctl.8.html\"> \u0443\u0442\u0438\u043b\u0438\u0442\u044b auditctl<\/a>, \u043b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 <em>audit.rules<\/em>, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0439 \u0436\u0435 auditctl \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 auditd.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u2014 \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<blockquote>\n<p><code>type=CONFIG_CHANGE msg=audit(1704970843.772:2557): op=set audit_backlog_limit=8192 old=8192 auid=4294967295 ses=4294967295 res=1 AUID=\"unset\"<\/code><\/p>\n<\/blockquote>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/kernel\/audit.c#L384 static int audit_log_config_change(char *function_name, u32 new, u32 old, int allow_changes) { struct audit_buffer *ab; int rc = 0;  ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_CONFIG_CHANGE); if (unlikely(!ab)) return rc; audit_log_format(ab, \"op=set %s=%u old=%u \", function_name, new, old); audit_log_session_info(ab); rc = audit_log_task_context(ab); if (rc) allow_changes = 0; audit_log_format(ab, \" res=%d\", allow_changes); audit_log_end(ab); return rc; }<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"152\" width=\"152\">\n<p align=\"center\"><strong>\u041f\u043e\u043b\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"152\" width=\"152\">\n<p align=\"center\">op<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>set<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"152\" width=\"152\">\n<p align=\"center\">&lt;function_name><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u00a0<code>function_name<\/code>. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430\u00a0<code>function_name<\/code>\u00a0\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <em>audit.rules<\/em> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0438\u0436\u0435.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"152\" width=\"152\">\n<p align=\"center\">old<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0442\u0430\u0440\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"152\" width=\"152\">\n<p align=\"center\">res<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.  <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"161\" width=\"161\">\n<p align=\"center\"><strong>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 auditctl\/audit.rules<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"center\"><strong>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 function_name<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"161\" width=\"161\">\n<p align=\"center\">-b<\/p>\n<\/td>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"center\">audit_backlog_limit<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/man7.org\/linux\/man-pages\/man3\/audit_set_backlog_limit.3.html\">\u0420\u0430\u0437\u043c\u0435\u0440 \u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/a> \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043e\u0436\u0438\u0434\u0430\u044e\u0449\u0438\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0441\u043b\u0443\u0436\u0431\u0443 \u0430\u0443\u0434\u0438\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"161\" width=\"161\">\n<p align=\"center\">&#8212;backlog_wait_time<\/p>\n<\/td>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"center\">audit_backlog_wait_time<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/man7.org\/linux\/man-pages\/man3\/audit_set_backlog_wait_time.3.html\">\u0412\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f<\/a>, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0434\u0440\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u0435 \u0430\u0443\u0434\u0438\u0442\u0430 \u043f\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u00a0<code>backlog_limit<\/code>. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0435\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044f\u0434\u0440\u0430.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"161\" width=\"161\">\n<p align=\"center\">-e<\/p>\n<\/td>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"center\">audit_enabled<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/man7.org\/linux\/man-pages\/man3\/audit_set_enabled.3.html\">\u0424\u043b\u0430\u0433 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/a> \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430. \u0412\u043b\u0438\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u044f\u0434\u0440\u0430.<\/p>\n<p align=\"left\">\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p align=\"left\">\u00b7\u00a0<strong>0:<\/strong>\u00a0\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u0443\u0434\u0438\u0442\u0430, \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0435\u0439 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f;<\/p>\n<p align=\"left\">\u00b7\u00a0<strong>1:<\/strong>\u00a0\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u0443\u0434\u0438\u0442\u0430, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0435\u0439 \u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f (\u0435\u0441\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432);<\/p>\n<p align=\"left\">\u00b7\u00a0<strong>2:<\/strong>\u00a0\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u044b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0435\u0451 \u0440\u0430\u0431\u043e\u0442\u044b. \u0421\u043d\u044f\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0432 \u0443\u0437\u0435\u043b.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"161\" width=\"161\">\n<p align=\"center\">-f<\/p>\n<\/td>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"center\">audit_failure<\/p>\n<\/td>\n<td>\n<p><a href=\"https:\/\/man7.org\/linux\/man-pages\/man3\/audit_set_failure.3.html\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0434\u0440\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 backlog_limit \u0438\u043b\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p>\u00b7\u00a0<strong>0:<\/strong>\u00a0\u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438;<\/p>\n<p>\u00b7\u00a0<strong>1:<\/strong>\u00a0\u0432\u043d\u0435\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u044f\u0434\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/man7.org\/linux\/man-pages\/\/man3\/function::printk.3stap.html\">printk<\/a>;<\/p>\n<p>\u00b7\u00a0<strong>2:\u00a0<\/strong>\u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e \u00ab\u043f\u0430\u043d\u0438\u043a\u0443 \u044f\u0434\u0440\u0430\u00bb (<a href=\"https:\/\/man7.org\/linux\/man-pages\/man3\/function::panic.3stap.html\">kernel panic<\/a>).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"161\" width=\"161\">\n<p align=\"center\">-r<\/p>\n<\/td>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"center\">audit_rate_limit<\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"https:\/\/man7.org\/linux\/man-pages\/man3\/audit_set_rate_limit.3.html\">\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/a> \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0435 \u044f\u0434\u0440\u043e\u043c \u0441\u043b\u0443\u0436\u0431\u0435 \u0430\u0443\u0434\u0438\u0442\u0430    <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cbd\/85b\/22f\/cbd85b22f86ef52fec705c4d91e9188f.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM   \" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM   \" width=\"796\" height=\"1149\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cbd\/85b\/22f\/cbd85b22f86ef52fec705c4d91e9188f.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM   <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043a\u0430 \u0432\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0430\u0443\u0434\u0438\u0442\u0430.<\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441\u043c. \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <em>RULE OPTIONS<\/em> <a href=\"https:\/\/man7.org\/linux\/man-pages\/man8\/auditctl.8.html\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a>):<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0444\u043b\u0430\u0433 <code>-w<\/code> \u0432 auditctl \u0438\u043b\u0438 audit.rules) \u2014 \u0434\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0445\u00a0w-\u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 (\u0444\u043b\u0430\u0433\u0438 <code>-a\/A<\/code> \u0432 auditctl \u0438\u043b\u0438 audit.rules) \u2014 \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u0445\u00a0a-\u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0430\u0432\u0438\u043b \u043e\u0431\u043e\u0438\u0445 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<pre><code class=\"bash\">-a always,exit -F arch=b64 -S socket -F a0=0x2 -F key=socket_rule -w \/home -p rwa -k home_access_rule<\/code><\/pre>\n<p>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 a-\u043f\u0440\u0430\u0432\u0438\u043b\u0430:  <\/p>\n<blockquote>\n<p><code>type=CONFIG_CHANGE msg=audit(1704970843.303:2578): auid=4294967295 ses=4294967295 op=add_rule key=\"pt_siem_execve\" list=4 res=1 AUID=\"unset\"<\/code><\/p>\n<p><code>type=SYSCALL msg=audit(1704970843.303:2578): arch=c000003e syscall=44 success=yes exit=1072 a0=3 a1=7ffdfffb9b80 a2=430 a3=0 items=0 ppid=1796367 pid=1796382 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=\"auditctl\" exe=\"\/usr\/sbin\/auditctl\" key=(null) ARCH=x86_64 SYSCALL=sendto AUID=\"unset\" UID=\"root\" GID=\"root\" EUID=\"root\" SUID=\"root\" FSUID=\"root\" EGID=\"root\" SGID=\"root\" FSGID=\"root\"<\/code><\/p>\n<p><code>type=SOCKADDR msg=audit(1704970843.303:2578): saddr=100000000000000000000000 SADDR={ fam=netlink nlnk-fam=16 nlnk-pid=0 }<\/code><\/p>\n<p><code>type=PROCTITLE msg=audit(1704970843.303:2578): proctitle=2F7362696E2F617564697463746C002D52002F6574632F61756469742F72756C65732E642F30302D7369656D2E72756C6573<\/code><\/p>\n<\/blockquote>\n<p>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 w-\u043f\u0440\u0430\u0432\u0438\u043b\u0430:  <\/p>\n<blockquote>\n<p><code>type=CONFIG_CHANGE msg=audit(1704970843.287:2597): auid=4294967295 ses=4294967295 op=add_rule key=\"pt_siem_etc_read\" list=4 res=1 AUID=\"unset\"<\/code><\/p>\n<p><code>type=SYSCALL msg=audit(1704970843.287:2597): arch=c000003e syscall=44 success=yes exit=1088 a0=3 a1=7ffdfffb9b80 a2=440 a3=0 items=1 ppid=1796367 pid=1796382 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=\"auditctl\" exe=\"\/usr\/sbin\/auditctl\" key=(null) ARCH=x86_64 SYSCALL=sendto AUID=\"unset\" UID=\"root\" GID=\"root\" EUID=\"root\" SUID=\"root\" FSUID=\"root\" EGID=\"root\" SGID=\"root\" FSGID=\"root\"<\/code><\/p>\n<p><code>type=SOCKADDR msg=audit(1704970843.287:2597): saddr=100000000000000000000000 SADDR={ fam=netlink nlnk-fam=16 nlnk-pid=0 }<\/code><\/p>\n<p><code>type=CWD msg=audit(1704970843.287:2597): cwd=\"\/\"<\/code><\/p>\n<p><code>type=PATH msg=audit(1704970843.287:2597): item=0 name=\"\/etc\/sudoers.d\" inode=393298 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0 OUID=\"root\" OGID=\"root\"<\/code><\/p>\n<p><code>type=PROCTITLE msg=audit(1704970843.287:2597): proctitle=2F7362696E2F617564697463746C002D52002F6574632F61756469742F61756469742E72756C6573<\/code><\/p>\n<\/blockquote>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438\u00a0<code>CONFIG_CHANGE<\/code>:  <\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/kernel\/auditfilter.c#L1107 static void audit_log_rule_change(char *action, struct audit_krule *rule, int res) { struct audit_buffer *ab;  if (!audit_enabled) return;  ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_CONFIG_CHANGE); if (!ab) return; audit_log_session_info(ab); audit_log_task_context(ab); audit_log_format(ab, \" op=%s\", action);    \/\/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: add_rule \u0438\u043b\u0438 remove_rule audit_log_key(ab, rule->filterkey);    \/\/ \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f key audit_log_format(ab, \" list=%d res=%d\", rule->listnr, res); audit_log_end(ab); }<\/code><\/pre>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <strong>audit_log_format()<\/strong> \u0438 <strong>audit_log_key()<\/strong>:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"115\" width=\"115\">\n<p align=\"center\"><strong>\u041f\u043e\u043b\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"115\" width=\"115\">\n<p align=\"center\">op<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (<em>add_rule<\/em>) \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 (<em>remove_rule<\/em>) \u043f\u0440\u0430\u0432\u0438\u043b\u0430.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"115\" width=\"115\">\n<p align=\"center\">key<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0435 \u043f\u0440\u0438 \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043b\u0430\u0433\u043e\u0432\u00a0<strong>-k<\/strong>\u00a0\u0438\u043b\u0438\u00a0<strong>-F key=.<\/strong>\u00a0\u0415\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0430\u043d\u043e, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>(null)<\/code>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"115\" width=\"115\">\n<p align=\"center\">list<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0435\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u00a0<code>list<\/code>\u00a0\u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 (\u0441\u043c. \u0440\u0430\u0437\u0434\u0435\u043b\u00a0<em>RULE OPTIONS<\/em>\u00a0<a href=\"https:\/\/man7.org\/linux\/man-pages\/man8\/auditctl.8.html\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a>).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"115\" width=\"115\">\n<p align=\"center\">res<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f\u00a0<code>list<\/code>\u00a0\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/include\/uapi\/linux\/audit.h#L164 #define AUDIT_FILTER_USER0x00\/* Apply rule to user-generated messages *\/ #define AUDIT_FILTER_TASK0x01\/* Apply rule at task creation (not syscall) *\/ #define AUDIT_FILTER_ENTRY0x02\/* Apply rule at syscall entry *\/ #define AUDIT_FILTER_WATCH0x03\/* Apply rule to file system watches *\/ #define AUDIT_FILTER_EXIT0x04\/* Apply rule at syscall exit *\/ #define AUDIT_FILTER_EXCLUDE0x05\/* Apply rule before record creation *\/ #define AUDIT_FILTER_TYPEAUDIT_FILTER_EXCLUDE \/* obsolete misleading naming *\/ #define AUDIT_FILTER_FS0x06\/* Apply rule at __audit_inode_child *\/ #define AUDIT_NR_FILTERS7 #define AUDIT_FILTER_PREPEND0x10\/* Prepend to front of list *\/<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 w-\u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432\u0438\u0434\u0430 \u00ab<code>-w &lt;\u043f\u0443\u0442\u044c_\u043a_\u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443_\u043e\u0431\u044a\u0435\u043a\u0442\u0443> ...<\/code>\u00bb \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f auditd \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 a-\u043f\u0440\u0430\u0432\u0438\u043b:<\/p>\n<pre><code class=\"bash\">-a always,exit -S all -F dir=&lt;\u043f\u0443\u0442\u044c_\u043a_\u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443_\u043e\u0431\u044a\u0435\u043a\u0442\u0443> ...\u00a0\u00a0 # \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c\u00a0 -a always,exit -S all -F path=&lt;\u043f\u0443\u0442\u044c_\u043a_\u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443_\u043e\u0431\u044a\u0435\u043a\u0442\u0443> ...\u00a0 # \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-userspace\/blob\/572eb7d4fe926e7c1c52166d08e78af54877cbc5\/src\/auditctl.c#L1007 case 'w': if (add != AUDIT_FILTER_UNSET || del != AUDIT_FILTER_UNSET) { audit_msg(LOG_ERR, \"watch option can't be given with a syscall\"); retval = -1; } else if (optarg) { add = AUDIT_FILTER_EXIT; action = AUDIT_ALWAYS; _audit_syscalladded = 1; retval = audit_setup_watch_name(&amp;rule_new, optarg);  \/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 audit_add_watch_dir()     } else { audit_msg(LOG_ERR, \"watch option needs a path\"); retval = -1; } break;   \/\/ https:\/\/github.com\/linux-audit\/audit-userspace\/blob\/572eb7d4fe926e7c1c52166d08e78af54877cbc5\/lib\/libaudit.c#L779 int audit_add_watch_dir(int type, struct audit_rule_data **rulep, const char *path) { size_t len = strlen(path); struct audit_rule_data *rule = *rulep;  \/\/ &lt;...>  rule->flags = AUDIT_FILTER_EXIT; rule->action = AUDIT_ALWAYS; audit_rule_syscallbyname_data(rule, \"all\");  \/\/ -S all rule->field_count = 2; rule->fields[0] = type;  \/\/ AUDIT_WATCH (-F path) \u0438\u043b\u0438 AUDIT_DIR (-F dir) rule->values[0] = len; rule->fieldflags[0] = AUDIT_EQUAL; rule->buflen = len; memcpy(&amp;rule->buf[0], path, len);  \/\/ Default to all permissions     \/\/ \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f -F perm=rwxa, \u043d\u043e      \/\/ \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445) rule->fields[1] = AUDIT_PERM; rule->fieldflags[1] = AUDIT_EQUAL; rule->values[1] = AUDIT_PERM_READ | AUDIT_PERM_WRITE | AUDIT_PERM_EXEC | AUDIT_PERM_ATTR;  _audit_permadded = 1;  return  0; }<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b\u00a0<strong>auditctl -l<\/strong>:<\/p>\n<pre><code class=\"bash\">-w \/home -p rwa -k home_access_rule -a always,exit -S all -F dir=\/home -F perm=rwa -k home_access_rule_1 -a always,exit -S all -F path=\/home -F perm=rwa -k home_access_rule_2<\/code><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 <strong>auditctl<\/strong>:<\/p>\n<pre><code class=\"bash\">-w \/home -p rwa -k home_access_rule -w \/home -p rwa -k home_access_rule_1 -w \/home -p rwa -k home_access_rule_2<\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 w-\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>list=4<\/code><em> <\/em>(<code>AUDIT_FILTER_EXIT<\/code>). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u00a0<code>AUDIT_FILTER_WATCH<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0430\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 w-\u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0412 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e, \u043f\u043e\u043c\u0438\u043c\u043e <code>CONFIG_CHANGE<\/code><em>,<\/em> \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c \u0438\u0445 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445, \u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435\u00a0<code>CONFIG_CHANGE<\/code>:<\/p>\n<ul>\n<li>\n<p><strong>SYSCALL.<\/strong>\u00a0\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u00a0<strong>sendto()<\/strong>, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>SOCKADDR.<\/strong>\u00a0\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u043a\u0435\u0442\u0435 netlink, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438. \u042d\u0442\u043e \u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u00a0<strong>sendto()<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>CWD.<\/strong>\u00a0\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432\u0448\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e.<\/p>\n<\/li>\n<li>\n<p><strong>PATH.<\/strong>\u00a0\u0417\u0430\u043f\u0438\u0441\u044c, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>PROCTITLE.<\/strong>\u00a0\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432 HEX \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u00a0\u2014 \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0438\u0436\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u044d\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f, \u043e\u043d\u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0431\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/24c\/831\/be2\/24c831be28cbca2fe79369a39a21ca93.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" width=\"712\" height=\"1191\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24c\/831\/be2\/24c831be28cbca2fe79369a39a21ca93.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h2>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: SYSCALL<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041e\u043d\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u2014 \u044d\u0442\u043e API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u044f\u0434\u0440\u043e\u043c. \u041e\u043d\u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438, \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0442 \u043f.<\/p>\n<p>\u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0437\u0430\u043f\u0438\u0441\u0438\u00a0<code>SYSCALL<\/code>.\u00a0\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043f\u043e\u043b\u0435\u0439 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0447\u0435\u043c \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445.<\/p>\n<p><a class=\"anchor\" name=\"6\" id=\"6\"><\/a><\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043f\u043e\u043b\u044f\u0445\u00a0<code>arch\/ARCH<\/code>.<\/p>\n<blockquote>\n<p><strong>arch=c000003e<\/strong><code> syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 items=2 ppid=1736 pid=3202324 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 tty=(none) ses=4294967295 comm=\"ps\" exe=\"\/usr\/bin\/ps\" key=\"execve_rule\" <\/code><strong>ARCH=x86_64<\/strong><code> SYSCALL=execve AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code>   <\/p>\n<\/blockquote>\n<p>\u041e\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432\u044b\u0437\u043e\u0432\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u043f\u043e\u043b\u0435<code>syscall<\/code><em>, <\/em>\u0442\u0430\u043a \u043a\u0430\u043a<em> <\/em>\u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0432\u044b\u0437\u043e\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u0445 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u043e\u0432.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043e\u0442\u0440\u044b\u0432\u043a\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f\u00a0<code>arch<\/code>. \u041f\u043e\u043b\u0435\u00a0<code>ARCH<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u00a0<code>arch<\/code>\u00a0\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/include\/uapi\/linux\/audit.h#L384 #define __AUDIT_ARCH_64BIT  0x80000000 #define __AUDIT_ARCH_LE    0x40000000  #define AUDIT_ARCH_AARCH64(EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ALPHA(EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ARCOMPACT(EM_ARCOMPACT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ARCOMPACTBE(EM_ARCOMPACT) #define AUDIT_ARCH_ARCV2(EM_ARCV2|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ARCV2BE(EM_ARCV2) #define AUDIT_ARCH_ARM(EM_ARM|__AUDIT_ARCH_LE) \/\/ &lt;...>   \/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/include\/uapi\/linux\/elf-em.h#L5 #define EM_NONE0 #define EM_M321 #define EM_SPARC2 #define EM_3863 #define EM_68K4 #define EM_88K5 #define EM_4866\/* Perhaps disused *\/ #define EM_8607 #define EM_MIPS8\/* MIPS R3000 (officially, big-endian only) *\/ #define EM_MIPS_RS3_LE10\/* MIPS R3000 little-endian *\/ #define EM_MIPS_RS4_BE10\/* MIPS R4000 big-endian *\/ #define EM_PARISC15\/* HPPA *\/ #define EM_SPARC32PLUS18\/* Sun's \"v8plus\" *\/ #define EM_PPC20\/* PowerPC *\/ \/\/ &lt;...><\/code><\/pre>\n<p>\u041f\u0440\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u043e\u0432 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u0438\u0445 \u0438\u043c\u0435\u043d\u0430 (\u043d\u0430 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f auditd \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/534\/5f0\/ca3\/5345f0ca3be62d8b307e31bd5582666a.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 syscall_attributes_modify \" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 syscall_attributes_modify \" width=\"607\" height=\"708\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/534\/5f0\/ca3\/5345f0ca3be62d8b307e31bd5582666a.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 syscall_attributes_modify <\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"7\" id=\"7\"><\/a><\/p>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0437\u043e\u0432\u0430<\/h3>\n<p>\u0418\u0437\u0443\u0447\u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435:<\/p>\n<blockquote>\n<p><code>arch=c000003e <\/code><strong>syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10<\/strong><code> items=2 ppid=1736 pid=3202324 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 tty=(none) ses=4294967295 comm=\"ps\" exe=\"\/usr\/bin\/ps\" key=\"execve_rule\" ARCH=x86_64 <\/code><strong>SYSCALL=execve<\/strong><code> AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code>  <\/p>\n<\/blockquote>\n<p>\u041b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 man-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u00a0\u2014 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043e \u0432\u044b\u0437\u043e\u0432\u0435\u00a0<strong>execve().<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bd7\/a30\/c5a\/bd7a30c5a805815b86dcd0fcc0cacad6.png\" alt=\"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 man\" title=\"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 man\" width=\"927\" height=\"1130\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd7\/a30\/c5a\/bd7a30c5a805815b86dcd0fcc0cacad6.png\"\/><\/p>\n<div><figcaption><a href=\"https:\/\/man7.org\/linux\/man-pages\/man2\/execve.2.html\">\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 man<\/a><\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438:<\/p>\n<ul>\n<li>\n<p><strong>syscall\/SYSCALL.<\/strong>\u00a0\u041a\u043e\u0434 \u0432\u044b\u0437\u043e\u0432\u0430 \u0438 \u0435\u0433\u043e \u0438\u043c\u044f. \u041a\u043e\u0434\u044b \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/marcin.juszkiewicz.com.pl\/download\/tables\/syscalls.html\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>success.<\/strong>\u00a0\u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>exit.<\/strong>\u00a0\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043e\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 (\u0441\u043c. \u0440\u0430\u0437\u0434\u0435\u043b\u00a0<em>RETURN VALUE<\/em>\u00a0\u043d\u0430 man-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b\u0437\u043e\u0432\u0430). \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0430 \u0441\u0430\u043c\u043e \u0447\u0438\u0441\u043b\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438 (\u0441\u043c. \u0440\u0430\u0437\u0434\u0435\u043b\u00a0<em>ERRORS<\/em>\u00a0\u043d\u0430 man-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435). \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u00a0<code>EACCESS<\/code>\u00a0\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435. \u041d\u043e \u0432 \u0441\u0430\u043c\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0438\u043c\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b\u00a0<strong>errno<\/strong>.<\/p>\n<\/li>\n<li>\n<p><strong>a0-a3.<\/strong>\u00a0\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430. \u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 HEX-\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435. \u041f\u043e\u043b\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0441 \u0442\u0438\u043f\u043e\u043c\u00a0<strong>char *,<\/strong>\u00a0\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u044b \u043d\u0435 \u043d\u0435\u0441\u0443\u0442. \u0427\u0438\u0441\u043b\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u043f\u044f\u0442\u044b\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u044b \u043d\u0435 \u0443\u0432\u0438\u0434\u0438\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439, \u0447\u0442\u043e \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 (\u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435\u00a0\u2014\u00a0<code>a3<\/code>).<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u044f \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f: \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438, \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438, \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438.\u00a0<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f<\/p>\n<blockquote>\n<p><code>arch=c000003e <\/code><strong>syscall=257 success=no exit=-2 a0=ffffff9c a1=55eeafd2dc20 a2=0 a3=0<\/strong><code> items=1 ppid=1 pid=4102158 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=\"atop\" exe=\"\/usr\/bin\/atop\" subj=unconfined key=(null) ARCH=x86_64 <\/code><strong>SYSCALL=openat<\/strong><code> AUID=\"unset\" UID=\"root\" GID=\"root\" EUID=\"root\" SUID=\"root\" FSUID=\"root\" EGID=\"root\" SGID=\"root\" FSGID=\"root\"<\/code>   <\/p>\n<\/blockquote>\n<p>\u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 MaxPatrol SIEM \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u00bb \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f (\u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON):  <\/p>\n<pre><code>{     \"action\": \"access\",     \"object\": \"file_object\",     \"status\": \"failure\",     \"category.generic\": \"File System Object\",     \"category.high\": \"System Management\",     \"category.low\": \"Manipulation\",     \"msgid\": \"openat\",     \"object.property\": \"flags\",     \"object.state\": \"r\",     \"object.value\": \"O_RDONLY\",     \"reason\": \"No such file or directory\" }<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438\u0437\u00a0<code>SYSCALL<\/code>\u00a0\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n<p><a class=\"anchor\" name=\"8\" id=\"8\"><\/a><\/p>\n<h4>\u041f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0430\u043c: SYSCALL \u0438 PATH<\/h4>\n<p>\u042d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0435\u0435 \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c.<\/p>\n<blockquote>\n<p><code>type=SYSCALL msg=audit(1704970843.702:73702361): arch=c000003e syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 <\/code><strong>items=2<\/strong><code> ppid=1736 pid=3202324 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 tty=(none) ses=4294967295 comm=\"ps\" exe=\"\/usr\/bin\/ps\" key=\"execve_rule\" ARCH=x86_64 SYSCALL=execve AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code><\/p>\n<p><code>type=PATH msg=audit(1704970843.702:73702361): <\/code><strong>item=0<\/strong><code> name=\"\/bin\/ps\" inode=1445245 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0 OUID=\"root\" OGID=\"root\"<\/code><\/p>\n<p><code>type=PATH msg=audit(1704970843.702:73702361): <\/code><strong>item=1 <\/strong><code>name=\"\/lib64\/ld-linux-x86-64.so.2\" inode=1442616 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0 OUID=\"root\" OGID=\"root\"<\/code><\/p>\n<\/blockquote>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f\u00a0<code>items<\/code>\u00a0\u0432 \u0437\u0430\u043f\u0438\u0441\u0438\u00a0<code>SYSCALL<\/code>\u00a0\u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439\u00a0<code>PATH<\/code>. \u0412 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0443\u0440\u043d\u0430\u043b\u0430\u0445 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 MaxPatrol SIEM \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f, \u0437\u043d\u0430\u0447\u0438\u0442 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044c\u00a0<code>PATH<\/code>\u00a0\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445\u0441\u044f \u0432 \u043d\u0435\u0439 \u043f\u043e\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b\u00a0<strong>ls<\/strong>\u00a0\u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u043e\u0442 \u0432\u044b\u0432\u043e\u0434 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u043c\u043d\u043e\u0433\u0438\u043c, \u043a\u0442\u043e \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0441 Linux.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6e7\/e15\/099\/6e7e150992f25be7787d4008597da176.png\" alt=\"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e: inode - mode \u2013 \u2026 - OUID - OGID \u2013 \u2026 \u2013 \u2026 - name   \" title=\"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e: inode - mode \u2013 \u2026 - OUID - OGID \u2013 \u2026 \u2013 \u2026 - name   \" width=\"811\" height=\"94\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e7\/e15\/099\/6e7e150992f25be7787d4008597da176.png\"\/><\/p>\n<div><figcaption>\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e: inode &#8212; mode \u2013 \u2026 &#8212; OUID &#8212; OGID \u2013 \u2026 \u2013 \u2026 &#8212; name   <\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043f\u043e\u043b\u0435\u00a0<code>name<\/code>\u00a0\u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 HEX, \u0435\u0441\u043b\u0438 \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u044b. \u0417\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<strong>audit_log_n_untrustedstring()<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0435\u0439.<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/v6.4\/kernel\/audit.c#L2102 void audit_log_n_untrustedstring(struct audit_buffer *ab, const char *string, size_t len) { if (audit_string_contains_control(string, len)) audit_log_n_hex(ab, string, len); else audit_log_n_string(ab, string, len); }<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438.<\/p>\n<p>\u041f\u043e\u043b\u0435\u00a0<code>mode<\/code>\u00a0\u043f\u0440\u043e\u0449\u0435 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u0446\u0430. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0442\u0440\u0438 \u0446\u0438\u0444\u0440\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0443 \u0432 \u0432\u043e\u0441\u044c\u043c\u0435\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0427\u0435\u0442\u0432\u0435\u0440\u0442\u0430\u044f \u0446\u0438\u0444\u0440\u0430 \u0441 \u043a\u043e\u043d\u0446\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0443\u0442\u044c \u043c\u0435\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e: suid-\u0431\u0438\u0442, sgid-\u0431\u0438\u0442 \u0438 sticky-\u0431\u0438\u0442. \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0446\u0438\u0444\u0440\u044b\u00a0\u2014 \u0442\u0438\u043f \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041c\u0430\u043f\u043f\u0438\u043d\u0433 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"174\" width=\"174\">\n<p align=\"center\"><strong>mode (event)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"199\" width=\"199\">\n<p align=\"center\"><strong>mode (ls, 1-\u0439 \u0441\u0438\u043c\u0432\u043e\u043b)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"174\" width=\"174\">\n<p align=\"center\">01<\/p>\n<\/td>\n<td data-colwidth=\"199\" width=\"199\">\n<p align=\"center\">p<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b (pipe)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"174\" width=\"174\">\n<p align=\"center\">02<\/p>\n<\/td>\n<td data-colwidth=\"199\" width=\"199\">\n<p align=\"center\">c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (char device)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"174\" width=\"174\">\n<p align=\"center\">04<\/p>\n<\/td>\n<td data-colwidth=\"199\" width=\"199\">\n<p align=\"center\">d<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0430\u043f\u043a\u0430 (directory)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"174\" width=\"174\">\n<p align=\"center\">06<\/p>\n<\/td>\n<td data-colwidth=\"199\" width=\"199\">\n<p align=\"center\">b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u043b\u043e\u0447\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (block device)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"174\" width=\"174\">\n<p align=\"center\">010<\/p>\n<\/td>\n<td data-colwidth=\"199\" width=\"199\">\n<p align=\"center\">&#8212;<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b (regular file)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"174\" width=\"174\">\n<p align=\"center\">012<\/p>\n<\/td>\n<td data-colwidth=\"199\" width=\"199\">\n<p align=\"center\">l<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0438\u043c\u0432\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 (symlink)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"174\" width=\"174\">\n<p align=\"center\">014<\/p>\n<\/td>\n<td data-colwidth=\"199\" width=\"199\">\n<p align=\"center\">s<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043e\u043a\u0435\u0442 (socket)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u043b\u0435\u00a0<code>dev<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b (\u0435\u0441\u043b\u0438 \u0441\u0430\u043c \u0444\u0430\u0439\u043b \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c). \u041f\u043e\u043b\u0435\u00a0<code>rdev<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f\u00a0<code>device<\/code>. \u041f\u043e\u043b\u044f\u00a0<code>cap_*<\/code>\u00a0\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435\u00a0<code>capabilities<\/code>\u00a0\u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/man7.org\/linux\/man-pages\/man7\/capabilities.7.html\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a>. \u041f\u043e\u043b\u0435\u00a0<code>nametype<\/code>\u00a0(\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445\u00a0\u2014\u00a0<code>objtype<\/code>) \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0442\u0438\u043f \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/include\/linux\/audit.h#L135 #defineAUDIT_TYPE_UNKNOWN0        \/* we don't know yet *\/ #defineAUDIT_TYPE_NORMAL1        \/* a \"normal\" audit record *\/ #defineAUDIT_TYPE_PARENT2        \/* a parent audit record *\/ #defineAUDIT_TYPE_CHILD_DELETE 3    \/* a child being deleted *\/ #defineAUDIT_TYPE_CHILD_CREATE 4    \/* a child being created *\/<\/code><\/pre>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043e \u043d\u0438\u0436\u0435:<\/p>\n<ul>\n<li>\n<p><strong>UNKNOWN.<\/strong>\u00a0\u0424\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0438\u0441\u0442\u0435\u043c\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0433\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442). \u041f\u0440\u0438\u00a0<code>nametype=UNKNOWN<\/code>\u00a0\u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0<code>inode<\/code>\u00a0\u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f\u00a0<code>rdev<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>NORMAL.<\/strong>\u00a0\u041f\u0440\u043e\u0441\u0442\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0444\u0430\u0439\u043b, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>PARENT.<\/strong>\u00a0\u0424\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>DELETE.<\/strong>\u00a0\u0424\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0432\u044b\u0437\u043e\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>CREATE.<\/strong>\u00a0\u0424\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0432\u044b\u0437\u043e\u0432\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438\u00a0<code>PATH<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044f\u0434\u0440\u0430, \u0438 \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u2014 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0438\u0432 \u0435\u0433\u043e, \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u00ab\u043e\u0431\u0435\u0440\u0442\u043a\u0430\u043c\u0438\u00bb \u043d\u0430\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438\u0445 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/syscalls64.paolostivanin.com\">\u0441\u0430\u0439\u0442,<\/a> \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0435\u043d\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0437\u043e\u0432\u044b <strong>rename()<\/strong>, <strong>renameat()<\/strong> \u0438 <strong>renameat2()<\/strong>, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u0430\u043c\u0438 \u043d\u0430\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>do_renameat2()<\/strong>.<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/fs\/namei.c#L4888 static int do_renameat2(int olddfd, const char __user *oldname, int newdfd, const char __user *newname, unsigned int flags) {     \/\/ &lt;...> }  SYSCALL_DEFINE5(renameat2, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, unsigned int, flags) { return do_renameat2(olddfd, oldname, newdfd, newname, flags); }  SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname) { return do_renameat2(olddfd, oldname, newdfd, newname, 0); }  SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newname) { return do_renameat2(AT_FDCWD, oldname, AT_FDCWD, newname, 0); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<strong>bpftrace<\/strong>, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"cpp\">\/\/ [root@localhost test_dir] mv ..\/test_dir_2 .\/test_dir_22 do_renameat2(olddfd: -100, oldname: \"..\/test_dir_2\", newdfd: -100, newname: \".\/test_dir_22\", flags: 1) {     \/\/ filename_parentat(old)     audit_alloc_name(audit_context(), type: 0) {         \/\/ [item=0] nametype=UNKNOWN     }     __audit_inode(filename: \"..\/test_dir_2\", dentry: [262146] \"root\", flags: 1) {         \/\/ [item=0] nametype=UNKNOWN -> nametype=PARENT inode=262146     }     \/\/ filename_parentat(new)     audit_alloc_name(audit_context(), type: 0) {     \/\/ [item=1] nametype=UNKNOWN     }     __audit_inode(filename: \".\/test_dir_22\", dentry: [262852] \"test_dir\", flags: 1) {     \/\/ [item=1] nametype=UNKNOWN -> nametype=PARENT inode=262852     }      vfs_rename(old_dir_inode: 262146, old_dentry: [262906] \"test_dir_2\", new_dir_inode: 262852, new_dentry: [0] \"test_dir_22\", ... , flags: 1) {         may_delete(dir_inode: 262146, child_dentry: [262906] \"test_dir_2\", ...) {             __audit_inode_child(parent_inode: 262146, dentry: [262906] \"test_dir_2\", type: 3) {                 audit_alloc_name(audit_context(), type: 3) {                     \/\/ [item=2] nametype=DELETE inode=262906                 }             }         }          \/\/ may_create()         __audit_inode_child(parent_inode: 262852, dentry: [0] \"test_dir_22\", type: 4) {             audit_alloc_name(audit_context(), type: 4) {                 \/\/ [item=3] nametype=CREATE             }         }          \/\/ fsnotify_move() \u0434\u043b\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a         __audit_inode_child(parent_inode: 262852, dentry: [262906] \"test_dir_22\", type: 4) {             \/\/ [item=3] nametype=CREATE -> nametype=CREATE inode=262906         }     } } -> 0<\/code><\/pre>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438\u00a0<strong>do_renameat2()<\/strong>\u00a0\u044f \u043f\u043e\u043c\u0435\u0442\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442 \u0432\u00a0<code>PATH<\/code>\u00a0\u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 <code>PATH<\/code>:<\/p>\n<blockquote>\n<p><code>type=PATH msg=audit(1704970843.024:221): item=0 name=\"..\/\" inode=262146 dev=fd:00 mode=040700 ouid=0 ogid=0 rdev=00:00 nametype=PARENT cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0<\/code><\/p>\n<p><code>type=PATH msg=audit(1704970843.024:221): item=1 name=\".\/\" inode=262852 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=PARENT cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0<\/code><\/p>\n<p><code>type=PATH msg=audit(1704970843.024:221): item=2 name=\"..\/test_dir_2\" inode=262906 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=DELETE cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0<\/code><\/p>\n<p><code>type=PATH msg=audit(1704970843.024:221): item=3 name=\".\/test_dir_22\" inode=262906 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=CREATE cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0<\/code><\/p>\n<\/blockquote>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <code>PATH<\/code>, \u043a\u0430\u043a\u00a0<strong>__audit_inode()<\/strong>.\u00a0\u0412\u0437\u0430\u043c\u0435\u043d \u044d\u0442\u043e\u0433\u043e \u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0441\u0445\u0435\u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439<em>\u00a0<\/em><code>PATH <\/code>\u0434\u043b\u044f \u043e\u0441\u043e\u0431\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432. \u041d\u0430\u0439\u0442\u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438\u00a0<a href=\"https:\/\/github.com\/Security-Experts-Community\/open-xp-rules\/tree\/master\/packages\/system\/normalization_formulas\/UNIX_like\/auditd\/syslog_structured\">Security Experts Community<\/a>. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f\u00a0<strong>do_rename2()<\/strong>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e57\/1b1\/39b\/e571b139b0a70d17e36a288ec6b70941.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 do_renameat2()   \" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 do_renameat2()   \" width=\"1074\" height=\"1251\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e57\/1b1\/39b\/e571b139b0a70d17e36a288ec6b70941.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/Security-Experts-Community\/open-xp-rules\/blob\/master\/packages\/system\/normalization_formulas\/UNIX_like\/auditd\/_manuals\/path_records\/do_renameat2.png\">do_renameat2()<\/a>   <\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"9\" id=\"9\"><\/a><\/p>\n<h4>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/h4>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441 \u043d\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u044b.<\/p>\n<blockquote>\n<p><code>arch=c000003e syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 items=2 <\/code><strong>ppid=1736 pid=3202324<\/strong><code> auid=4294967295 <\/code><strong>uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997<\/strong><code> tty=(none) ses=4294967295 comm=\"ps\" exe=\"\/usr\/bin\/ps\" key=\"execve_rule\" ARCH=x86_64 SYSCALL=execve AUID=\"unset\" <\/code><strong>UID=&#187;git&#187; GID=&#187;git&#187; EUID=&#187;git&#187; SUID=&#187;git&#187; FSUID=&#187;git&#187; EGID=&#187;git&#187; SGID=&#187;git&#187; FSGID=&#187;git&#187;<\/strong>   <\/p>\n<\/blockquote>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/man7.org\/linux\/man-pages\/man7\/credentials.7.html\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a>. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043a\u0440\u0430\u0442\u043a\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f:<\/p>\n<ul>\n<li>\n<p><strong>PID\/PPID:<\/strong>\u00a0\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><strong>UID\/GID:<\/strong>\u00a0\u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 (real) \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u044b. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0445\u043e\u0437\u044f\u0438\u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>EUID\/EGID:<\/strong>\u00a0\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 (effective) \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u044b. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u043c\u043e\u0447\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>SUID\/SGID:<\/strong>\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 set-user-ID \u0438 set-group-ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f-\u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 EUID\/EGID, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u0438\u0442\u0430\u043c\u0438 set-user \u0438 set-group.<\/p>\n<\/li>\n<li>\n<p><strong>FSUID\/FSGID:<\/strong>\u00a0\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f Linux; \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"10\" id=\"10\"><\/a><\/p>\n<h4>\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b<\/h4>\n<p>\u042d\u0442\u043e \u043f\u043e\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432\u0448\u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432.<\/p>\n<blockquote>\n<p><code>arch=c000003e syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 items=2 ppid=1736 pid=3202324 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 <\/code><strong>tty=(none)<\/strong><code> ses=4294967295 comm=\"ps\" exe=\"\/usr\/bin\/ps\" key=\"execve_rule\" ARCH=x86_64 SYSCALL=execve AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code>   <\/p>\n<\/blockquote>\n<p>\u0427\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0438\u0436\u0435:<\/p>\n<ul>\n<li>\n<p><strong>ttyX<\/strong>: \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0441\u0438\u0434\u0438\u0442 \u0437\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u043e\u043c, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u043a \u0443\u0437\u043b\u0443).\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>pts\/X\u00a0<\/strong>(\u0438\u043b\u0438\u00a0<strong>\/dev\/pts\/X<\/strong>): \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, SSH). \u041a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u0435 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0435 \u0432 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430\u0445, \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f pts-\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>(none)<\/strong>: \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430. \u0422\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"11\" id=\"11\"><\/a><\/p>\n<h3>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0435\u0441\u0441\u0438\u0438<\/h3>\n<p>\u041f\u043e\u043b\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432\u0448\u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432.<\/p>\n<blockquote>\n<p><code>arch=c000003e syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 items=2 ppid=1736 pid=3202324 <\/code><strong>auid=4294967295<\/strong><code> uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 tty=(none) <\/code><strong>ses=4294967295<\/strong><code> comm=\"ps\" exe=\"\/usr\/bin\/ps\" key=\"execve_rule\" ARCH=x86_64 SYSCALL=execve AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code>   <\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0438 \u043f\u043e\u043b\u044f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u00a0<a href=\"https:\/\/habr.com\/ru\/companies\/pt\/articles\/788828\/#2\">LOGIN<\/a>.<\/p>\n<p><a class=\"anchor\" name=\"12\" id=\"12\"><\/a><\/p>\n<h4>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435<\/h4>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<blockquote>\n<p><code>arch=c000003e syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 items=2 ppid=1736 pid=3202324 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 tty=(none) ses=4294967295 <\/code><strong>comm=&#187;ps&#187; exe=&#187;\/usr\/bin\/ps&#187;<\/strong><code> key=\"execve_rule\" ARCH=x86_64 SYSCALL=execve AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code>   <\/p>\n<\/blockquote>\n<p>\u041f\u043e\u043b\u0435 <code>comm<\/code>, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0445\u043e\u0442\u044f \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0414\u043b\u0438\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 16 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438. \u0412 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/proc\/&lt;pid>\/comm<\/code> .\u00a0<\/p>\n<p>\u041f\u043e\u043b\u0435\u00a0<code>exe<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u0443\u0442\u044c \u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443, \u0430 \u043d\u0435 \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443. \u0412 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435\u00a0<code>\/proc\/&lt;pid>\/exe<\/code>\u00a0(\u0447\u0435\u0440\u0435\u0437\u00a0<strong>readlink<\/strong>).  <\/p>\n<blockquote>\n<p><code>arch=c000003e syscall=59 success=yes exit=0 a0=5653ad1e69e0 a1=5653ad0ace80 a2=5653ad0c2100 a3=7fff8dd2e010 items=3 ppid=388 pid=958 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 <\/code><strong>comm=&#187;cached_setup_te&#187; exe=&#187;\/usr\/bin\/dash&#187;<\/strong><code> subj=unconfined key=\"execve_rule\" ARCH=x86_64 SYSCALL=execve AUID=\"unset\" UID=\"root\" GID=\"root\" EUID=\"root\" SUID=\"root\" FSUID=\"root\" EGID=\"root\" SGID=\"root\" FSGID=\"root\"<\/code>   <\/p>\n<\/blockquote>\n<p>\u0414\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432 MaxPatrol SIEM \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u043d\u0435\u0433\u043e \u0438\u0437 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438\u00a0<code>PATH<\/code>:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/919\/7e5\/a13\/9197e5a13fb90a8f45daff5317bf9acb.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" width=\"978\" height=\"1211\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/919\/7e5\/a13\/9197e5a13fb90a8f45daff5317bf9acb.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430\u0447\u043d\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0444\u0430\u0439\u043b\u0430\u043c), \u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u00a0<code>exe<\/code>. \u0410 \u043e\u043d\u043e, \u043a\u0430\u043a \u043c\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0435\u0435, \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p><a class=\"anchor\" name=\"13\" id=\"13\"><\/a><\/p>\n<h4>\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0430\u0443\u0434\u0438\u0442\u0430<\/h4>\n<p>\u042d\u0442\u043e \u043f\u043e\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043c\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0448\u0435\u0433\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 (\u043e\u043d\u043e \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 audit.rules \u0438\u043b\u0438 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 auditctl \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438\u00a0<strong>-k<\/strong>\u00a0\u0438\u043b\u0438\u00a0<strong>-F key=<\/strong>).<\/p>\n<blockquote>\n<p><code>arch=c000003e syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 items=2 ppid=1736 pid=3202324 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 tty=(none) ses=4294967295 comm=\"ps\" exe=\"\/usr\/bin\/ps\" <\/code><strong>key=&#187;execve_rule&#187;<\/strong><code> ARCH=x86_64 SYSCALL=execve AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code>   <\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"14\" id=\"14\"><\/a><\/p>\n<h3>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: PROCTITLE<\/h3>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c\u00a0<code>PROCTITLE<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435\u00a0<code>proctitle<\/code>\u00a0\u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432\u0448\u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 128 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 (\u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 HEX).<\/p>\n<blockquote>\n<p><code>type=PROCTITLE msg=audit(1704970843.702:73702361): proctitle=7073002D6F007273733D002D700031373336<\/code><\/p>\n<\/blockquote>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u0435\u0448\u0438\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u043c\u0438 \u0432\u044b\u0432\u043e\u0434\u0430\u043c\u0438 \u043f\u0440\u0438 \u0435\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u044f\u0432\u043d\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/84f\/340\/b1f\/84f340b1f0aabe8095f630d5e054ce50.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b ps   \" title=\"\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b ps   \" width=\"1179\" height=\"1252\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/84f\/340\/b1f\/84f340b1f0aabe8095f630d5e054ce50.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b ps   <\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u00a0<strong>*.process.meta<\/strong>, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430:  <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f5d\/e88\/1bb\/f5de881bb4d22d151ecf1bbbb4c3b061.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" width=\"423\" height=\"223\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f5d\/e88\/1bb\/f5de881bb4d22d151ecf1bbbb4c3b061.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"15\" id=\"15\"><\/a><\/p>\n<h3>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: CWD<\/h3>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c\u00a0<code>CWD<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435\u00a0<code>cwd<\/code>\u00a0\u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0440\u0430\u0431\u043e\u0447\u0435\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432\u0448\u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432.<\/p>\n<blockquote>\n<p><code>type=CWD msg=audit(1704970843.287:209): cwd=\"\/home\/cm\/ansible-role\"<\/code><\/p>\n<\/blockquote>\n<p>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0432 \u0437\u0430\u043f\u0438\u0441\u044f\u0445\u00a0<code>PATH<\/code>\u00a0\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u00a0<code>cwd<\/code>. \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0438\u0436\u0435.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/76b\/e31\/66e\/76be3166e7dce6a7f39578f99adb4f86.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" width=\"875\" height=\"877\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/76b\/e31\/66e\/76be3166e7dce6a7f39578f99adb4f86.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"16\" id=\"16\"><\/a><\/p>\n<h3>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: EXECVE<\/h3>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c\u00a0<code>EXECVE<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041e\u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0445\u0441\u044f \u043a \u0432\u044b\u0437\u043e\u0432\u0430\u043c \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430\u00a0<strong>exec()<\/strong>.<\/p>\n<blockquote>\n<p><code>type=EXECVE msg=audit(1704970843.702:73702361): argc=5 a0=\"ps\" a1=\"-o\" a2=\"rss=\" a3=\"-p\" a4=\"1736\"<\/code><\/p>\n<\/blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439\u00a0<code>EXECVE<\/code>\u00a0\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e (\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d). \u041f\u043e\u043b\u0435\u00a0<code>argc<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.  <\/p>\n<blockquote>\n<p><code>type=EXECVE msg=audit(1704970843.734:38026): argc=10001 a0=\"docker\" a1=\"run\" a2=\"--name\" &lt;...> a125_len=58 a125[0]=\"input\/2023-01-21\/002935bd-fc0d-42fc-b37f-52c4970d760e.json\"<\/code><\/p>\n<p><code>type=EXECVE msg=audit(1704970843.734:38026):\u00a0 a126=\"input\/2023-01-21\/00297f08-8df5-482b-a37a-c3674f57652c.json\" &lt;...> a238_len=58 a238[0]=\"input\/2023-01-21\/00661c59-0511-4b4e-ab6e-4a6298517bfa.json\"<\/code><\/p>\n<\/blockquote>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432\u00a0a-\u043f\u043e\u043b\u044f\u0445 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u00a0<code>a*_len<\/code>\u00a0\u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0434\u043b\u0438\u043d\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0430 \u0432\u00a0<code>a*[i]<\/code>\u00a0\u2014 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u0438.<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/kernel\/auditsc.c#L1236 len_tmp = 0; if (require_data || (iter > 0) || ((len_abuf + sizeof(abuf)) > len_rem)) {  \/\/ \u0441 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 if (iter == 0) { len_tmp += snprintf(&amp;abuf[len_tmp],sizeof(abuf) - len_tmp, \" a%d_len=%lu\",arg, len_full ); } len_tmp += snprintf(&amp;abuf[len_tmp], sizeof(abuf) - len_tmp, \" a%d[%d]=\", arg, iter++ ); } else  \/\/ \u0431\u0435\u0437 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438 len_tmp += snprintf(&amp;abuf[len_tmp], sizeof(abuf) - len_tmp, \" a%d=\", arg );  WARN_ON(len_tmp >= sizeof(abuf)); abuf[sizeof(abuf) - 1] = '\\0';  \/* log the arg in the audit record *\/ audit_log_format(*ab, \"%s\", abuf);<\/code><\/pre>\n<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441\u00a0<code>PROCTITLE<\/code>\u00a0\u0438\u00a0<code>EXECVE<\/code>\u00a0\u043e\u0447\u0435\u043d\u044c \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0441 \u043f\u043e\u043b\u0435\u043c\u00a0<code>exe<\/code>\u00a0\u0438\u0437 \u0437\u0430\u043f\u0438\u0441\u0438\u00a0<code>SYSCALL<\/code>\u00a0\u0438 \u043f\u043e\u043b\u0435\u043c\u00a0<code>name<\/code>\u00a0\u0438\u0437 \u0437\u0430\u043f\u0438\u0441\u0438\u00a0<code>PATH<\/code>\u00a0\u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0412 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 (\u043f\u0443\u0442\u044c \u043a \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430). \u0414\u0440\u0443\u0433\u0438\u0435 \u0436\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c, \u0435\u0435 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u044b, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p><a class=\"anchor\" name=\"17\" id=\"17\"><\/a><\/p>\n<h3>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: SOCKADDR<\/h3>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c\u00a0<code>SOCKADDR<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u043a\u0435\u0442\u0435 \u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043d\u0430\u0434 \u043d\u0438\u043c.<\/p>\n<blockquote>\n<p><code>type=SOCKADDR msg=audit(1704970843.702:7777): saddr=020001BB0A0AC0E80000000000000000 SADDR={ saddr_fam=inet laddr=10.10.192.232 lport=443 }<\/code><\/p>\n<\/blockquote>\n<p>\u041f\u043e\u043b\u0435\u00a0<code>saddr<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u043a\u0435\u0442\u0435 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445, \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 HEX. \u0412 \u0435\u0433\u043e \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u043d\u043e\u043c \u00ab\u0441\u043e\u0431\u0440\u0430\u0442\u0435\u00bb\u00a0<code>SADDR<\/code>\u00a0\u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u0435, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u00a0<code>saddr<\/code>\u00a0\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u041f\u043e\u0434 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u043a\u0435\u0442\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0439. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/include\/linux\/socket.h#L187 #define AF_UNSPEC0 #define AF_UNIX1\/* Unix domain sockets *\/ #define AF_LOCAL1\/* POSIX name for AF_UNIX*\/ #define AF_INET2\/* Internet IP Protocol *\/ #define AF_AX253\/* Amateur Radio AX.25 *\/ #define AF_IPX4\/* Novell IPX *\/ \/\/ &lt;...><\/code><\/pre>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0431\u0430\u0439\u0442\u043e\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0441\u043e\u043a\u0435\u0442\u0430.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\"><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b saddr \u0438 \u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>saddr:<\/strong> 020000350A0034650000000000000000<br \/><strong>\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u043a\u0435\u0442\u0430:<\/strong> AF_INET<br \/><strong>\u0411\u0430\u0439\u0442\u044b \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443:<\/strong><br \/>\u00b7 2 \u0431\u0430\u0439\u0442\u0430: \u043f\u043e\u0440\u0442 (0035h = 53)<br \/>\u00b7 4 \u0431\u0430\u0439\u0442\u0430: IP-\u0430\u0434\u0440\u0435\u0441 (0A003465h = 10.0.52.101)<br \/>\u00b7 8 \u0431\u0430\u0439\u0442: \u043d\u0443\u043b\u0435\u0432\u044b\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>saddr:<\/strong> 0A000009000000002A0DD6C10000001C000000000000004E00000000<br \/><strong>\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u043a\u0435\u0442\u0430:<\/strong> AF_INET6<br \/><strong>\u0411\u0430\u0439\u0442\u044b \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443:<br \/><\/strong>\u00b7 2 \u0431\u0430\u0439\u0442\u0430: \u043f\u043e\u0440\u0442 (0009h = 9)<br \/>\u00b7 4 \u0431\u0430\u0439\u0442\u0430: \u043d\u0443\u043b\u0435\u0432\u044b\u0435<br \/>\u00b7 16 \u0431\u0430\u0439\u0442: IP-\u0430\u0434\u0440\u0435\u0441 (2A0DD6C10000001C000000000000004Eh = 2a0d:d6c1:0:1c::4e)<br \/>\u00b7 4 \u0431\u0430\u0439\u0442\u0430: \u043d\u0443\u043b\u0435\u0432\u044b\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>saddr:<\/strong> 0A00A6780000000000000000000000000000FFFF0A7EFF0300000000<br \/><strong>\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u043a\u0435\u0442\u0430:<\/strong> AF_INET6 (\u043a\u0435\u0439\u0441 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c IPv4, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0432 IPv6)<br \/><strong>\u0411\u0430\u0439\u0442\u044b \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443:<br \/><\/strong>\u00b7 2 \u0431\u0430\u0439\u0442\u0430: \u043f\u043e\u0440\u0442 (A678h = 42616)<br \/>\u00b7 4 \u0431\u0430\u0439\u0442\u0430: \u043d\u0443\u043b\u0435\u0432\u044b\u0435<br \/>\u00b7 16\u00a0\u0431\u0430\u0439\u0442: IP-\u0430\u0434\u0440\u0435\u0441 (00000000000000000000FFFF0A7EFF03h = 10.126.255.3)<br \/>\u00b7 4 \u0431\u0430\u0439\u0442\u0430: \u043d\u0443\u043b\u0435\u0432\u044b\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>saddr:<\/strong> 01002F6373692F6373692E736F636B00 <br \/><strong>\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u043a\u0435\u0442\u0430:<\/strong> AF_UNIX<br \/><strong>\u0412\u0441\u0435 \u0431\u0430\u0439\u0442\u044b:<\/strong> \u043f\u0443\u0442\u044c \u043a \u0441\u043e\u043a\u0435\u0442\u0443 (2F6373692F6373692E736F636B00h = \/csi\/csi.sock) <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c\u00a0<code>SOCKADDR<\/code>. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430\u00a0<strong>connect()<\/strong>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/63c\/0f4\/d44\/63c0f4d44a5c9147ba369ab0d8978544.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" width=\"790\" height=\"1090\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/63c\/0f4\/d44\/63c0f4d44a5c9147ba369ab0d8978544.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"18\" id=\"18\"><\/a><\/p>\n<h3>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u041f\u041e (USER_*, CRED_*, etc)<\/h3>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u044f\u0434\u0440\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0441\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432\u0445\u043e\u0434\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0442 OpenSSH:<\/p>\n<blockquote>\n<p><code>type=USER_LOGIN msg=audit(1705079375.303:37516): pid=1868146 uid=0 auid=1000 ses=24982 msg='op=login id=1000 exe=\"\/usr\/sbin\/sshd\" hostname=10.125.3.2 addr=10.125.3.2 terminal=\/dev\/pts\/0 res=success' UID=\"root\" AUID=\"zabbix\" ID=\"zabbix\"<\/code><\/p>\n<\/blockquote>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/kernel\/audit.c#L1364 case AUDIT_FIRST_USER_MSG ... AUDIT_LAST_USER_MSG: case AUDIT_FIRST_USER_MSG2 ... AUDIT_LAST_USER_MSG2: \/\/ &lt;...> err = audit_filter(msg_type, AUDIT_FILTER_USER); if (err == 1) { char *str = data;  \/\/ &lt;...>          \/\/ \u041f\u043e \u0441\u0443\u0442\u0438 - audit_log_common_recv_msg(),         \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0439         audit_log_user_recv_msg(&amp;ab, msg_type);  if (msg_type != AUDIT_USER_TTY) { str[data_len - 1] = '\\0';             \/\/ \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f audit_log_format(ab, \" msg='%.*s'\", AUDIT_MESSAGE_TEXT_MAX, str); } else { audit_log_format(ab, \" data=\"); if (data_len > 0 &amp;&amp; str[data_len - 1] == '\\0') data_len--; audit_log_n_untrustedstring(ab, str, data_len); } audit_log_end(ab); } break;   \/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/kernel\/audit.c#L1076 static void audit_log_common_recv_msg(struct audit_context *context, struct audit_buffer **ab, u16 msg_type) { uid_t uid = from_kuid(&amp;init_user_ns, current_uid()); pid_t pid = task_tgid_nr(current);  \/\/ &lt;...>  *ab = audit_log_start(context, GFP_KERNEL, msg_type); if (unlikely(!*ab)) return;  \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u043b\u044f audit_log_format(*ab, \"pid=%d uid=%u \", pid, uid); audit_log_session_info(*ab); audit_log_task_context(*ab); }<\/code><\/pre>\n<p>\u041f\u043e\u043b\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435, \u043f\u0440\u0438\u0441\u043b\u0430\u0432\u0448\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435, \u043e\u0442 \u0447\u044c\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438\u00a0\u043e\u043d \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0438 \u043e \u0441\u0435\u0441\u0441\u0438\u0438. \u0422\u0435\u043b\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435\u00a0<code>msg<\/code>. \u041e\u043d\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439\u00a0<strong>libaudit.h<\/strong>.<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-userspace\/blob\/572eb7d4fe926e7c1c52166d08e78af54877cbc5\/lib\/libaudit.h#L710 extern int audit_log_user_message(int audit_fd, int type, const char *message,  const char *hostname, const char *addr, const char *tty, int result); extern int audit_log_user_comm_message(int audit_fd, int type, const char *message, const char *comm, const char *hostname, const char *addr, const char *tty, int result); extern int audit_log_acct_message(int audit_fd, int type, const char *pgname, const char *op, const char *name, unsigned int id,     const char *host, const char *addr, const char *tty, int result); extern int audit_log_user_avc_message(int audit_fd, int type, const char *message, const char *hostname, const char *addr, const char *tty, uid_t uid); extern int audit_log_semanage_message(int audit_fd, int type, const char *pgname, const char *op, const char *name, unsigned int id, const char *new_seuser, const char *new_role, const char *new_range, const char *old_seuser, const char *old_role, const char *old_range, const char *host, const char *addr, const char *tty, int result); extern int audit_log_user_command(int audit_fd, int type, const char *command, const char *tty, int result);   \/\/ https:\/\/github.com\/linux-audit\/audit-userspace\/blob\/572eb7d4fe926e7c1c52166d08e78af54877cbc5\/lib\/audit_logging.c#L480 \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f audit_log_acct_message() if (name &amp;&amp; id == -1) { if (audit_value_needs_encoding(name, len)) { audit_encode_value(user, name, len); format = \"op=%s acct=%s exe=%s hostname=%s addr=%s terminal=%s res=%s\"; } else format = \"op=%s acct=\\\"%s\\\" exe=%s hostname=%s addr=%s terminal=%s res=%s\";  snprintf(buf, sizeof(buf), format, op, user, exename, host ? host : \"?\", addrbuf, tty ? tty : \"?\", success ); } else snprintf(buf, sizeof(buf), \"op=%s id=%u exe=%s hostname=%s addr=%s terminal=%s res=%s\", op, id, exename, host ? host : \"?\", addrbuf, tty ? tty : \"?\", success );  \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u044f\u0434\u0440\u043e ret = audit_send_user_message(audit_fd, type, REAL_ERR, buf);<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u041f\u041e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442 auditd, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libaudit \u0432 OpenSSH:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/openssh\/openssh-portable\/blob\/V_9_4_P1\/audit-linux.c #include &lt;libaudit.h> #include \"log.h\" #include \"audit.h\" \/\/ &lt;...>  int linux_audit_record_event(int uid, const char *username, const char *hostname, const char *ip, const char *ttyn, int success) { int audit_fd, rc, saved_errno; \/\/ &lt;...>  rc = audit_log_acct_message(audit_fd, AUDIT_USER_LOGIN,     NULL, \"login\", username ? username : \"(unknown)\", username == NULL ? uid : -1,      hostname, ip, ttyn, success );  \/\/ &lt;...> return rc >= 0; }  void audit_event(struct ssh *ssh, ssh_audit_event_t event) { switch(event) { case SSH_AUTH_SUCCESS: case SSH_CONNECTION_CLOSE: case SSH_NOLOGIN: case SSH_LOGIN_EXCEED_MAXTRIES: case SSH_LOGIN_ROOT_DENIED: break; case SSH_AUTH_FAIL_NONE: case SSH_AUTH_FAIL_PASSWD: case SSH_AUTH_FAIL_KBDINT: case SSH_AUTH_FAIL_PUBKEY: case SSH_AUTH_FAIL_HOSTBASED: case SSH_AUTH_FAIL_GSSAPI: case SSH_INVALID_USER: linux_audit_record_event(-1, audit_username(), NULL,     ssh_remote_ipaddr(ssh), \"sshd\", 0); break; default: debug(\"%s: unhandled event %d\", __func__, event); break; } }<\/code><\/pre>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f1\/70c\/77b\/4f170c77b8d4fc682e6f2ef2ee3e8928.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM\" width=\"742\" height=\"1222\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4f1\/70c\/77b\/4f170c77b8d4fc682e6f2ef2ee3e8928.png\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 Red Hat, \u0447\u0430\u0441\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0430\u0442\u0447\u0438 \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0438\u0435 \u043d\u0430\u0431\u043e\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u0435\u0441\u0441\u0438\u0438 SSH \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f OpenSSH \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u043b\u044f CentOS Stream 8:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/openssh\/openssh-portable\/blob\/daa5b2d869ee5a16f3ef9035aa0ad3c70cf4028e\/audit-linux.c#L86 void audit_session_open(struct logininfo *li) { if (linux_audit_record_event(li->uid, NULL, li->hostname, NULL,     li->line, 1) == 0) fatal(\"linux_audit_write_entry failed: %s\", strerror(errno)); }  \/\/ https:\/\/gitlab.com\/redhat\/centos-stream\/rpms\/openssh\/-\/blame\/c8s\/openssh-7.6p1-audit.patch#L487  void audit_session_open(struct logininfo *li)  { -if (linux_audit_record_event(li->uid, NULL, li->hostname, NULL, -    li->line, 1) == 0) -fatal(\"linux_audit_write_entry failed: %s\", strerror(errno)); +if (!user_login_count++) +linux_audit_user_logxxx(li->uid, NULL, li->hostname, +    li->line, 1, AUDIT_USER_LOGIN); +linux_audit_user_logxxx(li->uid, NULL, li->hostname, +    li->line, 1, AUDIT_USER_START);  }<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u00a0<code>USER_LOGIN<\/code>\u00a0\u043d\u0430 Red-Hat-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u041e\u0421 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:\u00a0<code>USER_LOGIN<\/code>\u00a0\u0438\u00a0<code>USER_START<\/code>. \u041d\u0430 \u0442\u0430\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445.\u00a0<\/p>\n<p>\u0421\u0440\u0435\u0434\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>Shadow Utils\u00a0\u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>Pluggable Authentication Modules (PAM)\u00a0\u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>Systemd\u00a0\u2014 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0434\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0430 GitHub \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u0443\u0434\u0438\u0442\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/db0\/bef\/926\/db0bef926d7fe39463e079aa566d02c8.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u043e\u0438\u0441\u043a\u0430\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u043e\u0438\u0441\u043a\u0430\" width=\"1256\" height=\"1367\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db0\/bef\/926\/db0bef926d7fe39463e079aa566d02c8.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u043e\u0438\u0441\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p><a class=\"anchor\" name=\"19\" id=\"19\"><\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043e\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0435\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0432\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0411\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c \u043d\u0430\u0448\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435.<\/p>\n<\/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\/789014\/\"> https:\/\/habr.com\/ru\/articles\/789014\/<\/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<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435\u0445 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0420\u043e\u043c\u0430, \u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u041e\u0421 Linux \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u043e\u0439 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/www.ptsecurity.com\/ru-ru\/services\/esc\/\">PT Expert Security Center<\/a>.<\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u0438\u0432\u044b \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e \u043e\u0431\u043c\u0435\u043d\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043e\u0431 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u043c\u043d\u043e\u0433\u0438\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Linux-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u041e\u0421 \u2014 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0430\u0443\u0434\u0438\u0442\u0430 Linux (auditd). \u041f\u0440\u0438 \u0434\u043e\u043b\u0436\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c \u043f\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f auditd \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0418\u0411 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430\u043c\u0438\u00a0<a href=\"https:\/\/www.ptsecurity.com\/ru-ru\/products\/mpsiem\/\">MaxPatrol SIEM<\/a>. \u041f\u0440\u0438 \u0438\u0445 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u044b \u0441\u0442\u0430\u0440\u0430\u043b\u0438\u0441\u044c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:<\/p>\n<ol>\n<li>\n<p>\u0421\u0432\u044f\u0437\u0430\u043d\u044b \u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439? \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c?<\/p>\n<\/li>\n<li>\n<p>\u0427\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438\u00a0<code>type=XXX<\/code><em>\u00a0<\/em>\u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435, \u0438 \u043a\u0430\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043d\u0438\u0445?<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0442\u0438\u043f\u0430\u00a0<code>type=USER_*<\/code>\u00a0\u0438\u00a0<code>type=CRED_*<\/code>\u00a0\u043f\u0440\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u044f <code>type<\/code> \u043c\u043e\u0433\u0443\u0442 \u043d\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439 \u0438 \u043a\u0430\u043a \u0438\u0445 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 SIEM?<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u043c\u043d\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0447\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 man (\u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 Linux). \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0436\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b, \u0438 \u0438\u0445 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u044f\u0441\u043d\u044f\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 auditd: audit-kernel\u00a0<a href=\"https:\/\/github.com\/linux-audit\/audit-kernel\/tree\/v6.4\">6.4<\/a>\u00a0\u0438 audit-userspace\u00a0<a href=\"https:\/\/github.com\/linux-audit\/audit-userspace\/tree\/v3.1.2\">3.1.2<\/a>. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 MaxPatrol SIEM. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438\u00a0<a href=\"https:\/\/github.com\/Security-Experts-Community\/open-xp-rules\/tree\/master\/packages\/system\/normalization_formulas\/UNIX_like\/auditd\/syslog_structured\">Security Experts Community<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 <\/summary>\n<div class=\"spoiler__content\">\n<p><a href=\"#1\">\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/a><\/p>\n<p><a href=\"#2\">\u0421\u043e\u0431\u044b\u0442\u0438\u044f<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#2\">\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#2\">LOGIN<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\">DAEMON_START \/ DAEMON_END<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\">CONFIG_CHANGE<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p><a href=\"#5\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: SYSCALL<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#6\">\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#7\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0437\u043e\u0432\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#8\">\u041f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0430\u043c: SYSCALL \u0438 PATH<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#9\">\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#10\">\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#11\">\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0435\u0441\u0441\u0438\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#12\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#13\">\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0430\u0443\u0434\u0438\u0442\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p><a href=\"#14\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: PROCTITLE<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#15\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: CWD<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#16\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: EXECVE<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#17\">\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b: SOCKADDR<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#18\">\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u041f\u041e (USER_*, CRED_*, etc)<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a href=\"#19\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/h2>\n<p>\u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 Linux\u00a0\u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u044f\u0434\u0440\u0430, \u043d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u043d\u0438\u043c.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430 Linux<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u044f\u0434\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 netlink-\u0441\u043e\u043a\u0435\u0442. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 auditd \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0443\u0437\u043b\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u0442.\u043f. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libaudit \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 auditd, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b <em>audit.log<\/em>.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435\u00a0\u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<blockquote>\n<p><code>type=SYSCALL msg=audit(1663937111.702:73702361): arch=c000003e syscall=59 success=yes exit=0 a0=7f90824cfbf8 a1=7f907a020608 a2=7f907d9de920 a3=7f90742fcb10 items=2 ppid=1736 pid=3202324 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 tty=(none) ses=4294967295 comm=\"ps\" exe=\"\/usr\/bin\/ps\" key=\"execve_rule\" ARCH=x86_64 SYSCALL=execve AUID=\"unset\" UID=\"git\" GID=\"git\" EUID=\"git\" SUID=\"git\" FSUID=\"git\" EGID=\"git\" SGID=\"git\" FSGID=\"git\"<\/code><\/p>\n<p><code>type=EXECVE msg=audit(1663937111.702:73702361): argc=5 a0=\"ps\" a1=\"-o\" a2=\"rss=\" a3=\"-p\" a4=\"1736\"<\/code><\/p>\n<p><code>type=CWD msg=audit(1663937111.702:73702361) cwd=\"\/opt\/gitlab\/sv\/gitlab-exporter\"<\/code><\/p>\n<p><code>type=PROCTITLE msg=audit(1663937111.702:73702361): proctitle=7073002D6F007273733D002D700031373336<\/code><\/p>\n<\/blockquote>\n<p>\u041e\u043d\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0447\u0438\u0441\u043b\u0443-\u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0443, \u0438\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f (73702361 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435). \u0411\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e\u00a0<code>audit_id<\/code>. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u201c1\u201d, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 1. \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 MaxPatrol SIEM \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u0443\u0434\u043e\u0431\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438. \u041e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0438\u043c\u0435\u043d\u0430.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c.<\/p>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f<\/h2>\n<h3>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0434\u0438\u0442\u0430<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u044b, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<h4>LOGIN<\/h4>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u043e\u0431\u0437\u043e\u0440 \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u00a0<code>LOGIN<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0433\u043e (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439\u00a0<code>auid<\/code>\u00a0\u0438\u00a0<code>ses<\/code>) \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041e\u043d\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:<\/p>\n<blockquote>\n<p><code>type=LOGIN msg=audit(1705079372.663:35922): pid=1868146 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=24982 res=1 UID=\"root\" OLD-AUID=\"unset\" AUID=\"zabbix\"<\/code><\/p>\n<p><code>type=SYSCALL msg=audit(1693231661.663:35922): arch=c000003e syscall=1 success=yes exit=4 a0=3 a1=7ffea4955270 a2=4 a3=7f8fa0234371 items=0 ppid=1429800 pid=1868146 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=24982 comm=\"sshd\" exe=\"\/usr\/sbin\/sshd\" key=(null) ARCH=x86_64 SYSCALL=write AUID=\"zabbix\" UID=\"root\" GID=\"root\" EUID=\"root\" SUID=\"root\" FSUID=\"root\" EGID=\"root\" SGID=\"root\" FSGID=\"root\"<\/code><\/p>\n<p><code>type=PROCTITLE msg=audit(1693231661.663:35922): proctitle=2F7573722F7362696E2F73736864002D44002D52<\/code><\/p>\n<\/blockquote>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-kernel\/blob\/6995e2de6891c724bfeb2db33d7b87775f913ad1\/kernel\/audit.c#L2308 static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid, unsigned int oldsessionid, unsigned int sessionid, int rc) { struct audit_buffer *ab; uid_t uid, oldloginuid, loginuid; struct tty_struct *tty;  if (!audit_enabled) return;  ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_LOGIN); if (!ab) return;  uid = from_kuid(&amp;init_user_ns, task_uid(current)); oldloginuid = from_kuid(&amp;init_user_ns, koldloginuid); loginuid = from_kuid(&amp;init_user_ns, kloginuid), tty = audit_get_tty();  audit_log_format(ab, \"pid=%d uid=%u\", task_tgid_nr(current), uid); audit_log_task_context(ab); audit_log_format(ab, \" old-auid=%u auid=%u tty=%s old-ses=%u ses=%u res=%d\", oldloginuid, loginuid, tty ? tty_name(tty) : \"(none)\", oldsessionid, sessionid, !rc     ); audit_put_tty(tty); audit_log_end(ab); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b auditd \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432 \u0438\u0445 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><strong>audit_log_start().<\/strong>\u00a0\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u00a0<code>AUDIT_*<\/code>\u00a0\u0438\u0437 \u0435\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u0434\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f\u00a0<code>type<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>audit_log_format().<\/strong>\u00a0\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u0438. \u0418\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u2014 \u043a\u0430\u0436\u0434\u0430\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0437\u0443\u0447\u0430\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u043e \u0437\u043d\u0430\u043d\u0438\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>audit_log_session_info().<\/strong>\u00a0\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u041d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043e\u043d\u0430 \u0441\u043b\u0443\u0436\u0438\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439\u00a0<code>auid<\/code>\u00a0\u0438\u00a0<code>ses<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438\u00a0<code>LOGIN<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>audit_log_task_context().\u00a0<\/strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f\u00a0<code>subj<\/code>\u00a0\u0432 \u0437\u0430\u043f\u0438\u0441\u044c. \u041e\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043c\u0435\u0442\u043a\u0435 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u043d\u0434\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023<\/code> \u0434\u043b\u044f SELinux).<\/p>\n<\/li>\n<li>\n<p><strong>audit_log_end().<\/strong>\u00a0\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0430\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044e. \u0414\u043b\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b\u00a0<code>auid<\/code>\u00a0\u0438\u00a0<code>ses<\/code>. \u041f\u043e\u043b\u0435\u00a0<code>auid<\/code>\u00a0(audit uid)\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0415\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u0432\u043e\u0437\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0435\u0441\u0441\u0438\u0438. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<strong>su<\/strong>\u00a0\u0438\u043b\u0438\u00a0<strong>sudo,<\/strong>\u00a0\u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code>auid<\/code>\u00a0\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445. \u041f\u043e\u043b\u0435\u00a0<code>ses<\/code>\u00a0\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0435\u0441\u0441\u0438\u0438.<\/p>\n<p>Old-\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043f\u043e\u043b\u0435\u0439\u00a0<code>auid<\/code>\u00a0\u0438\u00a0<code>ses<\/code><em>,<\/em>\u00a0\u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 4294967295. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/man7.org\/linux\/man-pages\/man3\/audit_setloginuid.3.html\">\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a>\u00a0<strong>audit_setloginuid()<\/strong>\u00a0\u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0432 MaxPatrol SIEM<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435\u00a0<code>SYSCALL<\/code>\u00a0\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043f\u0440\u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u00a0<code>CONFIG_CHANGE<\/code>.<\/p>\n<p><a class=\"anchor\" name=\"#3\" id=\"#3\"><\/a><\/p>\n<h4>DAEMON_START \/ DAEMON_END<\/h4>\n<p>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u044d\u0442\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u044e\u0442 \u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0441\u043b\u0443\u0436\u0431\u044b \u0430\u0443\u0434\u0438\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/p>\n<blockquote>\n<p><code>type=DAEMON_START msg=audit(1695054308.076:7647): op=start ver=3.0.7 format=enriched kernel=5.4.0-137-generic auid=4294967295 pid=751 uid=0 ses=4294967295 subj=unconfined\u00a0 res=success AUID=\"unset\" UID=\"root\"<\/code><\/p>\n<p><code>&lt;...><\/code><\/p>\n<p><code>type=DAEMON_END msg=audit(1695054400.076:7648): op=terminate auid=0 pid=1 subj= res=success AUID=\"root\"<\/code> <\/p>\n<\/blockquote>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u00a0<code>DAEMON_*<\/code>\u00a0\u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0445\u00a0<code>audit_id<\/code>\u00a0\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c\u00a0\u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.<\/p>\n<pre><code class=\"cpp\">\/\/ https:\/\/github.com\/linux-audit\/audit-userspace\/blob\/572eb7d4fe926e7c1c52166d08e78af54877cbc5\/src\/auditd.c#L306 if (seq_num == 0) { srandom(time(NULL)); seq_num = random() % 10000;  \/\/ \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f } else seq_num++; \/\/ Write event into netlink area like normal events if (gettimeofday(&amp;tv, NULL) == 0) { e->reply.len = snprintf((char *)e->reply.msg.data, DMSG_SIZE, \"audit(%lu.%03u:%u): %s\", tv.tv_sec, (unsigned)(tv.tv_usec\/1000), seq_num, str ); } else { e->reply.len = snprintf((char *)e->reply.msg.data, DMSG_SIZE, \"audit(%lu.%03d:%u): %s\", (unsigned long)time(NULL), 0, seq_num, str ); }<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u0432\u0443\u0445 \u043f\u043e\u0434\u0440\u044f\u0434 \u0438\u0434\u0443\u0449\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<blockquote>\n<p><code>type=DAEMON_START msg=audit(1695054308.076:7647): op=start ver=3.0.7 format=enriched kernel=5.4.0-137-generic auid=4294967295 pid=751 uid=0 ses=4294967295 subj=unconfined\u00a0 res=success AUID=\"unset\" UID=\"root\"<\/code><\/p>\n<p><code>type=CONFIG_CHANGE msg=audit(1695054308.241:5): audit_backlog_limit=8192 old=64 auid=4294967295 ses=4294967295<\/code><\/p>\n<\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-366375","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366375","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=366375"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366375\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=366375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=366375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=366375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}