# US 2017/0325113 A1 · Antmonitor: a system for mobile network monitoring and its applications

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0325113 A1
- Document ID: US20170325113A1
- Status: Published application
- Kind: A1
- Application number: 15/587,291
- Filed: 2017-05-04
- Published: 2017-11-09
- Earliest claimed: 2016-05-04
- Assignees: The Regents of the University of California
- Applicants: The Regents of the University of California
- Inventors: ATHINA MARKOPOULOU; ANASTASIA SHUBA; EMMANOUIL ALIMPERTIS; JANUS VARMARKEN; MINAS GJOKA; MINH THOAI ANH LE; SIMON LANGHOFF
- Web page: https://patentgrep.com/patent/US20170325113A1

## CPC

- H04L 43/08: Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L 12/4633: {Interconnection of networks using encapsulation techniques, e.g. tunneling}
- H04L 12/4641: {Virtual LANs, VLANs, e.g. virtual private networks [VPN] (LAN interconnection over a bridge based backbone H04L12/462; encapsulation techniques H04L12/4633; routing of packets H04L45/00; packet switches H04L49/00; virtual private networks for security H04L63/0272)}
- H04L 43/045: for graphical visualisation of monitoring data
- H04L 43/065: related to network devices
- H04L 43/18: Protocol analysers
- H04L 63/0227: {Filtering policies (mail message filtering H04L51/212)}
- H04L 63/0272: {Virtual private networks}
- H04L 67/75: Indicating network or usage conditions on the user display
- H04M 1/72403: with means for local support of applications that increase the functionality
- H04W 4/20: Services signaling; Auxiliary data signalling, i.e. transmitting data via a non-traffic channel
- H04W 12/02: Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
- H04W 12/033: of the user plane, e.g. user's traffic
- H04W 12/35: {Protecting application or service provisioning, e.g. securing SIM application provisioning}
- H04W 12/80: Arrangements enabling lawful interception [LI]
- H04W 24/10: Scheduling measurement reports {; Arrangements for measurement reports}
- H04W 4/23: for mobile advertising
- Y02D 30/00: Reducing energy consumption in communication networks
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- H04M: TELEPHONIC COMMUNICATION (circuits for controlling other apparatus via a telephone cable and not involving telephone switching apparatus G08)
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

AntMonitor is a system for passive monitoring, collection, and analysis of fine-grained, large-scale packet measurements from mobile devices. The system may be implemented on top of a VPN-based service and using two possible architectures: Client-Server or Mobile-Only. A current implementation of the Mobile-Only design may outperform other mobile-only approaches: it may achieve, for example, 2× and 8× faster (down and uplink) speeds, and close to the raw no-VPN throughput, while using 2-12× less energy. AntMonitor can scale to a large number of end-users, provide enhanced privacy protection, and enable accurate traffic classification. The system may support (i) real-time detection and prevention of private information leak-age from the device to the network; (ii) passive performance measurements network-wide as well as per-user; and (iii) traffic classification at different granularities (including per-application or per device, and user profiling) based on TCP/IP header features.

## Claims

### Claim 1

A method of mobile network monitoring including:
a graphical user interface that allows a user to turn a virtual private network on or off, select which applications to monitor, select which analysis and logging to perform and what results to upload and visualize;
a method for intercepting all packets in and out of the device that may use a virtual private network (VPN) service on the device;
a routing module that interacts with said intercepting method and routes packets to/from their target/source host;
a log module for logging entire datagrams or metadata on the device, and for uploading all or parts of the log files from the device to a log server; and
an analysis and visualization module on the device and/or at the log server.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
a client-server architecture is used to intercept all packets, including a VPN client on the device for intercepting all packets, and a VPN server on the cloud where all packets are routed through; and
the routing module is configured to route a datagram associated with the applications to said VPN server.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
a mobile-only architecture of mobile network monitoring is used to intercept all packets; and
the routing module is configured to route a datagram directly to/from the destination/source (without involving a remote VPN server) by having a forwarder module on the device translate all TCP and UDP flows on the device, between raw sockets (using the VPN service) and layer-4 sockets (over the network interface).

### Claim 4 (depends on 3)

A method of claim 3 wherein the forwarder module has the following properties:
the forwarder module reads from the raw sockets from the VPN service using an event-based mechanism instead of a sleep-based mechanism; and
the forwarder module uses a mechanism to eliminate string copies by using a shared data structure; and
the forwarder module uses a large Maximum Transfer Unit (MTU) to read/write from/to the raw VPN sockets and reads/writes in large chunks from/to the layer-4 sockets, and matches the sizes between the two; and
the forwarder module minimizes the number of threads used (1 thread for reading, 1 for writing and 1 for connection management) and the number of sockets used (1 socket for all TCP connections and 1 socket for all UDP connections).

### Claim 5 (depends on 4)

The method of claim 4, with an additional privacy leaks module, including the following:
an algorithm for searching for multiple strings at the same time;
placing the privacy leaks module in the architecture so as to utilize the shared data structure and minimize memory copies; and
detecting and blocking privacy leaks in real-time.

### Claim 6 (depends on 1)

The method of claim 1, with an additional traffic classification and profiling module including:
for traffic profiling, including application classification, anomaly detection and user profiling; while
using accurate ground-truth on a phone, from mapping packets to applications and from other contextual data such as location, time, other running applications in a foreground; and/or
using information uploaded from multiple devices to the log server.

