Skip to content

Commit 3e60f9f

Browse files
committed
New rule: Attachment: ICS with embedded Javascript in SVG file
1 parent 65e77bf commit 3e60f9f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Attachment: ICS with embedded Javascript in SVG file"
2+
description: "Detects incoming messages containing ICS attachments with embedded SVG files that contain malicious JavaScript code, including base64-encoded content and potentially harmful event handlers. The rule specifically watches for onload events, location redirects, error handlers, and iframe elements with base64 data URIs."
3+
type: "rule"
4+
severity: "high"
5+
source: |
6+
type.inbound
7+
and any(attachments,
8+
(.content_type == "text/calendar" or .file_extension =~ "ics")
9+
and any(file.explode(.),
10+
(
11+
.file_extension in~ ("svg", "svgz")
12+
or .flavors.mime == "image/svg+xml"
13+
)
14+
and any(.scan.strings.strings,
15+
strings.ilike(.,
16+
"*onload*",
17+
"*window.location.href*",
18+
"*onerror*",
19+
"*CDATA*",
20+
"*<script*",
21+
"*</script*",
22+
"*atob*",
23+
"*location.assign*",
24+
"*decodeURIComponent*"
25+
)
26+
)
27+
)
28+
)
29+
attack_types:
30+
- "Credential Phishing"
31+
- "Malware/Ransomware"
32+
tactics_and_techniques:
33+
- "Scripting"
34+
- "Evasion"
35+
detection_methods:
36+
- "File analysis"
37+
- "Javascript analysis"
38+
- "Sender analysis"

0 commit comments

Comments
 (0)