diff options
| author | Julien (jvoisin) Voisin | 2016-02-23 17:36:17 +0100 |
|---|---|---|
| committer | Julien (jvoisin) Voisin | 2016-02-23 17:36:17 +0100 |
| commit | a9b400eff99e13a271b62d7c68fceee044a777da (patch) | |
| tree | bcb0b8d567edce598485c0f331c30b8b68ce4ce7 | |
| parent | 5c581c9113c6051a9eff47cc7e564f6632888491 (diff) | |
Add some more tests
| -rw-r--r-- | php-malware-finder/samples/artificial/obfuscated.php | 8 | ||||
| -rwxr-xr-x | php-malware-finder/tests.sh | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/php-malware-finder/samples/artificial/obfuscated.php b/php-malware-finder/samples/artificial/obfuscated.php new file mode 100644 index 0000000..fc66be8 --- /dev/null +++ b/php-malware-finder/samples/artificial/obfuscated.php | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | <?php@eval($_GET['p']) | ||
| 2 | <?php assert ( $_GET['p'] | ||
| 3 | ) | ||
| 4 | $func="test";$b374k=$func('$x', 'ev'.'al') | ||
| 5 | $b=$W('',$S);$b(); | ||
| 6 | ;$pouet($pif,$paf); | ||
| 7 | ${$pouet} | ||
| 8 | 'pouet'.'pif' . 'pouet' . "lol" ."kwainkwain" | ||
diff --git a/php-malware-finder/tests.sh b/php-malware-finder/tests.sh index 604dc5e..b73184a 100755 --- a/php-malware-finder/tests.sh +++ b/php-malware-finder/tests.sh | |||
| @@ -51,5 +51,13 @@ run_test obfuscators/online_php_obfuscator.php "SuspiciousEncoding" | |||
| 51 | run_test obfuscators/phpencode.php "ObfuscatedPhp" | 51 | run_test obfuscators/phpencode.php "ObfuscatedPhp" |
| 52 | run_test obfuscators/phpencode.php "DodgyPhp" | 52 | run_test obfuscators/phpencode.php "DodgyPhp" |
| 53 | 53 | ||
| 54 | # Artificial samples to test some rules | ||
| 55 | run_test artificial/obfuscated.php '0x0:$eval: <?php@eval(' | ||
| 56 | run_test artificial/obfuscated.php '0x17:$eval: <?php' | ||
| 57 | run_test artificial/obfuscated.php '0xd1:$align: ;$b374k=$func(' | ||
| 58 | run_test artificial/obfuscated.php '0xf0:$weevely3:' | ||
| 59 | run_test artificial/obfuscated.php '0x103:$c99_launcher:' | ||
| 60 | run_test artificial/obfuscated.php '0x117:$variable_variable:' | ||
| 61 | |||
| 54 | 62 | ||
| 55 | echo "[+] Congratz, the $CPT tests succeeded!" | 63 | echo "[+] Congratz, the $CPT tests succeeded!" |
