From 6beeeebe3c43f0643e521139d3f8b1ff4a7f3059 Mon Sep 17 00:00:00 2001 From: Julien Voisin Date: Thu, 5 Mar 2015 15:36:22 +0100 Subject: Yara is cooler than Python --- malwares.yara | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 malwares.yara (limited to 'malwares.yara') diff --git a/malwares.yara b/malwares.yara new file mode 100644 index 0000000..3d857c1 --- /dev/null +++ b/malwares.yara @@ -0,0 +1,161 @@ +private rule IsPhp +{ + strings: + $php = " 5 or #hexvars > 5) +} + +rule CloudFlareBypass +{ + strings: + $chk_jschl = "chk_jschl" + $jschl_vc = "jschl_vc" + $jschl_answer = "jschl_answer" + + condition: + 2 of them // Better be safe than sorry +} + +rule DodgyPhp +{ + strings: + $execution = /(eval|passthru|exec|system|win_shell_execute)\((base64_decode|php:\/\/input|str_rot13|gzinflate|getenv|\\?\$_(GET|REQUEST|POST))/ + $basedir_bypass = /(curl_init\([\"']file:[\"']|file:file:\/\/)/ + $safemode_bypass = /\x00\/\.\.\/|LD_PRELOAD/ + $shellshock = /putenv\(["']PHP_[^=]=\(\) { [^}] };/ + $restore_bypass = /ini_restore\(['"](safe_mode|open_basedir)['"]\)/ + $various = "