Iriguard Tristan Bilot
email: tristan.bilot@universite-paris-saclay.fr

Nour

A Survey on Malware Detection with Graph Representation Learning

Keywords: General and reference → Surveys and overviews, • Security and privacy → Malware and its mitigation, • Computing methodologies → Learning latent representations, Neural networks, Spectral methods Deep Learning, DL, GNN, Graph Neural Networks, Graph Representation Learning, Machine Learning, Malware, Malware Detection, ML

Malware detection has become a major concern due to the increasing number and complexity of malware. Traditional detection methods based on signatures and heuristics are used for malware detection, but unfortunately, they suffer from poor generalization to unknown attacks and can be easily circumvented using obfuscation techniques. In recent years, Machine Learning (ML) and notably Deep Learning (DL) achieved impressive results in malware detection by learning useful representations from data and have become a solution preferred over traditional methods. More recently, the application of such techniques on graph-structured data has achieved state-of-the-art performance in various domains and demonstrates promising results in learning more robust representations from malware. Yet, no literature review focusing on graph-based deep learning for malware detection exists. In this survey, we provide an in-depth literature review to summarize and unify existing works under the common approaches and architectures. We notably demonstrate that Graph Neural Networks (GNNs) reach competitive results in learning robust embeddings from malware represented as expressive graph structures, leading to an efficient detection by downstream classifiers. This paper also reviews adversarial attacks that are utilized to fool graph-based detection methods. Challenges and future research directions are discussed at the end of the paper.

CCS Concepts: •

INTRODUCTION

Malware, short for malicious software, is a generic term for unwanted programs designed to harm or exploit computer systems [START_REF] Bayer | Dynamic analysis of malicious code[END_REF]. The detection of widespread malware such as ransomware, worms, Trojan horses or spyware, has become a major concern since their increase in both number and complexity [START_REF] Ye | A survey on malware detection using data mining techniques[END_REF]. Indeed, malware programs can appear in different forms and may be hidden under other trusted programs available on the most used platforms such as Android, Windows or even the Web. Unaware users are frequently fooled by authors of malware and important efforts have been spent to prevent these threats. Traditional detection techniques mainly rely on signatures and heuristics, where malware is detected by comparing it to existing malware or known malicious patterns. However, those methods are known to suffer from poor generalization to unknown attacks or variants and can be easily circumvented using obfuscation techniques [START_REF] Aslan | A comprehensive review on malware detection approaches[END_REF]. Other behavior-based methods tend to perform better by further analyzing the malware and evaluating its intended actions before executing it. However, such techniques appear to be very time-consuming [START_REF] Küchler | Does every second count? time-based evolution of malware behavior in sandboxes[END_REF]. Over the last decade, Machine Learning (ML) and notably Deep Learning (DL) have sparked a sea change in a variety of fields, including cybersecurity, by allowing the model to learn from data and adapt to new patterns. This ability to adapt makes these methods well-suited to a number of tasks, including malware detection, as shown by the growing number of papers that apply ML to this problem [START_REF] Liu | A review of android malware detection approaches based on machine learning[END_REF].

Despite the progress made with these learning-based methods, malware detection remains a challenging task, as malware authors continue to make their techniques evolve, with the aim to evade detection. In an attempt to outperform current ML and DL methods that learn from traditional Euclidean data, graph representation learning has emerged as a promising alternative to capture complex patterns in malware programs represented as graphs. Indeed, a growing number of fields are benefiting from these graph-based learning methods and obtaining state-of-the-art results [START_REF] Zhou | Graph neural networks: A review of methods and applications[END_REF], as graph structures offer even more semantic information by encoding spatial relations and connectivity between entities.

Current studies on malware detection using machine learning are mainly based on the review of traditional ML and DL techniques applied to structured data. However, more and more recent papers tend to use graph representation learning in their approaches, and to the best of our knowledge, there is no literature review that specifically focuses on these techniques applied to malware detection.

This survey is a first attempt to shape the research area of malware detection with graph representation learning, by providing a comprehensive review of current approaches. Specifically, we present in this paper the following contributions:

• An overview of common representations that are used to model malware as graphs as well as techniques to extract these graph structures from raw malware data. • A comprehensive summary of the state of the art papers, grouped according to the most common types of graphs, namely: Control Flow Graph (CFG), Function Call Graph (FCG), Program Dependence Graph (PDG), system call graph, system entity graph and network flow graph. We also propose a general architecture under which a majority of works can be abstractly summarized. • A review of the adversarial attacks that are used against GNN-based malware detection techniques, along with a discussion on the challenges that may be encountered as well as future research directions and conclusions. In particular, we show that the works presented in this paper are very recent and that many promising directions remain unexplored.

graphs and then explain differences between traditional Deep Learning and graph representation learning, along with the types of GNNs that are frequently employed.

Graph Structures

Graphs are useful data structures to model the interactions between the entities of a complex system. They possess a great expressiveness and can represent any connected systems using only two abstract objects, which are nodes and edges.

Graph. A graph can be denoted as 𝐺 = (𝑉 , 𝐸) where 𝑉 = 𝑣 1 , ..., 𝑣 𝑁 is a set of 𝑁 = |𝑉 | nodes (i.e. entities) and 𝐸 = 𝑒 1 , ..., 𝑒 𝑀 is a set of 𝑀 = |𝐸| edges, namely the relations between entities. Edges in the graph can either be directed (e.g. a process 𝑎 forks another process 𝑏), or undirected (e.g. a bi-directional communication flow between two clients). By default, such graphs only represent a topology by incorporating the relations between different objects and do not store any local information.

Attributed Graph. Attributed graphs attach additional features to the elements of the graph, leading to a more detailed representation. A node-attributed graph assumes function 𝐹 𝑛 : 𝑉 -→ R 𝑑 𝑛 to map each node to a feature vector of 𝑑 𝑛 elements. Similarly, an edge-attributed graph assumes function 𝐹 𝑒 : 𝐸 -→ R 𝑑 𝑒 to map every edge to a vector of 𝑑 𝑒 features. Node and edge features can be conveniently described in a matrix format, where 𝑋 usually represents the node feature matrix and 𝑋 𝑒 is the edge feature matrix. Furthermore, the structure of the graph is mostly designated by an adjacency matrix 𝐴.

Heterogeneous Graph. In many cases, the relations between graph objects become more complex, involving multiple types of modalities. These representations can be modeled with heterogeneous graphs, by introducing two mapping functions 𝜙 𝑣 : 𝑉 → 𝑇 𝑣 and 𝜙 𝑒 : 𝐸 → 𝑇 𝑒 that respectively map to a node type in 𝑇 𝑣 and an edge type in 𝑇 𝑒 .

Although other graph structures exist, current state-of-the-art graph-based malware detection methods are mostly based on these representations.

Learning on Graphs

Since nodes in a graph are inherently connected, they are not considered independent and uniformly distributed. For these reasons, traditional ML models cannot be directly applied on graphs, which suggests that specific techniques are required to deal with these interconnected structures.

Representation Learning.

A malware detection model must first go through a training procedure where it learns parameters based on a large number of training samples, in order to approximate a relationship function between the input feature space and the output binary label. Representation learning aims at learning an intermediate function 𝑓 formulated as 𝑓 : 𝑋 → R 𝑑 , which maps the input feature space 𝑋 to an embedding space R 𝑑 that retains essential information from raw input features. Embedding representations can then be leveraged in downstream tasks such as learning word relationships [START_REF] Mikolov | Distributed representations of words and phrases and their compositionality[END_REF], learning the representation of objects in images [START_REF] Vincent | Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion[END_REF] or learning translation of language [START_REF] Wu | Google's neural machine translation system: Bridging the gap between human and machine translation[END_REF]. In malware detection, representation learning aims at creating embeddings from input data such as program code. The embeddings are then converted into a distribution that either indicates a probability to be a malware (binary classification) or to belong to a determined malware category or malware family (multi-class classification).

Graph Representation

Learning. Standard representation learning techniques are not suited to deal with data generated from non-Euclidean domain space such as graphs. For instance, regular Convolutional Neural Networks (CNNs) [START_REF] Lecun | Convolutional networks for images, speech, and time series. The handbook of brain theory and neural networks[END_REF] and Recurrent Neural Networks (RNNs) [START_REF] Hochreiter | Long short-term memory[END_REF] are unable to perform traditional convolutions or recurrent operations on graphs as the notion of Euclidean distance cannot be applied. Graph representation learning [START_REF] William L Hamilton | Representation learning on graphs: Methods and applications[END_REF], on the other hand, is a specific area of ML that aims to learn embedding representations from graph-structured data. This involves learning embeddings from nodes, edges, or graphs in a way that ensures that objects with similarities in feature space have similar representations in embedding space. The proximity between learned representations can then be leveraged in different downstream tasks. In the field of cybersecurity, tasks such as node classification, edge classification and graph classification are frequently used. Node classification aims at finding a label for a specific object in the graph such as detecting a botnet node in a network [START_REF] Zhou | Automating botnet detection with graph neural networks[END_REF][START_REF] Carpenter | Detecting botnet nodes via node representation learning[END_REF][START_REF] Zhao | Multi-attributed heterogeneous graph convolutional network for bot detection[END_REF], whereas edge classification is applied to assign a label to a relation or event, such as detecting a malicious authentication request [START_REF] Bowman | Detecting lateral movement in enterprise computer networks with unsupervised graph {AI}[END_REF][START_REF] Isaiah | Euler: Detecting network lateral movement via scalable temporal link prediction[END_REF]. On the other hand, graph classification maps the whole graph to a label. This task is largely used in malware detection in cases where the goal is to predict the label of a binary represented as a graph . It is also possible to work at the sub-graph level to detect areas in the graph that are responsible for the prediction done by a predictive model [START_REF] Dinal Herath | Cfgexplainer: Explaining graph neural network-based malware classification from control flow graphs[END_REF].

In literature, the first methods for graph representation learning based on graph embedding are mostly relying on random walks, where the co-occurrence of nodes is preserved. DeepWalk [START_REF] Perozzi | Deepwalk: Online learning of social representations[END_REF] was the first method to leverage the Skip-gram model [START_REF] Mikolov | Distributed representations of words and phrases and their compositionality[END_REF] to compute embeddings from nodes that co-occur in random walks. It learns node embeddings by optimizing a neighborhood preserving objective, using random walks and word embedding techniques. First, 𝑛 random walks are generated by randomly traversing the graph 𝑛 times. Each walk is composed of 𝑘 nodes, where 𝑘 is a hyperparameter representing the length of a random walk. Then each node tries to reconstruct neighboring nodes from its random walk using the Skip-gram model.

To fully learn the embeddings, node2vec [START_REF] Grover | node2vec: Scalable feature learning for networks[END_REF] integrates a second-order biased random walk that captures local and global structures using Breadth First Search (BFS) and Depth First Search (DFS) algorithms. Other methods such as LINE [START_REF] Tang | Line: Large-scale information network embedding[END_REF] have also achieved great performance in learning embeddings from graphs. However, most of these techniques do not share parameters between nodes [START_REF] William L Hamilton | Representation learning on graphs: Methods and applications[END_REF], meaning that the model size grows linearly with the size of the graph. Moreover, these methods are highly dependent on the values of hyperparameters and tend to favor proximity information over structural information [START_REF] Velickovic | Deep graph infomax[END_REF]. Another disadvantage of using these walk-based techniques is that they are generally transductive, meaning that a single graph is taken as input and that no inference is possible on unseen nodes or edges. Contrarily, inductive models take as input multiple graphs and can generalize to unseen examples.

Graph Neural Networks.

