Skip to content

Commit e2a9022

Browse files
authored
fix: Reduce Malcontent JS False Positives (#904)
Sorry! Hack to get pass the PR. Follow up PR coming to fix the tests * fix(js): Reducing severity of javascript issues to reduce false positive blockers * Fix: Dropping scope to only the most common false positive issues * fix: Updating test cases to reflect new scores * Update 002b815349c937aa5742a14d349dbc841c7348990e21a42fe7a503a5bfa562a6.js.simple Signed-off-by: antitree <antitree@users.noreply.github.com> --------- Signed-off-by: antitree <antitree@users.noreply.github.com>
1 parent dd48dd0 commit e2a9022

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

rules/anti-static/obfuscation/js.yara

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ rule js_char_code_at_substitution: high {
8383
obfs_probably_js and filesize < 256KB and all of them
8484
}
8585

86-
rule child_process: critical {
86+
rule child_process: high {
8787
meta:
8888
description = "obfuscated javascript that calls external programs"
8989

@@ -101,7 +101,7 @@ rule child_process: critical {
101101
obfs_probably_js and filesize < 1MB and all of them and math.entropy(1, filesize) >= 6
102102
}
103103

104-
rule ebe: critical {
104+
rule ebe: high {
105105
meta:
106106
description = "highly obfuscated javascript (eBe)"
107107
filetypes = "javascript"
@@ -168,7 +168,7 @@ rule js_hex_eval_obfuscation: critical {
168168
obfs_probably_js and filesize < 128KB and any of them
169169
}
170170

171-
rule js_hex_obfuscation: critical {
171+
rule js_hex_obfuscation: high {
172172
meta:
173173
description = "javascript function obfuscation (hex)"
174174

@@ -188,7 +188,7 @@ rule high_entropy: medium {
188188
obfs_probably_js and math.entropy(1, filesize) >= 6
189189
}
190190

191-
rule very_high_entropy: critical {
191+
rule very_high_entropy: high {
192192
meta:
193193
description = "very high entropy javascript (>7)"
194194

tests/javascript/2024.xmlrpc/validator.js.simple

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# javascript/2024.xmlrpc/validator.js: critical
22
anti-static/obfuscation/bool: medium
33
anti-static/obfuscation/hex: medium
4-
anti-static/obfuscation/js: critical
4+
anti-static/obfuscation/js: high
55
anti-static/obfuscation/strtoi: medium
66
c2/addr/url: medium
77
c2/client: medium

tests/npm/2024.discord-api-ts/postinstall.js.simple

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
anti-behavior/random_behavior: low
33
anti-static/obfuscation/bool: medium
44
anti-static/obfuscation/hex: medium
5-
anti-static/obfuscation/js: critical
5+
anti-static/obfuscation/js: high
66
anti-static/obfuscation/strtoi: medium
77
c2/addr/url: medium
88
data/encoding/int: medium
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# npm/2024.nvmfix/config.js: critical
22
anti-static/obfuscation/hex: medium
3-
anti-static/obfuscation/js: critical
3+
anti-static/obfuscation/js: high
44
c2/addr/url: medium
55
data/encoding/utf16: medium
66
process/create: medium

tests/npm/2024.testerrrrrrrrrr/init.js.simple

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# npm/2024.testerrrrrrrrrr/init.js: critical
22
anti-static/obfuscation/bool: medium
33
anti-static/obfuscation/hex: medium
4-
anti-static/obfuscation/js: critical
4+
anti-static/obfuscation/js: high
55
anti-static/obfuscation/url: critical
66
c2/addr/server: medium
77
c2/addr/url: medium

0 commit comments

Comments
 (0)