-
Notifications
You must be signed in to change notification settings - Fork 0
Home
peanuth8tr edited this page Oct 16, 2020
·
2 revisions
Many of these are covered by the CIS GCP Foundation Benchmark.
- the use and privileges of service accounts
- See Google IAM Analyzer for specific use cases of IAM concerns (e.g. iam.serviceAccounts.actAs permissions or finding resources which are granted any role/permission to a specified identity)
- the use and rotation of security keys
- See section 1 of CIS GCP Foundation Benchmark
- Ensure management access is not permitted from the Internet (e.g. SSH/RDP)
- Default network does not exist in a project
- VPC peering between projects does not allow unintended access to sensitive networks
- See section 3 of CIS GCP Foundation Benchmark
- Outbound traffic must be disabled to avoid data exfiltration concerns. DNS recursive queries must be disabled too for the same reason.
- Verify Buckets and Objects are not vulnerable to public enumeration through default naming conventions
- Access permissions to storage buckets
- Searches for sensitive info (e.g. creds) that could lead to privesc
- Verify logging and versioning are enabled
- See section 5 of CIS GCP Foundation Benchmark
- Ensure Cloud Audit Logging across all services and users in a project
- See section 2 of CIS GCP Foundation Benchmark (Many custom logging filters and alerts are listed here)
Many of the same aspects of normal OS privilege escalation apply here. Target will typically be Ubuntu and built off GCP CIS hardened base image. Things to look for that are specific to GCP include
- Ability to Write Custom GCP Metadata for CE Instances. An attacker may be able to escalate his privileges by adding SSH keys to custom metadata and switch to another user in the system that is sudoer (see Gitlab article).
- Sensitive scripts/values written to GCP Metadata. Any startup scripts need to be manually reviewed for business logic bugs. The integrity of any downloaded software needs to be validated (e.g. verification of checksums or PGP signatures), unless they originate from a trusted source within GCP (e.g. a GCP bucket). Any downloaded configuration files or keys need to be stored in the filesystem with the right permissions.
$ curl "http://metadata.google.internal/computeMetadata/v1/project/attributes/?recursive=true&alt=text" \
-H "Metadata-Flavor: Google"
$ curl "http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=true&alt=text" \
-H "Metadata-Flavor: Google"
- User home directory permissions
- Config files with service account keys
$ sudo find / -name "gcloud"
- See section 4 of CIS GCP Foundation Benchmark
- Forseti relies on MySQL to store policies and rules. Ensure MySQL is hardened.
- Default user is "forseti_security_user". Verify that the password of the user is not exposed.
- App-Engine
- BigQuery
- Database Services