Files
hacktricks-cloud/src/pentesting-cloud/gcp-security/gcp-services/gcp-api-keys-enum.md

2.7 KiB

GCP - API Keys Enum

{{#include ../../../banners/hacktricks-training.md}}

Basic Information

Google Cloud Platform (GCP) में, API कुंजी एक सरल एन्क्रिप्टेड स्ट्रिंग है जो बिना किसी प्रिंसिपल के एक एप्लिकेशन की पहचान करती है। इन्हें Google Cloud APIs तक पहुँचने के लिए उपयोग किया जाता है जो उपयोगकर्ता संदर्भ की आवश्यकता नहीं होती। इसका मतलब है कि इन्हें अक्सर उन परिदृश्यों में उपयोग किया जाता है जहाँ एप्लिकेशन अपने स्वयं के डेटा तक पहुँच रहा है न कि उपयोगकर्ता डेटा तक।

Restrictions

आप API कुंजी पर प्रतिबंध लागू कर सकते हैं ताकि सुरक्षा बढ़ सके। उदाहरण के लिए, आप कुंजी को केवल कुछ IP पते, वेब, एंड्रॉइड ऐप, iOS ऐप द्वारा उपयोग करने के लिए प्रतिबंधित कर सकते हैं, या इसे GCP के भीतर कुछ APIs या सेवाओं तक सीमित कर सकते हैं।

Enumeration

यह संभव है कि आप API कुंजी के प्रतिबंध को देख सकें (जिसमें GCP API एंडपॉइंट्स का प्रतिबंध शामिल है) क्रियाओं की सूची या वर्णन का उपयोग करके:

gcloud services api-keys list
gcloud services api-keys describe <key-uuid>
gcloud services api-keys list --show-deleted

Note

30 दिनों से पहले हटाए गए कुंजी को पुनर्प्राप्त करना संभव है, यही कारण है कि आप हटाए गए कुंजी की सूची बना सकते हैं।

Privilege Escalation & Post Exploitation

{{#ref}} ../gcp-privilege-escalation/gcp-apikeys-privesc.md {{#endref}}

Unauthenticated Enum

{{#ref}} ../gcp-unauthenticated-enum-and-access/gcp-api-keys-unauthenticated-enum.md {{#endref}}

Persistence

{{#ref}} ../gcp-persistence/gcp-api-keys-persistence.md {{#endref}}

{{#include ../../../banners/hacktricks-training.md}}