Translated ['src/pentesting-cloud/gcp-security/gcp-unauthenticated-enum-

This commit is contained in:
Translator
2025-06-10 12:36:36 +00:00
parent b4e062a973
commit c1b020c4a1

View File

@@ -18,9 +18,35 @@ APIキーに関する詳細情報は、以下を確認してください
例えば、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)
### 元のGCPプロジェクトを確認 - `apikeys.keys.lookup`
### 元のGCPプロジェクトを確認
これは、**見つけたAPIキーがどのGCPプロジェクトに属しているかを確認するのに非常に便利です**
これは、**見つけたAPIキーがどのGCPプロジェクトに属しているかを確認するのに非常に便利です**。いくつかのオプションがあります
- `https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=<api-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=<api-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
@@ -45,6 +71,6 @@ reason: AUTH_PERMISSION_DENIED
```
### ブルートフォースAPIエンドポイント
プロジェクトでどのAPIが有効になっているかわからない場合、ツール[https://github.com/ozguralp/gmapsapiscanner](https://github.com/ozguralp/gmapsapiscanner)を実行し、**APIキーでアクセスできるものを確認するのは興味深いでしょう。**
プロジェクトでどのAPIが有効になっているかわからない場合、ツール[https://github.com/ozguralp/gmapsapiscanner](https://github.com/ozguralp/gmapsapiscanner)を実行し、**APIキーで何にアクセスできるを確認するのは興味深いでしょう。**
{{#include ../../../banners/hacktricks-training.md}}