相关文章推荐
玉树临风的山羊  ·  中国规模最大,最著名的十大博物馆|三星堆博物 ...·  11 月前    · 
朝气蓬勃的豌豆  ·  超声波与次声波的区别振动筛用那种声波·  1 年前    · 
力能扛鼎的火龙果  ·  ChatGPT再出“王炸”,客服都要下岗了? ...·  1 年前    · 
一身肌肉的茄子  ·  化学教育·  2 年前    · 
忧郁的火腿肠  ·  米高梅影业的《机械战警》、《星际之门》等将迎 ...·  2 年前    · 
小百科  ›  IDENTITY IMPERSONATE - KubeHound
没有腹肌的八宝粥
5 月前

Details

Obtaining the impersonate users/groups permission will allow an attacker to execute K8s API actions on behalf of another user, including those with cluster-admin rights, and other highly privileged users.

Prerequisites

Ability to interrogate the K8s API with a role allowing impersonate access to users and/or groups.

See the example pod spec .

Checks

Simply ask kubectl:

kubectl auth can-i impersonate users
kubectl auth can-i impersonate groups

Exploitation

Execute any action in the K8s API impersonating a privileged group (e.g system:masters) or user using the syntax:

$ kubectl <verb> <noun> -as=null -as-group=system:masters -o json | jq

Defences

Monitoring

  • Monitoring the follow-on activity from user impersonation may be a more fruitful endeavour.
  • Implement least privilege access

    Impersonating users is a very powerful privilege and should not be required by the majority of users. Use an automated tool such a KubeHound to search for any risky permissions and users in the cluster and look to eliminate them.

    Calculation

  • IdentityImpersonate
  • IdentityImpersonateNamespace
  • References:

  • Official Kubernetes Documentation: Authenticating
  • Securing Kubernetes Clusters by Eliminating Risky Permissions
  •  
    推荐文章
    玉树临风的山羊  ·  中国规模最大,最著名的十大博物馆|三星堆博物馆新馆|中国|南京 ...
    11 月前
    朝气蓬勃的豌豆  ·  超声波与次声波的区别振动筛用那种声波
    1 年前
    力能扛鼎的火龙果  ·  ChatGPT再出“王炸”,客服都要下岗了?-虎嗅网
    1 年前
    一身肌肉的茄子  ·  化学教育
    2 年前
    忧郁的火腿肠  ·  米高梅影业的《机械战警》、《星际之门》等将迎来亚马逊的重启 ...
    2 年前
    今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
    删除内容请联系邮箱 2879853325@qq.com
    小百科 - 百科知识指南
    © 2024 ~ 沪ICP备11025650号