<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Application of Graph Databases for Static Code Analysis of Web-Applications</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>ITMO University</institution>
          ,
          <addr-line>Kronverkskiy prospekt, 49, St. Petersburg, 197101</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>1866</year>
      </pub-date>
      <fpage>0000</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>Graph databases ofer a very flexible data model. We present the approach of static code analysis using graph databases. The main stage of the analysis algorithm is the construction of ASG (Abstract Source Graph), which represents relationships between AST (Abstract Syntax Tree) nodes. The ASG is saved to a graph database (like Neo4j) and queries to the database are made to get code properties for analysis. The approach is applied to detect and exploit Object Injection vulnerability in PHP web-applications. This vulnerability occurs when unsanitized user data enters PHP unserialize function. Successful exploitation of this vulnerability means building of “object chain”: a nested object, in the process of deserializing of it, a sequence of methods is being called leading to dangerous function call. In time of deserializing, some “magic” PHP methods (__wakeup or __destruct) are called on the object. To create the “object chain”, it's necessary to analyze methods of classes declared in web-application, and find sequence of methods called from “magic” methods. The main idea of author's approach is to save relationships between methods and functions in graph database and use queries to the database on Cypher language to find appropriate method calls. Also, some unobvious ways of calling other PHP “magic” methods, which help to find more appropriate “object chains” are considered. The approach was successfully tested on the vulnerability CVE-2014-1860 discovered in Contao CMS.</p>
      </abstract>
      <kwd-group>
        <kwd>static analysis</kwd>
        <kwd>graph database</kwd>
        <kwd>Cypher</kwd>
        <kwd>PHP</kwd>
        <kwd>Object injection</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Graph databases are used in many areas like bioinformatics [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], social networks
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], chemistry [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], and static code analysis [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. A graph database (over a countably
infinite set of labels ) is a pair G = (V, E) where V is a finite set of nodes,
      </p>
      <p>E ⊆ V × × V is a finite set of edges. There are two basic ways to explore
and graphically depict connected data: Resource Description Framework (RDF)
triple stores and labeled property graphs.</p>
      <p>The abstract RDF syntax is a set of triplets called an RDF graph. An RDF
triplet contains three components: a subject that is an URI reference or an empty
node; predicate, which is an URI reference; an object that is an URI reference,
literal, or empty node. RDF triplet written in order: subject, predicate and
object. A predicate is also known as a triplet property. An RDF graph is a set
of RDF triplets. A set of RDF graph nodes is a set of subjects and objects of
triplets of a graph.</p>
      <p>The property graphs are graphs in which attributes (properties) are assigned
to edges and/or vertices of the graph. A database in a graph model is a graph
whose vertices and edges are typed. A vertex or edge type is a collection of
attributes (properties) attributed to a vertex or edge.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Graph search queries in terms of formal languages</title>
      <p>One of the major problems, related with graph databases, is to find specific
paths in it. A path in graph G is a sequence p = (v0, a1, v1)...(vn−1, an, vn) of
edges of G. Constraints on the paths can be expressed in several ways: conjuctive
queries, shortest path queries, in terms of formal languages.</p>
      <p>Constraints in terms of regular languages are used to search patterns in
graph. The regular expressions for an alphabet are defined by the following
form: E ::= ∅ | ε | a |(E ◦ E)|(E + E)|E∗, where a ∈ . If E is a regular
expression then L(E) is a regular language. A regular path query (RPQ) is an
r
expression of the form x −→ y where x and y are variables and r is regular
expression over . Let r be a regular expression and G be a graph. A path
p = (v0, a1, v1)...(vn−1, an, vn) in G matches r, if a1a2...an ∈ L(r).</p>
      <p>Context-free languages also can be used as constraints. A context-free grammar
G can be defined as 4-tuple: G = (V, T, P, S) where V is a finite set of nonterminals
containing S, T is finite set of terminals, P is a set of production rules in the
form of α → β where α ∈ V and β ∈ (V ∪ T )*, and S is start symbol. An answer
to a context-free path query (CFPQ) is usually a set of triples (A, m, n) such
that there is a path from the node m to the node n, whose labeling is derived
from a non-terminal A ∈ V of the given context-free grammar.</p>
      <p>For example, let’s consider the following context-free grammar: S → aSa and
S → bSb. This grammar generates the language of even-length palindromes.
1
a
a
2
3</p>
      <p>5
b
a b</p>
      <p>
        a
4
Context-free path queries are more expressive, than regular path queries, but
such type of queries is not real-time and requires large amounts of memory [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
Another way to increase the expressiveness of regular parh queries is conjunctive
regular path queries. A conjunctive regular path query (CRPQ) is an expression
of the form ∃z ((x1 −a→1 y1) ∧ ... ∧ (xn −a−→n yn)) where z is a tuple of variables
from {x1, ..., xn, y1, ..., yn} and ri is an RPQ over for i ∈ [n]. A conjunctive
query over graph is an expression of the form: ∃z ((x1 −a→1 y1) ∧ ... ∧ (xn −a−→n yn))
where z is a tuple of variables from {x1, ..., xn, y1, ..., yn} and {a1, ..an} ∈ .
Conjunctive queries (and even first-order queries) on graphs are limited, they
can only express ”local” properties.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Path querying algorithms</title>
      <p>
        Most existing graph querying languages, including SPARQL [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], Gremlin
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], Cypher support only regular languages as constrains. There are several
approaches for evaluating RPQ: approach based on mapping to finite automaton
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and on searching for rare labels and starting breadth-first search [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
Algorithms for evaluating conjunctive regular path queries are studied in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
cfSPARQL [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] is the single known graph query language to support context-free
path constraints. The most of context-free path query evaluation algorithms are
based on extending the known context-free parse techniques to the graph input.
GSSLR algorithm [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] is based on Tomita recognizer, subgraph queries algorithm
[
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] uses Early parser, context-free path querying with structural representation
of result [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] is based on generalized top-down parsing algorithm (GLL). Also,
algorithm, introduced in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], constructs annotated grammar in order to evaluate
context-free path query. Algorithm in [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] is desighned to use fast boolean matrix
multiplication and GPU.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Graph databases in static code analysis</title>
      <p>One of the important usages of graph data models is a static code analysis. Static
analysis is a proven approach for detecting mistakes in the source code early in
the development cycle. Since static analysis does not compile or run the code,
it can be applied at an early state of development. This section investigates the
usage of graph databases in static code analysis tools.</p>
      <p>
        Graph-based analysis of JavaScript source code repositories [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] detects
deadcode, potential division by zero, and other mistakes using Neo4j graph
databases and openCypher for evaluating regular path queries.
      </p>
      <p>
        GREENSPECTOR [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] uses Neo4j and Cypher query language for finding
coding mistakes in a special graph data model called “call graph” via
patternmatching.
      </p>
      <p>
        Wiggle [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] is a prototype graph-model code-query system. It performs
such kinds of analysis like exploring type hierarchy, override hierarchy, type
attribution, method call graph and data flow analysis.
      </p>
      <p>
        Class-Graph [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] uses Neo4j and Cypher query language to collect structural
insights about Java projects and to store, compute and visualize a variety of
software metrics and other types of software analytics (method call hierarchies,
transitive clojure, critical path analysis, volatility and code quality).
Paper [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ] presents an approach to detect behavioral design patterns from
source code using static analysis techniques. This approach used Neo4j and uses
graph query language Gremlin for doing graph matching to perform structural
analysis, behavioral analysis, semantic analysis, Program Dependence Analysis,
Control Dependence Analysis and Data Dependence Analysis.
jQAssistant [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] is a static code analysis tool using the graph database Neo4j
and Cypher query language. It is used for detection of constraint violations,
generating reports about user defined concepts and metrics, deetecting common
problems like cyclic dependencies or tests without assertions in Java projects.
jQAssistant allows definition of rules and automated verification during a build
process. Rules can be expressed as Cypher queries.
      </p>
      <p>
        Joern [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ] analyzes a code base using a robust parser for C/C++ and represents
the entire code base by one large property graph stored in a Neo4j graph
database. This allows code to be mined using complex queries formulated in the
graph traversal languages Gremlin and Cypher. Exploring program structure,
call graph, data flows, methods, types and other can be performed by Joern
tool.
      </p>
      <p>
        NAVEX [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ] combines dynamic analysis that is guided by static analysis
techniques in order to automatically identify vulnerabilities and build working
exploits. It uses extention of Joern for PHP language to find vulnerabilities via
searching the enhanced code property graph using Gremlin queries and Neo4j
graph database.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Static code analysis problem</title>
      <p>To extract information for static analysis, it is necessary to present the program
code in the form of AST (Abstract Syntax Tree). Next, the syntax tree is
translated into a graph representation - ASG (Abstract Semantic Graph),
for this it is necessary to complete the information from AST with semantic
information. The resulting graph structure that accomodates the information,
would be a direct representation of packages, classes, interfaces, types, methods,
ifelds and containing relationships like dependencies, containment, calls,
coverage, etc. Queries are made to the constructed graph to retrieve the
necessary code properties, for example, obtain functionDefinition relationships
to get a program call stack.</p>
      <sec id="sec-5-1">
        <title>Source AST</title>
      </sec>
      <sec id="sec-5-2">
        <title>Graph Database ASG</title>
      </sec>
      <sec id="sec-5-3">
        <title>Query Fig. 2: Flowchart of static analysis engine</title>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Proposed Approach</title>
      <p>
        It is proposed to apply this approach for searching and exploiting of the Object
Injection vulnerability in PHP web applications. Object Injection attack is
part of the OWASP [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] vulnerability classification. The vulnerability arises
when unsanitized user data enters the PHP unserialize function. The result of
exploiting the vulnerability is to build a string with a chain of serialized PHP
objects. In order to successfully exploit a PHP Object Injection vulnerability
two conditions must be met:
• The web-application must have a class which implements a PHP magic
method (such as __wakeup or __destruct) that can be used to carry out
malicious attack
• All of the classes used during the attack must be declared when the
unserialize() function is being called
To exploit this vulnerability, we need to do static analysis of declared classes in
web-application code. During static analysis, we build a class hierarchy based on
the inheritance of each class. All defined methods, properties and class constants
are transformed to data symbols and stored in the analysis environment. When
analyzing the code of declared methods, it is necessary to take into account these
object-oriented features in PHP [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]:
• Object-sensitive Methods: __set_state(),
      </p>
      <p>__clone(), __toString(), __construct()
• Field-sensitive Methods: __get, __set, __isset, __unset
• Invocation-sensitive Methods: __call, __callStatic
• Calls using keywords: parent::, self::, static::
__sleep(),
__invoke(),
Let’s consider an example of the class with __wakeup method, which has ”new”
operator in it’s code. __construct method of Vuln class is called and arbitrary
ifle is unlinked.</p>
      <p>}
}
class Vuln {
public function __construct($file) {</p>
      <p>unlink($file);
}
class test {
public function __wakeup() {</p>
      <p>$this-&gt;a = new Vuln($this-&gt;test);
}
unserialize('O:4:”test”:1:{s:4:”test”;s:13:”/tmp/test.php”;}');</p>
      <p>In the following example non-existent method call in __destruct leads to __call
method being executed:
class method_test {
public function __call($name, $arguments) {
echo ”call '$name' ” . implode(', ', $arguments). PHP_EOL;
unlink($this-&gt;file);
}
public function __destruct() {</p>
      <p>$this-&gt;notexisting(1,2,3);
}
}
unserialize('O:11:”method_test”:1:{s:4:“file”;s:13:”/tmp/test.php”} ');
For each method, it is performed a check for possible other method calls and
”dangerous” functions. Using this information we can create object injection
chains. It is necessary to take into account some unobvious ways to call PHP
”magic” methods, when analyzing web-application source codes. It helps to
ifnd additional relationships between method calls and build proper ”object
chain”. No one of the previously reviewed open-source projects solves the task
of searching PHP object injection vulnerability.</p>
    </sec>
    <sec id="sec-7">
      <title>7 Implementation</title>
      <p>
        Constructing AST from source codes is done using nikic’s PHP-Parser utility
[
        <xref ref-type="bibr" rid="ref28">28</xref>
        ]. Each AST node is an object of class representing this node. Obtaining
relationships is done by calling ”traverse” method of an object of NodeTraverser
class, declared in PHP-Parser.
$nodeTraverser = new PhpParser\NodeTraverser;
$nodeTraverser-&gt;addVisitor(new ChangeMethodNameNodeVisitor);
$traversedNodes = $nodeTraverser-&gt;traverse($nodes);
All constructed nodes are bypassed, and there is done a check whether the node
is the object of some class:
– Class_ - represents AST of whole declared class.
– ClassMethod - represents AST of class method code.
– MethodCall - represents AST corresponding to method call inside other
methods.
– FuncCall - represents AST corresponding to function call inside other
methods.
      </p>
      <p>
        Information is extracted from nodes, saved into CSV files and imported into
Neo4j database. Methods and functions are represented using nodes labeled
”Method” and ”Function” and linked by relationship named ”CALLS”. Nodes
labeled ”Method” have properties: name - method name, class_name - name
of the class where method is declared. ”Function” nodes have the following
properties: name - function name, vuln (indicates that it is ”dangerous” function,
True or False). ”CALLS” relationship stores class field that calls the method in
it’s property. Relationships between method and function calls are created by
the following queries written on Cypher language:
MATCH (n1:Method),(n2:Method) WHERE n1.class_name=line[0]
AND n1.name=line[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] AND n2.name=line[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
MERGE (n1)-[r:CALLS {property:line[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]}]-&gt;(n2)''')
MATCH (n1:Method),(n2:Function) WHERE n1.class_name=line[0]
AND n1.name=line[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] AND n2.name=line[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
MERGE (n1)-[r:CALLS {property:''}]-&gt;(n2)''')
To obtain a sequence of method calls, we execute a query to the database:
MATCH p = (a: Method) - [r: CALLS * 0..10] -&gt; (b: Function {vuln: True})
WHERE a.name IN ['__wakeup', '__destruct'] RETURN p
This query returns all paths in graph database from nodes representing method
with the ”magic” name (__destruct / __wakeup) to nodes representing
dangerous function (marked with property ”vuln” equal to ”True”).
For demonstrating the approach, we took Contao CMS with vulnerability
CVE-2014-1860 [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ] and obtained a sequence of method calls leading to PHP
unlink function being called with an arbitrary file name as an argument.
Summing up, we propose method for static code analysis of scripts written in
PHP programming language. We create graph database that stores relationships
between code properties. Using this information creation of object injection
chains is done. Further work may consist in applying an approach to searching
deserialization vulnerabilities in application code with frameworks in Java
(Weblogic, Tomcat, Spring) or .NET. (Nancy, Breeze), and reducing time
complexity of graph database queries using context-free path queries.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Fiannaca</surname>
            <given-names>A.</given-names>
          </string-name>
          et al.
          <article-title>BioGraphDB: a new GraphDB collecting heterogeneous data for bioinformatics analysis</article-title>
          //Proceedings of BIOTECHNO.
          <article-title>- 2016.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Cattuto</surname>
            <given-names>C.</given-names>
          </string-name>
          et al.
          <article-title>Time-varying social networks in a graph database: a Neo4j use case //First international workshop on graph data management experiences and systems</article-title>
          .
          <source>- ACM</source>
          ,
          <year>2013</year>
          . - C.
          <year>11</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Hall</surname>
            <given-names>R. J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Murray</surname>
            <given-names>C. W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Verdonk</surname>
            <given-names>M. L.</given-names>
          </string-name>
          <article-title>The Fragment Network: A Chemistry Recommendation Engine Built Using a Graph Database /</article-title>
          /Journal of medicinal chemistry.
          <source>- 2017</source>
          . - T.
          <volume>60</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Yamaguchi F</surname>
          </string-name>
          . et al.
          <article-title>Modeling and discovering vulnerabilities with code property graphs //2014</article-title>
          <source>IEEE Symposium on Security and Privacy</source>
          . - IEEE,
          <year>2014</year>
          . - C.
          <fpage>590</fpage>
          -
          <lpage>604</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Prud</surname>
            <given-names>E.</given-names>
          </string-name>
          et al.
          <article-title>SPARQL query language for RDF</article-title>
          .(
          <year>2006</year>
          ).
          <article-title>- 2006.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Rodriguez</surname>
            <given-names>M. A.</given-names>
          </string-name>
          <article-title>The Gremlin graph traversal machine and language (invited talk) //</article-title>
          <source>Proceedings of the 15th Symposium on Database Programming Languages. - ACM</source>
          ,
          <year>2015</year>
          . - C.
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Alberto</surname>
            <given-names>O.</given-names>
          </string-name>
          <string-name>
            <surname>Mendelzon</surname>
          </string-name>
          and
          <string-name>
            <surname>Peter T. Wood</surname>
          </string-name>
          .
          <year>1995</year>
          .
          <article-title>Finding Regular Simple Paths in Graph Databases</article-title>
          .
          <source>SIAM J. Comput. 24</source>
          ,
          <issue>6</issue>
          (
          <year>December 1995</year>
          ),
          <fpage>1235</fpage>
          -
          <lpage>1258</lpage>
          . DOI=http://dx.doi.org/10.1137/S009753979122370X
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Koschmieder</surname>
          </string-name>
          , Andre and Leser, Ulf. (
          <year>2012</year>
          ).
          <source>Regular Path Queries on Large Graphs. 7338. 10</source>
          .1007/978-3-
          <fpage>642</fpage>
          -31235-9_
          <fpage>12</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Pablo</given-names>
            <surname>Barceló Baeza</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Querying graph databases</article-title>
          .
          <source>In Proceedings of the 32nd ACM SIGMOD-SIGACT-SIGAI symposium on Principles of database systems (PODS '13)</source>
          . ACM, New York, NY, USA,
          <fpage>175</fpage>
          -
          <lpage>188</lpage>
          . DOI: https://doi.org/10.1145/2463664.2465216
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Bienvenu</surname>
          </string-name>
          , Meghyn and Ortiz, Magdalena and Šimkus, Mantas. (
          <year>2013</year>
          ).
          <article-title>Conjunctive Regular Path Queries in Lightweight Description Logics</article-title>
          .
          <source>IJCAI International Joint Conference on Artificial Intelligence</source>
          .
          <fpage>761</fpage>
          -
          <lpage>767</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Zhang</surname>
            <given-names>X.</given-names>
          </string-name>
          et al.
          <article-title>Context-free path queries on</article-title>
          RDF graphs //International Semantic Web Conference. - Springer, Cham,
          <year>2016</year>
          . - C.
          <fpage>632</fpage>
          -
          <lpage>648</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Kuijpers</surname>
            <given-names>J</given-names>
          </string-name>
          . et al.
          <article-title>An experimental study of context-free path query evaluation methods //</article-title>
          <source>Proceedings of the 31st International Conference on Scientific and Statistical Database Management. - ACM</source>
          ,
          <year>2019</year>
          . - C.
          <fpage>121</fpage>
          -
          <lpage>132</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Medeiros</surname>
          </string-name>
          , Ciro and Musicante, Martin and Costa, Umberto. (
          <year>2019</year>
          ).
          <article-title>LL-based query answering over RDF databases</article-title>
          .
          <source>Journal of Computer Languages</source>
          .
          <volume>51</volume>
          .
          <fpage>75</fpage>
          -
          <lpage>87</lpage>
          .
          <fpage>10</fpage>
          .1016/j.cola.
          <year>2019</year>
          .
          <volume>02</volume>
          .002.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Sevon</surname>
          </string-name>
          , Petteri and Eronen, Lauri. (
          <year>2008</year>
          ).
          <article-title>Subgraph Queries by Context-free Grammars</article-title>
          .
          <source>Journal of Integrative Bioinformatics. 5. 10</source>
          .1515/jib-2008-100.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>Semyon</given-names>
            <surname>Grigorev</surname>
          </string-name>
          and
          <string-name>
            <given-names>Anastasiya</given-names>
            <surname>Ragozina</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Context-free path querying with structural representation of result</article-title>
          .
          <source>In Proceedings of the 13th Central and Eastern European Software Engineering Conference in Russia (CEESECR '17)</source>
          . ACM, New York, NY, USA, Article
          <volume>10</volume>
          , 7 pages. DOI: https://doi.org/10.1145/3166094.3166104.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>Rustam</given-names>
            <surname>Azimov</surname>
          </string-name>
          and
          <string-name>
            <given-names>Semyon</given-names>
            <surname>Grigorev</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Context-free path querying by matrix multiplication</article-title>
          .
          <source>In Proceedings of the 1st ACM SIGMOD Joint International Workshop on Graph Data Management Experiences and Systems (GRADES)</source>
          and
          <article-title>Network Data Analytics (NDA) (GRADES-NDA '</article-title>
          <year>18</year>
          ), Akhil Arora, Arnab Bhattacharya, George Fletcher, Josep Lluis Larriba Pey, Shourya Roy, and Robert West (Eds.). ACM, New York, NY, USA, Article
          <volume>5</volume>
          , 10 pages. DOI: https://doi.org/10.1145/3210259.3210264
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Hellings</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>Querying for Paths in Graphs using Context-Free Path Queries</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Szárnyas</surname>
          </string-name>
          , Gábor.
          <article-title>Graph-based analysis of JavaScript source code repositories</article-title>
          , FOSDEM, Graph devroom (Brussels,
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. OWASP T. Top 10-2017
          <source>The Ten Most Critical Web Application Security Risks</source>
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Azis</surname>
            <given-names>I. M. F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kom</surname>
            <given-names>M</given-names>
          </string-name>
          .
          <article-title>Object Oriented Programming Php 5</article-title>
          . - Elex Media Komputindo,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21. GREENSPECTOR tool. Available: https://greenspector.com/en/articles/2017- 06-12
          <article-title>-analyse-statique-code-bdd-orientee-graphe/</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Urma</surname>
          </string-name>
          , Raoul-Gabriel and Mycroft, Alan. (
          <year>2015</year>
          ).
          <article-title>Source-code queries with graph databases - With application to programming language usage and evolution</article-title>
          .
          <source>Science of Computer Programming</source>
          .
          <volume>97</volume>
          . 10.1016/j.scico.
          <year>2013</year>
          .
          <volume>11</volume>
          .010.
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23. Michael Hunger:
          <article-title>Class-Graph, leverages Cypher to collect structural insights about your Java projects Available</article-title>
          : https://github.com/jexp/class-graph
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Abdelsalam</surname>
          </string-name>
          , Khaled and Kamel, Amr. (
          <year>2018</year>
          ).
          <article-title>Reverse Engineering State and Strategy Design Patterns using Static Code Analysis</article-title>
          .
          <source>International Journal of Advanced Computer Science and Applications. 9. 10.14569/IJACSA</source>
          .
          <year>2018</year>
          .
          <volume>090178</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>25. jQAssistant tool. Available: https://jqassistant.org</mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>26. Available: https://github.com/ShiftLeftSecurity/joern</mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Abeer</surname>
            <given-names>Alhuzali</given-names>
          </string-name>
          , Rigel Gjomemo, Birhanu Eshete, and
          <string-name>
            <given-names>V. N.</given-names>
            <surname>Venkatakrishnan</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>NAVEX: precise and scalable exploit generation for dynamic web applications</article-title>
          .
          <source>In Proceedings of the 27th USENIX Conference on Security Symposium (SEC'18)</source>
          .
          <source>USENIX Association</source>
          , Berkeley, CA, USA,
          <fpage>377</fpage>
          -
          <lpage>392</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <article-title>A PHP parser written in PHP</article-title>
          . Available: https://github.com/nikic/PHP-Parser
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29. CVE-2014
          <article-title>-1860</article-title>
          . Available: https://github.com/contao/core/pull/6730
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>