基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-gcp-foundations-1-5命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
macOS post-exploitation for credential harvesting, DTrace monitoring, TCC bypass, and stealth operations via native tools
Windows userland post-exploitation for credential harvesting, monitoring, AMSI/ETW bypass, and stealth operations
Kubernetes post-exploitation for container escape, secret extraction, RBAC abuse, and cluster persistence
| name | cis-gcp-foundations-1.5 |
| description | Ensure That Service Account Has No Admin Privileges |
| category | cis-gcp-foundations |
| version | 4.0.0 |
| author | cyberstrike-official |
| tags | ["cis","gcp","iam","service-accounts","mfa","kms","api-keys"] |
| cis_id | 1.5 |
| cis_benchmark | CIS Google Cloud Platform Foundation Benchmark v4.0.0 |
| tech_stack | ["gcp"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
A service account is a special Google account that belongs to an application or a VM, instead of to an individual end-user. The application uses the service account to call the service's Google API so that users aren't directly involved. It's recommended not to use admin access for ServiceAccount.
Service accounts represent service-level security of the Resources (application or a VM) which can be determined by the roles assigned to it. Enrolling ServiceAccount with Admin rights gives full access to an assigned application or a VM. A ServiceAccount Access holder can perform critical actions like delete, update change settings, etc. without user intervention. For this reason, it's recommended that service accounts not have Admin rights.
Removing *Admin or *admin or Editor or Owner role assignments from service accounts may break functionality that uses impacted service accounts. Required role(s) should be assigned to impacted service accounts in order to restore broken functionalities.
From Google Cloud Console
IAM & admin/IAM using https://console.cloud.google.com/iam-admin/iamIAM Tab look for VIEW BY PRINCIPALSPRINCIPALS using type : Service accountSERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com*Admin or *admin or role matching Editor or role matching Owner under Role column.From Google Cloud CLI
gcloud projects get-iam-policy PROJECT_ID --format json > iam.json
role of members group associated with each serviceaccount does not contain *Admin or *admin or does not match or does not match .roles/editorroles/ownerThis recommendation is only applicable to User-Managed user-created service accounts. These accounts have the nomenclature: SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com. Note that some Google-managed, Google-created service accounts have the same naming format, and should be excluded (e.g., appsdev-apps-dev-script-auth@system.gserviceaccount.com which needs the Owner role).
Sample JSON output:
{
"bindings": [
{
"members": ["serviceAccount:our-project-123@appspot.gserviceaccount.com"],
"role": "roles/appengine.appAdmin"
},
{
"members": ["user:email1@gmail.com"],
"role": "roles/owner"
},
{
"members": [
"serviceAccount:our-project-123@appspot.gserviceaccount.com",
"serviceAccount:123456789012-compute@developer.gserviceaccount.com"
],
"role": "roles/editor"
}
],
"etag": "BwUjMhCsNvY=",
"version": 1
}
No user-managed service accounts should have *Admin, *admin, Editor, or Owner roles assigned.
From Google Cloud Console
IAM & admin/IAM using https://console.cloud.google.com/iam-admin/iamIAM Tab look for VIEW BY PRINCIPALSPRINCIPALS using type : Service accountSERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.comUser-Managed user created service account with roles containing *Admin or *admin or role matching Editor or role matching Owner under Role Column.Edit (Pencil Icon) for the Service Account, it will open all the roles which are assigned to the Service Account.Delete bin icon to remove the role from the Principal (service account in this case).From Google Cloud CLI
gcloud projects get-iam-policy PROJECT_ID --format json > iam.json
Role which contains roles/*Admin or roles/*admin or matched roles/editor or matches roles/owner. Add a role to the bindings array that defines the group members and the role for those members.For example, to grant the role roles/appengine.appViewer to the ServiceAccount which is roles/editor, you would change the example shown below as follows:
{
"bindings": [
{
"members": ["serviceAccount:our-project-123@appspot.gserviceaccount.com"],
"role": "roles/appengine.appViewer"
},
{
"members": ["user:email1@gmail.com"],
"role": "roles/owner"
},
{
"members": [
"serviceAccount:our-project-123@appspot.gserviceaccount.com",
"serviceAccount:123456789012-compute@developer.gserviceaccount.com"
],
"role": "roles/editor"
}
],
"etag": "BwUjMhCsNvY="
}
gcloud projects set-iam-policy PROJECT_ID iam.json
User Managed (and not user-created) default service accounts have the Editor (roles/editor) role assigned to them to support GCP services they offer.
By default, there are no roles assigned to User Managed User created service accounts.
Default (user-managed but not user-created) service accounts have the Editor (roles/editor) role assigned to them to support GCP services they offer. Such Service accounts are: PROJECT_NUMBER-compute@developer.gserviceaccount.com, PROJECT_ID@appspot.gserviceaccount.com.
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts - Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account. | x | x | x |
| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts - Ensure that all users with administrative account access use a dedicated or secondary account for elevated activities. This account should only be used for administrative activities and not internet browsing, email, or similar activities. | x | x | x |