| #!/bin/bash | |
| usage() { | |
| echo "Usage: $0 -s <service-name> [-n <namespace>]" | |
| exit 1 | |
| } | |
| check_service_exists() { | |
| if [ -z "$NAMESPACE" ]; then | |
| kubectl get service "$SERVICE_NAME" > /dev/null 2>&1 |
| # __ __ | |
| # __ ______ ____ ___ ____ _/ /____ ____ ____/ / | |
| # / / / / __ \/ __ `__ \/ __ `/ __/ _ \/ __ \/ __ / | |
| # / /_/ / /_/ / / / / / / /_/ / /_/ __/ /_/ / /_/ / | |
| # \__, /\____/_/ /_/ /_/\__,_/\__/\___/\____/\__,_/ | |
| # /____ matthewdavis.io, holla! | |
| # | |
| FROM node:9.2-alpine | |
| ENV GOPATH /go |
- installazione operator su openshift-operators, creazione sa (per ora cluster admin, non so se si puo' fare meno)
- creazione secrets con le credenziali
- creazione cr con caseid e proxy :)
Refs:
| terraform { | |
| required_version = ">= 0.12.0" | |
| } | |
| provider "aws" { | |
| region = "us-east-1" | |
| } | |
| resource "aws_vpc" "my_vpc" { | |
| cidr_block = "172.16.0.0/16" |
| valid = {"a","b","x"} | |
| def getMyDish(customerPref): | |
| if customerPref == "a" : | |
| return "Mi spiace, TortaDiRiso finita" | |
| if customerPref == "x" : | |
| return "! EasterEgg !" | |
| return "Ottima scelta, hai scelto VattelaaprendereneinXXX !!" | |
| while True: |
| https://cloud.google.com/storage/docs/encryption/ | |
| BUCKET_NAME=YOUR_NAME_enron_corpus | |
| gsutil mb gs://${BUCKET_NAME} | |
| gsutil cp gs://enron_corpus/allen-p/inbox/1. . | |
| tail 1. | |
| Enable API/Create keyring | |
| gcloud services enable cloudkms.googleapis.com |
*Most pentesting and gcp privilege escalation stuff out there for GCP assumes what I'm finding to be an absurd level of access handed to you.(i.e Human 2fa protected accounts, organization-wide read only IAM perms, etc that is not suitable for use in black box testing of mature environments.
There's a lot of data you need to use the gcp api only available behind mandatory 2fa protected human accounts that service accounts and low tier project accounts simply do not have access to enumerating if you find yourself having popped an application or shelled a instance somehow and have console-only access.
Intent of this is to break down various categories of escalation that will be available to service accounts, as well as point out various showstoppers.
- 0.1. References
- 0.2. Other cheatsheets
- 0.3. Manage multiple gcloud config configurations
- [0.3.1. Switch gcloud context with gcloud config](#031