Method and system for adaptive rule-based content scanners
16 claims: 10 independent, 6 dependent
- 1A computer system (130; 200) for scanning incoming mobile code, comprising:a receiver for receiving an incoming stream of mobile code for a specific programming language;parser rules and analyzer rules for the specific programming language, wherein the parser rules define certain patterns in terms of tokens, tokens being lexical constructs for the specific programming language, and wherein the analyzer rules identify certain combinations of tokens and patterns as being indicators of potential exploits, exploits being portions of mobile code that are malicious;a tokenizer (210) operatively coupled to said receiver for identifying individual tokens within the incoming stream;a parser (220) operatively coupled to said tokenizer and operable to use said parser rules for dynamically building, while said receiver is receiving the incoming stream, a parse tree whose nodes represent tokens or patterns in accordance with the parser rules;an analyzer (230) operatively coupled to said parser and operable to use said analyzer rules for dynamically detecting, while said parser is dynamically building the parse tree, combinations of nodes in the parse tree which are indicators of potential exploits, based on the analyzer rules;and means for generating a security profile for the stream indicating whether or not potential exploits have been discovered within the stream, and, if so, providing a diagnostic list of one or more potential exploits and their respective locations within the stream.
- 4The system of any preceding claim, further comprising a pattern-matching engine operatively coupled to said parser, for matching a pattern within a sequence of tokens in accordance with the parser rules.
- 8The system of any preceding claim, wherein the parser and analyzer rules include actions to be performed when corresponding rules are matched.
- 9The system of any preceding claim, further comprising a scripting engine operatively coupled to said parser and said analyzer for implementing the actions to be performed.
- 10The system of any preceding claim, wherein the specific programming language is at least one of JavaScript, Visual Basic, HyperText Markup Language (HTML) and Uniform Resource Identifier (URI).
- 11A computer processor-based method for scanning incoming mobile code, comprising:receiving, by a computer, an incoming stream of mobile code for a specific programming language;identifying (500), by the computer, individual tokens within the incoming stream, tokens being lexical constructs for the specific programming language;dynamically building (510), by the computer while said receiving receives the incoming stream, a parse tree whose nodes represent tokens or patterns in accordance with parser rules for the specific programming language, wherein the parser rules define certain patterns in terms of tokens;dynamically detecting (560), by the computer while said dynamically building builds the parse tree, combinations of nodes in the parse tree, which are indicators of potential exploits, based on analyzer rules for the specific programming language, wherein the analyzer rules identify certain combinations of tokens and patterns as being indicators of potential exploits, exploits being portions of mobile code that are malicious;and generating a security profile for the stream indicating whether or not potential exploits have been discovered within the stream, and, if so, the security profile further providing a diagnostic list of one or more potential exploits and their respective locations within the stream.
- 15The method of any one of claims 11 to 14, wherein the incoming stream of mobile code includes embedded mobile code for another programming language different than the specific programming language, the method further comprising repeating said identifying, said dynamically building, said dynamically detecting and said generating for the embedded mobile code, based on the parser and analyzer rules for the other programming language.
- 16A computer-readable storage medium storing program code for causing a computer to perform the steps of:receiving an incoming stream of mobile code for a specific programming language;identifying individual tokens within the incoming stream, tokens being lexical constructs for the specific programming language;dynamically building, while said receiving receives the incoming stream, a parse tree whose nodes represent tokens or patterns in accordance with parser rules for the specific programming language, wherein the parser rules define certain patterns in terms of tokens;dynamically detecting, while said dynamically building builds the parse tree, combinations of nodes in the parse tree, which are indicators of potential exploits, based on analyzer rules for the specific programming language, wherein the analyzer rules identify certain combinations of tokens and patterns as being indicators of potential exploits, exploits being portions of mobile code that are malicious;and generating a security profile for the stream indicating whether or not potential exploits have been discovered within the stream, and, if so, the security profile further providing a diagnostic list of one or more potential exploits and their respective locations within the stream.
Independent claims10
93 paragraphs in 6 sections, as filed
FIELD OF THE INVENTION
0001The present invention relates to network security, and in particular to scanning of mobile content for exploits.
BACKGROUND OF THE INVENTION
0002Conventional anti-virus software scans a computer file system by searching for byte patterns, referred to as signatures that are present within known viruses. If a virus signature is discovered within a file, the file is designated as infected.
0003Content that enters a computer from the Internet poses additional security threats, as such content executes upon entry into a client computer, without being saved into the computer's file system. Content such as JavaScript and VBScript is executed by an Internet browser, as soon as the content is received within a web page.
0004Conventional network security software also scans such mobile content by searching for heuristic virus signatures. However, in order to be as protective as possible, virus signatures for mobile content tend to be over-conservative, which results in significant over-blocking of content. Over-blocking refers to false positives; i.e., in addition to blocking of malicious content, prior art technologies also block a significant amount of content that is not malicious.
0005Another drawback with prior art network security software is that it is unable to recognize combined attacks, in which an exploit is split among different content streams. Yet another drawback is that prior art network security software is unable to scan content containers, such as URI within JavaScript.
0006All of the above drawbacks with conventional network security software are due to an inability to diagnose mobile code. Diagnosis is a daunting task, since it entails understanding incoming byte source code. The same malicious exploit can be encoded in an endless variety of ways, so it is not sufficient to look for specific signatures.
0007Nevertheless, in order to accurately block malicious code with minimal over-blocking, a thorough diagnosis is required.
0008In "<nplcit id="ncit0001" npl-type="b"><text>Securing Web Application Code by Static Analysis and Runtime Protection", (ACM, 2 PENN PLAZA, SUITE 701 - NEW YORK USA, 22 May 2004, pages 40-51, XP040180026</text></nplcit>) YAO-WEN HUANG ET AL describe a holistic approach to ensuring Web application security. Viewing Web application vulnerabilities as a secure information flow problem, a lattice-based static analysis algorithm derived from type systems and typestate, was created. During the analysis, sections of code considered vulnerable were instrumented with runtime guards, thus securing Web applications in the absence of user intervention. With sufficient annotations, runtime overhead could be reduced to zero. A tool named <i>WebSSARI</i> (Web application Security by Static Analysis and Runtime Inspection) was created to test the algorithm. Statistics show that static analysis reduced potential runtime overhead by 98.4%.
0009<patcit id="pcit0001" dnum="US20020073330A1"><text>US 2002/0073330 A1</text></patcit> describes a method and apparatus for detecting script language viruses. The apparatus includes a script language processor, a detection data processor and a detection engine. The script language processor prepares language description data corresponding to at least one script language. The detection data processor prepares detection data for viral code corresponding to the script language virus. The detection engine lexically analyzes a data stream using the language description data and the detection data to detect the viral code. The language description data may correspond to language definition rules and language check rules. The data stream may be converted to a stream of tokens, wherein the lexical analysis is performed on the token stream. The script language virus detection apparatus may be a computer program stored on a computer readable medium and/or transmitted via a computer network or other transmission medium.
0010According to a first aspect of the invention, there is provided a computer system for scanning incoming mobile code as set out in Claim 1.
0011According to a second aspect of the invention, there is provided a computer processor-based method for scanning incoming mobile code as set out in Claim 11.
0012According to a third aspect of the invention, there is provided a computer-readable storage medium storing program code as set out in Claim 16.
BRIEF DESCRIPTION OF THE DRAWINGS
0013The present invention will be more fully understood and appreciated from the following detailed description, taken in conjunction with the drawings in which: <ul id="ul0001" list-style="none" compact="compact"><li><figref idref="f0001">FIG. 1</figref> is a simplified block diagram of an overall gateway security system that uses an adaptive rule-based (ARB) content scanner, in accordance with a preferred embodiment of the present invention;</li><li><figref idref="f0002">FIG. 2</figref> is a simplified block diagram of an adaptive rule-based content scanner system, in accordance with a preferred embodiment of the present invention;</li><li><figref idref="f0003">FIG. 3</figref> is an illustration of a simple finite state machine for detecting tokens "a" and "ab", used in accordance with a preferred embodiment of the present invention;</li><li><figref idref="f0004">FIG. 4</figref> is an illustration of a simple finite state machine for a pattern, used in accordance with a preferred embodiment of the present invention;</li><li><figref idref="f0005">FIG. 5</figref> is a simplified flowchart of operation of a parser for a specific content language within an ARB content scanner, in accordance with a preferred embodiment of the present invention;</li><li><figref idref="f0006">FIG. 6</figref> is a simplified block diagram of a system for serializing binary instances of ARB content scanners, transmitting them to a client site, and regenerating them back into binary instances at the client site, in accordance with a preferred embodiment of the present invention; and</li><li><figref idref="f0007">FIG. 7</figref> illustrates a representative hierarchy of objects created by a builder module, in accordance with a preferred embodiment of the present invention.</li></ul>
LIST OF APPENDICES
0014Appendix A is a source listing of an ARB rule file for the JavaScript language, in accordance with a preferred embodiment of the present invention.
DETAILED DESCRIPTION
0015The present invention concerns scanning of content that contains mobile code, to protect an enterprise against viruses and other malicious code.
0016The following describes a method and system for scanning content that includes mobile code, to produce a diagnostic analysis of potential exploits within the content. The invention is applicable for use within a network gateway or proxy, to protect an intranet against viruses and other malicious mobile code.
0017The content scanners described herein are referred to as <u>adaptive rule-based</u> (ARB) scanners. An ARB scanner is able to adapt itself dynamically to scan a specific type of content, such as inter alia JavaScript, VBScript, URI, URL and HTML. ARB scanners differ from prior art scanners that are hard-coded for one particular type of content. In distinction, ARB scanners are data-driven, and can be enabled to scan any specific type of content by providing appropriate <u>rule files</u>, without the need to modify source code. Rule files are text files that describe lexical characteristics of a particular language. Rule files for a language describe character encodings, sequences of characters that form lexical constructs of the language, referred to as <u>tokens</u>, patterns of tokens that form syntactical constructs of program code, referred to as <u>parsing rules</u>, and patterns of tokens that correspond to potential exploits, referred to as <u>analyzer rules</u>. Rules files thus serve as adaptors, to adapt an ARB content scanner to a specific type of content.
0018The following also describes a novel description language for efficiently describing exploits. This description language enables an engineer to describe exploits as logical combinations of patterns of tokens.
0019Thus it may be appreciated that the described technique is able to diagnose incoming content. As such, the described technique achieves very accurate blocking of content, with minimal over-blocking as compared with prior art scanning technologies.
0020There is thus provided in accordance with a preferred embodiment of the present invention a method for scanning content, including identifying tokens within an incoming byte stream, the tokens being lexical constructs for a specific language, identifying patterns of tokens, generating a parse tree from the identified patterns of tokens, and identifying the presence of potential exploits within the parse tree, wherein said identifying tokens, identifying patters of tokens, and identifying the presence of potential exploits are based upon a set of rules for the specific language.
0021There is moreover provided in accordance with a preferred embodiment of the present invention a system for scanning content, including a tokenizer for identifying tokens within an incoming byte stream, the tokens being lexical constructs for a specific language, a parser operatively coupled to the tokenizer for identifying patterns of tokens, and generating a parse tree therefrom, and an analyzer operatively coupled to the parser for analyzing the parse tree and identifying the presence of potential exploits therewithin, wherein the tokenizer, the parser and the analyzer use a set of rules for the specific language to identify tokens, patterns and potential exploits, respectively.
0022There is further provided in accordance with a preferred embodiment of the present invention a computer-readable storage medium storing program code for causing a computer to perform the steps of identifying tokens within an incoming byte stream, the tokens being lexical constructs for a specific language, identifying patterns of tokens, generating a parse tree from the identified patterns of tokens, and identifying the presence of potential exploits within the parse tree, wherein said identifying tokens, identifying patters of tokens, and identifying the presence of potential exploits are based upon a set of rules for the specific language.
0023There is yet further provided in accordance with a preferred embodiment of the present invention a method for scanning content, including expressing an exploit in terms of patterns of tokens and rules, where tokens are lexical constructs of a specific programming language, and rules are sequences of tokens that form programmatical constructs, and parsing an incoming byte source to determine if an exploit is present therewithin, based on said expressing.
0024There is additionally provided in accordance with a preferred embodiment of the present invention a system for scanning content, including a parser for parsing an incoming byte source to determine if an exploit is present therewithin, based on a formal description of the exploit expressed in terms of patterns of tokens and rules, where tokens are lexical constructs of a specific programming language, and rules are sequences of tokens that form programmatical constructs.
0025There is moreover provided in accordance with a preferred embodiment of the present invention a computer-readable storage medium storing program code for causing a computer to perform the steps of expressing an exploit in terms of patterns of tokens and rules, where tokens are lexical constructs of a specific programming language, and rules are sequences of tokens that form programmatical constructs, and parsing an incoming byte source to determine if an exploit is present therewithin, based on said expressing.
0026Reference is now made to <figref idref="f0001">FIG. 1</figref>, which is a simplified block diagram of an overall gateway security system that uses an adaptive rule-based (ARB) content scanner, in accordance with a preferred embodiment of the present invention. Shown in <figref idref="f0001">FIG. 1</figref> is a network gateway 110 that acts as a conduit for content from the Internet entering into a corporate intranet, and for content from the corporate intranet exiting to the Internet. One of the functions of network gateway 110 is to protect client computers 120 within the corporate intranet from malicious mobile code originating from the Internet. Mobile code is program code that executes on a client computer. Mobile code can take many diverse forms, including inter alia JavaScript, Visual Basic script, HTML pages, as well as a Uniform Resource Identifier (URI).
0027Mobile code can be detrimental to a client computer. Mobile code can access a client computer's operating system and file system, can open sockets for transmitting data to and from a client computer, and can tie up a client computer's processing and memory resources. Such malicious mobile code cannot be detected using conventional anti-virus scanners, which scan a computer's file system, since mobile code is able to execute as soon as it enters a client computer from the Internet, before being saved to a file.
0028Many examples of malicious mobile code are known today. Portions of code that are malicious are referred to as <u>exploits</u>. For example, one such exploit uses JavaScript to create a window that fills an entire screen. The user is then unable to access any windows lying underneath the filler window. The following sample code shows such an exploit. <pre listing-type="program-listing"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>BID-3469</TITLE> <SCRIPT> op=window.createPopup( ); s='<body>foobar</body>'; op.document.body.innerHTML=s; function oppop( ) { it (!op.isOpen) { w = screen.width; h = screen.height; op.show(0,0,w,h,document. body); } } function doit ( ) { oppop( ); setlnterval("window.focus( ); {oppop( );}",10); } </SCRIPT> </HEAD> <BODY> <H1>BID-3469</H1> <FORM method=POST action=""> <INPUT type="button" name="btnDolt" value="Do It" onclick="doit( )"> </FORM> </BODY> </HTML></pre> Thus it may be appreciated that the security function of network gateway 110 is critical to a corporate intranet.
0029In accordance with a preferred embodiment of the present invention, network gateway 110 includes a content scanner 130, whose purpose is to scan mobile code and identify potential exploits. Content scanner 130 receives as input content containing mobile code in the form of byte source, and generates a <u>security profile</u> for the content. The security profile indicates whether or not potential exploits have been discovered within the content, and, if so, provides a diagnostic list of one or more potential exploits and their respective locations within the content.
0030Preferably, the corporate intranet uses a <u>security policy</u> to decide whether or not to block incoming content based on the content's security profile. For example, a security policy may block content that may be severely malicious, say, content that accesses an operating system or a file system, and may permit content that is less malicious, such as content that can consume a user's computer screen as in the example above. The diagnostics within a content security profile are compared with the intranet security policy, and a decision is made to allow or block the content. When content is blocked, one or more alternative actions can be taken, such as replacing suspicious portions of the content with innocuous code and allowing the modified content, and sending a notification to an intranet administrator.
0031Scanned content and their corresponding security profiles are preferably stored within a content cache 140. Preferably, network gateway 110 checks if incoming content is already resident in cache 140, and, if so, bypasses content scanner 130. Use of cache 140 saves content scanner 130 the task of re-scanning the same content.
0032Alternatively, a hash value of scanned content, such as an MD5 hash value, can be cached instead of caching the content itself. When content arrives at scanner 130, preferably its hash value is computed and checked against cached hash values. If a match is found with a cached hash value, then the content does not have to be re-scanned and its security profile can be obtained directly from cache.
0033Consider, for example, a complicated JavaScript file that is scanned and determined to contain a known exploit therewithin. An MD5 hash value of the entire JavaScript file can be stored in cache, together with a security profile indicating that the JavaScript file contains the known exploit. If the same JavaScript file arrives again, its hash value is computed and found to already reside in cache. Thus, it can immediately be determined that the JavaScript file contains the known exploit, without re-scanning the file.
0034It may be appreciated by those skilled in the art that cache 140 may reside at network gateway 110. However, it is often advantageous to place cache 140 as close as possible to the corporate intranet, in order to transmit content to the intranet as quickly as possible. However, in order for the security profiles within cache 140 to be up to date, it is important that network gateway 110 notify cache 140 whenever content scanner 130 is updated. Updates to content scanner 130 can occur inter alia when content scanner 130 is expanded (i) to cover additional content languages; (ii) to cover additional exploits; or (iii) to correct for bugs.
0035Preferably, when cache 140 is notified that content scanner 130 has been updated, cache 140 clears its cache, so that content that was in cache 140 is re-scanned upon arrival at network gateway 110.
0036Also, shown in <figref idref="f0001">FIG. 1</figref> is a pre-scanner 150 that uses conventional signature technology to scan content. As mentioned hereinabove, pre-scanner 150 can quickly determine if content is innocuous, but over-blocks on the safe side. Thus pre-scanner 150 is useful for recognizing content that poses no security threat. Preferably, pre-scanner 150 is a simple signature matching scanner, and processes incoming content at a rate of approximately 100 mega-bits per second. ARB scanner 130 performs much more intensive processing than pre-scanner 150, and processes incoming content at a rate of approximately 1 mega-bit per second.
0037In order to accelerate the scanning process, pre-scanner 150 acts as a first-pass filter, to filter content that can be quickly recognized as innocuous. Content that is screened by pre-scanner 150 as being potentially malicious is passed along to ARB scanner 130 for further diagnosis. Content that is screened by pre-scanner 150 as being innocuous bypasses ARB scanner 130. It is expected that pre-scanner 150 filters 90% of incoming content, and that only 10% of the content requires extensive scanning by ARB scanner 130. As such, the combined effect of ARB scanner 130 and pre-scanner 150 provides an average scanning throughout of approximately 9 mega-bits per second.
0038Use of security profiles, security policies and caching is described in applicant's <patcit id="pcit0002" dnum="US6092194A"><text>U.S. Pat. No. 6,092,194</text></patcit> entitled SYSTEM AND METHOD FOR PROTECTING A COMPUTER AND A NETWORK FROM HOSTILE DOWNLOADABLES, in applicant's <patcit id="pcit0003" dnum="US6804780B"><text>U.S. Patent No. 6,804,780</text></patcit> entitled SYSTEM AND METHOD FOR PROTECTING A COMPUTER AND A NETWORK FROM HOSTILE DOWNLOADABLES and in applicant's <patcit id="pcit0004" dnum="US7418731B"><text>U.S. Patent No. 7,418,731</text></patcit> entitled METHOD AND SYSTEM FOR CACHING AT SECURE GATEWAYS.
0039Reference is now made to <figref idref="f0002">FIG. 2</figref>, which is a simplified block diagram of an adaptive rule-based content scanner system 200, in accordance with a preferred embodiment of the present invention. An ARB scanner system is preferably designed as a generic architecture that is language-independent, and is customized for a specific language through use of a set of language-specific rules. Thus, a scanner system is customized for JavaScript by means of a set of JavaScript rules, and is customized for HTML by means of a set of HTML rules. In this way, each set of rules acts as an adaptor, to adapt the scanner system to a specific language. A sample rule file for JavaScript is provided in Appendix A, and is described hereinbelow.
0040Moreover, in accordance with a preferred embodiment of the present invention, security violations, referred to as <u>exploits</u>, are described using a generic syntax, which is also language-independent. It is noted that the same generic syntax used to describe exploits is also used to describe languages. Thus, referring to Appendix A, the same syntax is used to describe the JavaScript parser rules and the analyzer exploit rules.
0041It may thus be appreciated that the present invention provides a flexible content scanning method and system, which can be adapted to any language syntax by means of a set of rules that serve to train the content scanner how to interpret the language. Such a scanning system is referred to herein as an <u>adaptive rule-based</u> (ARB) scanner. Advantages of an ARB scanner, include inter alia: <ul id="ul0002" list-style="bullet" compact="compact"><li>the ability to re-use software code for many different languages;</li><li>the ability to re-use software code for binary content and EXE files;</li><li>the ability to focus optimization efforts in one project, rather than across multiple projects; and</li><li>the ability to describe exploits using a generic syntax, which can be interpreted by any ARB scanner.</li></ul>
0042The system of <figref idref="f0002">FIG. 2</figref> includes three main components: a tokenizer 210, a parser 220 and an analyzer 230. The function of <u>tokenizer 210</u> is to recognize and identify constructs, referred to as tokens, within a byte source, such as JavaScript source code. A token is generally a sequence of characters delimited on both sides by a punctuation character, such as a white space. Tokens includes inter alia language keywords, values, names for variables or functions, operators, and punctuation characters, many of which are of interest to parser 220 and analyzer 230.
0043Preferably, tokenizer 210 reads bytes sequentially from a content source, and builds up the bytes until it identifies a complete token. For each complete token identified, tokenizer 210 preferably provides both a token ID and the token sequence.
0044In a preferred embodiment of the present invention, the tokenizer is implemented as a finite state machine (FSM) that takes input in the form of character codes. Tokens for the language are encoded in the FSM as a sequence of transitions for appropriate character codes, as described hereinbelow with reference to <figref idref="f0003">FIG. 3</figref>. When a sequence of transitions forms a complete lexical token, a punctuation character, which normally indicates the end of a token, is expected. Upon receiving a punctuation character, the token is complete, and the tokenizer provides an appropriate ID. If a punctuation character is not received, the sequence is considered to be part of a longer sequence, and no ID is provided at this point. Reference is now made to <figref idref="f0003">FIG. 3</figref>, which is an illustration of a simple finite state machine for detecting tokens "a" and "ab", used in accordance with a preferred embodiment of the present invention. Shown in <figref idref="f0003">FIG. 3</figref> are five states, 1-5, with labeled and directed transitions therebetween. As tokenizer reads successive characters, a transition is made from a current state to a next state accordingly. State 1 is an entry state, where tokenizer 210 begins. State 4 is a generic state for punctuation. Specifically, whenever a punctuation character is encountered, a transition is made from the current state to state 4. The "a" token is identified whenever a transition is made from state 3 to state 4. Similarly, the "ab" token is identified whenever a transition is made from state 5 to state 4. A generic token, other than "a" and "ab" is identified whenever a transition is made from state 2 to state 4. A punctuation token is identified whenever a transition is made out of state 4. Referring back to <figref idref="f0002">FIG. 2</figref>, tokenizer 210 preferably includes a normalizer 240 and a decoder 250. In accordance with a preferred embodiment of the present invention, <u>normalizer 240</u> translates a raw input stream into a reduced set of character codes. Normalized output thus becomes the input for tokenizer 210. Examples of normalization rules includes, inter alia <ul id="ul0003" list-style="bullet" compact="compact"><li>skipping character ranges that are irrelevant;</li><li>assigning special values to character codes that are irrelevant for the language structure but important for the content scanner;</li><li>translating, such as to lowercase if the language is case-insensitive, in order to reduce input for tokenizer 210;</li><li>merging several character codes, such as white spaces and line ends, into one; and</li><li>translating sequences of raw bytes, such as trailing spaces, into a single character code.</li></ul> Preferably, normalizer 240 also handles Unicode encodings, such as UTF-8 and UTF-16.
0045In accordance with a preferred embodiment of the present invention, normalizer 240 is also implemented as a finite-state machine. Each successive input is either translated immediately according to normalization rules, or handled as part of a longer sequence. If the sequence ends unexpectedly, the bytes are preferably normalized as individual bytes, and not as part of the sequence.
0046Preferably, normalizer 240 operates in conjunction with decoder 250. Preferably, <u>decoder 250</u> decodes character sequences in accordance with one or more character encoding schemes, including inter alia (i) SGML entity sets, including named sets and numerical sets; (ii) URL escape encoding scheme; (iii) ECMA script escape sequences, including named sets, octal, hexadecimal and Unicode sets; and (iv) character-encoding switches.
0047Preferably, decoder 250 takes normalized input from normalizer 240. In accordance with a preferred embodiment of the present invention, decoder 250 is implemented as a finite-state machine. The FSM for decoder 250 terminates when it reaches a state that produces a decoded character. If decoder 250 fails to decode a sequence, then each character is processed by tokenizer 210 individually, and not as part of the sequence. Preferably, a plurality of decoders 250 can be pipelined to enable decoding of text that is encoded by one escape scheme over another, such as text encoded with a URL scheme and then encoded with ECMA script scheme inside of JavaScript strings.
0048Tokenizer 210 and normalizer 240 are generic modules that can be adapted to process any content language, by providing a description of the content language within a rule file. Preferably, the rule file describes text characters used within the content language, and the composition of constructs of the content language, referred to as tokens. Tokens may include inter alia, an IDENT token for the name of a variable or function, various punctuation tokens, and tokens for keywords such as NEW, DELETE, FOR and IF. A sample rule file for JavaScript is provided in Appendix A, and is described hereinbelow.
0049In accordance with a preferred embodiment of the present invention, <u>parser 220</u> controls the process of scanning incoming content. Preferably, parser 220 invokes tokenizer 210, giving it a callback function to call when a token is ready. Tokenizer 210 uses the callback function to pass parser 220 the tokens it needs to parse the incoming content. Preferably, parser 220 uses a parse tree data structure to represent scanned content. A parse tree contains a node for each token identified while parsing, and uses parsing rules to identify groups of tokens as a single pattern. Examples of parsing rules appear in Appendix A, and are described hereinbelow.
0050Preferably, the parse tree generated by parser 220 is dynamically built using a shift-and-reduce algorithm. Successive tokens provided to parser 220. by tokenizer 210 are positioned as siblings. When parser 220 discovers that a parsing rule identifies a group of siblings as a single pattern, the siblings are reduced to a single parent node by positioning a new parent node, which represents the pattern, in their place, and moving them down one generation under the new parent note.
0051Preferably, within the parse tree, each node contains data indicating inter alia an ID number, the token or rule that the node represents, a character string name as a value for the node, and a numerical list of attributes. For example, if the node represents an IDENT token for the name of a variable, then the value of the node is the variable name; and if the node represents a rule regarding a pattern for a function signature, then the value of the node is the function name.
0052In addition, whenever a parsing rule is used to recognize a pattern, information about the pattern may be stored within an internal symbol table, for later use.
0053In a preferred embodiment of the present invention, parsing rules are implemented as finite-state machines. These FSMs preferably return an indicator for (i) an exact match, (ii) an indicator to continue with another sibling node, or (iii) an indicator of a mis-match that serves as an exit.
0054More generally, parsing rules may be implemented using a hybrid mix of matching algorithms. Thus, it may use a deterministic finite automaton (DFA) for quick identification of rule candidates, and a non-deterministic finite automaton (NFA) engine for exact evaluation of the candidate rules.
0055In addition to a pattern, a parser rule optionally includes one or more actions to be performed if an exact pattern match is discovered. Actions that can be performed include inter alia creating a new node in the parse tree, as described hereinabove with respect to the shift and reduce algorithm; setting internal variables; invoking a sub-scanner 270, as described hereinbelow; and searching the parse tree for nodes satisfying specific conditions. By default, when the pattern within a parser rule is matched, parser 220 automatically performs a reduce operation by creating a new node and moving token nodes underneath the new node. A rule may be assigned a NoCreate attribute, in which case the default is changed to not performing the reduction operation upon a match, unless an explicit addnode command is specified in an action for the rule.
0056Sub-scanner 270 is another ARB scanner, similar to scanner 200 illustrated in <figref idref="f0002">FIG. 2</figref> but for a different type of content. Preferably, sub-scanner 270 is used to scan a sub-section of input being processed by scanner 200. Thus, if an HTML scanner encounters a script element that contains JavaScript code, then there will be a rule in the HTML scanner whose action includes invoking a JavaScript scanner. In turn, the JavaScript scanner may invoke a URI scanner. Use of sub-scanner 270 is particularly efficient for scanning content of one type that contains content of another type embedded therein.
0057Preferably, immediately after parser 220 performs a reduce operation, it calls analyzer 230 to check for exploits. <u>Analyzer 230</u> searches for specific patterns of content that indicate an exploit.
0058Preferably, parser 220 passes to analyzer 230 a newly-created parsing node. Analyzer 230 uses a set of analyzer rules to perform its analysis. An analyzer rule specifies a generic syntax pattern in the node's children that indicates a potential exploit. An analyzer rule optionally also includes one or more actions to be performed when the pattern of the rule is matched. In addition, an analyzer rule optionally includes a description of nodes for which the analyzer rule should be examined. Such a description enables analyzer 230 to skip nodes that are not to be analyzed. Preferably, rules are provided to analyzer 230 for each known exploit. Examples of analyzer rules appear in Appendix A, and are described hereinbelow.
0059Preferably, the nodes of the parse tree also include data for analyzer rules that are matched. Specifically, if analyzer 230 discovers that one or more analyzer rules are matched at a specific parsing tree node, then the matched rules are added to a list of matched rules stored within the node.
0060An advantage of the present invention is that both parser 220 and analyzer 230 use a common ARB regular expression syntax. As such, a common pattern matching engine 260 performs pattern matching for both parser 220 and analyzer 230. In accordance with a preferred embodiment of the present invention, pattern matching engine 260 accepts as input (i) a list of ARB regular expression elements describing a pattern of interest; and (ii) a list of nodes from the parse tree to be matched against the pattern of interest. Preferably, pattern matching engine 260 returns as output (i) a Boolean flag indicating whether or not a pattern is matched; and (ii) if the pattern is matched, positional variables that match grouped portions of the pattern. For example, if a pattern "(IDENT) EQUALS NUMBER" is matched, then $1 is preferably set to a reference to the nodes involved in the IDENT token. That is, if a matched pattern is "(1 2 3) 4 5", then $1 refers to the nodes 1, 2 and 3 as a single group.
0061Preferably, the ARB regular expression that is input to pattern matching engine 260 is pre-processed in the form of a state machine for the pattern. Reference is now made to <figref idref="f0004">FIG. 4</figref>, which is an illustration of a simple finite state machine, used in accordance with a preferred embodiment of the present invention, for a pattern, <pre listing-type="program-listing"> (IDENT <val=="foo" & match(*) :Rulel> | List <val=="bar">) EQUALS NUMBER</pre> Specifically, the pattern of interest specifies either an IDENT token with value "foo" and that matches Rule1, or a List with value "bar", followed by an EQUALS token and a NUMBER token.
0062Reference is now made to Appendix A, which is a source listing of an ARB rule file for the JavaScript language, in accordance with a preferred embodiment of the present invention. The listing in Appendix A is divided into six main sections, as follows: (i) vchars, (ii) tokens, (iii) token_pairs, (iv) attribs, (v) parser_rules and (vi) analyzer_rules.
0063The <u>vchars section</u> includes entries for virtual characters. Each such entry preferably conforms to the syntax <img file="EP1810152B1_D0001.tif" /> For example, the entry <pre listing-type="program-listing"> vchar nl 0x0d { [0x0d]+; [0x0a] + }</pre> converts a sequence of one or more CRs (carriage-returns) and a sequence of one or more LFs (line-feeds) to a newline meta-character.
0064The vchars section also includes entries for aliases, which are names for special virtual characters. Each such entry preferably conforms to the syntax <img file="EP1810152B1_D0002.tif" /> For example, the entry <pre listing-type="program-listing"> Vchar_alias underscore { 0x5F; }</pre> identifies the hexadecimal number 0x5F with the name "underscore".
0065The <u>tokens section</u> includes entries for language tokens for a scanner language; namely, JavaScript for Appendix A. Each such entry preferably conforms to the syntax <pre listing-type="program-listing"> token-entry* (cdata) ;</pre> For example, the entry <pre listing-type="program-listing"> LBRACE "[!left_curly_bracket!]" punct;</pre> defines identifies a punctuation token, LBRACE, as a "left_curly_bracket", which is an alias for 0x7B as defined in the previous vchars section. Note that aliases are preferably surrounded by exclamation points.
0066A CDATA token, for identifying strings or commented text, preferably conforms to the syntax <pre listing-type="program-listing"> "start" "end" ["escape-pattern] "skip-pattern";</pre> For example, the entry <pre listing-type="program-listing"> DOUBLE_QUOTE DOUBLE_QUOTE "[!backslash!] [!double_quote]?" "[^[!backslash!] [!double_quote!]]+" ;</pre> identifies a string as beginning and ending with a DOUBLE-QUOTE token, as previously defined, with an escape pattern that has a "backslash" followed by zero or one "double_quote", and a skip pattern that has one or more characters other than "backlash" and "double_quote".
0067The <u>token pairs section</u> defines tokens that can validly appear in juxtaposition, and tokens that cannot validly appear in juxtaposition, in conformance with the language rules. Generally, when the tokenizer encounters an invalid juxtaposition, it inserts a virtual semi-colon. An entry for a token-pair preferably conforms to the syntax <pre listing-type="program-listing">{valid | invalid} [(] token-ID | token-ID]* [)] [(] token-ID | token-ID]* [)];</pre> For example, the entry <pre listing-type="program-listing"> invalid IF (ELSE | FOR | WHILE | DOT);</pre> indicates that an IF token cannot validly be followed by an ELSE, FOR, WHILE or DOT token. Thus, if an IF token followed by an ELSE, FOR, WHILE, or DOT token is encountered in the input, tokenizer 210 will insert a virtual delimiter character between them.
0068The <u>parser-rules</u> section has entries defining rules for the parser. Such entries preferably conform to the syntax <pre listing-type="program-listing"> rule rule-name [nonode] [noanalyzel [nomatch]</pre><img file="EP1810152B1_D0003.tif" />
0069A <u>pattern</u> is a regular expression of IDs, preferably conforming to the syntax <pre listing-type="program-listing"> ID1-expr ID2-expr ... IDn-expr</pre> Preferably, ID-expr is one of the following: <ul id="ul0004" list-style="bullet" compact="compact"><li>ID</li><li>(ID [<b>ID</b>]*)</li><li>ID <val==val></li><li>ID <id==rule-ID></li><li>ID <match(n): rule-ID></li><li>ID <match(*): rule-ID></li><li>ID <match (m,n): rule-ID></li></ul> The modifiers '*', '+', '?', '{m}' and '{m,n}' are used conventionally as follows: <ul id="ul0005" list-style="bullet" compact="compact"><li>'*' zero or more occurrences</li><li>'+' one or more occurrences</li><li>'?' zero or one occurrence</li><li>'{m}' exactly m occurrences</li><li>'{m,n}' between m and n occurrences, inclusive</li></ul> For example, the pattern in the rule for FuncSig (FUNCTION) (IDENT?) (List) describes a keyword "function", followed by zero or one IDENT token, and followed by a "List". In turn, the pattern in the rule for List <pre listing-type="program-listing"> (LPAREN) ((Expr) (COMMA Expr)*)? (RPAREN)</pre> describes a LPAREN token and a RPAREN token surrounding a list of zero or more Expr's separated by COMMA tokens. In turn, the pattern in the rule for Expr <pre listing-type="program-listing"> ([ExprDelimTokens ExprLdelimTokens ExprLdelimRules]? ([^ ExprDelimTokens ExprLdelimTokens ExprLdelimRules ExprExcludeRules ExprRdelimTokens]+) [ExprDelimTokens ExprRdelimTokens]) | ([ExprStmntRules]);</pre> describes a general definition of what qualifies as an expression, involving delimiter tokens and other rules.
0070An <u>action</u> prescribes an action to perform when a pattern is matched. For example, the action in the rule for FuncSig <pre listing-type="program-listing">this.val=$(2).val; @("FUNCNAME").val=$(2).val;</pre> assigns a value to FuncSig, which is the value of the second parameter in the pattern for FuncSig; namely, the value of the IDENT token. In addition, the action assigns this same value to an entry in a symbol table called "FUNCNAME", as described hereinbelow. It may thus be appreciated that certain rules have values associated therewith, which are assigned by the parser as it processes the tokens.
0071The symbol table mentioned hereinabove is an internal table, for rules to store and access variables.
0072The <u>analyzer-rules</u> section has entries defining rules for the parser. Such entries preferably conform to the syntax <img file="EP1810152B1_D0004.tif" /> Patterns and actions for analyzer rules are similar to patterns and actions for parser rules. For example, the pattern <pre listing-type="program-listing"> (IDENT) ASSIGNMENT IDENT <val=="screen"> DOT IDENT <val=="width">;</pre> within the rule for ScrWidAssign describes a five-token pattern; namely, (i) an IDENT token, followed by (ii) an ASSIGNMENT token, followed by (iii) an IDENT token that has a value equal to "screen", followed by (iv) a DOT token, and followed by (v) an IDENT token that has a value equal to "width". Such a pattern indicates use of a member reference "screen.width" within an assignment statement, and corresponds to the example exploit listed above in the discussion of <figref idref="f0001">FIG. 1</figref>.
0073The action <pre listing-type="program-listing"> @($(1).val).attr += ATTR_SCRWID;</pre> within the ScrWidAssign rule assigns the attribute ATTR_SCRWID to the symbol table entry whose name is the value of the IDENT token on the left side of the pattern. Similarly, the pattern <pre listing-type="program-listing"> (IDENT) ASSIGNMENT IDENT <@(val).aftr?=ATTR-WINDOW> DOT FuncCall <val=="createPopup"> $;</pre> in the rule for CreatePopup1 corresponds to the command <pre listing-type="program-listing">op=window.createPopup( );</pre> in the example exploit above. It may thus be appreciated that exploits are often described in terms of composite pattern matches, involving logical combinations of more than one pattern. Node patterns within analyzer rules preferably specify nodes for which an analyzer rule should be evaluated. Node patterns serve to eliminate unnecessary analyses. Referring back to <figref idref="f0002">FIG. 2</figref>, when parser 220 finds a pattern match for a specific parser rule, it preferably creates a node in the parse tree, and places the matching nodes underneath the newly created node. Preferably, parser 220 assigns the name of the specific rule to the name of the new node. However, if the rule has a "nonode" attribute, then such new node is not created.
0074After performing the actions associated with the specific rule, parser 220 preferably calls analyzer 230, and passes it the newly-created parser node of the parse tree. However, if the rule has a "noanalyzer" attribute, then analyzer 230 is not called.
0075When analyzer 230 finds a pattern match for a specific analyzer rule, it preferably adds the matched rule to the parse tree. However, if the rule has a "nomatch" attribute, then the matched rule is not added to the parse tree.
0076Reference is now made to <figref idref="f0005">FIG. 5</figref>, which is a simplified flowchart of operation of a parser for a specific content language, such as parser 220 (<figref idref="f0002">FIG. 2</figref>), within an ARB content scanner, such as content scanner 130 (<figref idref="f0001">FIG. 1</figref>), in accordance with a preferred embodiment of the present invention. Prior to beginning the flowchart in <figref idref="f0005">FIG. 5</figref>, it is assumed that the parser has initialized a parse tree with a root node. At step 500, the parser calls a tokenizer, such as tokenizer 210, to retrieve a next token from an incoming byte stream. At step 510 the parser adds the token retrieved by the tokenizer as a new node to a parse tree. Preferably, new nodes are added as siblings until a match with a parser rule is discovered.
0077Nodes within the parse tree are preferably named; i.e., they have an associated value that corresponds to a name for the node. Preferably, new nodes added as siblings are named according to the name of the token they represent.
0078At step 520 the parser checks whether or not a pattern is matched, based on parser rules within a rule file for the specific content language. If not, then control returns to step 500, for processing the next token. If a match with a parser rule is discovered at step 520, then at step 530 the parser checks whether or not the matched parser rule has a "nonode" attribute. If so, then control returns to step 500. If the matched parser rule does not have a "nonode" attribute, then at step 540 the parser performs the matched parser rule's action. Such action can include inter alia creation of a new node, naming the new node according to the matched parser rule, and placing the matching nodes underneath the new node, as indicated at step 540. Thus it may be appreciated that nodes within the parse tree have names that correspond either to names of tokens, or names of parser rules.
0079At step 550 the parser checks whether or not the matched parser rule has a "noanalyze" attribute. If so, then control returns to step 520. If the matched parser rule does not have a "noanalyze" attribute, then at step 560 the parser calls an analyzer, such as analyzer 230, to determine if a potential exploit is present within the current parse tree. It may thus be appreciated that the analyzer is called repeatedly, while the parse tree is being dynamically built up.
0080After checking the analyzer rules, the analyzer returns its diagnostics to the parser. At step 570 the parser checks whether or not the analyzer found a match for an analyzer rule. If not, then control returns to step 500. If the analyzer did find a match, then at step 580 the parser performs the matched analyzer rule's action. Such action can include inter alia recording the analyzer rule as data associated with the current node in the parse tree; namely, the parent node that was created at step 540, as indicated at step 580.
0081In accordance with a preferred embodiment of the present invention, binary class instances of ARB scanners are packaged serially, for transmission to and installation at a client site. Reference is now made to <figref idref="f0006">FIG. 6</figref>, which is a simplified block diagram of a system for serializing binary instances of ARB content scanners, transmitting them to a client site, and regenerating them back into binary instances at the client site. The workflow in <figref idref="f0006">FIG. 6</figref> begins with a set of rule files for one or more content languages. Preferably, the rule files are generated by one or more people who are familiar with the content languages.
0082A rule-to-XML convertor 610 converts rule files from ARB syntax into XML documents, for internal use. Thereafter a builder module 620 is invoked. Preferably, builder module 620 generates a serialized rule data file, referred to herein as an <u>archive file</u>.
0083In turn, ARB scanner factory module 630 is responsible for producing an ARB scanner on demand. Preferably, an ARB scanner factory module has a public interface as follows: <pre listing-type="program-listing"> class arbScannerFactory { INT32 createScanner(const std::string& mimetype, arbScanner** scanner); INT32 retireScanner(arbScanner *scanner, INT32& factoryStillActive); Bool hasScannerType(const std::string& mimeType); }</pre> ARB scanner factory module 630 is also responsible for pooling ARB scanners for later re-use.
0084ARB scanner factory module 630 instantiates a scanner repository 640. Repository 640 produces a single instance of each ARB scanner defined in the archive file. Preferably, each instance of an ARB scanner is able to initialize itself and populate itself with the requisite data.
0085Reference is now made to <figref idref="f0007">FIG. 7</figref>, which illustrates a representative hierarchy of objects created by builder module 620, in accordance with a preferred embodiment of the present invention. Shown in <figref idref="f0007">FIG. 7</figref> are three types of content scanners: a scanner for HTML content, a scanner for JavaScript content, and a scanner for URI content. An advantage of the present invention is the ability to generate such a multitude of content scanners within a unified framework.
0086After ARB scanner factory module 630 is produced, builder module 620 calls a serialize( ) function. As such, the serialize( ) function called by builder module 620 causes all relevant classes to serialize themselves to the archive file recursively. Thereafter the archive file is sent to a client site.
0087After receiving the archive file, the client deserializes the archive file, and creates a global singleton object encapsulating an ARB scanner factory instance 650. The singleton is initialized by passing it a path to the archive file.
0088When the client downloads content from the Internet it preferably creates a pool of thread objects. Each thread object stores its ARB scanner factory instance 650 as member data. Whenever a thread object has content to parse, it requests an appropriate ARB scanner 660 from its ARB scanner factory object 650. Then, using the ARB scanner interface, the thread passes content and calls the requisite API functions to scan and process the content. Preferably, when the thread finishes scanning the content, it returns the ARB scanner instance 660 to its ARB scanner factory 650, to enable pooling the ARB scanner for later re-use.
0089It may be appreciated by those skilled in the art that use of archive files and scanner factories enables auto-updates of scanners whenever new versions of parser and analyzer rules are generated.
0090In reading the above description, persons skilled in the art will realize that there are many apparent variations that can be applied to the methods and systems described. Thus, although <figref idref="f0005">FIG. 5</figref> describes a method in which a complete diagnostic of all match analyzer rules is produced, in an alternative embodiment the method may stop as soon as a first analyzer rule is matched. The parser would produce an incomplete diagnostic, but enough of a diagnostic to determine that the scanned content contains a potential exploit.
0091In addition to script and text files, the present invention is also applicable to parse and analyze binary content and EXE files. Tokens can be defined for binary content. Unlike tokens for text files that are generally delimited by punctuation characters, tokens for binary content generally have different characteristics.
0092In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will, however, be evident that various modifications and changes may be made to the specific exemplary embodiments without departing from the scope of the invention as set forth in the appended claims. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense.
APPENDIX A
0093<pre listing-type="program-listing"> vchars { vchar ignore 0x00 "ignore" { [0x00-0xFF]+; } vchar ws 0x20 { [0x09 0x0B 0x0C 0x20 0xA0]+; } vchar nl 0x0d { [0x0d]+; [0x0a]+; } vchar alphanum '?' "raw" { [0x21-0x2f 0x30-0x39 0x3a-0x40 0x41-0x5A 0x5b-0x60 0x61-0x7A 0x7B- 0x7E 0x7f-0x9F 0xA1-0xff]; } vchar_alias underscore { 0x5F; } vchar_alias equals { 0x3D; } vchar_alias hash { 0x23; } vchar_alias at { 0x40; } tokens, { TOKENIZER_DEFAULT ".+"; WS "[!ws!]" punct not-a-token; EOL "[!nl!]" punct not-a-token; IDENT "[A-Za-z[!underscore!] [!dollarsign!] [A-Za-z0- 9[!underscore!] ['dollarsign']]*"; LBRACE "[!left_curly_bracket!]" punct; RBRACE "[!right_curly_bracket!]" punct; LPAREN "[!left_parenthesis!]" punct ; RPAREN "[!right_parenthesis!]" punct; LBRACKET "[!left_square_bracket!]" punct; RBRACKET "[!right_square_bracket!]" punct; SINGLE_QUOTE "[!single_quote!]" punct; DOUBLE_QUOTE "[!double_quote!]" punct; COMMENT_OPEN "[!slash!] [!asterisk!]" punct; COMMENT_CLOSE "[!asterisk!] [!slash!]" punct; DOUBLE_SLASH "[!slash!] [!slash!]" punct; INTEGER_DECIMAL "[0-9]+"; INTEGER_HEX "0 [xX] [0-9A-Fa-f]+"; cdata CDATA { DOUBLE_QUOTE DOUBLE_QUOTE "[!backslash!] [!double_quote!]?" "[^[!backslash!] [!double_quote!]]+"; SINGLE_QUOTE SINGLE_QUOTE "[!backslash!] [!single_quote!]?" "[^[lbackslash!][!single-quote!]]+"; COMMENT_OPEN COMMENT_CLOSE "[^[!asterisk!]]+"; DOUBLE_SLASH EOL "[^[!nl!]]+"; } VSEMICOLON vdelim; } #define OP PLUS | MINUS | SLASH | MULTIPLY | MOD token_pairs { invalid IDENT IDENT; invalid IF (ELSE | FOR | WHILE | DOT); invalid (OP) (OP); valid (PLUS | MINUS) (PLUS | MINUS); invalid INTEGER_DECIMAL IDENT; } #define Semicolon (SEMICOLON | VSEMICOLON) #define Semicolon_ SEMICOLON VSEMICOLON #define ActionClause (((Expr) Semicolon) | (Block)) parser_rules { rule Eval { patterns { EVAL List; } } rule FuncSig { patterns { (FUNCTION) (IDENT?) (List); } actions { this.val=$(2).val; @("FUNCNAME").val = $(2).val; } } rule FuncDecl { patterns { (FuncSig) Block; } actions { this.val=$(1).val; ∼@ ("FUNCNAME"); } } rule FuncCall { patterns { (IDENT) List; } actions { this.val=$(1).val; } } . . . #define ExprDelimTokens Semicolon_ COMMA COLON #define ExprLdelimTokens LPAREN LBRACE ELSE DO IN THROW RETURN CASE VAR #define ExprRdelimTokens RPAREN RBRACE #define ExprLdelimRules IfClause WhileClause ForClause ForInClause WithClause #define ExprExcludeRules IfStmnt Expr #define ExprStmntRules FuncDecl IfElseStmnt IfNoElseStmnt WhileStmnt DoWhileStmnt ForStmnt ForInStmnt SwitchStmnt WithStmnt TryCatchFinallyStmnt TryCatchNoFinallyStmnt TryNoCatchFinallyStmnt ThrowStmnt ReturnStmnt LabelStmnt CaseStmnt DefaultStmnt BreakStmnt ContinueStmnt VarStmnt DebuggerStmnt NakedBlockStmnt NakedListStmnt rule Expr nonode { patterns { ( [ExprDelimTokens ExprLdelimTokens ExprLdelimRules]? ([^ ExprDelimTokens ExprLdelimTokens ExprLdelimRules ExprExcludeRules ExprRdelimTokens]+) [ExprDelimTokens ExprRdelimTokens] ) | ([ExprStmntRules]); } actions { addnode (children="2 3"); } } rule BlockBegin nonode { patterns { LBRACE; } actions { @level++; } } rule Block { patterns { (LBRACE) (Expr Semicolon?)* (RBRACE); } actions { @level--; } } rule List { patterns { (LPAREN) ((Expr) (COMMA Expr)*)? (RPAREN); } } analyzer_rules { RULE_DECL (Begin) nomatch patterns { BEGIN; } actions { @("window", 0).attr += ATTR_WINDOW; @("self", 0).attr += ATTR_WINDOW; @("parent", 0).attr += ATTR_WINDOW; } RULE_DECL (ScrWidAssign) patterns { (IDENT) ASSIGNMENT IDENT <val=="screen"> DOT IDENT <val=="width">; actions { @($(1).val).attr += ATTR_SCRWID; } RULE_DECL (ScrHgtAssign) { patterns { (IDENT) ASSIGNMENT IDENT <val=="screen"> DOT IDENT <val=="height">; } actions { @($(1).val).attr += ATTR_SCRHGT; } RULE_DECL (ScrWidHgtList) { patterns { LPAREN Expr COMMA Expr COMMA Expr <attr?=ATTR_SCRWID> COMMA Expr <attr?=ATTR_SCRHGT>; } RULE_DECL (EXPLOIT) exploit { patterns { . <(matches(*):RULE(CreatePopup1) & matches(*):RULE(WndShowScrnWidHgt1)) | (matches(*):RULE(CreatePopup2) & matches(*):RULE(WndShowScrnWidHgt2))>; } } RULE_DECL (CreatePopup1) { patterns { (IDENT) ASSIGNMENT IDENT <@(val).attr?=ATTR_WINDOW> DOT FuncCall <val=="createPopup"> $; } actions { @($(1).val).attr += ATTR_WINDOW; } }</pre>
Contents6
11 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11
Every citation, both ways
| Document | Relation | Office |
|---|---|---|
| US2002073330A1 | Cites | United States of America |
| US6487666B1 | Cites | United States of America |
| YAO-WEN HUANG ET AL.: "Securing Web Application Code by Static Analysis and Runtime Protection", ACM, 2 PENN PLAZA, SUITE 701 - NEW YORK USA, 22 May 2004 (2004-05-22), pages 40-51, XP040180026, | Non-patent | – |
58 members in 9 offices
Priority claims7
| Document | Office | Kind | Date |
|---|---|---|---|
| 930884 | United States of America | – | |
| 93088404 | United States of America | A | |
| 2005000915 | Israel | W | |
| 2005000915 | – | – | – |
| 930884 | – | – | – |
| US20040930884 | – | – | – |
| WO2005IL00915 | – | – | – |
Members58
| Document | Office | Kind | |
|---|---|---|---|
| CA2275771A1 | Canada | A1 | |
| WO9821683A2 | World Intellectual Property Organization (WIPO) | A2 | |
| WO9821683A3 | World Intellectual Property Organization (WIPO) | A3 | |
| WO9935583A2 | World Intellectual Property Organization (WIPO) | A2 | |
| WO9935583A3 | World Intellectual Property Organization (WIPO) | A3 | |
| EP0965094A2 | European Patent Office (EPO) | A2 | |
| US6092194A | United States of America | A | |
| US6154844A | United States of America | A | |
| US6167520A | United States of America | A | |
| WO0188673A2 | World Intellectual Property Organization (WIPO) | A2 | |
| AU7440601A | Australia | A | |
| US2002013910A1 | United States of America | A1 | |
| JP2002514326A | Japan | A | |
| US6480962B1 | United States of America | B1 | |
| WO0188673A3 | World Intellectual Property Organization (WIPO) | A3 | |
| US6804780B1 | United States of America | B1 | |
| EP0965094A4 | European Patent Office (EPO) | A4 | |
| US2005005107A1 | United States of America | A1 | |
| US2005108554A1 | United States of America | A1 | |
| US2005240999A1 | United States of America | A1 | |
| US2006026677A1 | United States of America | A1 | |
| CA2578792A1 | Canada | A1 | |
| CA2842218A1 | Canada | A1 | |
| WO2006025050A2 | World Intellectual Property Organization (WIPO) | A2 | |
| WO2006025050A3 | World Intellectual Property Organization (WIPO) | A3 | |
| US7058822B2 | United States of America | B2 | |
| US2006149968A1 | United States of America | A1 | |
| EP1810152A2 | European Patent Office (EPO) | A2 | |
| JP3952315B2 | Japan | B2 | |
| US7418731B2 | United States of America | B2 | |
| EP0965094B1 | European Patent Office (EPO) | B1 | |
| CA2275771C | Canada | C | |
| ATE409920T1 | Austria | T1 | |
| DE69739021D1 | Germany | D1 | |
| IL147712A | Israel | A | |
| US7613926B2 | United States of America | B2 | |
| US7647633B2 | United States of America | B2 | |
| IL190518A | Israel | A | |
| US7975305B2 | United States of America | B2 | |
| US8079086B1 | United States of America | B1 | |
| US2012117651A1 | United States of America | A1 | |
| US8225408B2 | United States of America | B2 | |
| IL181611A | Israel | A | |
| EP1810152A4 | European Patent Office (EPO) | A4 | |
| US8677494B2 | United States of America | B2 | |
| US2014143827A1 | United States of America | A1 | |
| US2015169870A1 | United States of America | A1 | |
| US2015180885A1 | United States of America | A1 | |
| US9141786B2 | United States of America | B2 | |
| US2015288720A1 | United States of America | A1 | |
| US9189621B2 | United States of America | B2 | |
| US9219755B2 | United States of America | B2 | |
| US2016070907A1 | United States of America | A1 | |
| US9444844B2 | United States of America | B2 | |
| EP1810152B1This record | European Patent Office (EPO) | B1 | |
| CA2578792C | Canada | C | |
| CA2842218C | Canada | C | |
| US10552603B2 | United States of America | B2 |
83 legal events, as 9 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Patent expired after termination of 20 yearsExpiredPE20 | PE20 | GB | |
| Patent expired because of reaching the maximum lifetime of a patentExpiredMK | MK | NL | |
| Expiry of rightR071 | R071 | DE | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Amendment of ipc main classPREVIOUS MAIN CLASS: H04L0029060000R079 | R079 | DE | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Fee paymentPLFP | PLFP | FR | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Patent lapsedLapsedMM4A | MM4A | IE | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Patent ceasedCeasedPL | PL | CH | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| No opposition filedOpposition26N | 26N | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Fee paymentPLFP | PLFP | FR | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| No opposition filed against granted patent, or epo opposition proceedings concluded without decisionGrantedR097 | R097 | DE | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Deletion acc. to par. 5 (withdrawal of the translation of the ep patent)MK05 | MK05 | AT | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Invalidated european patentMG4D | MG4D | LT | |
| Dpma publication of mentioned ep patent grantGrantedR096 | R096 | DE | |
| Translation for ep filed (entry of ep into country)FP | FP | NL | |
| European patents granted designating irelandGrantedFG4D | FG4D | IE | |
| Reference to at number (ep patent validated in austria)REF | REF | AT | |
| European patent takes effect as a national patent in ch/liEP | EP | CH | |
| Designated contracting statesAK | AK | EP | |
| European patent grantedGrantedFG4D | FG4D | GB | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| Grant fee paidORIGINAL CODE: EPIDOSNIGR3GRAS | GRAS | EP | |
| Intention to grant announcedINTG | INTG | EP | |
| Information provided on ipc code assigned before grantRIC1 | RIC1 | EP | |
| Information provided on ipc code assigned before grantRIC1 | RIC1 | EP | |
| Information provided on ipc code assigned before grantRIC1 | RIC1 | EP | |
| Information provided on ipc code assigned before grantRIC1 | RIC1 | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOSNIGR1GRAP | GRAP | EP | |
| Amendment of ipc main classPREVIOUS MAIN CLASS: G06F0011300000R079 | R079 | DE | |
| Party data changed (applicant data changed or rights of an application transferred)RAP1 | RAP1 | EP | |
| First examination report despatched17Q | 17Q | EP | |
| Supplementary search report drawn up and despatchedA4 | A4 | EP | |
| Information provided on ipc code assigned before grantRIC1 | RIC1 | EP | |
| Information provided on ipc code assigned before grantRIC1 | RIC1 | EP | |
| Party data changed (applicant data changed or rights of an application transferred)RAP1 | RAP1 | EP | |
| Request for extension of the european patent (deleted)DAX | DAX | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Information on inventor provided before grant (corrected)RIN1 | RIN1 | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 1810152
- Publication, DOCDB
- 1810152
- Publication, EPODOC
- EP1810152
- Application
- 57754574
- Application, DOCDB
- 05775457
- Application, EPODOC
- EP20050775457
Titles3
- German
- VERFAHREN UND SYSTEM FÜR ADAPTIVE, AUF REGELN BASIERENDE INHALTS-SCANNER
- English
- METHOD AND SYSTEM FOR ADAPTIVE RULE-BASED CONTENT SCANNERS
- French
- PROCEDE ET SYSTEME DESTINES A DES DISPOSITIFS DE BALAYAGE DE CONTENUS FONDES SUR DES REGLES ADAPTATIVES
Classification
- CPC, 8
- G06F21/563
- G06F8/427
- G06F21/562
- G06F2221/2119
- H04L63/0227
- H04L63/0245
- H04L63/145
- H04L63/168
- IPC, 5
- H04L29 06
- G06F9 45
- G06F11 30
- G06F21 00
- G06F21 56
Designated states1
- Contracting states, 1
- Türkiye
