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

Update YARAForge rules, refresh testdata #482

Merged
merged 1 commit into from
Oct 3, 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
Binary file modified test_data/macOS/2023.3CX/libffmpeg.dirty.mdiff
Binary file not shown.
54 changes: 35 additions & 19 deletions test_data/macOS/2024.BeaverTail/Jami.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"Behaviors": [
{
"Description": "Makes references to multiple browser credentials",
"Description": "Uses HTTP, archives, and references multiple browsers",
"MatchStrings": [
".config",
"Application Support",
Expand All @@ -21,10 +21,11 @@
"Opera Software",
"Roaming/"
],
"RiskScore": 4,
"RiskLevel": "CRITICAL",
"RiskScore": 3,
"RiskLevel": "HIGH",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/combo/stealer/browser.yara#multiple_browser_refs",
"ID": "combo/stealer/browser"
"ID": "combo/stealer/browser",
"RuleName": "multiple_browser_refs"
},
{
"Description": "makes HTTPS connections and references multiple Chrome crypto wallet extensions",
Expand All @@ -46,7 +47,8 @@
"RiskScore": 4,
"RiskLevel": "CRITICAL",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/combo/stealer/wallet.yara#crypto_extension_stealer",
"ID": "combo/stealer/wallet"
"ID": "combo/stealer/wallet",
"RuleName": "crypto_extension_stealer"
},
{
"Description": "binary contains little text content",
Expand All @@ -56,7 +58,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/evasion/binary-opaque.yara#opaque_binary",
"ID": "evasion/binary/opaque"
"ID": "evasion/binary/opaque",
"RuleName": "opaque_binary"
},
{
"Description": "Beaver Tail Infostealer",
Expand All @@ -79,7 +82,8 @@
"RiskLevel": "CRITICAL",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/malware/family/beaver_tail.yara#beaver_tail",
"ReferenceURL": "https://objective-see.org/blog/blog_0x7A.html",
"ID": "malware/family/beaver_tail"
"ID": "malware/family/beaver_tail",
"RuleName": "beaver_tail"
},
{
"Description": "download files",
Expand All @@ -90,7 +94,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/net/download.yara#download",
"ID": "net/download"
"ID": "net/download",
"RuleName": "download"
},
{
"Description": "submits form content to websites",
Expand All @@ -100,7 +105,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/net/http-post.yara#form_data_reference",
"ID": "net/http/post"
"ID": "net/http/post",
"RuleName": "form_data_reference"
},
{
"Description": "uploads files",
Expand All @@ -111,7 +117,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/net/upload.yara#upload",
"ID": "net/upload"
"ID": "net/upload",
"RuleName": "upload"
},
{
"Description": "hardcoded IP address",
Expand All @@ -121,7 +128,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/ip.yara#hardcoded_ip",
"ID": "ref/ip"
"ID": "ref/ip",
"RuleName": "hardcoded_ip"
},
{
"Description": "hardcoded IP:port destination",
Expand All @@ -131,7 +139,8 @@
"RiskScore": 3,
"RiskLevel": "HIGH",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/ip_port.yara#hardcoded_ip_port",
"ID": "ref/ip_port"
"ID": "ref/ip_port",
"RuleName": "hardcoded_ip_port"
},
{
"Description": "path reference within ~/.config",
Expand All @@ -143,7 +152,8 @@
"RiskScore": 1,
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/path/home-config.yara#home_config_path",
"ID": "ref/path/home/config"
"ID": "ref/path/home/config",
"RuleName": "home_config_path"
},
{
"Description": "hardcoded IP address within a URL",
Expand All @@ -153,7 +163,8 @@
"RiskScore": 3,
"RiskLevel": "HIGH",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/site/http-ip.yara#http_hardcoded_ip",
"ID": "ref/site/http/ip"
"ID": "ref/site/http/ip",
"RuleName": "http_hardcoded_ip"
},
{
"Description": "contains embedded HTTP URLs",
Expand All @@ -163,7 +174,8 @@
"RiskScore": 1,
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/site/url.yara#http_url",
"ID": "ref/site/url"
"ID": "ref/site/url",
"RuleName": "http_url"
},
{
"Description": "gets very excited",
Expand All @@ -173,7 +185,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/words/exclamation.yara#exclamations",
"ID": "ref/words/exclamation"
"ID": "ref/words/exclamation",
"RuleName": "exclamations"
},
{
"Description": "steals login keychain",
Expand All @@ -185,7 +198,8 @@
"RiskLevel": "CRITICAL",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/secrets/keychain.yara#login_keychain_eager_beaver",
"ReferenceURL": "https://www.group-ib.com/blog/apt-lazarus-python-scripts/",
"ID": "secrets/keychain"
"ID": "secrets/keychain",
"RuleName": "login_keychain_eager_beaver"
},
{
"Description": "references 'cstealer' tool",
Expand All @@ -205,11 +219,13 @@
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/yara/threat_hunting/all.yara#cstealer_offensive_tool_keyword",
"ReferenceURL": "https://github.com/mthcht/ThreatHunting-Keywords",
"RuleAuthor": "mthcht",
"ID": "3P/threat_hunting/cstealer"
"ID": "3P/threat_hunting/cstealer",
"RuleName": "cstealer_offensive_tool_keyword"
}
],
"RiskScore": 4,
"RiskLevel": "CRITICAL"
}
}
},
"Filter": "false_positive,ignore"
}
12 changes: 8 additions & 4 deletions test_data/macOS/clean/ls.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/env/TERM.yara#TERM",
"ReferenceURL": "https://www.gnu.org/software/gettext/manual/html_node/The-TERM-variable.html",
"ID": "env/TERM"
"ID": "env/TERM",
"RuleName": "TERM"
},
{
"Description": "traverse filesystem hierarchy",
Expand All @@ -40,7 +41,8 @@
"RiskScore": 1,
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/fs/directory-traverse.yara#fts",
"ID": "fs/directory/traverse"
"ID": "fs/directory/traverse",
"RuleName": "fts"
},
{
"Description": "read value of a symbolic link",
Expand All @@ -51,11 +53,13 @@
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/fs/link-read.yara#readlink",
"ReferenceURL": "https://man7.org/linux/man-pages/man2/readlink.2.html",
"ID": "fs/link/read"
"ID": "fs/link/read",
"RuleName": "readlink"
}
],
"RiskScore": 1,
"RiskLevel": "LOW"
}
}
},
"Filter": "false_positive,ignore"
}
35 changes: 22 additions & 13 deletions test_data/npm/2024.noblox/postinstall.js.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/fs/directory-create.yara#mkdir",
"ReferenceURL": "https://man7.org/linux/man-pages/man2/mkdir.2.html",
"ID": "fs/directory/create"
"ID": "fs/directory/create",
"RuleName": "mkdir"
},
{
"Description": "submits content to websites",
Expand All @@ -30,7 +31,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/net/http-post.yara#http_post",
"ID": "net/http/post"
"ID": "net/http/post",
"RuleName": "http_post"
},
{
"Description": "excessive references to hexadecimal values",
Expand Down Expand Up @@ -1824,7 +1826,8 @@
"RiskScore": 3,
"RiskLevel": "HIGH",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/obfuscation/generic/hex.yara#excessive_hex_refs",
"ID": "obfuscation/generic/hex"
"ID": "obfuscation/generic/hex",
"RuleName": "excessive_hex_refs"
},
{
"Description": "javascript obfuscation (excessive const functions)",
Expand All @@ -1833,10 +1836,11 @@
"function(",
"{return"
],
"RiskScore": 4,
"RiskLevel": "CRITICAL",
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/obfuscation/js/function_spam.yara#js_const_func_obfuscation",
"ID": "obfuscation/js/function_spam"
"ID": "obfuscation/js/function_spam",
"RuleName": "js_const_func_obfuscation"
},
{
"Description": "javascript function obfuscation (hex)",
Expand Down Expand Up @@ -1985,7 +1989,8 @@
"RiskScore": 4,
"RiskLevel": "CRITICAL",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/obfuscation/js/hex_functions.yara#js_hex_obfuscation",
"ID": "obfuscation/js/hex_functions"
"ID": "obfuscation/js/hex_functions",
"RuleName": "js_hex_obfuscation"
},
{
"Description": "javascript obfuscation (integer parsing)",
Expand All @@ -1995,10 +2000,11 @@
"parseInt",
"{return"
],
"RiskScore": 4,
"RiskLevel": "CRITICAL",
"RiskScore": 3,
"RiskLevel": "HIGH",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/obfuscation/js/parseInt.yara#js_const_func_obfuscation",
"ID": "obfuscation/js/parseInt"
"ID": "obfuscation/js/parseInt",
"RuleName": "js_const_func_obfuscation"
},
{
"Description": "path reference for C:\\Windows (may be partial)",
Expand All @@ -2008,7 +2014,8 @@
"RiskScore": 1,
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/path/windows_root.yara#windows_path",
"ID": "ref/path/windows_root"
"ID": "ref/path/windows_root",
"RuleName": "windows_path"
},
{
"Description": "gets very excited",
Expand All @@ -2018,11 +2025,13 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/words/exclamation.yara#exclamations",
"ID": "ref/words/exclamation"
"ID": "ref/words/exclamation",
"RuleName": "exclamations"
}
],
"RiskScore": 4,
"RiskLevel": "CRITICAL"
}
}
},
"Filter": "false_positive,ignore"
}
30 changes: 20 additions & 10 deletions test_data/python/2024.yocolor/setup.py.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"RiskLevel": "CRITICAL",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/admin/pip_install.yara#pip_installer_fernet",
"ReferenceURL": "https://checkmarx.com/blog/over-170k-users-affected-by-attack-using-fake-python-infrastructure/",
"ID": "admin/pip_install"
"ID": "admin/pip_install",
"RuleName": "pip_installer_fernet"
},
{
"Description": "Python library installer that executes the Windows 'start' command",
Expand All @@ -32,7 +33,8 @@
"RiskScore": 4,
"RiskLevel": "CRITICAL",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/combo/backdoor/py_setuptools.yara#setuptools_cmd_exec_start",
"ID": "combo/backdoor/py_setuptools"
"ID": "combo/backdoor/py_setuptools",
"RuleName": "setuptools_cmd_exec_start"
},
{
"Description": "Supports Fernet (symmetric encryption)",
Expand All @@ -42,7 +44,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/crypto/fernet.yara#crypto_fernet",
"ID": "crypto/fernet"
"ID": "crypto/fernet",
"RuleName": "crypto_fernet"
},
{
"Description": "execute external program",
Expand All @@ -53,7 +56,8 @@
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/exec/program.yara#py_subprocess",
"ReferenceURL": "https://man7.org/linux/man-pages/man2/execve.2.html",
"ID": "exec/program"
"ID": "exec/program",
"RuleName": "py_subprocess"
},
{
"Description": "reads from a file handle",
Expand All @@ -63,7 +67,8 @@
"RiskScore": 1,
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/fd/read.yara#py_fd_read",
"ID": "fd/read"
"ID": "fd/read",
"RuleName": "py_fd_read"
},
{
"Description": "opens files",
Expand All @@ -73,7 +78,8 @@
"RiskScore": 1,
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/fs/file-open.yara#py_open",
"ID": "fs/file/open"
"ID": "fs/file/open",
"RuleName": "py_open"
},
{
"Description": "gets executable associated to this process",
Expand All @@ -83,7 +89,8 @@
"RiskScore": 2,
"RiskLevel": "MEDIUM",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/process/executable_path.yara#python_sys_executable",
"ID": "process/executable_path"
"ID": "process/executable_path",
"RuleName": "python_sys_executable"
},
{
"Description": "path reference within /usr/bin",
Expand All @@ -93,7 +100,8 @@
"RiskScore": 1,
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/path/usr-bin.yara#usr_bin_path",
"ID": "ref/path/usr/bin"
"ID": "ref/path/usr/bin",
"RuleName": "usr_bin_path"
},
{
"Description": "contains embedded HTTPS URLs",
Expand All @@ -104,11 +112,13 @@
"RiskScore": 1,
"RiskLevel": "LOW",
"RuleURL": "https://github.com/chainguard-dev/malcontent/blob/main/rules/ref/site/url.yara#https_url",
"ID": "ref/site/url"
"ID": "ref/site/url",
"RuleName": "https_url"
}
],
"RiskScore": 4,
"RiskLevel": "CRITICAL"
}
}
},
"Filter": "false_positive,ignore"
}
Loading