Recent graph representation learning approaches tend to be inspired from the Graph Neural Network (GNN) model [START_REF] Gori | A new model for learning in graph domains[END_REF] [START_REF] Scarselli | The graph neural network model[END_REF], which is the origin of the first application of deep neural networks to graph-structured data. Although deep learning on graphs has been democratized fairly recently, the first GNN [START_REF] Gori | A new model for learning in graph domains[END_REF] dates back to 2005 and is originally inspired from RNNs. In recent years, the popularity of deep learning has led to the emergence of new methods involving spectral and spatial convolution methods applied to graph structures, making it possible to take advantage of both the expressive structure of graphs and the power of representation learning. Spectral GNNs such as ChebNet [START_REF] Defferrard | Convolutional neural networks on graphs with fast localized spectral filtering[END_REF] exploit the Laplacian matrix eigen decomposition in Fourier space to analyze the underlying structure of the graph. On the other hand, spatial GNNs such as Graph Convolutional Network (GCN) [START_REF] Thomas | Semi-supervised classification with graph convolutional networks[END_REF], GraphSAGE [START_REF] Hamilton | Inductive representation learning on large graphs[END_REF], Deep Graph Convolutional Neural Network (DGCNN) [START_REF] Zhang | An end-to-end deep learning architecture for graph classification[END_REF], and Graph Attention Network (GAT) [START_REF] Veličković | Graph attention networks[END_REF] work directly on the adjacency matrix and capture the local neighborhood of the nodes in the graph domain, which avoids the time-consuming switch in spectral domain. GCN captures both feature and local substructure information by propagating the information along the neighboring nodes within the graph. DGCNN also leverages convolutions but is specifically designed for the graph classification task. GraphSAGE provides an inductive solution that can scale to large graphs by sampling the neighbors during message-passing. Finally, GAT leverages the attention mechanism [START_REF] Bahdanau | Neural machine translation by jointly learning to align and translate[END_REF] to learn an importance weight for each neighboring node.

Variants of these models have achieved state-of-the-art results in a variety of domains such as recommender systems [START_REF] Wu | Graph neural networks in recommender systems: a survey[END_REF], traffic forecasting [START_REF] Jiang | Graph neural network for traffic forecasting: A survey[END_REF] and drug discovery [START_REF] Gaudelet | Utilizing graph machine learning within drug discovery and development[END_REF]. However, GNN-based methods remain little used in cybersecurity compared to other domains where research is largely oriented in this direction.

MALWARE DETECTION WITH GRAPHS

In the field of ML, malware detection usually consists in extracting features from an input binary file, which are leveraged by a downstream algorithm for classification. Malware detection with graph ML follows the same idea, with the only difference that a supplementary step is introduced after the feature extraction. This step consists in transforming the input features into a graph structure that will then be fed to the classifier. In this section, we describe ways to represent malware as expressive graph structures along with a general methodology to leverage graph representation learning in downstream malware detection tasks.

Modeling Malware as Graphs

In real-world scenarios, malware programs are usually compiled binaries that may be obfuscated to hide their malicious payload. Furthermore, a same malware could be written in multiple languages or using different hardware platforms. Therefore, we think that an optimal representation of a binary program should fulfill these conditions:

• Preserve the semantic of the program: the actions resulting from the execution of the app should be captured by the data representation, in order to understand benign and malicious behaviors. • Be robust to obfuscation techniques: the representation should capture the fundamental semantic of the program even if its code is obfuscated. • Be language-and platform-agnostic: the representation should be abstract enough to transcend the programming language and the platform on which the program is written.

Building a data representation that respects all previous conditions remains a challenging task due to the constant evolution of techniques employed by attackers. In the next section, we describe the analysis methods and graph structures commonly used for the representation of malware.

Analysis

Methods for Feature Extraction. Multiple analysis techniques are commonly employed to extract meaningful features from computer programs in an attempt to obtain an efficient representation [START_REF] Ye | A survey on malware detection using data mining techniques[END_REF]. Static analysis aims to analyze software without executing it, whereas dynamic analysis actually executes it to capture different levels of information. Both approaches have their own strengths and weaknesses. Static analysis is relatively cheap to perform and provides a comprehensive view of the program by considering all branches present in the code. However, it may not detect issues that only occur at runtime, such as memory leaks and race conditions. On the other hand, dynamic analysis can further analyze the behavior of the program by running it with different inputs and capturing the generated events at runtime. This technique is also more robust to code obfuscation, compared to static analysis. However, dynamic analysis is very resource-intensive to execute and may not be able to analyze the entire program, providing a less comprehensive view that could ignore malicious behaviors [START_REF] Anderson | Improving malware classification: bridging the static/dynamic gap[END_REF]. In an attempt to benefit from both techniques, hybrid analysis is a solution that tries to combine the advantages of both static and dynamic analysis, while minimizing their weaknesses.

Common Graph

Structures for Malware Detection. The various features extracted using the aforementioned analysis methods are frequently used to represent program semantics in the form of graphs. This practice has gained more and more interest due to the faculty of graphs to represent systems in a robust and intuitive way [START_REF] Anderson | Improving malware classification: bridging the static/dynamic gap[END_REF][START_REF] Lee | Detecting metamorphic malwares using code graphs[END_REF][START_REF] Kruegel | Polymorphic worm detection using structural information of executables[END_REF]. The main graph structures employed for malware detection are presented as follows:

Control Flow Graph (CFG). Control flow graphs model all possible paths during the execution of a program, in an intra-procedural way. The nodes represent basic blocks, namely a sequence of instructions (e.g. assembly instructions) without any jumps. The jumps are characterized by the directed edges between the basic blocks, that represent the control flow of the program. When built from low-level assembly languages, CFGs have the faculty to be language-agnostic as they model the logic of a program without requiring language-specific instructions [START_REF] Yan | Classifying malware represented as control flow graphs using deep graph convolutional neural network[END_REF]. Although other representations such as hexadecimal also possess this characteristic, CFGs provide a more intuitive way to model programs as graphs [START_REF] Yan | Classifying malware represented as control flow graphs using deep graph convolutional neural network[END_REF][START_REF] Dinal Herath | Cfgexplainer: Explaining graph neural network-based malware classification from control flow graphs[END_REF].

Function Call Graph (FCG). Function call graphs are a type of CFG that provide an interprocedural view of the program, where nodes are functions and edges represent function calls from one function to another. Although FCGs offer a global view of function calls executed by the program, they generally lack the intra-procedural information that CFGs provide. To address this, some approaches can be employed by jointly using FCGs and CFGs, where embeddings from CFGs are integrated into the nodes of the FCGs, to capture both intra-procedural and inter-procedural semantic [START_REF] Reza Norouzian | Hybroid: Toward android malware detection and categorization with program code and network traffic[END_REF][START_REF] Xu | hybrid-flacon: Hybrid pattern malware detection and categorization with network traffic andprogram code[END_REF][START_REF] Wang | A hierarchical graph-based neural network for malware classification[END_REF]. In the case of Android malware analysis, a prevalent approach is to statically extract the API call sequences from the application and represent them using a FCG [START_REF] Oliveira | Behavioral malware detection using deep graph convolutional neural networks[END_REF][START_REF] Li | Intelligent malware detection based on graph convolutional network[END_REF][START_REF] Li | Dmalnet: Dynamic malware analysis based on api feature engineering and graph learning[END_REF][START_REF] Wei | Amandroid: A precise and general inter-component data flow analysis framework for security vetting of android apps[END_REF].

Program Dependence Graph (PDG). Program dependence graphs model both data and control dependencies in code, where nodes are instructions or statements and edges represent the data values and control conditions that must be fulfilled to execute the node's operation [START_REF] Ferrante | The program dependence graph and its use in optimization[END_REF]. Scarcely used by current graph representation learning approaches, this graph structure may be promising to capture different conditional flows in the program [START_REF] Xu | Android-coco: Android malware detection with graph neural network for byte-and native-code[END_REF].

System Call Graph. The system calls generated by the execution of a program can be captured via dynamic analysis and the communication with the system can be modeled with a graph, where nodes represent system calls and edges are the interactions [START_REF] Teenu S John | Graph convolutional networks for android malware detection with system call graphs[END_REF] between those calls. This representation offers a low-level view of system interactions that can also benefit the detection of malware.

System Entity Graph. During its execution, a program interacts with system entities such as processes, files, registry keys or network sockets. These interactions can be captured using sandbox tools like cuckoo [START_REF]Cuckoo Sandbox Book -Cuckoo Sandbox v2.0.7 Book[END_REF] for a deep analysis of the program's behaviors. Similarly as provenance graphs employed in host-based intrusion, these entities can be modeled as nodes in a graph, and the edges represent the operations between them [START_REF] Viet | Malware detection based on directed multi-edge dataflow graph representation and convolutional neural network[END_REF][START_REF] Fan | A novel malware detection framework based on weighted heterograph[END_REF].

Network Flow Graph. The network activity generated by the program can also be monitored during its execution, and a network flow graph can be constructed with IP addresses and/or communication ports as nodes, and edges representing network flows. While some works solely rely on network traffic to detect malware activities [START_REF] Busch | Nf-gnn: network flow graph neural networks for malware detection and classification[END_REF][START_REF] Liu | Nt-gnn: Network traffic graph for 5g mobile iot android malware detection[END_REF], others enhance their detection capabilities by combining CFGs or FCGs with network data [START_REF] Reza Norouzian | Hybroid: Toward android malware detection and categorization with program code and network traffic[END_REF][START_REF] Xu | hybrid-flacon: Hybrid pattern malware detection and categorization with network traffic andprogram code[END_REF].

In this survey, we focus on the analysis of malware detection methods with graph representation learning for Android, Windows and Web platforms, since the vast majority of current state-ofthe-art works are solely based on these platforms. For each of these platforms, we divided the Android-based Detection Network Flow Graph [START_REF] Reza Norouzian | Hybroid: Toward android malware detection and categorization with program code and network traffic[END_REF][START_REF] Xu | hybrid-flacon: Hybrid pattern malware detection and categorization with network traffic andprogram code[END_REF][START_REF] Busch | Nf-gnn: network flow graph neural networks for malware detection and classification[END_REF][START_REF] Liu | Nt-gnn: Network traffic graph for 5g mobile iot android malware detection[END_REF] System Call Graph [START_REF] Teenu S John | Graph convolutional networks for android malware detection with system call graphs[END_REF] PDG [START_REF] Xu | Android-coco: Android malware detection with graph neural network for byte-and native-code[END_REF] FCG [12, 32, 33, 35-47, 94, 95] CFG [START_REF] Reza Norouzian | Hybroid: Toward android malware detection and categorization with program code and network traffic[END_REF][START_REF] Xu | hybrid-flacon: Hybrid pattern malware detection and categorization with network traffic andprogram code[END_REF][START_REF] Fairbanks | Identifying att&ck tactics in android malware control flow graph through graph representation learning and interpretability[END_REF] Fig. state-of-the-art into sections based on the input graph structure. The literature review is summarized in Fig. 1.

Methodology of Malware Detection with Graph Representation Learning

In literature, a majority of contributions rely on a similar sequence of operations to predict malware from source code with graph representation learning. In this section, we propose a general architecture, shown in Fig. 2, to summarize the process of malware detection from graph-represented source code on Android and Windows platform. The first step involves extracting code from the binary, which is usually disassembled to assembly language or decompiled to higher-level language. In the case of malware detection with dynamic analysis, this step assumes dynamic input features such as a stream of API calls or system entity interactions (see Section 6.1). Subsequently, a graph builder is employed to transform the code into a graph-structured representation that preserves the program's semantics, as detailed in Section 4.1.2. Typically, these first two steps are performed using reverse engineering tools listed in Table 1. Optionally, the graph can be preprocessed and attributed with hand-crafted features, located on nodes or edges. Then, graph representation learning techniques, such as GNNs, leverage the semantics of code to learn node embeddings, which capture the relationships and the role of internal instructions, functions, or API calls, depending on the input graph. These embeddings are commonly generated using well-known GNN variants, which have been discussed in Section 3.2.3. Other techniques employ word embedding techniques inspired from Natural Language Processing (NLP) to learn the meaning of opcode or API functions, enabling integration of the resulting embeddings into a global graph structure for GNNs to learn the structural properties. The majority of studies consider malware detection as a graph classification task, whereby node embeddings are transformed with a global pooling operation (or readout) to create a single fixed-size graph embedding vector that encapsulates all information of the graph. The final vector can then be classified using traditional ML or DL methods. [START_REF]HomePage Systemtap Wiki[END_REF], ltrace [START_REF]HomePage Systemtap Wiki[END_REF] System entities cuckoo, Any.Run [START_REF] Any | RUN Interactive Online Malware Sandbox[END_REF] Network flows Argus [107], Zeek [START_REF]Zeek is a powerful network analysis framework that is much different from the typical IDS you may know[END_REF], Splunk [START_REF]Splunk | The Key to Enterprise Resilience[END_REF], Joy [START_REF]A package for capturing, analyzing network flow data, intraflow data for network research forensics, and security monitoring[END_REF] Green refers to tools specifically designed for Android APKs.

