GraphQL APIs provide a single endpoint for data access in distributed web applications. Clients retrieve only the data they need in one request by querying a structured schema. Introspection queries allow clients and developers to retrieve the schema programmatically. However, the schema reveals valuable information (such as available fields and type relationships) that could benefit attackers. For this reason, production environments typically disable introspection. Tools such as Clairvoyance use blind introspection, a technique that retrieves the schema by combining brute forcing with GraphQL’s field suggestion feature, which suggests corrections for misspelt or similar fields. However, retrieval quality, measured by schema coverage, depends on the wordlist used. In our benchmark of 7 open-source projects, Clairvoyance covered roughly 35% of the schemas on average, even when using the best available GraphQL-specific wordlist. In this paper, we propose KrakQL: an LLM-guided, novelty-search-based schema retriever that leverages the partially discovered schema to propose context-aware candidate fields and arguments. We demonstrate that KrakQL outperforms Clairvoyance with 140% improvement in average coverage, 134 \(\times \) fewer HTTP requests, and a 93 \(\times \) higher success rate, all at a negligible token cost. Finally, we release KrakQL to support reproducibility and enable further research.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

KrakQL: LLM-Guided Blind Introspection of GraphQL Schemas

  • Marcello Maugeri,
  • Abenezer Angamo,
  • Giampaolo Bella

摘要

GraphQL APIs provide a single endpoint for data access in distributed web applications. Clients retrieve only the data they need in one request by querying a structured schema. Introspection queries allow clients and developers to retrieve the schema programmatically. However, the schema reveals valuable information (such as available fields and type relationships) that could benefit attackers. For this reason, production environments typically disable introspection. Tools such as Clairvoyance use blind introspection, a technique that retrieves the schema by combining brute forcing with GraphQL’s field suggestion feature, which suggests corrections for misspelt or similar fields. However, retrieval quality, measured by schema coverage, depends on the wordlist used. In our benchmark of 7 open-source projects, Clairvoyance covered roughly 35% of the schemas on average, even when using the best available GraphQL-specific wordlist. In this paper, we propose KrakQL: an LLM-guided, novelty-search-based schema retriever that leverages the partially discovered schema to propose context-aware candidate fields and arguments. We demonstrate that KrakQL outperforms Clairvoyance with 140% improvement in average coverage, 134 \(\times \) fewer HTTP requests, and a 93 \(\times \) higher success rate, all at a negligible token cost. Finally, we release KrakQL to support reproducibility and enable further research.