summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien (jvoisin) Voisin2016-05-11 13:18:51 +0200
committerJulien (jvoisin) Voisin2016-05-11 13:18:51 +0200
commit00d3bd072796336a7b243eb11a74412ef9c15b1f (patch)
treea0eebc5cc45e98f3211f7fa30c36e63cce56ce35
parenta16357a56653edc2aa0dc769a3df0bb4268dab94 (diff)
Fix the tests
-rwxr-xr-xphp-malware-finder/tests.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/php-malware-finder/tests.sh b/php-malware-finder/tests.sh
index 3aaceea..42c2456 100755
--- a/php-malware-finder/tests.sh
+++ b/php-malware-finder/tests.sh
@@ -3,6 +3,8 @@
3PMF=./phpmalwarefinder 3PMF=./phpmalwarefinder
4SAMPLES=./samples 4SAMPLES=./samples
5 5
6type yara 2>/dev/null 1>&2 || (echo "[-] Please make sure that yara is installed" && exit 1)
7
6CPT=0 8CPT=0
7run_test(){ 9run_test(){
8 NB_DETECTED=$(${PMF} -v "$SAMPLES"/"$1" | grep -c "$2" 2>/dev/null) 10 NB_DETECTED=$(${PMF} -v "$SAMPLES"/"$1" | grep -c "$2" 2>/dev/null)
@@ -32,11 +34,9 @@ run_test freepbx.php 'DodgyPhp'
32run_test freepbx.php '0x31d:$execution: system(base64_decode' 34run_test freepbx.php '0x31d:$execution: system(base64_decode'
33 35
34# Classic shells 36# Classic shells
35run_test classic/ajaxshell.php 'ObfuscatedPhp'
36run_test classic/ajaxshell.php 'DodgyStrings' 37run_test classic/ajaxshell.php 'DodgyStrings'
37run_test classic/ajaxshell.php 'Websites' 38run_test classic/ajaxshell.php 'Websites'
38run_test classic/ajaxshell.php '0x23e2:$: shell_exec' 39run_test classic/ajaxshell.php '0x23e2:$: shell_exec'
39run_test classic/ajaxshell.php '0x2380:$eval: {\\x0A\\x09\\x09\\x09\\x09\\x09system('
40run_test classic/ajaxshell.php "0x16e0:\$ini_get: ini_get('safe_mode" 40run_test classic/ajaxshell.php "0x16e0:\$ini_get: ini_get('safe_mode"
41run_test classic/ajaxshell.php "0x17f1:\$ini_get: ini_get('open_basedir" 41run_test classic/ajaxshell.php "0x17f1:\$ini_get: ini_get('open_basedir"
42run_test classic/angel.php '0x1d:$disable_magic_quotes:' 42run_test classic/angel.php '0x1d:$disable_magic_quotes:'