用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-ocp-v160-1-4-1命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-ocp-v160-1.4.1 |
| description | Ensure that the healthz endpoints for the scheduler are protected by RBAC (Manual) |
| category | cis-openshift |
| version | 1.6.0 |
| author | cyberstrike-official |
| tags | ["cis","openshift","kubernetes","redhat","scheduler","rbac","profiling","healthz"] |
| cis_id | 1.4.1 |
| cis_benchmark | CIS Red Hat OpenShift Container Platform Benchmark v1.6.0 |
| tech_stack | ["kubernetes","openshift","redhat"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Disable profiling, if not needed.
Profiling allows for the identification of specific performance bottlenecks. It generates a significant amount of program data that could potentially be exploited to uncover system and program details. If you are not experiencing any bottlenecks and do not need the profiler for troubleshooting purposes, it is recommended to turn it off to reduce the potential attack surface.
Profiling information would not be available.
In OpenShift 4, The Kubernetes Scheduler operator manages and updates the Kubernetes Scheduler deployed on top of OpenShift. By default, the operator exposes metrics via metrics service. The metrics are collected from the Kubernetes Scheduler operator. Profiling data is sent to healthzPort, the port of the localhost healthz endpoint. Changing this value may disrupt components that monitor the kubelet health. The default healthz port value is 10251, and the healthz bindAddress is 127.0.0.1. To ensure the collected data is not exploited, profiling endpoints are secured via RBAC (see cluster-debugger role). By default, the profiling endpoints are accessible only by users bound to cluster-admin or cluster-debugger role. Profiling can not be disabled.
To verify the configuration, run the following command:
Run the following command to check the livenessProbe configuration:
oc -n openshift-kube-scheduler get cm kube-scheduler-pod -o json | jq -r '.data."pod.yaml"' | jq '.spec.containers[].livenessProbe'
Verify the output path is set to healthz.
Run the following command to check the readinessProbe configuration:
oc -n openshift-kube-scheduler get cm kube-scheduler-pod -o json | jq -r '.data."pod.yaml"' | jq '.spec.containers[].readinessProbe'
Verify the output path is set to healthz.
Verify endpoints exist for the scheduler:
oc -n openshift-kube-scheduler describe endpoints
Validate that RBAC is enabled and protects controller endpoints. First, switch to the openshift-kube-scheduler:
oc project openshift-kube-scheduler
Next, get the schedule pod name and port:
export POD=$(oc get pods -l app=openshift-kube-scheduler -o jsonpath='{.items[0].metadata.name}')
export PORT=$(oc get pod $POD -o jsonpath='{.spec.containers[0].livenessProbe.httpGet.port}')
Attempt to make an insecure GET request to the metrics endpoint:
oc rsh $POD curl https://localhost:$PORT/metrics -k
Verify that an HTTP 403 is returned.
Create a test service account:
oc create sa permission-test-sa
Generate a service account token and attempt to access the metrics endpoint:
export SA_TOKEN=$(oc create token permission-test-sa)
oc rsh $POD curl http://localhost:$PORT/metrics -H "Authorization: Bearer $SA_TOKEN" -k
Verify that an HTTP 403 is returned.
Login as a cluster administrator and attempt to access the metrics endpoint:
CLUSTER_ADMIN_TOKEN=$(oc whoami -t)
oc rsh $POD curl https://localhost:$PORT/metrics -H "Authorization: Bearer $CLUSTER_ADMIN_TOKEN" -k
Verify metrics output is returned. Unset environment variables used in the test and delete the test service account:
unset CLUSTER_ADMIN_TOKEN POD PORT SA_TOKEN
oc delete sa permission-test-sa
None.
By default, profiling is enabled and protected by RBAC.
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 6.8 Define and Maintain Role-Based Access Control | X | ||
| v7 | 14.6 Protect Information through Access Control Lists | X | X | X |
| Techniques / Sub-techniques | Tactics | Mitigations |
|---|---|---|
| T1609 | TA0002 | M1035 |
Level 1 (Manual)