arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.18601cs.CRcs.SE
收藏

评估大型语言模型在检测 Android 应用程序中机密信息方面的能力

Evaluating Large Language Models in detecting Secrets in Android Apps

SnT, University of Luxembourg(卢森堡大学科学与技术学院)

Marco Alecci, Jordan Samhi, Tegawendé F. Bissyandé, Jacques Klein

AI总结:

本文提出基于 LLM 的 SecretLoc,利用上下文与结构线索检测 Android 应用硬编码机密,在基准和 5000 个 Google Play 应用中发现大量既有方法遗漏的新型机密。

摘要:

移动应用程序通常嵌入 API 密钥、令牌和客户端 ID 等身份验证机密,以便与云服务集成。然而,开发人员经常将这些凭据硬编码到 Android 应用程序中,使其可能通过逆向工程被提取。一旦泄露,攻击者即可利用这些机密访问敏感数据、操纵资源或滥用 API,从而造成重大安全和财务风险。现有的检测方法(例如基于正则表达式的分析、静态分析和机器学习)能够有效识别已知模式,但存在根本性局限:它们需要预先掌握凭据结构、API 签名或训练数据方面的知识。在本文中,我们提出了 SecretLoc,这是一种基于 LLM 的方法,用于检测 Android 应用程序中硬编码的机密。SecretLoc 超越了模式匹配;它利用上下文和结构线索识别机密,而无需依赖预定义模式或带标签的训练集。通过使用文献中的基准数据集,我们证明 SecretLoc 能够检测出基于正则表达式、静态分析和机器学习的方法所遗漏的机密,包括此前未见过的机密类型。我们总共发现了 4828 个未被现有方法检测到的机密,并发现了 10 多种“新”类型的机密,例如 OpenAI API 密钥、GitHub Access Tokens、RSA 私钥和 JWT 令牌等。我们进一步将分析扩展到从 Google Play 新爬取的应用程序,并在其中发现并负责任地披露了额外的硬编码机密。在一组 5000 个应用程序中,我们在 2124 个应用程序(42.5%)中检测到机密;在我们联系开发人员后,其中若干机密已得到确认并修复。我们的结果揭示了一种双重用途风险:如果分析人员能够使用 LLM 发现这些机密,攻击者同样可以做到。这凸显出整个移动生态系统迫切需要主动的机密管理和更强大的缓解实践。

英文摘要:

Mobile apps often embed authentication secrets, such as API keys, tokens, and client IDs, to integrate with cloud services. However, developers often hardcode these credentials into Android apps, exposing them to extraction through reverse engineering. Once compromised, adversaries can exploit secrets to access sensitive data, manipulate resources, or abuse APIs, resulting in significant security and financial risks. Existing detection approaches, such as regex-based analysis, static analysis, and machine learning, are effective for identifying known patterns but are fundamentally limited: they require prior knowledge of credential structures, API signatures, or training data. In this paper, we propose SecretLoc, an LLM-based approach for detecting hardcoded secrets in Android apps. SecretLoc goes beyond pattern matching; it leverages contextual and structural cues to identify secrets without relying on predefined patterns or labeled training sets. Using a benchmark dataset from the literature, we demonstrate that SecretLoc detects secrets missed by regex-, static-, and ML-based methods, including previously unseen types of secrets. In total, we discovered 4828 secrets that were undetected by existing approaches, discovering more than 10 "new" types of secrets, such as OpenAI API keys, GitHub Access Tokens, RSA private keys, and JWT tokens, and more. We further extend our analysis to newly crawled apps from Google Play, where we uncovered and responsibly disclosed additional hardcoded secrets. Across a set of 5000 apps, we detected secrets in 2124 apps (42.5%), several of which were confirmed and remediated by developers after we contacted them. Our results reveal a dual-use risk: if analysts can uncover these secrets with LLMs, so can attackers. This underscores the urgent need for proactive secret management and stronger mitigation practices across the mobile ecosystem.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