summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien (jvoisin) Voisin2016-02-23 17:36:17 +0100
committerJulien (jvoisin) Voisin2016-02-23 17:36:17 +0100
commita9b400eff99e13a271b62d7c68fceee044a777da (patch)
treebcb0b8d567edce598485c0f331c30b8b68ce4ce7
parent5c581c9113c6051a9eff47cc7e564f6632888491 (diff)
Add some more tests
-rw-r--r--php-malware-finder/samples/artificial/obfuscated.php8
-rwxr-xr-xphp-malware-finder/tests.sh8
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"
51run_test obfuscators/phpencode.php "ObfuscatedPhp" 51run_test obfuscators/phpencode.php "ObfuscatedPhp"
52run_test obfuscators/phpencode.php "DodgyPhp" 52run_test obfuscators/phpencode.php "DodgyPhp"
53 53
54# Artificial samples to test some rules
55run_test artificial/obfuscated.php '0x0:$eval: <?php@eval('
56run_test artificial/obfuscated.php '0x17:$eval: <?php'
57run_test artificial/obfuscated.php '0xd1:$align: ;$b374k=$func('
58run_test artificial/obfuscated.php '0xf0:$weevely3:'
59run_test artificial/obfuscated.php '0x103:$c99_launcher:'
60run_test artificial/obfuscated.php '0x117:$variable_variable:'
61
54 62
55echo "[+] Congratz, the $CPT tests succeeded!" 63echo "[+] Congratz, the $CPT tests succeeded!"