Nowadays, mobile apps prevalently adopt remote logging to monitor essential software activities for various purposes, e.g., debugging, anomaly detection, and remote diagnosis, but were found leaking user privacy. Unfortunately, the state-of-the-art methods are highly restricted to the reliance on predefined heuristic methods and limited prior knowledge, leaving the severity largely unknown to the community. To comprehensively understand this urgent issue, we propose PrInLog, an automatic analysis tool to analyze the remote logging behaviors in mobile apps. Specifically, PrInLog introduces a new concept of log-generation context, which incorporates what and when user private data is leaked by proposing a systematic and novel semantic-driven approach to infer the logging content and an iterative algorithm to extract requisite logging predicates. Our evaluation of 200000 top apps in Google Play as of August 2023 discovered 23493 apps with remote logging behaviors, where 3270 popular apps recording personally identifiable information (PII), some of which are highly app-specific that have never been reported before, e.g., detailed patient information, and 1709 apps alongside logging other private data such as location, purchase, and search contents.
