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

Create link_userinfo_excessive_padding.yml #2299

Merged
merged 5 commits into from
Jan 15, 2025
Merged
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
26 changes: 26 additions & 0 deletions detection-rules/link_userinfo_excessive_padding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Link: Obfuscation via userinfo with Excessive URL Padding"
description: "Identifies instances where a malicious actor leverages an excessively padded username within the userinfo portion of the URL to hide the true destination in preview windows."
type: "rule"
severity: "medium"
source: |
type.inbound
and 0 < length(body.links) < 100
and any(body.links,
// Detects deceptive URLs where the URL appears to start with a trusted domain (e.g., youtube.com@),
// but the actual destination domain is something else (e.g., malicious-site.com).
// In such cases, browsers interpret the portion before the '@' symbol as a username (e.g., youtube.com),
// and the URL resolves to the domain after the '@' symbol (malicious-site.com).
// This technique is often used in phishing attacks to trick users into trusting the link by showing a familiar domain.
// (?:%(?:25)?[a-f0-9]{2}){30,} is the key part which detects 30 or more URL encoded values before an @ (or a URL encoded @)
regex.icontains(coalesce(.href_url.rewrite.original, .href_url.url),
'https?(?:(?:%3a|\:)?(?:\/|%2f){2})[^\/]+(?:%(?:25)?[a-f0-9]{2}){30,}(?:@|%(?:25)?40)[^\/]+(?:\/|%(?:25)?2f)'
)
)
attack_types:
- "Credential Phishing"
tactics_and_techniques:
- "Evasion"
- "Impersonation: Brand"
detection_methods:
- "URL analysis"
id: "806317a3-d931-501c-9505-d2e08c646565"
Loading