用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-gcp-foundations-3-8命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 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
基于 SOC 职业分类
| name | cis-gcp-foundations-3.8 |
| description | Ensure That VPC Flow Logs Is Enabled for Every Subnet in a VPC Network |
| category | cis-gcp-foundations |
| version | 4.0.0 |
| author | cyberstrike-official |
| tags | ["cis","gcp","networking","vpc","flow-logs"] |
| cis_id | 3.8 |
| cis_benchmark | CIS Google Cloud Platform Foundation Benchmark v4.0.0 |
| tech_stack | ["gcp"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Flow Logs is a feature that enables users to capture information about the IP traffic going to and from network interfaces in the organization's VPC Subnets. Once a flow log is created, the user can view and retrieve its data in Stackdriver Logging. It is recommended that Flow Logs be enabled for every business-critical VPC subnet.
VPC networks and subnetworks not reserved for internal HTTP(S) load balancing provide logically isolated and secure network partitions where GCP resources can be launched. When Flow Logs are enabled for a subnet, VMs within that subnet start reporting on all Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) flows. Each VM samples the TCP and UDP flows it sees, inbound and outbound, whether the flow is to or from another VM, a host in the on-premises datacenter, a Google service, or a host on the Internet. If two GCP VMs are communicating, and both are in subnets that have VPC Flow Logs enabled, both VMs report the flows.
Flow Logs supports the following use cases:
Flow Logs provide visibility into network traffic for each VM inside the subnet and can be used to detect anomalous traffic or provide insight during security workflows.
The Flow Logs must be configured such that all network traffic is logged, the interval of logging is granular to provide detailed information on the connections, no logs are filtered, and metadata to facilitate investigations are included.
Note: Subnets reserved for use by internal HTTP(S) load balancers do not support VPC flow logs.
Standard pricing for Stackdriver Logging, BigQuery, or Cloud Pub/Sub applies. VPC Flow Logs generation will be charged starting in GA as described in reference: https://cloud.google.com/vpc/
Flow Logs is set to OnAggregation Interval is set to 5 secInclude metadata checkbox is checkedSample rate is set to 100%Note: It is not possible to determine if a Log filter has been defined from the console.
gcloud compute networks subnets list --format json | \
jq -r
'(["Subnet","Purpose","Flow_Logs","Aggregation_Interval","Flow_Sampling","Metadata","Logs_Filtered"] | (., map(length*"-"))),
(.[] |
[
.name,
.purpose,
(if has("enableFlowLogs") and .enableFlowLogs == true then "Enabled" else "Disabled" end),
(if has("logConfig") then .logConfig.aggregationInterval else "N/A" end),
(if has("logConfig") then .logConfig.flowSampling else "N/A" end),
(if has("logConfig") then .logConfig.metadata else "N/A" end),
(if has("logConfig") then (.logConfig | has("filterExpr")) else "N/A" end)
]
) |
@tsv' | \
column -t
The output of the above command will list:
Enabled or Disabled value if Flow Logs are enabledAggregation Interval or N/A if disabled, the value for Flow Sampling or N/A if disabledMetadata or N/A if disabledIf the subnet's purpose is PRIVATE then Flow Logs should be Enabled.
If Flow Logs is enabled then:
Aggregation_Interval should be INTERVAL_5_SECFlow_Sampling should be 1Metadata should be INCLUDE_ALL_METADATALogs_Filtered should be false.Subnet details page displays.EDIT button.Flow Logs to On.Configure Logs section.Aggregation Interval to 5 SEC.Include metadata.Sample rate to 100.Note: It is not possible to configure a Log filter from the console.
To enable VPC Flow Logs for a network subnet, run the following command:
gcloud compute networks subnets update [SUBNET_NAME] --region [REGION] --enable-flow-logs --logging-aggregation-interval=interval-5-sec --logging-flow-sampling=1 --logging-metadata=include-all
By default, Flow Logs is set to Off when a new VPC network subnet is created.
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 8.2 Collect Audit Logs | x | x | x |
| v8 | 13.6 Collect Network Traffic Flow Logs | x | x | |
| v7 | 6.2 Activate audit logging | x | x | x |
| v7 | 12.8 Deploy NetFlow Collection on Networking Boundary Devices | x | x |