### Claim 7 (depends on 1)

The method of claim 1, including a network performance measurement module, including
monitoring of multiple pieces of information on the mobile device at a same time, including WiFi or cellular throughout, RSSP, location and other information that can be read from mobile APIs or inferred from captured packets; and
computing network performance metrics (such as throughput), based on the captured packets, logging them on the device and/or uploading them to the log server, using pcap, pcapng, JSON or other formats.

### Claim 8

A computer program product for mobile network monitoring, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions using a computer processor to cause the mobile device and/or a cloud server to:
allow a user to turn a virtual private network on or off using a graphical user interface and select applications for contributing data to data collection;
manage a network tunnel (TUN) interface and route the data for the data collection by extracting a datagram from the data, routing the datagram to a target host, wrapping a response from the target host in a datagram, and writing the response to the network tunnel interface;
log files with some of the data for the data collection and upload them to a log server; and
analyze packets from the data and visualize them.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein:
a client-server architecture is used to intercept all packets, including a VPN client on the device for intercepting all packets, and a VPN server on the cloud where all packets are routed through; and
a routing module is configured to route a datagram associated with the applications to the VPN server.

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein:
a mobile-only architecture of mobile network monitoring is used to intercept all packets; and
a routing module is configured to route a datagram directly to and from the destination and source without involving a remote VPN server by having a forwarder module on the device translate all TCP and UDP flows on the device, between raw sockets (using the VPN service) and layer-4 sockets (over the network interface).

### Claim 11 (depends on 10)

A computer program of claim 10 wherein the forwarder module has the following properties:
the forwarder module reads from a TUN interface using an event-based mechanism, instead of a sleep-based mechanism; and
the forwarder module uses a mechanism to eliminate string copies by using a shared data structure; and
the forwarder module uses a large MTU to read/write from/to the TUN interface and reads/writes in large chunks from/to the sockets, and matches the sizes between the TUN interface and sockets; and
the forwarder module minimizes the number of threads used (1 thread for reading, 1 for writing and 1 for connection management) and the number of sockets used (1 socket for all TCP connections and 1 socket for all UDP connections).

### Claim 12 (depends on 11)

A computer program of claim 11 wherein the forwarder module has the following properties:
the forwarder module reads from a TUN interface using the poll( ) mechanism available in linux and native C; and
the forwarder module uses the shared BytesBuffer data structure to eliminate string copies between Java and native C parts of the implementation; and
the forwarder module uses a large MTU to read/write from/to the TUN interface and reads/writes in large chunks from/to the sockets, and matches the sizes used at the TUN interface and sockets; and
the forwarder module minimizes the number of threads used (1 thread for reading, 1 for writing and 1 for connection management) and the number of sockets used (1 socket for all TCP connections and 1 socket for all UDP connections)

### Claim 13 (depends on 11)

The computer program product of claim 11, with a privacy leaks module, including the following:
an algorithm for searching for multiple strings at the same time; and
placing the privacy leaks module so that it utilizes the shared data structure and minimize memory copies; and
detecting and blocking privacy leaks in real-time.

### Claim 14 (depends on 13)

The computer program product of claim 13, with a privacy leaks module, including the following:
the Aho-Corasick algorithm for searching for multiple strings at the same time; and
using BytesBuffer to minimize memory copies.

### Claim 15 (depends on 11)

The computer program product of claim 11 with a traffic classification and profiling module, including:
application classification, anomaly detection and user profiling for traffic profiling;
using accurate ground-truth on a phone, from mapping packets to applications and from other contextual data such as location, time, other running applications in a foreground; and
using information uploaded from multiple devices to the log server.

### Claim 16 (depends on 11)

The computer program product of claim 11, including a network performance measurement module, including
monitoring of multiple pieces of information on the mobile device simultaneously, including WiFi or cellular throughout, RSSP, location and other information that can be read from mobile APIs or inferred from captured packets; and
computing network performance metrics (such as throughput), based on the captured packets, logging them on the device and/or uploading them to the log server, using pcap, pcapng, JSON or other formats.

### Claim 17

A computer program product for mobile network monitoring, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions using a computer processor to cause the mobile device to:
allow a user to turn a virtual private network on or off using a graphical user interface and select applications for contributing data to data collection;
manage a network tunnel (TUN) interface and route the data for the data collection by extracting a datagram from the data, routing the datagram to a target host, wrapping a response from the target host in a datagram, and writing the response to the network tunnel interface;
intercept the packets on the device using the aforementioned VPN service and corresponding TUN interface;
route a datagram directly to and from the destination and source without involving a remote VPN server by having a forwarder module on the device, by translating all TCP and UDP flows on the device, between raw sockets (using the VPN service) and layer-4 sockets (over the network interface).
the aforementioned forwarder module reads from a TUN interface using an event-based mechanism, uses a shared data structure to eliminate string copies;
the aforementioned forwarder module uses a large MTU to read/write from/to the TUN interface and reads/writes in large chunks from/to the sockets, and matches the sizes between the TUN interface and sockets; and
the forwarder module minimizes the number of threads used (1 thread for reading, 1 for writing and 1 for connection management) and the number of sockets used (1 socket for all TCP connections and 1 socket for all UDP connections).
