# TOAR: Toward Resisting AS-Level Adversary Correlation Attacks Optimal Anonymous Routing
## 1 Introduction  
The Onion Router (Tor) [1] is currently the foremost anonymous communication system. It offers technical anonymity protection for internet users' privacy by concealing the connection between identity information and the IP addresses of communication entities through multi-hop overlay routing. The Tor network comprises 7500 relays and handles nearly terabytes of bandwidth traffic daily, serving more than 5 million users [2]. To ensure low-latency communication, Tor does not use traffic obfuscation techniques, which makes it challenging to defend against correlation attacks. Traffic correlation analysis is a fundamental technique used in a wide range of deanonymization attacks on Tor, leveraging external traffic features as side-channel information [3, 4]. Studies have found that autonomous system adversaries are more capable of conducting traffic correlation analysis attacks than previously recognized [5]. Internet routing detours usually generate high latency and increase the likelihood of AS-level adversaries appearing at both ends of the circuit, further raising the risk of correlation attacks [6]. Additionally, there is some research aimed at improving the accuracy of these correlation attacks [7, 8]. This trend islikely to drive the growing use of correlation analysis attacks, which will ultimately reduce Tor's level of anonymity. A significant amount of prior research has focused on developing AS-aware paths in Tor by modifying the relay selection algorithm [9; 10; 11; 12]. These AS-aware path algorithms utilize the geographic locations of clients and relays as a criterion for weighting the relays. However, application-layer solutions are limited to passive inference techniques, leading to inaccurate routing inference and increased latency for Tor clients. A significant portion of the latency overhead can be attributed to the underlying structure of Tor relay connections. For example, Counter-RAPTOR [12] significantly increases download time [13]. To address the above challenges, we propose Toward Resisting AS-level Adversary Correlation Attacks Optimal Anonymous Routing (TOAR). Rather than modifying the relay selection algorithm in the overlay network, TOAR leverages an underlay routing scheme within Software Defined Networks (SDN). TOAR is a two-stage (i.e., route searching and route forwarding) routing mechanism based on Bayesian optimization in SDN networks. Initially, it selects routing nodes that provide strong anonymity and low communication costs, ensuring compliance with established policy guidelines while avoiding AS that could connect traffic between the source and destination. Subsequently, it queries and confirms routing policy information through programmable interfaces designed for cross-SDN domain boundary routing. To assess TOAR's anonymity, along with the effectiveness of route searching and route forwarding performance, we carry out a comprehensive analysis and extensive experiments. The results indicate that TOAR is an effective solution for addressing the reduction in anonymity caused by AS-level attackers while also mitigating the high latency associated with routing detours. In summary, this paper makes the following contributions:  
* We propose a novel two-stage (i.e., route searching and route forwarding) routing mechanism, TOAR, based on Bayesian optimization. It effectively addresses the issue of diminished anonymity in Tor resulting from AS-level correlation attacks and reduces high latency caused by routing detours. * In TOAR, we design a software-defined programmable interface that facilitates querying routing policy information and confirming routing selections, enabling flexible end-to-end source routing choices. * We conduct a comprehensive analysis and extensive experiments to assess TOAR's anonymity, along with the effectiveness of route searching and route forwarding performance. The results indicate that TOAR provides stronger anonymity and improves communication performance. The remainder of this paper is organized as follows.