Upgrade to Pro — share decks privately, control downloads, hide ads and more …

絵ではじめるKubernetesセキュリティ

Avatar for Aoi Takahashi Aoi Takahashi
September 16, 2026

 絵ではじめるKubernetesセキュリティ

2026-09-16 Kubernetes祭り #2
で登壇したときの資料です

Avatar for Aoi Takahashi

Aoi Takahashi

September 16, 2026

More Decks by Aoi Takahashi

Other Decks in Technology

Transcript

  1. 目次 • 知っている人も多そう ◦ Secret、RBAC、Service Account • 名前は知っているかな ◦ PSS、PSA、Admission

    Controller ◦ Network Policy ◦ gVisor ◦ trivy • 使い方わからない... ◦ kube-bench、Falco、AppArmor
  2. Admission Controller • • Kubernetesのリクエストをインターセプトする仕組み 設定は2種類 ◦ Validation : 設定を拒否する

    ◦ Mutation: 設定を追記修正する apiVersion: apps/v1 kind: Deployment … spec: hostPID: true containers: - name: kubecon-shopping securityContext: privileged: true … Validation Not created … spec: hostPID: false … securityContext: privileged: false … Mutation corrected and created
  3. Network Policy • Pod間通信を制御する apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name:

    test-network-policy namespace: default spec: podSelector: matchLabels: role: db policyTypes: - Ingress - Egress ingress: - from: - podSelector: matchLabels: role: frontend ports: - protocol: TCP port: 6379 egress: - to: - ipBlock: cidr: 10.0.0.0/24 ports: - protocol: TCP port: 5978
  4. Falkey • ランタイムセキュリティツール • Linuxカーネルイベント等にカスタムルールを適用し、コン テキストを付加してリアルタイムアラートを出力する カスタムルールの例 - rule: Create

    Symlink Over Sensitive Files desc: > Detect symlinks created over a curated list of sensitive files or subdirectories under /etc/ or root directories. Can be customized as needed. Refer to further and equivalent guidance within the rule "Read sensitive file untrusted". condition: > create_symlink and (evt.arg.target in (sensitive_file_names) or evt.arg.target in (sensitive_directory_names)) output: Symlinks created over sensitive files | target=%evt.arg.target linkpath=%evt.arg.linkpath evt_type=%evt.type user=%user.name user_uid=%user.uid user_loginuid=%user.loginuid process=%proc.name proc_exepath=%proc.exepath parent=%proc.pname command=%proc.cmdline terminal=%proc.tty priority: WARNING tags: [maturity_stable, host, container, filesystem, mitre_credential_access, T1555]