{"id":482805,"date":"2026-06-08T12:05:08","date_gmt":"2026-06-08T12:05:08","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=482805"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=482805","title":{"rendered":"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433, IDS \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437. YARA"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442<\/h3>\n<p>YARA \u2014 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 YARA \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b (\u0441\u0442\u0440\u043e\u043a\u0438, \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f) \u0432 \u0444\u0430\u0439\u043b\u0430\u0445. \u0428\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430\u0445, IDS, threat hunting \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0430\u043b\u0432\u0430\u0440\u0438.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<pre><code class=\"bash\">sudo apt install yara<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/h3>\n<pre><code>yara [\u043e\u043f\u0446\u0438\u0438] &lt;\u0444\u0430\u0439\u043b \u043f\u0440\u0430\u0432\u0438\u043b&gt; &lt;\u0446\u0435\u043b\u044c&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u0438 \u043e\u043f\u0446\u0438\u0438<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0424\u043b\u0430\u0433<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-r<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u043e\u0431\u0445\u043e\u0434 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-s<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-p N<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-m<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-n<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b (\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-g<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0435\u0433\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-l N<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041b\u0438\u043c\u0438\u0442 \u0441\u0442\u0440\u043e\u043a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-d VAR=VAL<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>--no-warnings<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u0435\u0437 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-f<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0440\u0435\u0436\u0438\u043c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>-x MODULE<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/h3>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 1 \u2014 \u043f\u043e\u0438\u0441\u043a \u043c\u0430\u043b\u0432\u0430\u0440\u0438 \u043f\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c:<\/strong><\/p>\n<pre><code class=\"bash\"># \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f):git clone https:\/\/github.com\/Yara-Rules\/rules.git \/opt\/yara-rules# \u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:yara \/opt\/yara-rules\/malware\/RAT.yar \/tmp\/suspicious_file.exe<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code>QUASAR_RAT \/tmp\/suspicious_file.exeWin32_Trojan_Generic \/tmp\/suspicious_file.exe<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 2 \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/strong><\/p>\n<pre><code class=\"bash\">cat &gt; detect_webshell.yar &lt;&lt; 'EOF'rule WebShell_PHP_Generic {    meta:        description = \"Detect PHP web shells\"        severity = \"critical\"    strings:        $s1 = \"eval(\" nocase        $s2 = \"base64_decode(\" nocase        $s3 = \"system(\" nocase        $s4 = \"passthru(\" nocase        $s5 = \"$_REQUEST\" nocase        $s6 = \"$_POST\" nocase    condition:        filesize &lt; 100KB and        3 of ($s*)}EOFyara detect_webshell.yar \/var\/www\/html\/ -r -s<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code>WebShell_PHP_Generic \/var\/www\/html\/images\/thumb.php0x0: $s1: eval(0x15: $s2: base64_decode(0x45: $s5: $_REQUEST<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 3 \u2014 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:<\/strong><\/p>\n<pre><code class=\"bash\"># \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c PID \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:ps aux | grep suspicious# \u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441:yara -p 4 \/opt\/rules\/malware.yar 1234<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code>Cobalt_Strike_Beacon 1234<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0427\u0430\u0441\u0442\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><strong>\u201cError: could not open file\u201d<\/strong> \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0443 \u043f\u0440\u0430\u0432\u0438\u043b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439<\/strong> \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>-p 8<\/code> \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043c\u0435\u0442\u043a\u0438 OPSEC<\/h3>\n<ul>\n<li>\n<p>YARA \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0449\u0438\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u043b\u044f threat hunting \u2014 \u0437\u043d\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0445 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u043e\u0445\u043e\u0442\u044b \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0443\u0433\u0440\u043e\u0437\u044b.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0421\u0432\u044f\u0437\u043a\u0430 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438<\/h3>\n<pre><code>yara (\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u043b\u0432\u0430\u0440\u0438) \u2192 ghidra (\u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432)yara + volatility (\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043c\u043f\u0430 \u043f\u0430\u043c\u044f\u0442\u0438)yara \u2192 sigma (\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u0432 SIEM \u0444\u043e\u0440\u043c\u0430\u0442\u044b)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<p>\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\/1044952\/\">https:\/\/habr.com\/ru\/articles\/1044952\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442YARA \u2014 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 YARA \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b (\u0441\u0442\u0440\u043e\u043a\u0438, \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f) \u0432 \u0444\u0430\u0439\u043b\u0430\u0445. \u0428\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430\u0445, IDS, threat hunting \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0430\u043b\u0432\u0430\u0440\u0438.\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430sudo apt install yara\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441yara [\u043e\u043f\u0446\u0438\u0438] &lt;\u0444\u0430\u0439\u043b \u043f\u0440\u0430\u0432\u0438\u043b&gt; &lt;\u0446\u0435\u043b\u044c&gt;\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u0438 \u043e\u043f\u0446\u0438\u0438\u0424\u043b\u0430\u0433\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435-r\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u043e\u0431\u0445\u043e\u0434 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439-s\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438-p N\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432-m\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b-n\u0418\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b (\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f)-g\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0435\u0433\u0438-l N\u041b\u0438\u043c\u0438\u0442 \u0441\u0442\u0440\u043e\u043a-d VAR=VAL\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e&#8212;no-warnings\u0411\u0435\u0437 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439-f\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0440\u0435\u0436\u0438\u043c-x MODULE\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b\u041f\u0440\u0438\u043c\u0435\u0440 1 \u2014 \u043f\u043e\u0438\u0441\u043a \u043c\u0430\u043b\u0432\u0430\u0440\u0438 \u043f\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c:# \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f):git clone https:\/\/github.com\/Yara-Rules\/rules.git \/opt\/yara-rules# \u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:yara \/opt\/yara-rules\/malware\/RAT.yar \/tmp\/suspicious_file.exeQUASAR_RAT \/tmp\/suspicious_file.exeWin32_Trojan_Generic \/tmp\/suspicious_file.exe\u041f\u0440\u0438\u043c\u0435\u0440 2 \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430:cat &gt; detect_webshell.yar &lt;&lt; &#8216;EOF&#8217;rule WebShell_PHP_Generic {    meta:        description = &#171;Detect PHP web shells&#187;        severity = &#171;critical&#187;    strings:        $s1 = &#171;eval(&#187; nocase        $s2 = &#171;base64_decode(&#187; nocase        $s3 = &#171;system(&#187; nocase        $s4 = &#171;passthru(&#187; nocase        $s5 = &#171;$_REQUEST&#187; nocase        $s6 = &#171;$_POST&#187; nocase    condition:        filesize &lt; 100KB and        3 of ($s*)}EOFyara detect_webshell.yar \/var\/www\/html\/ -r -sWebShell_PHP_Generic \/var\/www\/html\/images\/thumb.php0x0: $s1: eval(0x15: $s2: base64_decode(0x45: $s5: $_REQUEST\u041f\u0440\u0438\u043c\u0435\u0440 3 \u2014 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:# \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c PID \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:ps aux | grep suspicious# \u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441:yara -p 4 \/opt\/rules\/malware.yar 1234Cobalt_Strike_Beacon 1234\u0427\u0430\u0441\u0442\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438\u201cError: could not open file\u201d \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0443 \u043f\u0440\u0430\u0432\u0438\u043b.\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 -p 8 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.\u0417\u0430\u043c\u0435\u0442\u043a\u0438 OPSECYARA \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0449\u0438\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u043b\u044f threat hunting \u2014 \u0437\u043d\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0445 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c.\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u043e\u0445\u043e\u0442\u044b \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0443\u0433\u0440\u043e\u0437\u044b.\u0421\u0432\u044f\u0437\u043a\u0430 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438yara (\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u043b\u0432\u0430\u0440\u0438) \u2192 ghidra (\u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432)yara + volatility (\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043c\u043f\u0430 \u043f\u0430\u043c\u044f\u0442\u0438)yara \u2192 sigma (\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u0432 SIEM \u0444\u043e\u0440\u043c\u0430\u0442\u044b)\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1044952\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-482805","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/482805","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=482805"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/482805\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=482805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=482805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=482805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}