Skip to content

Commit 3ac1b53

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

8 files changed

Lines changed: 35 additions & 4 deletions

File tree

rules/anti-behavior/blocklist/user.yara

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ rule common_username_block_list: critical {
4242
$not_grafana3 = "grafana.debug.scenes"
4343
$not_jitsu = "jitsu.com"
4444
$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"
4548
$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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ rule fake_kworker: critical linux {
77
$kworker2 = "[kworker"
88
99
$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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
rule arangodb_override: override {
2+
meta:
3+
R3C0NST_Shellcode_Apihashing_FIN8 = "low"
4+
strings:
5+
$ = "https://github.com/arangodb-helper/arangodb"
6+
$ = "/home/build/arangod"
7+
$ = "application/x-arango-dump"
8+
$ = "arangodb"
9+
condition:
10+
all of them
11+
}

rules/impact/degrade/win_defender.yara

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
rule win_defender_configure: high {
22
meta:
33
description = "Uses powershell to configure Windows Defender"
4+
filetypes = "exe,pe,ps1"
45

56
strings:
67
$exclusion = /[\w \'\:\\\"\-]{0,32}Add-MpPreference[\w \'\:\\\"\-]/
@@ -12,6 +13,7 @@ rule win_defender_configure: high {
1213
rule win_defender_exclusion: critical {
1314
meta:
1415
description = "Uses powershell to define Windows Defender exclusions"
16+
filetypes = "exe,pe,ps1"
1517

1618
strings:
1719
$exclusion = /[\w \'\:\\\"\-]{0,32}Add-MpPreference.{0,32}Exclusion[\w \'\:\\\"]{0,32}/

0 commit comments

Comments
 (0)