Skip to content

Researchers propose a practical key extraction framework for black-box LLMsPractical Secrets Extraction against Black-box LLMs

arXiv· arXiv:2609.36941· Shiqian Zhao, Siwei Jiang, Xinfeng Li, Runyi Hu, Yandan Zheng, Congyu Guo, Tianwei Zhang, Anh Tuan Luu·Indexed by this site · 2026-09-30· Originally publishedSelected AttacksSelectedAttention38

Translation in progress — untranslated text is omitted.

Quick read

Attacks

Based on the paper PDF (generated by Gemini); refer to the original

AI summaryResearchers propose a black-box key extraction framework that relies only on the output interface, used to extract memorized API keys from commercial API large models. The method has two stages: first, using semantically preserved prompt variants, response cross-validation, and vendor format filtering, they distill the victim model's key-related behavior into a local white-box proxy; then, on the proxy, they use truncated top-p sampling combined with local token entropy, N-gram frequency, and vendor structure priors to filter candidates. On a controlled benchmark containing 100 real keys from 5 vendors and 4 programming languages, the recovery improvement over representative baselines is up to 57.1%, the real key ratio is improved by up to 2.6 times, and post-construction extraction latency is reduced by 20.7 to 34.8 times. Real-world evaluation recovered masked vendor credentials from three independently deployed black-box systems, involving OpenAI and Claude Code; GitHub search showed public matches for these keys, and the authors did not make actual API calls for ethical reasons.

Questions
Code large models may memorize high-entropy API keys from public or private code during training, creating leakage risk; however, commercial black-box interfaces only provide text output and hide internal probability distributions, making it difficult to distinguish real credentials from model hallucination through direct querying, and facing limitations of narrow search space and huge online call overhead.
Methods
Proposes a two-stage black-box extraction framework: first, semantically preserving code prefix perturbations are used to query the victim model, and after format filtering, a local white-box proxy model is built through hard-label response distillation; then, Sample-k%p sampling is used on the proxy model, combined with local window entropy and 4-gram repetition suppression to filter candidate credentials offline.
Experiments and results
On the 5-platform credential benchmark, the average number of real credentials recovered improves by 11.8%–25.0% over direct querying (Table 1), and extraction latency is reduced by 20.7–34.8 times (Figure 3); in real-world tests, credentials with public GitHub matches were successfully recovered from Qwen3-27B, GPT-Codex 5.3, and Claude Haiku 4.5.
Limitations and future work
The authors state that code and materials are planned to be released in the future to facilitate reproduction, and the research promotes stricter data cleaning research; for ethical reasons, no real-time interface verification of recovered credentials was performed; controlled experiments cover 3 victim models and 5 credential platforms, and real-world tests did not send requests externally.
Why it was selectedThe paper presents a two-stage method for extracting memorized secrets using only the output interface, accompanied by controlled benchmarks and real-system validation, which can be compared with existing white-box auditing approaches.

The paper presents a two-stage method for extracting memorized secrets using only the output interface, accompanied by controlled benchmarks and real-system validation, which can be compared with existing white-box auditing approaches.

Related events and news

1 events · 0 news mentions

  • This event's paper

    黑盒LLM密钥提取框架研究

    研究者提出仅依赖输出接口的黑盒 LLM 密钥提取框架,在 100 个真实密钥基准上恢复效果较基线最高提升 57.1%。

Read originalarxiv.org