Safely processing and presenting documents with executable text
AssigneeSamsung Electronics Co., Ltd.
InventorsOnur Aciicmez, Shuo Tang
Life of this patent
Estimating the term…
Abstract
Techniques for processing documents with executable text are disclosed. The techniques, among other things, can effectively address XSS attacks to Internet users when browsing web sites. Content deemed not to be trusted or fully trusted (“untrusted”) can be marked in a document that can include executable text. Remedial action, including not allowing execution of executable text marked as “untrusted” can be taken. In addition, when the document is processed, content deemed not to be trusted or fully trusted (“untrusted”) can be effectively monitored in order to identify executable text that may have been effectively produced by “untrusted” content and/or somehow may have been affected by “untrusted” content.
Claims21
A computer-implemented method of processing a web page document that includes executable text and non-executable text, the method comprising:
- determining, using a hardware processor, whether the executable text has been derived from, affected by, or derived from and affected by untrusted content in the web page document when the web page document is processed prior to execution of the executable text in the web page document, wherein the untrusted content in the web page document includes text, textual content, or text and textual content for one or more scripts identified as tainted text within the web page document;
- identifying the executable text as being included in the untrusted content when it is determined that the executable text has been derived from, affected by, or derived from and affected by the untrusted content in the web page document;
- wherein identifying includes:
- marking one or more nodes of a document object model (DOM) tree generated for the web page document with a tainted mark when the one or more nodes are generated, modified, affected by, or generated, modified and affected by the untrusted content, as a result of interaction with the untrusted content, or generated, modified and affected by the untrusted content and as a result of interaction with the untrusted content;
- not allowing execution of the executable text when it is determined prior to execution of the executable text that the executable text has been derived from or has been affected by the untrusted content in the web page document;
- and
- propagating tainted information based on script operations propagating the tainted information from one or more of tainted operands, arguments, and variables.
A computing system, wherein the computing system comprises:
- a document processor that uses a hardware processor for processing a web page document that includes non-executable content and executable text;
- a marking module that marks one or more nodes of a document object model (DOM) tree generated by a first parser for the web page with a tainted mark when the one or more nodes are generated, modified, affected by, or generated, modified and affected by untrusted content, and as a result of interaction with the untrusted content, or as a result of interaction with the untrusted content;
- and
- a second parser that prevents execution of executable text marked as the untrusted content within the web page document prior to execution of the executable text marked as the untrusted content that comprises one or more scripts when processing the web page document by a browser,
- wherein the marking module further propagates tainted information based on script operations propagating the tainted information from one or more of tainted operands, arguments, and variables.
A non-transitory computer readable storage medium storing at least executable computer code for processing a web page document that can include non-executable content and executable text, wherein the non-transitory computer readable storage medium includes:
- a first executable computer code operable to determine whether the executable text has been derived from, affected by, or derived from and affected by untrusted content in the web page document when the web page document is processed or is being processed;
- a second executable computer code operable to identifying the executable text as the untrusted content when the first executable computer code operates to determine that the executable text has been derived from, affected by, or derived from and affected by the untrusted content in the web page document;
- wherein the second executable computer code includes:
- a third executable computer code operable to mark one or more nodes of a document object model (DOM) tree generated for the web page document with a tainted mark when the one or more nodes are generated, modified, affected by, or generated, modified and affected by the untrusted content, as a result of interaction with untrusted content, or as a result of interaction with the untrusted content;
- and
- a fourth executable computer code operable to deny execution of the executable text comprising one or more scripts, prior to execution of the executable text, when the first executable computer code operates to determine that the executable text has been derived from or has been affected by the untrusted content,
- wherein the third executable code further operable to propagate tainted information based on script operations propagating the tainted information from one or more of tainted operands, arguments, and variables.
Dependencies are inferred from the claim text.