YARA · elceef yara-rulz
ELCEEF_Base64_SVG_Javascript
Detects base64 encoded SVG objects containing Javascript
- Author
- marcin@ulikowski.pl
- Date
- 2022-10-25
- Modified
- 2022-12-12
- Score / Quality
- 75 / 75
What this rule detects
Detects base64 encoded SVG objects containing Javascript
It defines 2 patterns (2 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule ELCEEF_Base64_SVG_Javascript
{
meta:
= "Detects base64 encoded SVG objects containing Javascript"
= "marcin@ulikowski.pl"
= "99275772-1f4f-5616-9a9c-f76b613fe143"
= "2022-10-25"
= "2022-12-12"
= "https://github.com/elceef/yara-rulz"
= "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/rules/Base64_SVG_Javascript.yara#L1-L16"
= "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/LICENSE"
= "fe394a59e961c3fbcc326e7d0ee5909596de55249e669bc4da0aed172c11fda8"
= "f0c94f2705b1aea17f4a6c6d71c6ed725fe71bf66b03b0117060010859ca8a19"
= "e4cb08ccc75dc00b518c4ee1495409ae6bb99e7d493be55312b8d39aa9099cfc"
= 75
= 75
= ""
strings:
$svg = "\"data:image/svg+xml;base64" wide ascii
$js = "<script type=\"text/javascript\">" base64
condition:
all of them
}
Strings (2 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $svg | text | "\"data:image/svg+xml;base64" | wide ascii |
| $js | text | "<script type=\"text/javascript\">" | base64 |
Condition
all of themIn plain words (Heuristic)
- All patterns in the rule must match.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
References
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- fe394a59e961c3fbcc326e7d0ee5909596de55249e669bc4da0aed172c11fda8
- f0c94f2705b1aea17f4a6c6d71c6ed725fe71bf66b03b0117060010859ca8a19
Licence & attribution
Author: marcin@ulikowski.pl
Source repository: elceef yara-rulz @ 5683b294a1
Licence: MIT License (repository licence)
Copyright notice: Copyright (c) 2022 Marcin Ulikowski
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 99275772-1f4f-5616-9a9c-f76b613fe143
Related rules
- Exploitelceef yara-rulz· marcin@ulikowski.pl· 2025-08-18
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2024-04-10
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2023-05-05
- Suspicious / huntingelceef yara-rulz· marcin@ulikowski.pl· 2023-05-01
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2023-04-17
- Exploitelceef yara-rulz· marcin@ulikowski.pl· 2023-09-23
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2023-03-08
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2022-12-02