diff --git a/rules/detection-rules.json b/rules/detection-rules.json index a8bdeac0..461caa03 100644 --- a/rules/detection-rules.json +++ b/rules/detection-rules.json @@ -1,6 +1,6 @@ { - "version": "1.1.0", - "lastUpdated": "2025-12-20T00:00:00Z", + "version": "2.2.2", + "lastUpdated": "2026-04-24T20:16:00Z", "description": "Phishing detection logic for identifying phishing attempts targeting Microsoft 365 login pages", "trusted_login_patterns": [ "^https:\\/\\/login\\.microsoftonline\\.(com|us)$", @@ -33,7 +33,11 @@ "^https:\\/\\/([a-zA-Z0-9-]+\\.)*microsoftazuread-sso\\.com$", "^https:\\/\\/([a-zA-Z0-9-]+\\.)*azureedge\\.net$", "^https:\\/\\/([a-zA-Z0-9-]+\\.)*bing\\.com$", + "^https:\\/\\/([a-zA-Z0-9-]+\\.)*msn\\.com$", + "^https:\\/\\/([a-zA-Z0-9-]+\\.)*xbox\\.com$", + "^https:\\/\\/([a-zA-Z0-9-]+\\.)*mcas\\.ms$", "^https:\\/\\/github\\.com$", + "^https:\\/\\/raw\\.githubusercontent\\.com$", "^https:\\/\\/([a-zA-Z0-9-]+\\.)*cloud\\.microsoft$", "^https:\\/\\/([a-zA-Z0-9-]+\\.)*powerbi\\.com$" ], @@ -56,7 +60,10 @@ "^https:\\/\\/(?:[^/]*\\.)?zoom\\.us(/.*)?$", "^https:\\/\\/github\\.com(/.*)?$", "^https:\\/\\/[^/]*\\.github\\.com(/.*)?$", - "^https:\\/\\/[^/]*\\.github\\.io(/.*)?$" + "^https:\\/\\/[^/]*\\.github\\.io(/.*)?$", + "^https://[^/]*\\.huntress.io(/.*)?$", + "^https://ltshare\\.intelli-comp\\.com(/.*)?$", + "^https://[^/]*\\.intellicomp.net(/.*)?$", ], "context_indicators": { "description": "Additional context that indicates legitimate discussion vs phishing", @@ -178,11 +185,7 @@ "id": "meta_og_title_microsoft", "type": "meta_tag", "attribute": "og:title", - "patterns": [ - "microsoft", - "office\\s*365", - "azure" - ], + "patterns": ["microsoft", "office\\s*365", "azure"], "description": "Open Graph title contains Microsoft branding", "weight": 0.5, "category": "secondary" @@ -221,19 +224,73 @@ }, { "id": "segoe_ui_font", - "type": "source_content", - "pattern": "Segoe\\s+UI(?:\\s+(?:Webfont|Symbol|Historic|Emoji))?", + "type": "code_driven", + "code_logic": { + "type": "all_of", + "operations": [ + { + "type": "substring_present", + "values": ["segoe ui"] + }, + { + "type": "any_of", + "operations": [ + { + "type": "substring_present", + "values": [ + "loginfmt", + "idsibutton9", + "idpartnerpl", + "urlmsasignup", + "aadcdn.msauth.net", + "aadcdn.msftauthimages.net" + ] + }, + { + "type": "substring_present", + "values": ["type=\"password\"", "signin", "sign in", "login"] + } + ] + } + ] + }, "description": "Microsoft's Segoe UI font family variants (supporting evidence only)", "weight": 0.5, "category": "secondary" }, { "id": "ms_container_layout", - "type": "css_pattern", - "patterns": [ - "display:\\s*grid.*place-items:\\s*center", - "height:\\s*100vh.*width:\\s*100vw" - ], + "type": "code_driven", + "code_logic": { + "type": "any_of", + "operations": [ + { + "type": "pattern_count", + "patterns": [ + "display:\\s*grid[^;{}]*;[^{}]*place-items:\\s*center" + ], + "flags": "i", + "min_count": 1 + }, + { + "type": "all_of", + "operations": [ + { + "type": "pattern_count", + "patterns": ["(?:^|[^-\\w])height\\s*:\\s*100vh\\s*;"], + "flags": "i", + "min_count": 1 + }, + { + "type": "pattern_count", + "patterns": ["(?:^|[^-\\w])width\\s*:\\s*100vw\\s*;"], + "flags": "i", + "min_count": 1 + } + ] + } + ] + }, "description": "Microsoft login container layout (supporting evidence only)", "weight": 0.5, "category": "secondary" @@ -241,7 +298,7 @@ { "id": "ms_external_css", "type": "source_content", - "pattern": "(?:href=[\"'].*(?:aadcdn\\.msauth|aadcdn\\.msftauth|login\\.microsoftonline).*\\.css[\"']|src=[\"'].*(?:aadcdn\\.msauth|login\\.microsoft).*\\.css[\"'])", + "pattern": "(?:<(?:link|script)[^>]+(?:href|src)=[\"']https?:\\/\\/[^\"']*(?:aadcdn\\.msauth\\.net|aadcdn\\.msftauth\\.net|aadcdn\\.msftauthimages\\.net|login\\.microsoftonline\\.com)[^\"']*\\.css(?:\\?[^\"']*)?[\"'][^>]*>)", "description": "Microsoft login-specific CSS files (strong evidence)", "weight": 3, "category": "secondary" @@ -343,26 +400,19 @@ "aad_detection_elements": [ { "id": "loginfmt_field", - "selectors": [ - "input[name='loginfmt']", - "#i0116" - ], + "selectors": ["input[name='loginfmt']", "#i0116"], "description": "Azure AD username/email input field", "weight": 30 }, { "id": "next_button", - "selectors": [ - "#idSIButton9" - ], + "selectors": ["#idSIButton9"], "description": "Azure AD Next/Sign in button", "weight": 25 }, { "id": "password_field", - "selectors": [ - "input[type='password']" - ], + "selectors": ["input[type='password']"], "description": "Password input field", "weight": 20 }, @@ -392,25 +442,19 @@ }, { "id": "urlMsaSignUp", - "text_patterns": [ - "urlMsaSignUp" - ], + "text_patterns": ["urlMsaSignUp"], "description": "Microsoft signup URL reference", "weight": 15 }, { "id": "flowToken", - "text_patterns": [ - "flowToken" - ], + "text_patterns": ["flowToken"], "description": "Microsoft authentication flow token", "weight": 15 }, { "id": "aadcdn_msauth", - "text_patterns": [ - "https:\\/\\/aadcdn\\.msauth\\.net/" - ], + "text_patterns": ["https:\\/\\/aadcdn\\.msauth\\.net/"], "description": "Microsoft authentication CDN reference", "weight": 15 } @@ -421,9 +465,7 @@ "type": "url", "weight": 25, "condition": { - "domains": [ - "login.microsoftonline.com" - ] + "domains": ["login.microsoftonline.com"] }, "description": "Verify legitimate Microsoft domain (must be login.microsoftonline.com)" }, @@ -475,10 +517,7 @@ "type": "dom", "weight": 20, "condition": { - "selectors": [ - "input[name='loginfmt']", - "#i0116" - ] + "selectors": ["input[name='loginfmt']", "#i0116"] }, "description": "Check for loginfmt input field availability" }, @@ -610,11 +649,7 @@ }, { "type": "substring_present", - "values": [ - "microsoft", - "office", - "365" - ] + "values": ["microsoft", "office", "365"] } ] }, @@ -650,9 +685,7 @@ "code_logic": { "type": "resource_from_domain", "resource_type": "customcss", - "allowed_domains": [ - "aadcdn.msftauthimages.net" - ], + "allowed_domains": ["aadcdn.msftauthimages.net"], "invert": true }, "severity": "high", @@ -672,33 +705,21 @@ "operations": [ { "type": "substring_present", - "values": [ - "microsoft", - "office", - "365" - ] + "values": ["microsoft", "office", "365"] }, { "type": "substring_present", - "values": [ - "login", - "password", - "signin" - ] + "values": ["login", "password", "signin"] }, { "type": "pattern_count", - "patterns": [ - "