Web Email XSS Protection via DOM Tree Filtering and Sandbox Emulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current anti-malware technologies do not effectively prevent cross-site scripting (XSS) and malware spread through Web-based email services like Hotmail and Gmail, which are susceptible to XSS attacks, as they do not adequately filter out malformed HTML and unknown JavaScripts, leading to potential data theft and malware infections.

Innovation Solution

A method is introduced to create a Document Object Model (DOM) tree from incoming emails, apply a normal element filter to exclude safe elements, and then use a script analyzer to emulate potentially malicious elements in a sandbox area to determine their malicious nature, notifying the user and preventing execution, thereby protecting computing devices from XSS threats.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If Web-based e-mails are not examined for cross-site scripting, then the e-mail service operates smoothly with fast delivery, but the computing device becomes vulnerable to malware infections and data theft

Engineering Contradiction:
Improvesecurity against XSS attacksVSAvoidemail filtering system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The e-mail filtering system is divided into multiple specialized components: a DOM tree creator that parses HTML, a normal element filter that removes safe elements, a script analyzer that identifies malicious code, and a sandbox emulator that tests suspicious elements. Each component handles a specific aspect of XSS detection, making the overall system more manageable and effective despite the complexity of protecting against cross-site scripting attacks

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A sandbox environment is introduced as an intermediary between the e-mail content and the user's computing device. The sandbox provides a isolated execution environment where suspicious JavaScript and HTML elements can be safely emulated and tested before being allowed to interact with the user's system, preventing direct malware execution while still enabling security analysis

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If all HTML elements in e-mails are executed in the browser, then the e-mail displays correctly with full functionality, but malicious JavaScript and malformed HTML can infect the computing device

Engineering Contradiction:
Improvee-mail display functionalityVSAvoidmalware execution risk
Core Design Contradiction:
Ease of operationVSObject-affected harmful factors

Solution Approach 1:

The system performs preliminary analysis of e-mail HTML content before it is executed in the user's browser. A DOM tree is created from the e-mail HTML, and a script analyzer examines the code structure to identify potentially malicious JavaScript and malformed HTML elements. Normal, safe elements are filtered out beforehand, and only validated content is allowed to execute in the browser, preventing malware execution while preserving legitimate e-mail functionality

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates a copy of the e-mail's DOM tree structure for analysis purposes. This copied DOM tree is then processed by the script analyzer and sandbox emulator to detect malicious elements. The original e-mail HTML remains intact for display, while the copied structure is used for security verification, allowing full functionality to be preserved while blocking harmful code

Inventive Principle:
Principle #26Copying

3Reliability

If a comprehensive script analyzer is applied to all e-mails, then cross-site scripting threats are detected, but the processing time and computational resources increase significantly

Engineering Contradiction:
ImproveXSS threat detection accuracyVSAvoide-mail processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The script analyzer applies partial analysis to e-mail content by first filtering out normal, safe HTML elements and focusing only on potentially malicious JavaScript and malformed HTML. The sandbox emulator is applied selectively only to elements that the script analyzer identifies as suspicious, rather than analyzing every element in every e-mail. This approach maintains high XSS detection accuracy while reducing overall processing time and computational resource consumption

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9049222B1Preventing cross-site scripting in web-based e-mail
Publication Date: 2015.06.02 TREND MICRO INC
  • US9049222B1 patent drawing
  • US9049222B1 patent drawing
  • US9049222B1 patent drawing

AI summary

Cross-site scripting vulnerabilities in a Web browser that may lead to malware execution on a computing device are reduced. The specific vulnerabilities arise from HTML-based e-mails using e-mail service providers (e.g., Hotmail, Gmail, Yahoo) that have unknown or malformed HTML elements and Javascripts. These unknown elements may execute in a browser and cause harm to the computing device. To prevent this, the e-mail is parsed to create a DOM tree. The DOM tree is filtered using a normal element filter. The modified DOM tree is filtered a second time using a script analyzer filter to isolate potentially harmful HTML and Javascript elements. These elements are then emulated to determine which of them are in fact malicious. These malicious elements are then prevented from executing, for example, by preventing the e-mail recipient from opening the e-mail in the browser.