Skip to content

Commit eb7c927

Browse files
authored
Address false positives with dojo.js and YUI (#1018)
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
1 parent 17a726c commit eb7c927

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

rules/anti-static/obfuscation/padding.yara

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ rule msxml2_http: critical {
99
$not_fileapi = "MSXML2.XMLHttp.3.0\")}catch(c){b=new ActiveXObject(\"Microsoft.XMLHTTP\")}return b},isArray:l,support:{dnd:s&&\"ondrop\"i"
1010
$not_i18next1 = "i18nextHttpBackend"
1111
$not_i18next2 = "u[\"User-Agent\"]=\"i18next-http-backend (node/\".concat(S.process.version,\"; \")"
12+
$not_yui1 = "Copyright (c) 2008, Yahoo! Inc. All rights reserved."
13+
$not_yui2 = "http://developer.yahoo.net/yui/license.txt"
14+
$not_yui3 = "version: 2.6.0"
15+
$not_yui4 = "YAHOO.util.Connect={_msxml_progid:[\"Microsoft.XMLHTTP\",\"MSXML2.XMLHTTP.3.0\",\"MSXML2.XMLHTTP\"]"
16+
$not_yui5 = "if(typeof YAHOO==\"undefined\"||!YAHOO){var YAHOO={};}YAHOO.namespace=function()"
1217
1318
condition:
1419
filesize < 128KB and $a and !a > 32 and none of ($not*)

rules/exec/remote_commands/code_eval.yara

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ rule js_eval_response: critical {
4646
strings:
4747
$val = /eval\(\w{0,16}\.responseText\)/
4848
49-
$not_ejs = /EJS\.|EJS=/
49+
$not_dojo = /dojo(\-|\_|x)/
50+
$not_ejs = /EJS\.|EJS=/
5051
5152
condition:
52-
filesize < 1MB and any of ($val*) and not #not_ejs > 0
53+
filesize < 1MB and any of ($val*) and not #not_ejs > 0 and not #not_dojo > 0
5354
}
5455

5556
rule js_eval_near_enough_fromChar: medium {

0 commit comments

Comments
 (0)