Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address false positives for Chromium, KOTS, and Nuclei #368

Merged
merged 5 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions rules/combo/stealer/browser.yara
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ rule multiple_browser_refs : critical {
$name_opera = "Opera Software"
$name_yandex = "YandexBrowser"
$not_chromium = "ChromiumBrowser"
$not_chromium_comment = "When this is enabled, Chromium can use"
$not_chromium_issues = "https://issues.chromium.org/"
$not_google = "developed by Google"
$not_google_chrome_software = "The Google Chrome software"
$not_bugzilla = "https://bugzilla.mozilla.org"
Expand Down Expand Up @@ -87,6 +90,9 @@ rule userdata_browser_archiver : medium {
$b_Safari = "Safari"
$b_Chrome = "Chrome"
$not_chromium = "ChromiumBrowser"
$not_chromium_comment = "When this is enabled, Chromium can use"
$not_chromium_issues = "https://issues.chromium.org/"
$not_google = "developed by Google"
$not_google_chrome_software = "The Google Chrome software"
$not_bugzilla = "https://bugzilla.mozilla.org"
Expand Down
9 changes: 8 additions & 1 deletion rules/combo/stealer/wallet.yara
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ rule crypto_stealer : critical {
$w_trezor = "Trezor"
$w_exodus = "Exodus"
$w_coinomi = "Coinomi"
$not_cats = /\"cats\": \[[^]]{0,64}/
Copy link
Member Author

@egibs egibs Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an exhaustive representation of the Wapalyzer schema but these strings should be broad enough to match content from those technology files.

$not_description = /\"description\": "([^"]{0,64})"/
$not_dom = /\"dom\": "([^"]{0,64})"/
$not_icon = /\"icon\": "([^"]{0,64})"/
$not_js = /\"js\": \{[^}]{0,64}/
$not_scriptsrc = /\"scriptSrc\": "([^"]{0,64})"/
$not_website = /\"website\": "([^"]{0,64})"/
condition:
$http and 2 of ($w*)
$http and 2 of ($w*) and none of ($not*)
}
2 changes: 2 additions & 0 deletions rules/evasion/base64-php_functions.yara
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ rule base64_php_functions : medium {
$f_wp_nonce_field = "wp_nonce_field" base64
$f_wp_verify_nonce = "wp_verify_nonce" base64

$not_comment = "// processing instruction, e.g. <?php ?>"
$not_mongosh_php = { 3C 3F 70 68 70 00 00 00 01 0C 51 61 03 00 00 00 02 00 00 00 3F 3E }
condition:
$php and $base64_decode and any of ($f_*) and none of ($not*)
Expand Down Expand Up @@ -124,6 +125,7 @@ rule base64_php_functions_multiple : critical {
$f_wp_nonce_field = "wp_nonce_field" base64
$f_wp_verify_nonce = "wp_verify_nonce" base64

$not_comment = "// processing instruction, e.g. <?php ?>"
$not_mongosh_php = { 3C 3F 70 68 70 00 00 00 01 0C 51 61 03 00 00 00 02 00 00 00 3F 3E }
condition:
$php and $base64_decode and 2 of ($f_*) and none of ($not*)
Expand Down