mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-02-04 11:07:37 -08:00
Translated ['src/pentesting-cloud/gcp-security/gcp-unauthenticated-enum-
This commit is contained in:
@@ -16,11 +16,37 @@ Kwa maelezo zaidi kuhusu API Keys angalia:
|
||||
|
||||
Regex ni: **`AIza[0-9A-Za-z_-]{35}`**
|
||||
|
||||
Tafuta mfano katika Github ikifuatia: [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)
|
||||
Tafuta kwa mfano katika Github ikifuatia: [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
|
||||
|
||||
Hii ni muhimu sana kuangalia **ni mradi gani wa GCP ambao API key uliyopata inahusiana nao**:
|
||||
Hii ni muhimu sana kuangalia **ni mradi gani wa GCP ambao API key uliyopata inahusiana nao**. Tuna chaguzi tofauti:
|
||||
|
||||
- Wasiliana na `https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=<api-key`
|
||||
|
||||
Kwa ajili ya ufupi, matokeo yalikatwa, lakini katika matokeo kamili ID ya mradi inaonekana zaidi ya mara 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.",
|
||||
[...]
|
||||
```
|
||||
- Wasiliana na `https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=<api-key>`
|
||||
|
||||
Kwa ajili ya ufupi, matokeo yalikatwa, lakini katika matokeo kamili, kitambulisho cha mradi kinaonekana zaidi ya mara 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.",
|
||||
[...]
|
||||
```
|
||||
- [Hii sasa haitumiki tena!] `apikeys.keys.lookup`
|
||||
```bash
|
||||
# If you have permissions
|
||||
gcloud services api-keys lookup AIzaSyD[...]uE8Y
|
||||
@@ -45,6 +71,6 @@ reason: AUTH_PERMISSION_DENIED
|
||||
```
|
||||
### Brute Force API endspoints
|
||||
|
||||
Kama hujui ni APIs zipi zimewezeshwa katika mradi, itakuwa ya kuvutia kutumia chombo [https://github.com/ozguralp/gmapsapiscanner](https://github.com/ozguralp/gmapsapiscanner) na kuangalia **ni nini unaweza kufikia kwa kutumia API key.**
|
||||
Kama hujui ni APIs zipi zimewezeshwa katika mradi, itakuwa ya kuvutia kutumia chombo [https://github.com/ozguralp/gmapsapiscanner](https://github.com/ozguralp/gmapsapiscanner) na kuangalia **kila kitu unachoweza kufikia kwa kutumia API key.**
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
Reference in New Issue
Block a user