GRAPH-BASED ANDROID MALWARE DETECTION

In this section, we present graph-based malware detection for Android platform, starting from the global methodology to build graphs from disassembled Android applications, to the review of existing works that leverage graph representation learning for the detection of malware.

Android-based Graph Structures

Android applications are packed into APK files containing the source code, resources, manifest file and assets. After unzipping an APK, numerous features can be extracted to be used in downstream ML tasks. The manifest file provides the big picture of an app and contains its meta-information such as the required permissions to run it, hardware features and components. Resources such as images, videos or audio files are also available for further analysis. However, these data are inherently flat and do not provide enough structured information to build a graph. This is why most approaches leverage the actual source code to represent the logic of the app as a graph. As an APK is a production-ready app package, the code has already been compiled and assembled into a Dalvik bytecode format (.dex file). In practice, this bytecode can be disassembled into higher-level human-readable code (.smali files). Based on both code representations, control flow graphs (CFGs), function call graphs (FCGs), program dependence graphs (PDGs) and APIs can be extracted in a static way. This static extraction process is demonstrated in Fig. 3. Concerning dynamic analysis, API call and system call sequences can be recorded when running the app in a sandboxed environment.

It is also possible to capture the network traffic by monitoring packets in a strategic area of a network.

Fig. 3. Android application compilation and disassembling process using static analysis. Java files are compiled into classes and are assembled into a single dex file. The APK is packed with the dex file, the manifest file and other resources. The dex bytecode can be disassembled into higher-level smali code and graph structures can be constructed from either dex or smali code depending on the use case requirements.

Android-based Approaches

In this section, we review state-of-the-art Android-based papers, classified by types of graph, also summarized in Table 2.

CFG

Approaches for Android Malware Detection. CFGs offer a remarkable abstract representation of programs to detect malware. Hybroid [START_REF] Reza Norouzian | Hybroid: Toward android malware detection and categorization with program code and network traffic[END_REF] leverages this representation by extracting basic blocks from APKs. Three types of embeddings are then constructed from the code, to capture different semantics, namely opcode embedding, basic block embedding and CFG embedding, where each representation is associated to a level of abstraction. The semantic of opcodes (Dalvik instructions) and basic blocks (sequence of instructions) is computed using the NLP-based model word2vec with Skip-gram. Precisely, Skip-gram learns embedding vectors for each basic block's raw instructions, by using an opcode to predict its surrounding opcodes. Indeed, the operands are not leveraged here as they are affected by the usage of Dalvik VM. For the basic block embeddings, they compute the weighted mean of the inner instructions' opcode. These basic block embeddings then become the node embeddings from the point of view of a FCG and structure2vec [START_REF] Dai | Discriminative embeddings of latent variable models for structured data[END_REF] creates a final graph embedding vector for graph classification. In parallel, the network traffic generated by the app is also captured with dynamic analysis using Argus [107]. The packets are transformed into flows to summarize the communication between the Android device and the destination IP addresses, using various statistics. After a feature selection step, important features are combined with the FCG embeddings for downstream classification with gradient boosting on the CICAndMal2017 dataset, where the model demonstrates a F1-score of 97% and beats other methods such as DREBIN [START_REF] Arp | Drebin: Effective and explainable detection of android malware in your pocket[END_REF] and SVM [START_REF] Guyon | Gene selection for cancer classification using support vector machines[END_REF].

On the other hand, hybrid-Falcon [START_REF] Xu | hybrid-flacon: Hybrid pattern malware detection and categorization with network traffic andprogram code[END_REF] transforms network flow data into 2D images on which a bi-directional LSTM captures flow representations from pixels. On the same dataset, the F1-score is further improved to 97.09%.

The paper [START_REF] Fairbanks | Identifying att&ck tactics in android malware control flow graph through graph representation learning and interpretability[END_REF] provides a solution to locate MITRE ATT&CK Tactics Techniques and Procedures (TTPs) detected from a subgraph of a CFG. Node representations are extracted with Inferential SIR-GN [START_REF] Layne | Inferential sir-gn: Scalable graph representation learning[END_REF] and the prediction is done using a random forest. To identify the subgraph responsible for the prediction, the authors rely on SHAP [START_REF] Scott | A unified approach to interpreting model predictions[END_REF] to attribute for each input feature a value that indicates its relevance for the final output. TTPs are successfully detected with a F1-score of 92.7%. Data represents the data type taken as input by the models; Analysis refers to the analysis method that is leveraged to extract features (e.g. extracting a CFG from smali code is static, capturing network traffic from a running app is dynamic, whereas leveraging both results in a hybrid analysis); Graph type designates one of the graphs introduced in Section 3.1, here we characterize a graph as attributed if a node or an edge is attributed either with hand-crafted features, raw features (e.g. raw instructions, function names) or embeddings (e.g. word embedding of a function), whereas a heterogeneous graph deals with multiple types and possibly different attributes; Classification designates the final object to classify (i.e. the classification task); Learning is the learning method used to train the models, whereas Models refer to the models on which the paper is inspired; Paper and Year identify the work and its publication year.

FCG Approaches

for Android Malware Detection. The semantic information captured by FCGs in programs makes this data structure a predominant choice in graph-based malware detection. For instance, a FCG is constructed from Smali code in work [START_REF] Zhu | Android malware detection using large-scale network representation learning[END_REF], where each node is attributed with function attributes such as the method type (system API, third-party API, etc.) and the requested permissions (required permissions for the execution of the function). The graph embeddings are then trained in a supervised way using the GCN propagation rule, presented in Eq. 1 and 2.

𝐻 (𝑘) = 𝜎 A𝐻 (𝑘-1) W (𝑘) (1)
where 𝐻 (𝑘) represents the node embedding matrix at layer 𝑘 with 𝐻 0 = 𝑋 , the feature matrix.

𝜎 represents an activation function, W (𝑘) is a trainable weight matrix and A designates the normalized adjacency matrix with self-loops described below.

A = D-1 2 (𝐴 + 𝐼 ) D-1 2 (2)
where 𝐼 the identity matrix and D is the degree matrix of adjacency matrix with self-loops 𝐴 + 𝐼 . The Drebin dataset is used for final evaluation with a F1-score of 99.68%.

In CGdroid [START_REF] Feng | Android malware detection based on call graph via graph neural network[END_REF], multiple node features are extracted from the disassembled methods in order to build a FCG that captures the semantic of functions. Indeed, each node is mapped to a vector of hand-designed features such as the number of string constants, the number of call and jump instructions, the associated permissions, etc. A GNN computes graph embeddings and a MLP is used for downstream graph classification on Drebin and Androzoo [START_REF] Allix | Androzoo: Collecting millions of android apps for the research community[END_REF] datasets, where a baseline is outperformed by 8% in F1-score.

Word embedding techniques are employed in [START_REF] Cai | Learning features from enhanced function call graphs for android malware detection[END_REF] to consider functions similarly as words and learn the meaning of functions. The embeddings are then assigned as attributes to each corresponding function node in a FCG, and a GCN is used as graph learning method. The proposed method achieved 99.65% F1-score with random forest classifier on a private dataset.

Similarly, authors in [START_REF] Xu | Detecting and categorizing android malware with graph neural networks[END_REF] leverage word embedding to transform Android opcodes from text to vectors using Skip-gram. In the same way as [START_REF] Cai | Learning features from enhanced function call graphs for android malware detection[END_REF], the embeddings are used as nodes in a FCG and this graph is fed into a GNN to compute a fixed-size graph embeddings vector. A 2-layer MLP and softmax are used as last layers of the architecture for graph classification, with an average accuracy of 99.6%.

