# Practical Secrets Extraction Against Black-Box LLMs

> Source: <https://arxiv.org/abs/2609.36941>
> Published: 2026-09-30 08:07:08+00:00

# Computer Science > Cryptography and Security

  [Submitted on 29 Sep 2026]

# Title:Practical Secrets Extraction against Black-box LLMs

[View PDF](https://arxiv.org/pdf/2609.36941)

[HTML (experimental)](https://arxiv.org/html/2609.36941v1)

Abstract:Large language models (LLMs) increasingly power autonomous coding agents such as Codex and Claude Code, yet their training corpora may contain confidential credentials exposed in public repositories or collected from private development artifacts, creating risks of memorization and subsequent leakage. Existing extraction audits, however, largely assume access to model weights or token probabilities. In this work, we present a black-box secret extraction framework for commercial, API-based LLMs under output-only access. It comprises (i) \emph{Cross-Validated Secret Knowledge Distillation}, which uses semantics-preserving prompt variants, response cross-validation, and provider-specific format filtering to distill secret-relevant behavior into a local white-box proxy; and (ii) \emph{Proxy-Guided Secret Extraction and Candidate Filtering}, which combines truncated top-$p$ sampling with local token entropy, $N$-gram frequency profiling, and provider-specific structural priors. On controlled API-key benchmarks, our framework improves recovery effectiveness and real-key rates over representative baselines while reducing extraction latency. A responsible real-world evaluation further recovers masked provider-specific credentials from three independently deployed black-box LLM systems spanning OpenAI and Claude Code, showing that memorized secrets can be exposed under output-only access.
    

### References & Citations

Loading...

# Bibliographic and Citation Tools

Bibliographic Explorer 

*(*[What is the Explorer?](https://info.arxiv.org/labs/showcase.html#arxiv-bibliographic-explorer))
Connected Papers 

*(*[What is Connected Papers?](https://www.connectedpapers.com/about))
Litmaps 

*(*[What is Litmaps?](https://www.litmaps.co/))
scite Smart Citations 

*(*[What are Smart Citations?](https://www.scite.ai/))
# Code, Data and Media Associated with this Article

alphaXiv 

*(*[What is alphaXiv?](https://alphaxiv.org/))
CatalyzeX Code Finder for Papers 

*(*[What is CatalyzeX?](https://www.catalyzex.com))
DagsHub 

*(*[What is DagsHub?](https://dagshub.com/))
Gotit.pub 

*(*[What is GotitPub?](http://gotit.pub/faq))
Hugging Face 

*(*[What is Huggingface?](https://huggingface.co/huggingface))
ScienceCast 

*(*[What is ScienceCast?](https://sciencecast.org/welcome))
# Demos

# Recommenders and Search Tools

Influence Flower 

*(*[What are Influence Flowers?](https://influencemap.cmlab.dev/))
CORE Recommender 

*(*[What is CORE?](https://core.ac.uk/services/recommender))
# arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? [**Learn more about arXivLabs**](https://info.arxiv.org/labs/index.html).
