Skip to content

Commit f22018b

Browse files
committed
2025/06/04 false positive reduction
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
1 parent e364445 commit f22018b

8 files changed

Lines changed: 52 additions & 13 deletions

File tree

rules/anti-behavior/blocklist/user.yara

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,18 @@ rule common_username_block_list: critical {
3737
$ = "test" fullword
3838
$ = "w0fjuOVmCcP5A" fullword
3939
40-
$not_grafana1 = "self.webpackChunkgrafana=self.webpackChunkgrafana||[]"
41-
$not_grafana2 = "The Grafana LLM plugin is not installed."
42-
$not_grafana3 = "grafana.debug.scenes"
43-
$not_jitsu = "jitsu.com"
44-
$not_redpanda = "redpanda"
45-
$not_wireshark = "wireshark.org"
40+
$not_grafana1 = "self.webpackChunkgrafana=self.webpackChunkgrafana||[]"
41+
$not_grafana2 = "The Grafana LLM plugin is not installed."
42+
$not_grafana3 = "grafana.debug.scenes"
43+
$not_jitsu = "jitsu.com"
44+
$not_redpanda = "redpanda"
45+
$not_sqlmetal1 = "sqlmetal"
46+
$not_sqlmetal2 = "asqlmetal_test_net_2_0, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c5753d8c47f40083f549016a5711238ac8ec297605abccd3dc4b6d0f280b4764eb2cc58ec4e37831edad7e7a07b8fe4a9cbb059374c0cc047aa28839fed7176761813caf6a2ffa0bff9afb50ead56dd3f56186a663962a12b830c2a70eb70ec77823eb5750e5bdef9e01d097c30b5c5463c3d07d3472b58e4c02f2792309259f"
47+
$not_sqlmetal3 = "asqlmetal_test_net_4_0, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c5753d8c47f40083f549016a5711238ac8ec297605abccd3dc4b6d0f280b4764eb2cc58ec4e37831edad7e7a07b8fe4a9cbb059374c0cc047aa28839fed7176761813caf6a2ffa0bff9afb50ead56dd3f56186a663962a12b830c2a70eb70ec77823eb5750e5bdef9e01d097c30b5c5463c3d07d3472b58e4c02f2792309259f"
48+
$not_wireshark = "wireshark.org"
49+
$gpt_tokenizer1 = "GPTTokenizer"
50+
$gpt_tokenizer2 = "GPT-4"
4651
4752
condition:
48-
8 of them and none of ($not*)
53+
8 of them and none of ($not*) and (#gpt_tokenizer1 < 3 and #gpt_tokenizer2 < 65)
4954
}

rules/anti-static/obfuscation/padding.yara

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ rule msxml2_http: critical {
55
strings:
66
$a = /M.{0,48}S.{0,48}X.{0,48}M.{0,48}L.{0,48}2.{0,48}\.X.{0,48}M.{0,48}L.{0,48}H.{0,48}T.{0,48}T.{0,48}P.{0,48}/
77
8+
// https://github.com/mailru/FileAPI/blob/5b50e8ed012e089eb578e586d860a6fd035e16d8/lib/FileAPI.core.js#L298
9+
$not_fileapi = "MSXML2.XMLHttp.3.0\")}catch(c){b=new ActiveXObject(\"Microsoft.XMLHTTP\")}return b},isArray:l,support:{dnd:s&&\"ondrop\"i"
810
$not_i18next1 = "i18nextHttpBackend"
911
$not_i18next2 = "u[\"User-Agent\"]=\"i18next-http-backend (node/\".concat(S.process.version,\"; \")"
1012

rules/anti-static/obfuscation/python.yara

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,10 @@ rule import_manipulator: critical {
542542
condition:
543543
// a91160135598f3decc8ca9f9b019dcc5e1d73e79ebe639548cd9ee9e6d007ea6 is the sha256 hash
544544
// for https://github.com/pypy/pypy/blob/main/lib-python/2.7/pickle.py
545-
filesize < 10MB and (hash.sha256(0, filesize) != "a91160135598f3decc8ca9f9b019dcc5e1d73e79ebe639548cd9ee9e6d007ea6") and all of them
545+
// 44cdd1503ae0b1d7c9e5eb79fd624a7e51780b7a8fc6cfbc68b49ef7c6e63abc is the sha256 hash
546+
// https://github.com/jython/jython/blob/v2.7.4/Lib/pickle.py
547+
filesize < 10MB and (hash.sha256(0, filesize) != "a91160135598f3decc8ca9f9b019dcc5e1d73e79ebe639548cd9ee9e6d007ea6") and
548+
(hash.sha256(0, filesize) != "44cdd1503ae0b1d7c9e5eb79fd624a7e51780b7a8fc6cfbc68b49ef7c6e63abc") and all of them
546549
}
547550

548551
rule bloated_hex_python: high {

rules/data/base64/external.yara

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ rule base64_shell_double_encode: critical {
3535
strings:
3636
$ref = /base64[\s>].{0,32}\|\s{0,2}base64/
3737
38+
$not_gpgme = "if (!base64 || base64 == -1) /* Make sure that we really have a string. */"
39+
$not_unix_rb = "echo '%<base64>s' | base64 --decode > %<file>s"
40+
3841
condition:
39-
any of them
42+
any of them and none of ($not*)
4043
}

rules/evasion/mimicry/fake-process.yara

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ rule fake_kworker: critical linux {
66
$kworker1 = /\[{0,1}kworker\/[\w\%:\-\]]{1,16}/
77
$kworker2 = "[kworker"
88
9-
$not_rescue = "kworker/R-%s"
9+
$not_rescue = "kworker/R-%s"
10+
$not_psutil_comment1 = "root 4 0.0 0.0B 0.0B -20 idle Mar27 00:00 kworker/0:0H"
11+
$not_psutil_comment2 = "root 20414 0.0 0.0B 0.0B idle Apr04 00:00 kworker/4:2"
12+
$not_psutil_comment3 = "root 22338 0.0 0.0B 0.0B idle 02:04 00:00 kworker/1:2"
1013
1114
condition:
1215
filesize < 100MB and any of ($kworker*) and none of ($not*)

rules/exfil/stealer/wallet.yara

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ rule crypto_stealer_names: critical {
3333
$not_clef1 = "These data types are defined in the channel between clef and the UILedger"
3434
$not_clef2 = "The `transaction` (on input into clef) can have either `data` or `input`"
3535
$not_geth_site = "https://geth.ethereum.org"
36+
$gpt_tokenizer1 = "GPTTokenizer"
37+
$gpt_tokenizer2 = "GPT-4"
3638
3739
condition:
38-
filesize < 100MB and $http and 2 of ($w*) and none of ($not*)
40+
filesize < 100MB and $http and 2 of ($w*) and none of ($not*) and (#gpt_tokenizer1 < 3 and #gpt_tokenizer2 < 65)
3941
}
4042

4143
rule crypto_extension_stealer: critical {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
rule arangodb_override: override {
2+
meta:
3+
R3C0NST_Shellcode_Apihashing_FIN8 = "low"
4+
5+
strings:
6+
$ = "https://github.com/arangodb-helper/arangodb"
7+
$ = "/home/build/arangod"
8+
$ = "application/x-arango-dump"
9+
$ = "arangodb"
10+
11+
condition:
12+
all of them
13+
}

rules/impact/degrade/win_defender.yara

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ rule win_defender_configure: high {
55
strings:
66
$exclusion = /[\w \'\:\\\"\-]{0,32}Add-MpPreference[\w \'\:\\\"\-]/
77
8+
// https://help.eclipse.org/latest/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/internal/WindowsDefenderConfigurator.html
9+
$not_configurator1 = "WindowsDefenderConfigurator_"
10+
$not_configurator2 = "org/eclipse/ui/internal/WindowsDefenderConfigurator"
11+
812
condition:
9-
$exclusion
13+
$exclusion and none of ($not*)
1014
}
1115

1216
rule win_defender_exclusion: critical {
@@ -16,6 +20,10 @@ rule win_defender_exclusion: critical {
1620
strings:
1721
$exclusion = /[\w \'\:\\\"\-]{0,32}Add-MpPreference.{0,32}Exclusion[\w \'\:\\\"]{0,32}/
1822
23+
// https://help.eclipse.org/latest/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/internal/WindowsDefenderConfigurator.html
24+
$not_configurator1 = "WindowsDefenderConfigurator_"
25+
$not_configurator2 = "org/eclipse/ui/internal/WindowsDefenderConfigurator"
26+
1927
condition:
20-
$exclusion
28+
$exclusion and none of ($not*)
2129
}

0 commit comments

Comments
 (0)