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 794b910c0..54f0f3fd2 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 @@ -16,11 +16,37 @@ Vir meer inligting oor API Sleutels, kyk: Die regex is: **`AIza[0-9A-Za-z_-]{35}`** -Soek dit byvoorbeeld in Github volgens: [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) +Soek dit byvoorbeeld in Github soos: [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) -### Kontroleer oorsprong GCP projek - `apikeys.keys.lookup` +### Kontroleer oorsprong GCP projek -Dit is uiters nuttig om te kontroleer **tot watter GCP projek 'n API sleutel wat jy gevind het behoort**: +Dit is uiters nuttig om te kontroleer **tot watter GCP projek 'n API sleutel wat jy gevind het behoort**. Ons het verskillende opsies: + +- Kontak `https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=` + +Vir die doeleindes van beknoptheid is die uitvoer afgekort, maar in die volledige uitvoer verskyn die projek-ID meer as 5 keer. +```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.", +[...] +``` +- [Hierdie een werk nie meer nie!] `apikeys.keys.lookup` ```bash # If you have permissions gcloud services api-keys lookup AIzaSyD[...]uE8Y