mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2025-12-30 22:50:43 -08:00
Check origin GCP project
This commit is contained in:
@@ -18,9 +18,39 @@ The regex is: **`AIza[0-9A-Za-z_-]{35}`**
|
||||
|
||||
Search it for example in Github following: [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
|
||||
|
||||
This is extremely useful to check to **which GCP project an API key that you have found belongs to**:
|
||||
This is extremely useful to check to **which GCP project an API key that you have found belongs to**. We have different options:
|
||||
|
||||
- Contact `https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=<api-key`
|
||||
|
||||
For the sake of brevity the output was truncated, but in the complete output the project ID appears more than 5 times
|
||||
|
||||
```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.",
|
||||
[...]
|
||||
```
|
||||
|
||||
- Contact `https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=<api-key`
|
||||
|
||||
For the sake of brevity the output was truncated, but in the complete output the project ID appears more than 5 times
|
||||
|
||||
```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.",
|
||||
[...]
|
||||
```
|
||||
|
||||
- [This one no longer works!] `apikeys.keys.lookup`
|
||||
|
||||
```bash
|
||||
# If you have permissions
|
||||
|
||||
Reference in New Issue
Block a user