SVG Security Analysis Toolkit to Detect Malicious Scripts Hidden in SVG Files
The SVG Security Analysis Toolkit by HackingLZ offers a comprehensive solution: a suite of four Python-based tools designed to reveal hidden scripts, decode obfuscated URLs, and verify protection mechanisms, all without exposing analysts to unsafe execution environments.
The toolkit’s first two components extract.py and extract_dynamic.py work in tandem to uncover malicious scripts through both static and dynamic analysis:
The extract.py is a static SVG URL Extractor that performs pattern-based analysis without executing any code.
It automatically detects and decodes XOR-encrypted payloads via String.fromCharCode patterns, Base64-encoded URLs extracted from data: URIsand character arithmetic schemes using parseInt and XOR loops. Usage examples illustrate its flexibility:
The extract_dynamic.py is a dynamic JavaScript Execution, leveraging box-js, safely executing embedded JavaScript within a sandbox to capture final URL constructions. Key features include:
To complete the analysis workflow, the toolkit includes cf_probe.py and encoder.py. The cf_probe.py is a Cloudflare Protection Detection program that scans HTTP and meta-refresh redirects for Cloudflare challenges.
This identifies Turnstile via data-sitekey attributes, scans linked JavaScript for reCAPTCHA or custom CAPTCHA systems, and reports CF headers like CF-Ray and DDoS protection messages.
The encoder.py is an SVG Test Case Generator; security teams can generate realistic obfuscated SVG samples to validate their detection pipelines.
HackingLZ recommends the following analysis sequence for maximum coverage and safety:
By combining static string decoding, sandboxed script execution, protection detection, and controlled test data generation, the SVG Security Analysis Toolkit empowers defenders to stay ahead of evasive SVG-based phishing and malware campaigns.
Follow us on Google News, LinkedIn, and X for daily cybersecurity updates. Contact us to feature your stories.
The post SVG Security Analysis Toolkit to Detect Malicious Scripts Hidden in SVG Files appeared first on Cyber Security News.
Pixar's Hoppers, about a young animal rights activist (Piper Curda) who transfers her mind into…
After more than five years since the last book in the series was published, Sarah…
On its Early Access launch day, before I'd unlocked anything, I was struck by how…
BriTanya Brown, an independent candidate for Texas House District 71, discusses her motivations for running,…
BRECKENRIDGE, Texas (KTAB/KRBC) - Three Breckenridge teens are accused of lying to police by saying…
Web Weather: widespread showers with pockets of scattered severe storms possible
This website uses cookies.