k8s默认seccomp禁用研究

CVE-2022-0185 in Linux Kernel Can Allow Container Escape in s

root@ubutest2:/# pscap -a
ppid pid   name       command           capabilities
0     1     root       bash             chown, dac_override, fowner, fsetid, kill, setgid, setuid, setpcap, net_bind_service, net_raw, sys_chroot, mknod, audit_write, setfcap
root@ubutest2:/# unshare -r
# pscap -a
ppid pid   name       command           capabilities
0     1     root       bash             chown, dac_override, fowner, fsetid, kill, setgid, setuid, setpcap, net_bind_service, net_raw, sys_chroot, mknod, audit_write, setfcap
1     270   root       sh               full

实践

通过下面命令启动一个容器

apiVersion: v1
kind: Pod
metadata:
  name: hello-apparmor
  annotations:
    # Tell Kubernetes to apply the AppArmor profile "k8s-apparmor-example-deny-write".
    # Note that this is ignored if the Kubernetes node is not running version 1.4 or greater.
    container.apparmor.security.beta.kubernetes.io/hello: unconfined
spec:
  containers:
  - name: hello
    image: busybox:1.28
    command: [ "sh", "-c", "echo 'Hello AppArmor!' && sleep 1h" ]

相关推荐

  1. k8s默认seccomp禁用研究

    2024-01-30 14:38:01       36 阅读
  2. 关于k8s中 storageclass 的 is-default-sc 默认存储设置

    2024-01-30 14:38:01       19 阅读
  3. k8s学习

    2024-01-30 14:38:01       33 阅读
  4. <span style='color:red;'>K</span><span style='color:red;'>8</span><span style='color:red;'>s</span>基础

    K8s基础

    2024-01-30 14:38:01      39 阅读
  5. <span style='color:red;'>k</span><span style='color:red;'>8</span><span style='color:red;'>s</span>-Pod

    k8s-Pod

    2024-01-30 14:38:01      34 阅读
  6. 学习<span style='color:red;'>k</span><span style='color:red;'>8</span><span style='color:red;'>s</span>

    学习k8s

    2024-01-30 14:38:01      31 阅读
  7. K8s 教程

    2024-01-30 14:38:01       48 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-30 14:38:01       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-30 14:38:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-30 14:38:01       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-30 14:38:01       20 阅读

热门阅读

  1. 【算法】传纸条(动态规划)

    2024-01-30 14:38:01       38 阅读
  2. oracle分区范围修改与数据迁移处理

    2024-01-30 14:38:01       32 阅读
  3. 数据结构-排序

    2024-01-30 14:38:01       51 阅读
  4. 消息队列和Kafka

    2024-01-30 14:38:01       27 阅读
  5. Spring 注解详情

    2024-01-30 14:38:01       42 阅读
  6. 学fpga和还是嵌入式?

    2024-01-30 14:38:01       40 阅读
  7. Chrome 121 释出

    2024-01-30 14:38:01       36 阅读