diff --git a/rules/admin/package-install.yara b/rules/admin/package-install.yara index e3952b84..c2cb330e 100644 --- a/rules/admin/package-install.yara +++ b/rules/admin/package-install.yara @@ -1,4 +1,4 @@ -rule yum_installer : suspicious { +rule yum_installer : notable { meta: description = "Installs software using yum" strings: @@ -7,7 +7,7 @@ rule yum_installer : suspicious { $val } -rule dnf_installer : suspicious { +rule dnf_installer : notable { meta: description = "Installs software using dnf" strings: @@ -16,7 +16,7 @@ rule dnf_installer : suspicious { $val } -rule rpm_installer : suspicious { +rule rpm_installer : notable { meta: description = "Installs software using rpm" strings: @@ -25,7 +25,7 @@ rule rpm_installer : suspicious { $val } -rule apt_installer : suspicious { +rule apt_installer : notable { meta: description = "Installs software using apt" strings: @@ -34,7 +34,7 @@ rule apt_installer : suspicious { $val } -rule apt_get_installer : suspicious { +rule apt_get_installer : notable { meta: description = "Installs software using apt-get" strings: @@ -45,7 +45,7 @@ rule apt_get_installer : suspicious { $val and not $foo } -rule apk_installer : suspicious { +rule apk_installer : notable { meta: description = "Installs software using APK" strings: @@ -62,18 +62,3 @@ rule pip_installer_regex : notable { condition: any of them } - -rule pip_installer : suspicious { - meta: - description = "Installs software using pip from python" - strings: - $pip_install = "os.system('pip install" - $pip_install_spaces = "'pip', 'install'" - $pip_install_args = "'pip','install'" - $pip3_install = "os.system('pip3 install" - $pip3_install_spaces = "'pip3', 'install'" - $pip3_install_args = "'pip3','install'" - condition: - any of them -} - diff --git a/rules/admin/pip_install.yara b/rules/admin/pip_install.yara new file mode 100644 index 00000000..9859387b --- /dev/null +++ b/rules/admin/pip_install.yara @@ -0,0 +1,14 @@ +rule pip_installer : suspicious { + meta: + description = "Installs software using pip from python" + strings: + $pip_install = "os.system('pip install" + $pip_install_spaces = "'pip', 'install'" + $pip_install_args = "'pip','install'" + $pip3_install = "os.system('pip3 install" + $pip3_install_spaces = "'pip3', 'install'" + $pip3_install_args = "'pip3','install'" + condition: + any of them +} + diff --git a/rules/admin/shutdown.yara b/rules/admin/shutdown.yara index 3f63a732..1dcf212c 100644 --- a/rules/admin/shutdown.yara +++ b/rules/admin/shutdown.yara @@ -1,5 +1,5 @@ -rule shutdown_s : suspicious { +rule shutdown_val : notable { meta: description = "calls shutdown command" strings: diff --git a/rules/combo/backdoor/php.yara b/rules/combo/backdoor/php.yara index d1e701d1..3077f03c 100644 --- a/rules/combo/backdoor/php.yara +++ b/rules/combo/backdoor/php.yara @@ -9,7 +9,7 @@ rule php_possible_backdoor : critical { hash_2023_0xShell_0xShellori = "506e12e4ce1359ffab46038c4bf83d3ab443b7c5db0d5c8f3ad05340cb09c38e" hash_2023_0xShell_wesoori = "bab1040a9e569d7bf693ac907948a09323c5f7e7005012f7b75b5c1b2ced10ad" strings: - $php = "php" + $php = "