From 3a5bfd753184902e286c19349dc122926c522954 Mon Sep 17 00:00:00 2001 From: Translator Date: Tue, 10 Jun 2025 12:36:22 +0000 Subject: [PATCH] Translated ['src/pentesting-cloud/gcp-security/gcp-unauthenticated-enum- --- .../gcp-api-keys-unauthenticated-enum.md | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/pentesting-cloud/gcp-security/gcp-unauthenticated-enum-and-access/gcp-api-keys-unauthenticated-enum.md b/src/pentesting-cloud/gcp-security/gcp-unauthenticated-enum-and-access/gcp-api-keys-unauthenticated-enum.md index 5aea4297e..5a75e14b7 100644 --- a/src/pentesting-cloud/gcp-security/gcp-unauthenticated-enum-and-access/gcp-api-keys-unauthenticated-enum.md +++ b/src/pentesting-cloud/gcp-security/gcp-unauthenticated-enum-and-access/gcp-api-keys-unauthenticated-enum.md @@ -12,15 +12,41 @@ ### OSINT techniques -**Google API 密钥被任何类型的应用广泛使用**,这些应用从客户端使用它们。通常可以在网站源代码或网络请求中找到它们,在移动应用中,或者仅仅是在像 Github 这样的平台上搜索正则表达式。 +**Google API 密钥被任何类型的应用广泛使用**,这些应用从客户端使用。通常可以在网站源代码或网络请求中找到它们,在移动应用中,或者仅仅是在像 Github 这样的平台上搜索正则表达式。 正则表达式是:**`AIza[0-9A-Za-z_-]{35}`** 例如,可以在 Github 上搜索: [https://github.com/search?q=%2FAIza%5B0-9A-Za-z\_-%5D%7B35%7D%2F\&type=code\&ref=advsearch](https://github.com/search?q=%2FAIza%5B0-9A-Za-z_-%5D%7B35%7D%2F&type=code&ref=advsearch) -### Check origin GCP project - `apikeys.keys.lookup` +### Check origin GCP project -这对于检查**您找到的 API 密钥属于哪个 GCP 项目**非常有用: +这对于检查**您找到的 API 密钥属于哪个 GCP 项目**非常有用。我们有不同的选项: + +- 联系 `https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=` + +为了简洁起见,输出被截断,但在完整输出中,项目 ID 出现了超过 5 次。 +```bash +curl -s "https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=AIzaSyD[...]uE8Y" + +{ +"error": { +"code": 403, +"message": "Identity Toolkit API has not been used in project 943955951114 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project=943955951114 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", +[...] +``` +- 联系 `https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=` + +为了简洁起见,输出被截断,但在完整输出中,项目 ID 出现了超过 5 次。 +```bash +curl -s "https://identitytoolkit.googleapis.com/v1/projects?key=AIzaSyD[...]uE8Y" + +{ +"error": { +"code": 403, +"message": "Identity Toolkit API has not been used in project 943955951114 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project=943955951114 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", +[...] +``` +- [这个不再有效了!] `apikeys.keys.lookup` ```bash # If you have permissions gcloud services api-keys lookup AIzaSyD[...]uE8Y