There are typically two types of approaches in a program analysis task – static analysis and dynamic analysis.
Static analysis assumes every path is executed, while dynamic analysis will perform an actual execution.
We have examined both approaches.
With the help of these analysis, we can extract useful object communication features. For example, in the following code, “window.open()” refers to a creation of a new window, so we can extract a feature “NEW::WINDOW” from static analysis. “frm.txt” actually refers to an “INPUT” object. Here it is to set the value of an input field, so we can extract a feature “SET::INPUT.value”. Similarly, we can extract many other features from static analysis.
As for dynamic analysis, we focus on finding more advanced features that only reveals during runtime. This example code is actually designed to perform a banner task. The message appearing in the status bar changes with time, which performs like a banner. A feature “CHANGES::WINDOW.status” can therefore get extracted with dynamic analysis.