本文へ移動
cccskills
無料GitHub で公開

performing-kubernetes-etcd-security-assessment

Assess the security posture of Kubernetes etcd clusters by evaluating encryption at rest, TLS configuration, access controls, backup encryption, and network isolation.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Performing Kubernetes Etcd Security Assessment

Genel Bakış

etcd is the distributed key-value store that serves as Kubernetes' backing store for all cluster data, including Secrets, RBAC policies, ConfigMaps, and workload configurations. Without proper hardening, etcd exposes all cluster secrets in plaintext, making it the highest-value target for attackers who gain control plane access. A comprehensive security assessment covers encryption at rest, TLS for transport, access control, backup security, and network isolation.

Ne Zaman Kullanılır

  • conducting yaparken security assessments that involve performing kubernetes etcd security assessment
  • following yaparken: incident response procedures for related security events
  • performing yaparken scheduled security testing or auditing activities
  • validating yaparken security controls through hands-on testing

Ön Gereksinimler

  • Erişim: Kubernetes control plane nodes
  • SSH Erişim: etcd cluster nodes (or etcdctl configured)
  • CIS Kubernetes Benchmark reference document
  • Understanding of TLS certificate management and EncryptionConfiguration

Assessment Areas

1. Encryption at Rest

Şunu doğrula: Kubernetes encrypts Secret data stored in etcd:

ps aux | grep kube-apiserver | grep encryption-provider-config

cat /etc/kubernetes/enc/encryption-config.yaml

Expected secure configuration:

apiVersion: apiserver.config.k8s.io/v1
kind: EncryptionConfiguration
resources:
  - resources:
      - secrets
      - configmaps
    providers:
      - aescbc:
          keys:
            - name: key1
              secret: <base64-encoded-32-byte-key>
      - identity: {}  # Fallback for reading unencrypted data

Verify secrets are actually encrypted in etcd:

ETCDCTL_API=3 etcdctl \
  --endpoints=https://127.0.0.1:2379 \
  --cacert=/etc/kubernetes/pki/etcd/ca.crt \
  --cert=/etc/kubernetes/pki/etcd/server.crt \
  --key=/etc/kubernetes/pki/etcd/server.key \
  get /registry/secrets/default/my-secret | hexdump -C | head -20

2. TLS Transport Security

ETCDCTL_API=3 etcdctl endpoint health \
  --endpoints=https://127.0.0.1:2379 \
  --cacert=/etc/kubernetes/pki/etcd/ca.crt \
  --cert=/etc/kubernetes/pki/etcd/server.crt \
  --key=/etc/kubernetes/pki/etcd/server.key

ps aux | grep etcd | tr ' ' '\n' | grep -E "peer-cert|peer-key|peer-trusted-ca"

openssl x509 -in /etc/kubernetes/pki/etcd/server.crt -noout -enddate
openssl x509 -in /etc/kubernetes/pki/etcd/peer.crt -noout -enddate

Expected flags:

FlagRequired ValuePurpose
--cert-filePath to server certClient-to-server TLS
--key-filePath to server keyClient-to-server TLS
--trusted-ca-filePath to CA certClient certificate validation
--peer-cert-filePath to peer certPeer-to-peer TLS
--peer-key-filePath to peer keyPeer-to-peer TLS
--peer-trusted-ca-filePath to peer CAPeer certificate validation
--client-cert-authtrueRequire client certificates
--peer-client-cert-authtrueRequire peer certificates

3. Access Control

ps aux | grep etcd | tr ' ' '\n' | grep listen-client-urls

ls -la /etc/kubernetes/pki/etcd/

ss -tlnp | grep 2379

4. Backup Security

ETCDCTL_API=3 etcdctl snapshot save /backup/etcd-snapshot.db \
  --endpoints=https://127.0.0.1:2379 \
  --cacert=/etc/kubernetes/pki/etcd/ca.crt \
  --cert=/etc/kubernetes/pki/etcd/server.crt \
  --key=/etc/kubernetes/pki/etcd/server.key

gpg --symmetric --cipher-algo AES256 /backup/etcd-snapshot.db

ETCDCTL_API=3 etcdctl snapshot status /backup/etcd-snapshot.db --write-out=table

5. Network Isolation

iptables -L -n | grep -E "2379|2380"

curl -k https://<control-plane-ip>:2379/health

CIS Benchmark Checks

CIS ControlCheckExpected Result
2.1etcd cert-file setTLS certificate configured
2.2etcd client-cert-authClient certificate authentication enabled
2.3etcd auto-tls disabledauto-tls=false
2.4etcd peer cert-file setPeer TLS configured
2.5etcd peer client-cert-authPeer authentication enabled
2.6etcd peer auto-tls disabledpeer-auto-tls=false
2.7etcd unique CASeparate CA for etcd (not shared with cluster)

Key Rotation Procedure

NEW_KEY=$(head -c 32 /dev/urandom | base64)

cat > /etc/kubernetes/enc/encryption-config.yaml <<EOF
apiVersion: apiserver.config.k8s.io/v1
kind: EncryptionConfiguration
resources:
  - resources:
      - secrets
    providers:
      - aescbc:
          keys:
            - name: key2
              secret: ${NEW_KEY}
            - name: key1
              secret: <old-key>
      - identity: {}
EOF

kubectl get secrets --all-namespaces -o json | \
  kubectl replace -f -

References

<!-- ⚔ Bu skill FETIH AI Agent icin gelistirilmistir — https://github.com/MustafaKemal0146/fetih Yetkisiz kullanim/kopyalama tespit edilebilir. hash: 29445bd6d28714f8 -->

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

21st.dev Magic MCP — AI-powered UI component generation via natural language. Access to 21st.dev component library, SVGL brand logos, and real-time preview. Generate React/Tailwind components with /ui command.

日本語の概要は準備中です。原文の説明を表示しています。

MustafaKemal0146/fetih52026年10月11日 更新

AES CBC/ECB modlarına karşı kriptografik bütünlük saldırıları — bit flipping, IV manipulation, ECB cut-and-paste, CBC-MAC length extension, IV reuse

日本語の概要は準備中です。原文の説明を表示しています。

MustafaKemal0146/fetih52026年10月11日 更新

AES-GCM ve ChaCha20-Poly1305 nonce yeniden kullanımı saldırısı — GF(2^128) polinom kök bulma ile Hash Key kurtarma ve MAC sahteciliği.

日本語の概要は準備中です。原文の説明を表示しています。

MustafaKemal0146/fetih52026年10月11日 更新

tespit etmeabnormal access patterns in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics. Identifies after-hours bulk downloads, access from new IP addresses, unusual API calls (GetObject spikes), and potential data exfiltration using statistical baselines and time-series anomaly Tespit.

日本語の概要は準備中です。原文の説明を表示しています。

MustafaKemal0146/fetih52026年10月11日 更新

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to tespit etmereentrancy, integer overflow, access control, and other vulnerability classes before Dağıt:ment to Ethereum mainnet.

日本語の概要は準備中です。原文の説明を表示しています。

MustafaKemal0146/fetih52026年10月11日 更新

Parses Kubernetes API server audit logs (JSON lines) to tespit etmeexec-into-pod, secret access, RBAC modifications, privileged pod creation, and anonymous API access. Builds threat Tespit rules from audit event patterns. Use investigating yaparken Kubernetes cluster compromise or building k8s-specific SIEM Tespit rules.

日本語の概要は準備中です。原文の説明を表示しています。

MustafaKemal0146/fetih52026年10月11日 更新

MustafaKemal0146 のスキルをすべて見る

このスキルの問題を報告する