summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Voisin2015-04-15 18:34:43 +0200
committerJulien Voisin2015-04-15 18:34:43 +0200
commit1eec91dbcf6959fa3bd92bb21582c75f58f4be8c (patch)
tree5db61d5392c1f4d78d2bed36f5edcc9ca9db7897
parent91a4e5d3b154bd7207ab8482a5c0384c77815860 (diff)
Ajout de sites DANGEROUS
Et hotfix de la detection des preg_replace
-rw-r--r--malwares.yara10
1 files changed, 8 insertions, 2 deletions
diff --git a/malwares.yara b/malwares.yara
index 352d084..0cf4948 100644
--- a/malwares.yara
+++ b/malwares.yara
@@ -98,12 +98,13 @@ rule DodgyPhp
98{ 98{
99 strings: 99 strings:
100 $execution = /(eval|passthru|exec|system|win_shell_execute)\((base64_decode|php:\/\/input|str_rot13|gz(inflate|uncompress)|getenv|\\?\$_(GET|REQUEST|POST))/ 100 $execution = /(eval|passthru|exec|system|win_shell_execute)\((base64_decode|php:\/\/input|str_rot13|gz(inflate|uncompress)|getenv|\\?\$_(GET|REQUEST|POST))/
101 $double_encoding = /(base64_decode\s*\(\s*){2}/
101 $basedir_bypass = /(curl_init\([\"']file:[\"']|file:file:\/\/)/ 102 $basedir_bypass = /(curl_init\([\"']file:[\"']|file:file:\/\/)/
102 $safemode_bypass = /\x00\/\.\.\/|LD_PRELOAD/ 103 $safemode_bypass = /\x00\/\.\.\/|LD_PRELOAD/
103 $shellshock = /putenv\(["']PHP_[^=]=\(\) { [^}] };/ 104 $shellshock = /putenv\(["']PHP_[^=]=\(\) { [^}] };/
104 $restore_bypass = /ini_restore\(['"](safe_mode|open_basedir)['"]\)/ 105 $restore_bypass = /ini_restore\(['"](safe_mode|open_basedir)['"]\)/
105 $various = "<!--#exec cmd=" //http://www.w3.org/Jigsaw/Doc/User/SSI.html#exec 106 $various = "<!--#exec cmd=" //http://www.w3.org/Jigsaw/Doc/User/SSI.html#exec
106 $pr = /preg_replace\(['"]\/[^\/]\/e['"]/ // http://php.net/manual/en/function.preg-replace.php 107 $pr = /preg_replace\(['"]\/[^\/]*\/e['"]/ // http://php.net/manual/en/function.preg-replace.php
107 $include = /include\([^\.]+\.(png|jpg|gif|bmp)/ // Clever includes 108 $include = /include\([^\.]+\.(png|jpg|gif|bmp)/ // Clever includes
108 $htaccess = "SetHandler application/x-httpd-php" 109 $htaccess = "SetHandler application/x-httpd-php"
109 110
@@ -190,7 +191,12 @@ rule ExploitsWebsites
190 $injector = "1337day.com" 191 $injector = "1337day.com"
191 $rapid7 = "rapid7.com" 192 $rapid7 = "rapid7.com"
192 $shodan = "shodan.io" 193 $shodan = "shodan.io"
193 $packetstorm = "packetstormsecurity.com" 194 $packetstorm = "packetstormsecurity"
195 $crackfor = "crackfor"
196 $rednoize = "md5.rednoize"
197 $hashcracking = "hashcracking"
198 $darkc0de = "darkc0de"
199 $securityfocus = "securityfocus"
194 200
195 condition: 201 condition:
196 IsPhp and any of them 202 IsPhp and any of them