Abstract
Many network services and tools (e.g. network monitors, malware-detection systems, routing and billing policy enforcement modules in ISPs) depend on identifying the type of traffic that passes through the network. With the widespread use of mobile devices, the vast diversity of mobile apps, and the massive adoption of encryption protocols (such as TLS), large-scale encrypted traffic classification becomes increasingly difficult. In this paper, we propose a deep learning model for mobile app identification that works even with encrypted traffic. The proposed model only needs the payload of the first few packets for classification, and, hence, it is suitable even for applications that rely on early prediction, such as routing and QoS provisioning. The deep model achieves between 84% to 98% accuracy for the identification of 80 popular apps. We also perform occlusion analysis to bring insight into what data is leaked from SSL/TLS protocol that allows accurate app identification. Moreover, our traffic analysis shows that many apps generate not only app-specific traffic, but also numerous ambiguous flows. Ambiguous flows are flows generated by common functionality modules, such as advertisement and traffic analytics. Because such flows are common among many different apps, identifying the source app that generates ambiguous flows is challenging. To address this challenge, we propose a CNN+LSTM model that uses adjacent flows to learn the order and pattern of multiple flows, to better identify the app that generates them. We show that such flow association considerably improves the accuracy, particularly for ambiguous flows. Furthermore, we show that our approach is robust to mixed traffic scenarios where some unrelated flows may appear in adjacent flows. To the best of our knowledge, this is the first work that identifies the source app for ambiguous flows.
Introduction
Network administrators and ISPs require accurate identification of mobile app traffic to manage Quality of Service (QoS), enforce billing policies, and detect security threats. However, two primary trends have made this nearly impossible for traditional tools: pervasive encryption and the rise of "ambiguous flows."
With the shift to HTTPS/TLS, packet payloads are unreadable, rendering traditional Deep Packet Inspection (DPI) ineffective. Furthermore, many apps share third-party libraries for advertising and analytics (e.g., Google Ads). A single flow from such a library appears identical across different apps, making source identification difficult. This research addresses these challenges by leveraging deep learning to identify apps from encrypted traffic and associating sequential flows to resolve ambiguity.
Methodology
The researchers developed two primary deep learning architectures to handle different traffic scenarios.
1D Convolutional Neural Network (CNN)
For single-flow identification, a 1D CNN is employed. The model processes the first 256 bytes of the first six packets of a flow. These are concatenated into a vector and treated as a 1D "image." The CNN's shift-invariant nature allows it to detect patterns, such as specific TLS handshake fields, regardless of their exact position within the packet.
CNN+LSTM for Flow Association
To identify the source of ambiguous flows, the authors introduced a joint CNN+LSTM model. While the CNN extracts features from individual flows, the Long Short-Term Memory (LSTM) network learns the temporal sequences and patterns of consecutive flows. By analyzing a 2-second window of traffic, the model can distinguish between apps that use the same generic ad or analytics services based on the preceding and succeeding traffic context.
Dataset and Preprocessing
The study utilized a large-scale dataset of 80 popular mobile apps (e.g., Facebook, YouTube, Gmail) collected in 2018. Traffic was captured through both human interaction and automated scripts on Android and iOS. To prevent model bias, the authors applied random under-sampling and over-sampling to balance the representation of apps with varying traffic volumes.
Results and Discussion
The proposed models demonstrated high efficacy across several metrics:
- High Accuracy: The CNN model achieved between 84% and 98% accuracy. Remarkably, even when protocol headers were removed, the model maintained 94.22% accuracy using only the encrypted payload.
- Resolving Ambiguity: The CNN+LSTM model improved accuracy for ambiguous flows by over 4% compared to single-flow analysis, reaching a final accuracy of 96.23%.
- Occlusion Analysis: By systematically masking parts of the TLS handshake, researchers found that the Server Name Indication (SNI) is a primary feature for identification. However, the model remains accurate even without SNI by leveraging other handshake extensions.
Conclusion and Future Work
This work presents a robust deep learning framework for identifying mobile apps from encrypted traffic, even when flows are ambiguous. By requiring only the first few packets, the system is suitable for real-time network management and early prediction tasks. Future research will focus on the impact of TLS 1.3, which encrypts more of the handshake, and exploring the QUIC protocol, which features even more extensive encryption than standard TLS.
Summary updated