In the reference [START_REF] Vinayaka | Android malware detection using function call graph with graph convolutional networks[END_REF], FCGs are extracted from APKs using Androguard and each node stores attributes related to the structural meaning of the node in the graph (e.g. node degree) or features extracted from the actual disassembled functions (e.g. method attributes, method opcodes' summary). Using these previous features, GCN, GraphSAGE, GAT and TAGCN [START_REF] Du | Topology adaptive graph convolutional networks[END_REF] are benchmarked together, with a better performance achieved with GraphSAGE. First, each node 𝑖 uniformly selects a fixedsize set of neighbors, denoted N (𝑖). Neighbors are then aggregated using a mean aggregation function such as:

h (𝑙+1) N (𝑖) = aggregate h (𝑙) 𝑗 , ∀𝑗 ∈ N (𝑖) (3)
where h (𝑙+1) N (𝑖) is the embedding of node 𝑖 at layer 𝑙 + 1 and ℎ (𝑙) 𝑗 denotes the embedding of a neighbor node 𝑗 at layer 𝑙. The embedding of 𝑖 at previous layer is then concatenated with the aggregated representation and then learned by a neural network.

h (𝑙+1) 𝑖 = 𝜎 W (𝑙) • h (𝑙) 𝑖 , h (𝑙+1) N (𝑖) (4)
where [, ] represents the concatenation operation. The embedding is finally normalized:

h (𝑙+1) 𝑖 = h (𝑙+1) 𝑖 ||h (𝑙+1) 𝑖 || 2 (5)
Malware Android apps from CICMalDroid2020 dataset are used for evaluation, with a best F1-score of 92.23%. For the detection of obfuscated malware, the paper [START_REF] Errica | Robust malware classification via deep graph networks on call graph topologies[END_REF] leverages a call graph where nodes are attributed with nodes' out-degree only. The Contextual Graph Markov Model (CGMM) [START_REF] Bacciu | Contextual graph markov model: A deep and generative approach to graph processing[END_REF] is used to learn the embeddings that are then classified using a standard feed-forward network, achieving a macro F1-score of 97.2%.

In the study [START_REF] Catal | Malware detection based on graph attention networks for intelligent transportation systems[END_REF], the node embeddings of an API call graph are computed using node2vec and aggregated with a GAT model. The authors explain that the use of node2vec as feature extraction method is justified by a 3% increase in F-score compared to traditional graph centrality features. Using the attention aggregation from GAT as a final step, the proposed solution reaches 94.1% in F-score.

API call traces and opcode features are further exploited in DeepCatra [START_REF] Wu | Deepcatra: Learning flow-and graph-based behaviors for android malware detection[END_REF], where Term Frequency-Inverse Document Frequency (TF-IDF) is used to identify critical Android APIs from call traces. The prior knowledge required to detect critical APIs is extracted from popular codebases available in online repositories such as CVE [119] and Exploit-DB [START_REF]Exploit Database Exploits for Penetration Testers Researchers and Ethical Hackers[END_REF]. Then, call graphs are generated from apps with Wala [102] by also considering the knowledge of previously identified critical APIs. Finally, a custom GNN and a bi-directional LSTM are trained in an end-to-end manner, to respectively capture the graph topology and temporal features from call traces. The output vectors produced by both models are then merged with a fully connected layer and a softmax layer is used for binary classification. The proposed model is evaluated against [START_REF] Teenu S John | Graph convolutional networks for android malware detection with system call graphs[END_REF] and other CNN-, GCN-and LSTM-based baselines. Compared to the baselines, DeepCatra achieves best results with 95.83% F1-score and further improves false positive and false negative rates.

In the paper [START_REF] Lo | Graph neural networkbased android malware classification with jumping knowledge[END_REF], the authors build an enhanced FCG, where node attributes are graph centrality indicators based on graph nodes' importance. Precisely, PageRank [START_REF] Page | The pagerank citation ranking: Bringing order to the web[END_REF], in/out degree and node betweenness centralities are used as node features. The FCG is fed into a GCN, a GraphSAGE and a GIN model for comparison, and all leverage jumping knowledge [START_REF] Xu | Representation learning on graphs with jumping knowledge networks[END_REF], a technique to overcome over-smoothing in GNN architectures by introducing jump connections in the neural network. GraphSAGE outperforms the compared baselines by an important gap on the multi-class classification task, with a F1-score respectively of 94% and 97% on Malnet-Tiny [START_REF] Freitas | A large-scale database for graph representation learning[END_REF] and Drebin [START_REF] Arp | Drebin: Effective and explainable detection of android malware in your pocket[END_REF] datasets.

Gunduz et al. [START_REF] Gunduz | Malware detection framework based on graph variational autoencoder extracted embeddings from api-call graphs[END_REF] compute node-level embeddings from sensitive API function calls using word2vec and leverage a Variational Graph Auto-Encoder (VGAE) [START_REF] Thomas | Variational graph auto-encoders[END_REF] to learn a reduced representation of embeddings that is used for downstream classification, with a F-measure of 93.4%.

For the detection of obfuscated malware from call graphs, the paper [START_REF] Lu | Robust android malware detection based on subgraph network and denoising gcn network[END_REF] leverages a GCN with subgraphs along with a denoising method. The method is evaluated on a private dataset made of samples from VirusShare and AndroZoo, whereas Proguard [START_REF]Java optimizer Guardsquare/proguard: ProGuard and obfuscator[END_REF] is used for code obfuscation.

A more general approach is proposed by Yumlembam et al. [START_REF] Yumlembam | Iot-based android malware detection using graph neural network with adversarial defense[END_REF], who consider each Android app as a local graph, where nodes are APIs and an edge exists between two APIs if they co-exist in a same code block (i.e. a code segment from a smali file, located between .method and .endmethod). A global graph then represents the connections among applications with co-occuring APIs. Multiple variants of the model are compared, using different features. One variant considers attributed nodes with 5 centrality indicators: degree, betweenness, closeness, eigenvector and PageRank. Another variant considers the permissions and intents from the manifest file. After benchmarking multiple models, the best combination is to calculate graph embeddings with GraphSAGE and to concatenate the vector with the permissions and intents features. The resulting vector is then passed into a classifier trained in supervised fashion, where a traditional CNN achieves best performance. In order to test the robustness of GNN-based malware detection models, the authors also provide a generative model inspired from VGAE, which can generate adversarial API graphs to fool the predictive model. The proposed methods are finally compared to many state-of-the-art techniques and respectively achieve 98.33% and 98.68% accuracy in Drebin and CICMaldroid datasets.

Other works model the interactions between APKs and API calls as a global view. In this paper, we describe this representation as an App-API graph, where a node is an Android app or an API call and an edge is a relation between two endpoint nodes such as two apps containing a same API, or two APIs coming from a same package. In literature, this type of structure is mostly represented as a large Heterogeneous Information Network (HIN) [START_REF] Shi | A survey of heterogeneous information network analysis[END_REF] (i.e. an heterogeneous graph), where the goal is to classify malware app nodes. In HinDroid [START_REF] Hou | Make evasion harder: an intelligent android malware detection system[END_REF][START_REF] Hou | Hindroid: An intelligent android malware detection system based on structured heterogeneous information network[END_REF], an App-API graph models the interactions between Android apps and APIs, as a HIN. A node is either an app or an API call, whereas an edge is one among multiple relations representing whether extracted API calls belong to the same code block, or if they are with the same package name, or use the same invoke method. Semantic is extracted from the heterogeneous graph using meta-paths. A meta-path is a path composed of a series of different node and edge types that captures a particular semantic in the graph. Because of their heterogeneous composition and significant semantic extraction abilities, meta-paths are frequently used in heterogeneous graphs. These meta-paths constructed by the traversal of graph are leveraged by a multi-kernel SVM to determine a weight for each meta-path. These weights are then considered for downstream app's node classification with a final F1-score of 98.84%.

Gdroid [START_REF] Gao | Gdroid: Android malware detection and classification with graph convolutional network[END_REF] is another technique that extracts a graph from API co-occurrence in APKs to build an App-API graph. The Skip-gram model first encodes APIs while preserving context information, with the objective to obtain similar embeddings for APIs with similar usages. On top of the graph, a GCN propagates the information and learns node embeddings that are leveraged for downstream node classification with 98.99% accuracy.

In Hawk [START_REF] Hei | Hawk: Rapid android malware detection through heterogeneous graph attention networks[END_REF], more than 180k APKs are extracted to build a large heterogeneous App-API graph that also models relations such as App-Permission, App-Class or App-Interface. Meta-paths along with meta-graphs are extracted from the graph to capture semantics. More precisely, two models are built for in-sample and out-sample nodes. The former is based on a custom heterogeneous GAT that fully leverages meta-structures to capture embeddings whereas the latter utilizes these embeddings in an incremental setting to quickly learn new embeddings without requiring re-learning. Hawk was evaluated against many baselines and outperforms them by a large gap on both in-sample and out-sample malware detection.

PDG Approaches for

Android Malware Detection. Program Dependence Graphs have been widely used in optimization tasks due to their faculty to model data and control flow from programs [START_REF] Ferrante | The program dependence graph and its use in optimization[END_REF]. For similar reasons, this structure is also employed in malware detection but remains little used with graph representation learning.

Android-COCO [START_REF] Xu | Android-coco: Android malware detection with graph neural network for byte-and native-code[END_REF] leverages the native code of dynamic libraries (.so files) along with the Android bytecode (.dex files) to construct a PDG for each app. Structure2vec computes the graph embeddings, that are then passed into a MLP for graph classification. For a more accurate prediction, a FCG is created, on which graph embeddings are also computed (similarly than Hybroid [START_REF] Reza Norouzian | Hybroid: Toward android malware detection and categorization with program code and network traffic[END_REF]). The predictions of both graphs are finally combined using an ensemble algorithm and a 99.88% F1-score is reached on samples from Drebin, AMD [START_REF] Wei | Deep ground truth analysis of current android malware[END_REF] and Androzoo datasets.

System

Call Approaches for Android Malware Detection. System calls provide a low-level view of system interactions, able to model attacks patterns. The authors in [START_REF] Teenu S John | Graph convolutional networks for android malware detection with system call graphs[END_REF] rely on dynamic analysis to record the system calls generated by the activity of a running APK to detect malware behaviors. Each node in the graph is one among 26 selected system calls and is summarized by 4 centrality indicators as node features: Katz, Betweennes, Closeness and PageRank centralities. Edges represent interactions between those system calls while the app is running. A GCN and a pooling layer compute graph embeddings and a fully-connected layer along with a softmax activation are used for graph classification. Their implementation achieves 92.3% accuracy and similar true positive rate as SVM but significantly outperforms all other methods regarding the false positive rate. As for the PDG, system call graphs are still scarcely used in current graph representation learning literature.

Network Flow

Approaches for Android Malware Detection. NF-GNN [START_REF] Busch | Nf-gnn: network flow graph neural networks for malware detection and classification[END_REF] proposes to detect Android malware using network flows constructed from pcap network captures. Only IP addresses are used to build the graph structure, the source and destination ports are not leveraged here. They propose a custom GNN model with a propagation function that considers both edge and node features. A MLP is first used on edge features and endpoint nodes aggregate the edges using the concatenation operation along with a residual connection [START_REF] He | Deep residual learning for image recognition[END_REF]. Then, three downstream methods are proposed for classification based on graph embeddings: a graph classifier (supervised), a custom graph autoencoder (unsupervised), and a one-class neural network (unsupervised). The graph classifier consists in adding a pooling layer and a dense layer with softmax activation. The GAE method uses as encoder the GNN described previously and as decoder a custom model that tries to reconstruct the original edge features from the compact node representations produced by the GNN encoder. Finally, the one-class network alternative is described as a pooling layer followed by a Deep Support Vector Data Description (SVDD) [START_REF] Ruff | Deep one-class classification[END_REF] model. The three variants have been compared to 7 supervised and unsupervised baseline methods on the CICAndMal2017 dataset and all methods outperform compared baselines by an important gap.

Similarly, NT-GNN [START_REF] Liu | Nt-gnn: Network traffic graph for 5g mobile iot android malware detection[END_REF] monitors the traffic produced by running APKs and converts the packets into flows using CICFlowMeter-V3. Communication ports are don't considered and only IP addresses from flows are leveraged to build the graph. A model inspired from the MPNN is used for messagepassing between nodes in the network graph and the classification is performed after applying a readout of the computed node embeddings. Node representations are updated by passing the previous representation with the new aggregated representation from neighbors into a GRU and the model is trained using cross-entropy loss. A 97% F1-score is reached on both CICAndMal2017 and AAGM datasets.

Other flow-based works are presented in [START_REF] Reza Norouzian | Hybroid: Toward android malware detection and categorization with program code and network traffic[END_REF][START_REF] Xu | hybrid-flacon: Hybrid pattern malware detection and categorization with network traffic andprogram code[END_REF], where the authors leverage network flows in combination with CFGs and FCGs to further improve the prediction capacities of the model (see Section 5.2.1).

Android Malware Datasets

In this section, we present Android datasets employed for graph-based malware detection tasks. A summary of the datasets used in previous studies is available in Table 3. Based on the current information provided from the respective websites of AMD, Malgenome and PRAGuard datasets, the release of these datasets has stopped for maintenance reasons and are not further described in this paper.

CICAndMal2017 [START_REF] Habibi Lashkari | Toward developing a systematic approach to generate benchmark android malware datasets and classification[END_REF]. An Android malware dataset developed by the Canadian Institute of Cybersecurity (CIC). It comprises 10,854 APK files published between 2015 and 2017 on Google Play Store. The dataset consists of 6,500 benign apps and 4,354 malware divided into Benign, Adware, Ransomware, SMS and Riskware classes. For each scenario, network packets are also collected and transformed into flows using CICFlowMeter [131]. This tool generates, for each flow, 80 features based on statistics from the packets contained within the flow.

CICMalDroid [START_REF] Mahdavifar | Dynamic android malware category classification using semi-supervised deep learning[END_REF]. This dataset was also made public by the Canadian Institute for Cybersecurity. It is composed of 17,341 APK samples collected during one year in 2018. Malware examples are divided into 5 classes: Benign, Adware, Banking, SMS and Riskware. Along with the APK files that can be used for classification tasks, three kinds of features are also provided for each sample: statically extracted features (e.g. intents, permissions and services), dynamically observed behaviors For each Paper, we provide the list of datasets along with the performance of the model. Datasets separated by a "+" refer to a global dataset built from the assembling of each mentionned dataset, whereas the use of a "," means that the authors have conducted experiments on separated datasets. If multiple comma-separated datasets are present in Datasets, and only one metric is assigned in Performance, then this metric refers to the performance of the first dataset. Otherwise, each dataset is assigned to a performance metric. If the number of metrics in Performance is greater than the number of datasets, then multiple variants of the models are proposed and we suggest to refer to the original paper for further information. In this paper, Performance metrics are defined such that the accuracy denoted as "acc"=(𝑇 𝑃 + 𝑇 𝑁 )/(𝑇 𝑃 + 𝑇 𝑁 + 𝐹 𝑃 + 𝐹 𝑁 ), where 𝑇 𝑃 , 𝑇 𝑁 , 𝐹 𝑃 , 𝐹 𝑁 refer to true positive, true negative, false positive and false negative, respectively. "F1"=2×Precision×Recall/(Precision + Recall) where Precision= 𝑇 𝑃 /(𝑇 𝑃 + 𝐹 𝑃 ) and Recall= 𝑇 𝑃 /(𝑇 𝑃 + 𝐹 𝑁 ). "AUC" refers to the Area Under the Receiver Operating Characteristic Curve.

(e.g. system calls, binder calls, composite behaviors) and network traffic in pcap format. Features are available from CSV files, ranging from 139 to 50,621 files depending on the APK.

AndroZoo [START_REF] Allix | Androzoo: Collecting millions of android apps for the research community[END_REF]. A collection of Android apps provided by the University of Luxembourg. In 2022, the dataset contains more than 21M APKs, mostly including benign apps from Google Play Store but also malware from VirusShare. Many other APK stores are fetched to continually update the collection. For each APK file, 9 features are collected such as the sha256 hash, the app compilation date or the size of the .dex file. AndroZoo is often used in combination with other APK malware datasets to obtain a balanced number of benign samples.

Drebin [START_REF] Arp | Drebin: Effective and explainable detection of android malware in your pocket[END_REF]. Made available by the MobileSandbox project, this dataset also provides malware Android apps. A total of 5,560 APKs divided into 179 malware families were collected between August 2010 and October 2012. Considering the important variety of classes, most multi-class classification papers use the top-k classes from the dataset by sorting malware based on the number of samples per class. Otherwise, all examples can be used for binary classification. Each APK is summarized by 10 features such as permissions, intents and providers. This dataset does not contain any benign example so an additional dataset such as AndroZoo should be used to complete the dataset with benignware examples.

MalNet [START_REF] Freitas | A large-scale database for graph representation learning[END_REF]. A large dataset containing FCGs extracted from AndroZoo APK files. According to the original paper from 2021, it was at this time the largest database for graph representation learning with 1,262,024 graphs, averaging over 15k nodes and 35k edges per graph, divided among 47 types. GNNs have been applied to this dataset in the original paper [START_REF] Freitas | A large-scale database for graph representation learning[END_REF], where baselines such as GCN, GIN or Feather are benchmarked together. Moreover, FCGs have demonstrated promising results when combined with representation learning techniques, in trying to overcome the polymorphic nature of malware [START_REF] Jiang | Dlgraph: Malware detection using deep learning and graph embedding[END_REF][START_REF] Gascon | Structural detection of android malware using embedded call graphs[END_REF]. For smaller experiments, MalNet-Tiny is a subset of MalNet composed of 5,000 graphs of at most 5k nodes and balanced in 5 types. The authors also released MalNet Explorer [134], a useful web interface to explore the graph structures of malware from the dataset.

GRAPH-BASED WINDOWS MALWARE DETECTION

The increasing level of sophistication of malware on Windows platform along with the widespread usage of this operating system worldwide has become a major concern to preserve the safety of many users. After the success of graph representation learning in many classification tasks, its application to Windows-based malware detection has become obvious. As for Android malware detection, in this section, we present a global methodology to model Windows binaries as graphs and we perform a literature review of current approaches involving graph learning algorithms.

Windows-based Program Graph Structures

In Windows, executable files are encapsulated following the portable executable (PE) file format. File extensions such as .exe, .dll and .sys are all PEs with different roles. Dynamic-link libraries (DLL) and system (SYS) files are both libraries of functions that are loaded into memory and used by other programs. The former is intended for a general function sharing purpose, whereas the latter is intended for a more specific use related to device drivers and hardware configurations by the system [START_REF] Hahn | Robust static analysis of portable executable malware[END_REF]. The EXE file is the one that is actually executed and that communicates with function libraries. Similarly as for Android APKs, PE files can be analyzed statically to extract source code employed in downstream graph structures such as CFGs, FCGs and PDGs. PEs are compiled code, meaning that the binary has to be first disassembled or decompiled to obtain an appropriate human-readable representation like assembly. A number of works also leverage dynamic analysis to detect Windows malware, where the executable binaries are run into a sandbox to monitor system entity interactions, system calls, network flows and live API calls. This process is described in Fig. 4.

Windows-based Approaches

This section reviews the approaches employed in the Windows-based papers presented in Table 4.

CFG Approaches for Windows Malware Detection.

In MAGIC [START_REF] Yan | Classifying malware represented as control flow graphs using deep graph convolutional neural network[END_REF], assembly code is extracted from PE files and converted into CFG, where nodes are basic blocks composed of multiple assembly instructions, and edges represent the program flow along these basic blocks, as explained in Section 4.1.2. Instead of using a standard GCN that was initially made for node classification, the authors prefer to leverage a Deep Graph Convolutional Neural Network (DGCNN) [START_REF] Zhang | An end-to-end deep learning architecture for graph classification[END_REF], which is especially designed for graph classification. The proposed DGCNN leverages adaptive max pooling and replaces the original Conv1D layer with a custom layer that considers graph embedding idea.

The training procedure of this model minimizes the mean negative logarithmic loss in an end-toend manner. The authors trained the model for malware classification on two private CFG-based Fig. 4. Extraction of graph structures from a running binary using dynamic analysis. The file is safely executed in a sandbox environment and all system-and network-level events are monitored for downstream graph construction. datasets: MSKCFG (inspired by [START_REF] Ronen | Microsoft malware classification challenge[END_REF]) and YANCFG (inspired by [START_REF] Yan | Be sensitive to your errors: Chaining neyman-pearson criteria for automated malware classification[END_REF]). These datasets were not made publicly available, but the procedure to generate the CFGs is provided in the paper. The model was also evaluated on the Microsoft Malware Classification Challenge dataset [START_REF] Ronen | Microsoft malware classification challenge[END_REF] and reaches 99.25% accuracy. A cross-platform approach is proposed in HawkEye [START_REF] Xu | Hawkeye: cross-platform malware detection with representation learning on graphs[END_REF] to extract both static and dynamic CFGs from binaries (i.e. Windows, Linux and Android platforms). Embeddings of instructions are computed using word2vec whereas the final graph embedding is calculated using a custom GNN that leverages the word embeddings as nodes. Malware samples were collected from VirusShare and Androzoo, and benign examples for Windows and Linux platforms were collected from libraries. Using this cross-platform method, HawkEye reaches an accuracy of 96.82% on Linux, 93.39% on Windows, whereas 99.6% accuracy is obtained on Android.

A similar CFG based on an assembly is employed in the paper [START_REF] Wang | A hierarchical graph-based neural network for malware classification[END_REF]. First, the semantic of functions is computed using random walk and the BERT [START_REF] Devlin | Bert: Pre-training of deep bidirectional transformers for language understanding[END_REF] language model. These embeddings are then assigned to the nodes of a FCG that represents a global view of the program. The importance between function nodes is then calculated with a GAT model, whose goal is to compute an attention score 𝑒 𝑖 𝑗 for each connected pair of function nodes 𝑖 and 𝑗:

𝑒 𝑖 𝑗 = LeakyReLU a 𝑇 Wℎ 𝑖 , Wℎ 𝑗
where [, ] is the concatenation operation, a and W respectively represent a trainable attention vector and a weight matrix. The features of nodes 𝑖 and 𝑗 are respectively represented here by ℎ 𝑖 and ℎ 𝑗 . As this score is not normalized, a softmax activation is applied on all neighbors to obtain coefficients that are associated to probability distribution:

𝛼 𝑖 𝑗 = softmax 𝑗 𝑒 𝑖 𝑗 = exp 𝑒 𝑖 𝑗 𝑘 ∈N 𝑖 exp (𝑒 𝑖𝑘 )
where N 𝑖 is the neighborhood of node 𝑖. The updated representation ℎ ′ 𝑖 of node 𝑖 can be obtained by gathering neighbor embeddings along with the calculated coefficients. The authors also leverage multi-head attention to calculate multiple representations that are then concatenated together:

ℎ ′ 𝑖 = ∥ 𝐾 𝑘=1 𝜎 ∑ 𝑗 ∈N 𝑖 𝛼 𝑘 𝑖 𝑗 W 𝑘 ℎ 𝑗 + W R ℎ 𝑖
where || represents the concatenation operation, 𝐾 is the number of attention heads and W R ℎ 𝑖 is a trainable residual connection. By leveraging the function-level and program-level embeddings with attention, the overall model achieved 90.88% and 72.44% F1-score on two private datasets.

In MalGraph [START_REF] Ling | Malgraph: Hierarchical graph neural networks for robust windows malware detection[END_REF], both CFG and FCG are also leveraged together. Intra-procedural relations are captured with GraphSAGE from the CFG and the embeddings are attributed to nodes in a FCG whose embeddings are also computed with GraphSAGE to capture inter-procedural relations. Max-pooling transforms node embeddings into graph embeddings for downstream PE malware graph classification. All samples were collected from VirusShare and VirusTotal and IDA Pro was utilized for disassembling.

Although previous works are by definition detection methods, they provide poor insights on the actual patterns and areas in the graph that led to the final prediction. CFGExplainer [START_REF] Dinal Herath | Cfgexplainer: Explaining graph neural network-based malware classification from control flow graphs[END_REF] is an explainability framework specially designed to explain the predictions done by GNNs on malware classification tasks based on CFGs. This method identifies subgraphs in the CFG, that contribute to the final prediction of a GNN. Concerning this particular task, CFGExplainer outperforms other explainability frameworks like GNNExplainer [START_REF] Ying | Gnnexplainer: Generating explanations for graph neural networks[END_REF], SubgraphX [START_REF] Hao Yuan | On explainability of graph neural networks via subgraph explorations[END_REF] and PGExplainer [START_REF] Luo | Parameterized explainer for graph neural network[END_REF]. [START_REF] Jiang | Dlgraph: Malware detection using deep learning and graph embedding[END_REF] leverages static analysis to extract API calls and FCG from binaries. The model relies on a FCG that represents the interactions between functions from disassembled PE files, along with a vector of extracted Windows API calls. The node embeddings of the FCG are calculated using node2vec and are fed into a stacked denoising auto encoder (SDA) [START_REF] Vincent | Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion[END_REF] to create a graph embedding vector. Similarly, a SDA takes as input the API vector and the two resulting vectors are then concatenated and passed into a softmax regression layer for classification, where an accuracy greater than 99% is achieved.

FCG Approaches for Windows Malware Detection. DLGraph

In the paper [START_REF] Oliveira | Behavioral malware detection using deep graph convolutional neural networks[END_REF], a behavioral graph is constructed from API call sequences monitored during the execution of PEs in a sandbox environment. A DGCNN is then used to compute embeddings for graph classification. Based on their experiments, the authors released a public dataset made of 42,797 malware and 1,079 benignware API call sequences [START_REF] Oliveira | Malware analysis datasets: Api call sequences[END_REF]. On the original imbalanced dataset, the proposed model achieves an F1-score of more than 99%.

SDGNet [START_REF] Zhang | Spectral-based directed graph network for malware detection[END_REF] similarly captures API calls along with attributes using dynamic analysis. Weighted graph normalization methods are utilized to transform the adjacency matrix into three symmetrical matrices that describe interactions of node information. A GCN-based model computes node embeddings for these matrices and all representations are merged into a final graph embedding that is leveraged for classification. A total of 8,909 labeled samples were collected from the Alibaba Cloud Malware Detection Base on Behavior dataset [START_REF]Alibaba Cloud Malware Detection Based On Behaviors[END_REF] and the final model achieves 97.3% accuracy.

The reference [START_REF] Li | Intelligent malware detection based on graph convolutional network[END_REF] uses a GCN on a directed cyclic graph that was pre-processed with Markov chain. The nodes represent API calls, whereas the edges (𝑢, 𝑣) are weighted according to the number of calls from 𝑢 to 𝑣. Malware samples used for evaluation are also collected dynamically using a sandbox environment in order to create a private dataset, on which a maximum accuracy of 98.32% is reached.

DMalNet [START_REF] Li | Dmalnet: Dynamic malware analysis based on api feature engineering and graph learning[END_REF] also leverages dynamic analysis to build FCGs from API calls captured during the execution of PE binaries. Here, both API names and API arguments are considered. The embeddings of these attributes are learned with a custom GIN model, whereas more complex structural interactions between APIs are learned with attention using a GAT. After computing embeddings for both semantics, important information is captured with a gPool layer [START_REF] Cangea | Towards sparse hierarchical graph classifiers[END_REF][START_REF] Gao | Graph u-nets[END_REF] for feature selection. More precisely, this pooling operation attributes to each node a projection score and selects top-𝑘 nodes based on these scores. The gPool output of the GIN model is taken as input by the GAT to capture the interactions between API calls. A final accuracy of 98.43% is obtained by leveraging a MLP for classification on a private dataset.

Entity Graph Approaches for Windows Malware

Detection. The dynamic nature of communications between system entities provide valuable information to detect malicious behaviors. In the paper [START_REF] Viet | Malware detection based on directed multi-edge dataflow graph representation and convolutional neural network[END_REF], authors monitor such interactions using dynamic analysis. Directed multi-edge graphs are built from interactions between four system entities: processes, files, registry keys and network sockets. Edges represent data transmission between entities such as system calls. Concretely, a node is represented by a categorical value between 0 and 3, and an edge stores a feature vector containing the size of the transmitted data and the time when the action occurred. Representation learning is done using a GCN and an attention-based pooling function is used to transform node embeddings into fixed-size graph embedding vector that is classified by a feed-forward network. Experiments have been conducted on a private dataset with samples from VirusShare and the proposed solution achieved 86.22% accuracy.

In MatchGNet [START_REF] Wang | Heterogeneous graph attention network[END_REF], malware detection is considered as the detection of a malicious process that behaves differently from benign processes. The authors first designed an invariant graph modeling technique to capture interactions in a heterogeneous graph that represents relations among system entities such as processes, files or sockets. A GNN-based encoder with attention learns the representations and a Siamese Network [START_REF] Bromley | Signature verification using a" siamese" time delay neural network[END_REF] learns the similarity between known benign programs and new incoming programs. During inference, the similarity distance between these two programs results in a score that is utilized for final classification. This model can thus be trained using only benign examples. The final evaluation is performed on a real enterprise dataset composed of 300 million events recorded on Windows and Linux hosts.

The paper [START_REF] Fan | A novel malware detection framework based on weighted heterograph[END_REF] represents malware behaviors as a weighted heterogeneous graph, where nodes are either an executable file (PE), a file, a file suffix or a module, and edges represent different (weighted) actions between entities. A custom model based on GraphSAGE and meta-paths is implemented to deal with the heterogeneity of the graph. This model achieved 91.56% accuracy on a private dataset. FewM-HGCL [START_REF] Liu | Fewm-hgcl: Few-shot malware variants detection via heterogeneous graph contrastive learning[END_REF] introduces a self-supervised method based on contrastive learning for few-shot malware variants detection. The authors construct a heterogeneous graph with 5 types of entities: process, API, file, signature, and network. API nodes are not only identified by their name but are also characterized by their category. API attributes are irregular by default and feature hashing [START_REF] Weinberger | Feature hashing for large scale multitask learning[END_REF] is used to transform them into compact fixed-length vectors. The idea behind contrastive learning is to use the natural co-occurrence associations in data as a substitute for ground truth labeled information. To perform contrastive learning, negative samples and positive samples are generated using different data augmentation techniques. Three distinct GAT models are then trained to respectively learn graph embeddings on the original graph, the positive graph and the negative graph. A discriminator aims to capture the similarity between the original graph and the positive graph along with the dissimilarity between the original graph and the negative graph. All self-trained embeddings are finally merged in a readout layer for downstream graph classification with an accuracy ranging from 85.73% to 98.65% on multiple datasets for malware variants detection.

Windows Malware Datasets

On Windows platform, a majority of works rely on private datasets constructed from public malware samples downloaded from VirusShare and VirusTotal. Using these data, the comparison between papers is ineffective. Other works evaluate their experiments on the Microsoft Malware Classification Challenge, which makes the performance comparison between papers possible. Datasets used in previous studies are reviewed in Table 5. Microsoft Malware Classification Challenge (MMCC) [START_REF] Ronen | Microsoft malware classification challenge[END_REF]. This dataset contains more than 20,000 malware samples that fall into nine families, namely Ramnit, Lollipop, Kelihos ver3, Vundo, Simda, Tracur, Kelihos ver1, Obfuscator.ACY and Gatak. For each binary, the dataset provides two data representations: the bytecode and the disassembly code (disassembled with IDA Pro). The assembly code can then be used to build attributed CFGs [START_REF] Yan | Classifying malware represented as control flow graphs using deep graph convolutional neural network[END_REF] or FCGs [START_REF] Jiang | Dlgraph: Malware detection using deep learning and graph embedding[END_REF].

VirusShare [148], VirusTotal [149].
It is common to download PE malware and Android malware from these two websites. Some works rely on dynamic analysis to run the downloaded malware into a cuckoo sandbox [START_REF] Li | Intelligent malware detection based on graph convolutional network[END_REF][START_REF] Li | Dmalnet: Dynamic malware analysis based on api feature engineering and graph learning[END_REF][START_REF] Viet | Malware detection based on directed multi-edge dataflow graph representation and convolutional neural network[END_REF], whereas others build static CFGs and FCGs [START_REF] Wang | A hierarchical graph-based neural network for malware classification[END_REF][START_REF] Jiang | Dlgraph: Malware detection using deep learning and graph embedding[END_REF].

GRAPH-BASED WEB MALWARE DETECTION

Compiled binaries are not the only way to hide malware payloads with the intent to execute malicious activity. Malware are also present in web technologies and efficient cyberdefense systems should also be designed. Graph representation learning remains little used in the web-based malware detection, but we think that web technologies are by definition graph-oriented and they could be potential candidates to these graph learning techniques. In this section, we will cover several graph structures for web malware detection along with works involving graph representation learning.

Web-based Graph Structures

The web contains a wide range of interconnected web pages accessible through Internet. All these pages along with the fundamental components that compose the structure of Internet are likely to hide malware used by attackers to fool unaware web visitors. Detecting such malicious behaviors can be achieved by direclty analyzing the source code of pages or the communications between services present on the web. In this survey, we focus our study on techniques employed to detect malware activities from source code, DNS communications and network flows. For the representation of web malware as code, web pages' content is generally fetched in order to build a hierarchical graph from HTML or JavaScript code. The DNS scene can also be modeled as a graph to excavate useful associations among domains, as shown in Fig. 5. In this case, the graph is generally heterogeneous as it models complex interactions between different types of entities such as hosts, IP addresses, segments, etc. A graph representation learning model can then learn malicious code patterns hidden in the code of untrusted websites, or detect anomalous DNS communications likely to be attacks such as DNS spoofing or DNS flood attacks. As for Android and Windows malware detection, network flows may also be used to model IP communications between clients and to detect network-level attacks like botnet and DDoS.

Web-based Approaches

Recent approaches for web-based malware detection with graph representation learning are presented below and summarized in Table 6.

Code-based

Approaches for Web Malware Detection. The inner structure of web pages contains important indicators that may be represented as a graph for downstream graph ML tasks. Ouyang et al. [START_REF] Ouyang | Phishing web page detection with html-level graph neural network[END_REF] suggests to fetch the HTML content of phishing web pages to build a heterogeneous graph on which learn the malicious structures that may help the detection of phishing attacks. Here, the HTML files are parsed into DOM trees, where a node represents a HTML tag [150] and edges are links between the tag and its inner tags. Leaf nodes are especially considered, as they store the actual string content that is located and displayed on the web page. A RNN is used at node-level to encode type-specific features based on the attributes and the text content. To capture long-range relations, the authors used the Topology Adaptive Graph Convolutional Network (TAGCN) [START_REF] Du | Topology adaptive graph convolutional networks[END_REF] 7.2.2 Domain-based Approaches for Web Malware Detection. For the detection of malicious domains, the paper [START_REF] He | Malicious domain detection via domain relationship and graph models[END_REF] proposes a lightweight approach that considers domains from passive DNS data. First, a domain relationship graph is built from domains and A records, where each node represents a domain and an edge exists if two domains resolve to the same IP address. Node embeddings are then computed using DeepWalk and the prediction is enhanced with hand-designed DNS features. Deepdom [START_REF] Sun | Deepdom: Malicious domain detection with scalable and heterogeneous graph convolutional networks[END_REF] applies a custom GCN on meta-paths extracted from a HIN containing entities such as clients, domains, IP addresses, and multiple relations like query, register and record. The proposed method has the ability to support inductive node embedding, and can thus generalize to unseen DNS nodes.

Another approach to detect unwanted domains is suggested in the paper [START_REF] Zhang | Attributed heterogeneous graph neural network for malicious domain detection[END_REF]. Here, the DNS interactions extracted from a private university network are also modeled with a HIN, where nodes are either a host, a domain or a resolved-IP, and edges could be a request or a resolution relation. Self-attention mechanism is applied directly on the heterogeneous edges, in contrast to HAN [START_REF] Wang | Heterogeneous graph attention network[END_REF] that uses this mechanism on meta-path scheme. With this technique, the representation of different types of neighbor nodes is projected in the embedding space of the specific target node type. Node embedding of malicious domains can then be detected in embedding space using a downstream fully-connected layer.

Network Flow

Approaches for Web Malware Detection. Network monitoring tools are effective to capture malicious traffic that may come from malware programs. In the paper [START_REF] Zhou | Automating botnet detection with graph neural networks[END_REF], authors propose to automate the detection of botnets by leveraging network traces between hosts with a GNN-based method. The task is here to classify malicious nodes, namely an IP address that participates in the botnet attack. A GCN model first computes the node embeddings across all the graph and malicious botnet nodes are then classified using a neural network at node-level. In botnets, infected bots receive commands from either centralized command-and-control (C&C) or decentralized peer-to-peer architectures (P2P). This technique respectively aims to detect C&C and P2P botnets with 99.03% and 99.51% accuracy. For this evaluation, a private dataset was created based on botnet topologies and background network traffic.

Another approach trained on background traffic with embedded synthetic botnet topologies is considered in reference [START_REF] Carpenter | Detecting botnet nodes via node representation learning[END_REF]. Here, the Inferential SIR_GN model is used to generalize on unseen and very large graphs. Indeed, network-based graphs can rapidly grow in size and adapted models are required to deal with these high-dimension structures. The node embeddings computed by SIR_GN are then fed into a standard neural network to classify botnet nodes.

Zhao et al. [START_REF] Zhao | Multi-attributed heterogeneous graph convolutional network for bot detection[END_REF] represents flows as a heterogeneous graph where nodes are flow entities and edges are events between flows. The nodes are also attributed with features such as timestamp and user-agent. Meta-paths are hand-designed to extract semantic from the heterogeneous graph. Then, a weighted similarity graph is built by computing similarity between node pairs and a GCN computes the embeddings. As in previous approaches, botnet nodes are detected using a neural network at node-level.

Network flows also provide useful information to detect DDoS attacks. In the paper [START_REF] Li | Graphddos: Effective ddos attack detection using graph neural networks[END_REF], GraphD-DoS aims to detect low-rate and high-rate DDoS attacks by considering the relationship between flows along with the relationship of packets from a single flow. First of all, an endpoint graph is constructed by dividing packets into two groups based on the source and destination IP addresses. The GIN model then performs message-passing between every nodes and computes embeddings. The task here is to classify DDoS attack graphs so the node embeddings are passed into a readout layer to perform graph classification.

Web Malware Datasets

In this section, we present web-based datasets on which graph structures can be built for graph representation learning. XSSed [START_REF]XSSed | Cross Site Scripting (XSS) attacks information and archive[END_REF]. An online webpage providing an updated list of XSS payloads and XSS vulnerable websites. This page was created in early 2007 with the scope of increasing security and privacy on the web, and remains today the largest online archive of XSS vulnerable websites [START_REF]XSSed | Cross Site Scripting (XSS) attacks information and archive[END_REF].

Petrak CIC-DoS-2017 [START_REF] Hadian | Detecting http-based application layer dos attacks on web servers in the presence of sampling[END_REF]. This dataset provides network traces from common application layer DoS attacks simulated in a testbed environment. The victim host is a webserver running Apache Linux and the attacker is supposed to be non-oblivious, meaning that he knows to optimize traffic to maximize the attack damage. The resulting experiment lasts for 24 hours and the final dataset results in 4.6GB of data.

ADVERSARIAL ATTACKS

Despite the capabilities of machine learning in classification tasks, these techniques are not immune to adversarial attacks, that aim to disturb the predictions of the model by introducing adversarial examples, crafted from small perturbations in the input. We review in this section background knowledge on adversarial attacks along with existing approaches against traditional and graphbased malware detection.

Background

Adversarial attacks have seen great success notably in the computer vision domain [START_REF] Akhtar | Threat of adversarial attacks on deep learning in computer vision: A survey[END_REF], where the goal is to craft adversarial images that the model will misclassify by predicting a wrong label. For a given classification model 𝑓 denoted as 𝑓 : 𝑥 → 𝑦 that predicts a label 𝑦 ∈ Y given the features 𝑥 ∈ X of an input example 𝑧 ∈ Z, we denote two categories of adversarial attacks [START_REF] Ling | Adversarial attacks against windows pe malware detection: A survey of the state-of-the-art[END_REF][START_REF] Demetrio | Adversarial exemples: A survey and experimental evaluation of practical attacks on machine learning for windows malware detection[END_REF]. A feature-space attack aims to craft adversarial features 𝑥 ′ ∈ X (e.g. a modified FCG or CFG) such that the distance between 𝑥 and 𝑥 ′ in feature-space is minimized, and such that the model 𝑓 predicts a label 𝑦 ′ ∈ Y different from 𝑦. However, a problem-space attack works directly on the real-world input 𝑧 instead of the features 𝑥. The goal then becomes to minimize the cost between 𝑧 and an adversarial example 𝑧 ′ (e.g. modified source code), such that 𝑓 predicts another label 𝑦 ′ . We can further classify adversarial attacks by the prior knowledge acquired by the attacker. White-box attacks assume that the attacker has full knowledge of the target model 𝑓 , namely he knows about the architecture, the parameters, etc. In contrast, black-box attacks refer to scenarios where only the output prediction is known by the attacker, making these attacks more difficult to succeed but also more likely to be faced in real-world applications. Other methods called gray-box attacks, live at the intersection between black-and white-box methods, where the attacker has knowledge of some prior knowledge that shall be defined depending on the use case.

Adversarial Attacks and Malware Detection

In the case of malware, adversarial attacks aim to craft new malware examples that preserve maliciousness while misleading the classification of the model. Formally, given an input malware 𝑧 such as a PE or an APK, we want to find either a modified version of its compiled code 𝑧 ′ or a modified version of its graph representation 𝑥 ′ that will not be detected by the model. However, these requirements imply multiple constraints that are hard to be fulfilled in the case of malware adversarial attacks. Indeed, as explained by Ling et al. [START_REF] Ling | Adversarial attacks against windows pe malware detection: A survey of the state-of-the-art[END_REF], adversarial attacks have been successfully applied to image classification as it is easy to retrieve a corresponding image 𝑧 ′ from an adversarial feature 𝑥 ′ because an image can be simply represented as a 2D-array of pixels. In other words, a differentiable and bi-injective inverse feature mapping function 𝜙 -1 can be approximated to map features from the feature space to an image in problem space. However, retrieving the original malware code 𝑧 ′ from a feature representation 𝑥 ′ (i.e. finding a similar inverse function) is much more challenging as the reconstructed input needs to fulfill multiple conditions to remain executable [START_REF] Pierazzi | Intriguing properties of adversarial ml attacks in the problem space[END_REF]. Notably, the generated adversarial example needs to respect a specific format such as PE or APK, but also needs to preserve the malicious payload while still being executable without error. Furthermore, in a black-box scenario, the attacker does not know beforehand the feature representation taken as input by the detection model, which further complicates the adversarial process. Despite these complicated requirements, researchers found adversarial attacks that can be employed to detect malware. To evade raw bytes-based malware detection models, works [START_REF] Kreuk | Deceiving end-to-end deep learning malware detectors using adversarial examples[END_REF] and [START_REF] Suciu | Exploring adversarial examples in malware detection[END_REF] append an adversarial sequence of bytes to the malware. Other works prefer to modify regions in the PE header [START_REF] Demetrio | Explaining vulnerabilities of deep learning to adversarial malware binaries[END_REF] or extend the DOS header [START_REF] Demetrio | Adversarial exemples: A survey and experimental evaluation of practical attacks on machine learning for windows malware detection[END_REF]. However, these techniques are ineffective for higher-level representations such as those based on API calls. For this purpose, many works insert additional API calls in feature space to add noise in the representation and evade the detection systems [START_REF] Chen | Adversarial machine learning in malware detection: Arms race between evasion attack and defense[END_REF][START_REF] Hu | Black-box attacks against rnn based malware detection algorithms[END_REF][START_REF] Rosenberg | Generic black-box end-to-end attack against state of the art api call based malware classifiers[END_REF][START_REF] Kawai | Improved malgan: Avoiding malware detector by leaning cleanware features[END_REF][START_REF] Fadadu | Evading api call sequence based malware classifiers[END_REF][START_REF] Rosenberg | Query-efficient black-box attack against sequence-based malware classifiers[END_REF][START_REF] Hu | Generating adversarial malware examples for black-box attacks based on gan[END_REF]. In other works, reinforcement learning (RL) is leveraged to manipulate the original malware in order to evade detection while maintaining a correct format and semantic [START_REF] Hyrum S Anderson | Evading machine learning malware detection[END_REF][START_REF] Wu | Enhancing machine learning based malware detection model by reinforcement learning[END_REF][START_REF] Fang | Evading anti-malware engines with deep reinforcement learning[END_REF].

Adversarial Attacks on Graph-based Malware Detection

Adversarial attacks are inherently dependent on the data representation taken as input by the model. When working with GNNs, attackers thus need to consider the graph representation of the data, leading to adversarial attacks specifically designed for graph-based detection systems. Literature presents numerous papers that apply such attacks to GNN classifiers by either modifying node and edge features, or by directly manipulating the graph structure with actions such as removing or adding nodes and edges [START_REF] Sun | Adversarial attack and defense on graph data: A survey[END_REF][START_REF] Zügner | Adversarial attacks on neural networks for graph data[END_REF][START_REF] Dai | Adversarial attack on graph structured data[END_REF]. In the case of malware, removing nodes or edges from graph structures such as FCG or CFG is not appropriate as it would not preserve the functionality of the program. The adversarial attack should also be efficient on graph classification tasks, as a large majority of works leverage this task for malware detection.

Two such adversarial approaches specifically designed against call graph-based malware detection are proposed by Xu et al. in MANIS [START_REF] Xu | Manis: Evading malware detection system on graph structure[END_REF]. The first method aims to pick the 𝑛-strongest nodes from the graph, which are the nodes that have the most influence over their neighbor nodes. They are then inserted in the input graph until evasion has succeeded. The second method relies on the direction of the gradient to guide the insertion of new nodes. The advantage of these methods is that they produce a valid binary that preserves the given format (e.g. PE or APK). On the Drebin dataset, 72.2% misclassification rate is achieved with the 𝑛-strongest nodes method, whereas the gradient-based proposition reaches 33.4% misclassification rate under the white-box setting. Similar results are also obtained in gray-box setting.

In the paper [START_REF] Zhao | Structural attack against graph based android malware detection[END_REF], authors propose a structural attack for APK-based FCGs that aims to address the inverse mapping problem [START_REF] Pierazzi | Intriguing properties of adversarial ml attacks in the problem space[END_REF], that consists in retrieving a valid malware in problem-space from the modified malware in feature-space (see Section 8.2). The proposed method works in whitebox setting, and leverages reinforcement learning along with heuristic optimization to perform graph modifications such as inserting and deleting nodes, or adding edges and rewiring. The performance of this solution has been evaluated on 30k APKs from Androzoo with over 90% attack success rate in feature space and up to 100% attack success rate in problem space.

Another adversarial method based on reinforcement learning is introduced in reference [START_REF] Zhang | Semantics-preserving reinforcement learning attack against graph neural networks for malware detection[END_REF] to evade GNN-based malware detection from CFGs. A deep RL agent is trained to insert semantic NOPs (no-operations) in CFG basic blocks extracted from PE malware. This technique has the faculty to preserve the semantic and format of the original file, while evading GNN classifiers in black-box setting with nearly 100% attack success rate on CFGs constructed with Angr [103] from samples collected on VirusShare and from the VXHeavens dataset [START_REF] Tan | Artificial immune system: applications in computer security[END_REF].

An adversarial attack for GNN-based APK malware detection has been introduced in the work [START_REF] Yumlembam | Iot-based android malware detection using graph neural network with adversarial defense[END_REF] to measure the robustness of the proposed detection model. The attack is based on a VGAE, that aims to effectively add nodes and edges to a FCG in order to fool the GNN classifier, in a black-box setting. This adversarial approach has been applied to the original GNN model to further improve the robustness of the detection system.

CHALLENGES AND DIRECTIONS

Graph representation learning has only recently been applied to malware detection. Therefore, there are still many challenges to achieve resilient malware detection methods. Consequently, we provide some future directions that could improve research in this area:

• While many papers reach good performance on malware detection using graph representation learning techniques, these models are usually evaluated on distinct examples. Indeed, some popular datasets exist, but they are often supplemented by additional samples extracted from public repositories such as Google Play Store, VirusShare and VirusTotal. These new samples make the comparison between papers inefficient as training and testing steps are not performed on the same malware examples, thus leading to different performance evaluations. We think that a large and diversified baseline dataset would be needed for future work, with the aim to effectively compare the metrics of different models. • The robustness of current approaches based on GNNs is uncertain. Most current works rely solely on the code extracted from APKs using static analysis. However, detecting obfuscated malware by only using its code is a challenging task [START_REF] Balakrishnan | Code obfuscation literature survey[END_REF]. Additional efforts using hybrid approaches on graphs could improve the robustness of these techniques, but this remains a scarcely explored direction. Furthermore, attackers may try to bypass the detection capabilities of the model by leveraging adversarial attacks. However, defenses against these attacks remains little studied in the field of GNNs and even less when applied to graph-based malware detection. Existing adversarial approaches presented in Section 8.3 have proven remarkable results in fooling the predictions of GNN-based classifiers even in black-box scenarios, meaning that important efforts are still necessary to obtain robust methods. • One of the drawbacks of using deep models is that they are not amenable to interpretability since they function as black boxes. However, understanding the reasons of a predictive model is of main importance, especially in the field of cybersecurity, where analysts should be able to understand the security-related decisions taken by algorithms. Explainability techniques currently exist to provide insights on the predictions performed by deep architectures such as GNNs [START_REF] Ying | Gnnexplainer: Generating explanations for graph neural networks[END_REF]. However, very few works leverage these techniques to further improve the explainability of malware predictions with GNNs [START_REF] Warmsley | A survey of explainable graph neural networks for cyber malware analysis[END_REF] and further research in this direction could be very useful to the fields of malware detection and analysis.

Furthermore, widely used GNN architectures may not be optimized for the particular task of malware detection, as these models were not specifically designed for this purpose. This means that significant research work could be undertaken to discover new GNN models dedicated to the representation of malware.

CONCLUSION

In this paper, we provide an in-depth review of graph representation learning techniques applied to the detection of Android, Windows and Web malware. We first introduced fundamental knowledge to understand graph-based learning methods along with the graph structures commonly employed in malware detection. We reviewed and classified state-of-the-art works in a comprehensive way and provide descriptions and insights on the datasets that can be leveraged to represent malware as graphs. We notably found that most existing techniques can be represented under a same architecture based on graph classification, which is presented and used as reference in this survey.

We also discovered that many recent works prefer leveraging GNNs in combination with word embedding techniques to learn the semantic of disassembled code along with the structural patterns of existing malware. This survey also shows that effective adversarial attacks can be used by attackers in an attempt to fool graph-based detection systems. The analysis of recent papers demonstrates the promising future of graph ML methods applied to malware detection, and as a result, we have provided future research directions based on the current challenges that can be addressed.

Fig. 2 .

 2 Fig. 2. General architecture of malware detection from static code analysis based on graph representation learning.

Fig. 5 .

 5 Fig. 5. Example of Web-based graph structures built from HTML code (left) and DNS data (right).

  1. Categorization of current state-of-the-art papers in malware detection with graph representation learning. In this survey, we classify papers by platform and by input data structure. Android-based detection is presented in Section 5, whereas Windows and Web detection are presented in Sections 6 and 7, respectively.

Table 1 .

 1 Common tools employed for data extraction and graph construction based on static or dynamic analysis.

Representation Tools

CFG Androguard

[START_REF]Welcome to Androguard's documentation! -Androguard 3.4.0 documentation[END_REF]

, radare2

[START_REF] Radare | [END_REF]

, IDA Pro

[START_REF]Hex Rays State of-the-art binary code analysis solutions[END_REF]

, Ghidra

[

99] FCG Androguard, Apktool [100], graph4apk [101], WALA [102], Angr [103], radare2, IDA Pro, cuckoo [84], Ghidra PDG Androguard, Ghidra Syscalls strace [104], SystemTap

Table 2 .

 2 Summary of Android-based malware detection approaches leveraging graph representation learning

	Data	Analysis Graph type	Classification	Learning	Models	Year	Paper
	CFG+FCG+Flows	Hybrid	Attributed	Graph	Supervised	Word2vec, structure2vec	2021	Hybroid [32]
		Hybrid	Attributed	Graph	Supervised	Bi-LSTM, word2vec, struc-	2021	hybrid-Falcon [33]
						ture2vec
	CFG	Hybrid	Attributed	Graph, Subgraph	Supervised	Inferential SIR_GN, RF	2021	Fairbanks et al. [34]
						GCN	2018	CG-GCN [35]
						GNN	2021	CGDroid [36]
						GCN, CBOW	2021	Cai et al. [37]
						GNN, Skip-gram	2021	Xu et al. [38]
						GraphSAGE	2021	Vinayaka et al. [39]
	FCG	Static	Attributed	Graph	Supervised	CGMM	2021	Errica et al. [40]
						GAT, node2vec	2021	Catal et al. [41]
						GNN, Bi-LSTM, TF-IDF	2022	DeepCatra [42]
						GCN, GraphSAGE, GIN	2022	Lo et al. [43]
						VGAE, word2vec	2022	Gunduz et al. [44]
						GCN	2022	Lu et al. [45]
						GraphSAGE, VGAE	2022	Yumlembam et al. [46]
						Multi-kernel model, Meta-path	2017	HinDroid [12]
	App-API FCG	Static	Heterogeneous Node	Supervised	GCN, Skip-gram	2021	GDroid [94]
						Custom HAN, Meta-path	2021	Hawk [95]
	PDG+FCG	Static	Attributed	Graph	Supervised	structure2vec, word2vec, SIF	2021	Android-COCO [47]
	Syscall Graph	Dynamic Attributed	Graph	Supervised	GCN	2020	John et al. [48]
	Flow Graph	Hybrid	Attributed	Graph	supervised Supervised, Un-	tions, Deep SVDD GNN, GAE, Residual connec-	2021	NF-GNN [49]
		Hybrid	Attributed	Graph	Supervised	MPNN, GRU	2023	NT-GNN [50]

Table 3 .

 3 Datasets employed in Android malware detection studies.

	Paper	Datasets	Performance
	Hybroid [32]	CICAndMal2017	97% F1
	hybrid-Falcon [33]	CICAndMal2017,AndroZoo	97.09% F1
	Fairbanks et al. [34]	VirusTotal	92.7% F1
	CG-GCN [35]	Drebin+Apkpure+HKUST	99.68% F1
	CGDroid [36]	Drebin+AndroZoo	~99% F1
	Cai et al. [37]	AndroZoo+VirusShare	99.65% F1
	Xu et al. [38]	Drebin+AMD+PRAGuard+AndroZoo	99.6% acc
	Vinayaka et al. [39]	CICMalDroid2020,AndroZoo	92.23% F1
	Errica et al. [40]	AMD,Google Play Store	97.2% macro F1
	Catal et al. [41]	CICMalDroid2020+ISCX-AndroidBot-2015	94.1% F1
	DeepCatra [42]	Drebin+DroidAnalytics+VirusShare +CI-CInvesAndMal2019+AndroZoo	95.83% F1
	Lo et al. [43]	MalNet-Tiny,Drebin	94%, 97% F1
	Gunduz et al. [44]	ISCX-AndroidBot-2015+CICMalDroid2020	93.4% F1
	Lu et al. [45]	VirusShare+AndroZoo+Google Play Store	~63%-95% F1
	Yumlembam et al. [46]	Drebin,CICMalDroid2020	98.33%, 98.68% acc
	HinDroid [12]	Private	98.84% F1
	GDroid [94]	AMD,Google Play Store	98.99% acc
	Hawk [95]	CICAndMal2017+VirusShare+AndroZoo +Google Play Store	>96% F1
	Android-COCO [47]	Drebin+AMD+AndroZoo	99.88% F1
	John et al. [48]	Drebin+AMD+Malgenome	92.3% acc
	NF-GNN [49]	CICAndMal2017	96.75% AUC, ~99% F1
	NT-GNN [50]	CICAndMal2017,AAGM	97%, 97% F1

Table 4 .

 4 Summary of Windows-based malware detection approaches leveraging graph representation learning.

	Data	Analysis Graph type	Classification	Learning	Models	Year	Paper
	CFG	Static	Attributed	Graph	Supervised	DGCNN	2019	MAGIC [51]
		Hybrid	Attributed	Graph	Supervised	GNN, word2vec	2021	HawkEye [52]
	CFG+FCG	Static	Attributed	Graph	Supervised	GAT, Random Walk, BERT	2021	Wang et al. [53]
		Static	Attributed	Graph	Supervised	GraphSAGE	2022	MalGraph [54]
		Static	Attributed	Graph	Supervised	node2vec, SDA	2019	DLGraph [55]
						DGCNN	2019	Oliveira et al. [56]
	FCG	Dynamic Attributed	Graph	Supervised	GCN	2021	SDGNet [57]
						GCN, Markov chain	2021	Li et al. [58]
						GAT, GIN, Word2vec	2022	DMalNet [59]
		Dynamic Attributed	Graph	Supervised	GCN	2019	MeQDFG [60]
	Entities	Dynamic Heterogeneous	Graph	supervised Semi-	Attention, Siamese Network Heterogeneous GNN, Meta-path,	2019	MatchGNet [61]
		Dynamic Heterogeneous,	Node	Supervised	GraphSAGE, Meta-path	2021	MalSage [85]
			Attributed
		Dynamic Heterogeneous	Graph	Self-	GAT, Meta-path, Contrastive	2022	FewM-HGCL [62]
					supervised	learning

Table 5 .

 5 Datasets employed in Windows malware detection studies.

	Paper	Datasets	Performance
	MAGIC [51]	MMCC	99.25% acc
	HawkEye [52]	VirusShare+AndroZoo	96.82%, 93.39%, 99.6%
			acc
	Wang et al. [53]	VirusShare+VirusTotal	90.88%, 72.44% F1
	MalGraph [54]	VirusShare+VirusTotal	99.97% acc
	DLGraph [55]	MMCC+VirusShare+KafanBBS	>99% acc
	Oliveira et al. [56]	VirusShare	~99.4% F1
	SDGNet [57]	Alibaba Dataset	97.3% acc
	Li et al. [58]	VirusShare+VirusTotal	98.32% acc
	DMalNet [59]	VirusShare+VirusTotal	98.43% acc
	MeQDFG [60]	VirusShare	86.22% acc
	MatchGNet [61]	Private	96.53% acc
	MalSage [85]	VirusTotal	91.56% acc
	FewM-HGCL [62]	VirusShare,ACT-KingKong,Ember, API Call Sequences,BIG 2015	85.73%-98.65% acc

Table 7 .

 7 Datasets employed in Web malware detection studies.

	Paper	Datasets	Performance
	Ouyang et al. [90]	OpenPhish+PhishTank+TrancoTop1M	95.5% acc
	PhishGNN [91]	OpenPhish+PhishTank+AlexaTop1M	99.7% acc
	GraphXSS [92]	XSSed	99.6% acc
	JStrong [93]	Petrak+GeeksOnSecurity+VirusTotal	99.95% acc
	He et al. [87]	Various datasets+AlexaTop1M	94% acc
	Deepdom [88]	Private	97.91% acc
	GAMD [89]	Private	92.77% acc
	Zhou et al. [27]	Private	99.03%, 99.51% acc
	isirgn1 [28]	CAIDA+Synthetic samples	97.85%-99.78% F1
	Bot-AHGCN [29]	CTU-13, Private	98.27%, 98.22% micro-F1
	GraphDDoS [86]	CIC-IDS-2017, CIC-DoS-2017	99.59%, 94.56% F1

PhishTank

[152]

, OpenPhish

[153]

. These two websites provide an updated list of known malicious URLs that is frequently updated by the community. Phishing URL detection is then possible either by directly extracting features from the raw URL as text, or by crawling the webpage's content if the domain still exists.

TrancoTop1M

[START_REF] Victor | Tranco: A research-oriented top sites ranking hardened against manipulation[END_REF]

, AlexaTop1M

[155]

. Provide benign URLs from the top 1 million sites on Internet ranked by traffic. Often used in combination with malicious URLs from PhishTank and OpenPhish.

  [157], GeeksOnSecurity[158]. Two datasets hosted on GitHub, containing malicious JS file samples. Petrak's dataset contains almost 40,000 JS malware samples, whereas the second contains malware samples divided into 1,156 HTML files, 1,357 JS files and 33 skipped files.CAIDA[START_REF]The CAIDA Anonymized Internet Traces Dataset[END_REF]. Between 2008 and 2019, the Center for Applied Internet Data Analysis (CAIDA) captured passive network traces from high-speed monitors on a business backbone link. Pcap files allow access to hundreds of Gigabytes of requests that were logged over the course of these years. All these traces provide a good solution to model background traffic in synthetic network datasets[START_REF] Zhou | Automating botnet detection with graph neural networks[END_REF]. CTU-13[START_REF] Garcia | An empirical comparison of botnet detection methods. computers & security[END_REF]. This dataset was made public by CTU University, Czech Republic. It contains network traffic captures from benign activity and from 13 botnet attack scenarios. Packets are available in pcap format and flows are in Netflow format and captured with Argus. In total, more than 850M packets and around 20M bi-directional flows are proposed in the dataset.

CIC-IDS2017

[START_REF] Sharafaldin | Toward generating a new intrusion detection dataset and intrusion traffic characterization[END_REF]

. CIC-IDS2017 is a network dataset suggested by the Canadian Institute of Cybersecurity (CIC). It consists of benign and offensive network flows. Each flow is associated with 80 features collected over the course of 5 days in a controlled setting using CICFlowMeter. These data are available in pcap and CSV format. Seven types of web attacks are represented, namely Brute Force, HeartBleed, Botnet, DoS, DDoS, Web Attack, and Infiltration.

J. ACM, Vol. 1, No. 1, Article 1. Publication date: March 2023.

to aggregate neighbors from different hops instead of the direct neighborhood used in traditional GCNs. All embeddings are then reduced with max-pooling and fed into a fully-connected layer for graph classification. The model is trained in an end-to-end manner with cross-entropy loss on a private dataset created from public phishing repositories, with a 95.5% accuracy. On the other hand, PhishGNN [START_REF] Bilot | Phishgnn: A phishing website detection framework using graph neural networks[END_REF] leverages the hyperlink structure of web pages, extracted from HTML content. Here, the graph is built by crawling the outgoing links of a HTML page, up to a certain depth. Each node represents a URL that is mapped to a vector of 25 hand-designed features automatically extracted during crawling from the URL text, the DOM content and the domain. The proposed framework first trains a random forest algorithm with the 25 features of all known websites, and then predicts the label of the outgoing links extracted with the crawler. A message-passing GNN such as GCN is then used on top of the graph containing the random forest predictions, and graph embeddings are aggregated with graph pooling for downstream classification. The combination of random forest predictions with a GNN achieves a clear classification improvement when compared to the performance of each algorithm separately. In the same way as [START_REF] Ouyang | Phishing web page detection with html-level graph neural network[END_REF], the performance of the model is evaluated on a private dataset, where PhishGNN reaches an accuracy of more than 99%.

Against malicious XSS payloads, authors in [START_REF] Liu | Graphxss: an efficient xss payload detection approach based on graph convolutional network[END_REF] propose to first preprocess payload samples with word2vec and further leverage the relations between words by creating a graph on which a GCN learns embeddings. A residual connection is employed in the GCN propagation function to accelerate the convergence of the model. This implementation is then evaluated on a private XSS payload dataset, with a 99.6% prediction accuracy.

JStrong [START_REF] Fang | Jstrong: Malicious javascript detection based on code semantic representation and graph neural network[END_REF] leverages graph representation learning to detect malicious JavaScript (JS) code. The authors study the performance of multiple graph structures to effectively represent the semantic of the JS code. Notably, word2vec along with a Gated GNN and a GAT model are leveraged to compute the embeddings of different graphs, namely an Abstract Syntax Tree (AST), a CFG, a PDG and an Object Dependence Graph (ODG) [START_REF] Li | Mining node. js vulnerabilities via object dependence graph and query[END_REF]. Embeddings are then aggregated with mean pooling and classified in graph classification setting, where best performance is achieved by applying the final architecture on a pruned PDG, which retains the most important information. Indeed, the authors explain that the PDG extracts more semantic information than an AST or a CFG due its ability to model data flow information and statement execution order.