Skip to content

Commit 72b929d

Browse files
committedJul 1, 2020
Fix a yara warning
This shouldn't impact detection much, while fixing a scary warning
1 parent d3c62c5 commit 72b929d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎php-malware-finder/php.yar

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ rule DodgyPhp
9292
$iis_com = /IIS:\/\/localhost\/w3svc/
9393
$include = /include\s*\(\s*[^\.]+\.(png|jpg|gif|bmp)/ // Clever includes
9494
$ini_get = /ini_(get|set|restore)\s*\(\s*['"](safe_mode|open_basedir|disable_(function|classe)s|safe_mode_exec_dir|safe_mode_include_dir|register_globals|allow_url_include)/ nocase
95-
$pr = /(preg_replace(_callback)?|mb_ereg_replace|preg_filter)\s*\(.+(\/|\\x2f)(e|\\x65)['"]/ nocase // http://php.net/manual/en/function.preg-replace.php
95+
$pr = /(preg_replace(_callback)?|mb_ereg_replace|preg_filter)\s*\([^)]*(\/|\\x2f)(e|\\x65)['"]/ nocase // http://php.net/manual/en/function.preg-replace.php
9696
$register_function = /register_[a-z]+_function\s*\(\s*['"]\s*(eval|assert|passthru|exec|include|system|shell_exec|`)/ // https://github.com/nbs-system/php-malware-finder/issues/41
9797
$safemode_bypass = /\x00\/\.\.\/|LD_PRELOAD/
9898
$shellshock = /\(\)\s*{\s*[a-z:]\s*;\s*}\s*;/

0 commit comments

Comments
 (0)
Failed to load comments.