Skip to content

Commit 33cd8ef

Browse files
authored
Add exception for php_image_include rule (#1000)
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
1 parent bef87d2 commit 33cd8ef

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

rules/evasion/covert-location/php_image.yara

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ rule php_image_include: critical {
77
$php = "<?php"
88
$include = /include\s*\(\s*[^\.]+\.(png|jpg|gif|bmp)/
99
10+
// https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/ErrorHandler/Resources/views/exception_full.html.php#L9
11+
// https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/ErrorHandler/Resources/assets/images/favicon.png.base64
12+
$not_symfony1 = "include('assets/images/favicon.png.base64')"
13+
$not_symfony2 = "<a href=\"https://symfony.com/doc/<?= Symfony\\Component\\HttpKernel\\Kernel::VERSION; ?>/index.html\">"
14+
1015
condition:
11-
filesize < 5242880 and all of them
16+
filesize < 5242880 and all of them and none of ($not*)
1217
}
1318

1419
rule php_in_image: critical {

0 commit comments

Comments
 (0)