LoFP
/
kubernetes
kubernetes rule
Title
Tags
a misconfigured rbac policy, a mistake by a valid user, or a wider issue with authentication tokens can also generate these errors.
kubernetes
sigma
an administrator may need to attach a hostpath volume for a legitimate reason. this alert should be investigated for legitimacy by determining if the kuberenetes.audit.requestobject.spec.volumes.hostpath.path triggered is one needed by its target container/pod. for example, when the fleet managed elastic agent is deployed as a daemonset it creates several hostpath volume mounts, some of which are sensitive host directories like /proc, /etc/kubernetes, and /var/log. add exceptions for trusted container images using the query field \"kubernetes.audit.requestobject.spec.container.image\"
T1610
t1611
kubernetes
elastic
an administrator may need to exec into a pod for a legitimate reason like debugging purposes. containers built from linux and windows os images, tend to include debugging utilities. in this case, an admin may choose to run commands inside a specific container with kubectl exec ${pod_name} -c ${container_name} -- ${cmd} ${arg1} ${arg2} ... ${argn}. for example, the following command can be used to look at logs from a running cassandra pod: kubectl exec cassandra --cat /var/log/cassandra/system.log . additionally, the -i and -t arguments might be used to run a shell connected to the terminal: kubectl exec -i -t cassandra -- sh
t1059
t1609
_deprecated
kubernetes
elastic
an administrator may submit this request as an \"impersonateduser\" to determine what privileges a particular service account has been granted. however, an adversary may utilize the same technique as a means to determine the privileges of another token other than that of the compromised account.
T1613
kubernetes
elastic
an administrator or developer may want to use a pod that runs as root and shares the host's ipc, network, and pid namespaces for debugging purposes. if something is going wrong in the cluster and there is no easy way to ssh onto the host nodes directly, a privileged pod of this nature can be useful for viewing things like iptable rules and network namespaces from the host's perspective. add exceptions for trusted container images using the query field \"kubernetes.audit.requestobject.spec.container.image\"
T1610
t1611
kubernetes
elastic
anonymous access to the api server is a dangerous setting enabled by default. common anonymous connections (e.g., health checks) have been excluded from this rule. all other instances of authorized anonymous requests should be investigated.
t1078
kubernetes
elastic
automated processes may need to take these actions and may need to be filtered.
t1078
t1552
t1552.007
kubernetes
sigma
by default a container is not allowed to access any devices on the host, but a \"privileged\" container is given access to all devices on the host. this allows the container nearly all the same access as processes running on the host. an administrator may want to run a privileged container to use operating system administrative capabilities such as manipulating the network stack or accessing hardware devices from within the cluster. add exceptions for trusted container images using the query field \"kubernetes.audit.requestobject.spec.container.image\"
T1610
t1611
kubernetes
elastic
controller service accounts aren't normally assigned to running pods, this is abnormal behavior with very few legitimate use-cases and should result in very few false positives.
t1078
kubernetes
elastic
developers may have a legitimate use for nodeports. for frontend parts of an application you may want to expose a service onto an external ip address without using cloud specific loadbalancers. nodeport can be used to expose the service on each node's ip at a static port (the nodeport). you'll be able to contact the nodeport service from outside the cluster, by requesting <nodeip>:<nodeport>. nodeport unlike loadbalancers, allow the freedom to set up your own load balancing solution, configure environments that aren't fully supported by kubernetes, or even to expose one or more node's ips directly.
t1133
kubernetes
elastic
kubectl calls are not malicious by nature. however source ip, verb and object can reveal potential malicious activity, specially anonymous suspicious ips and sensitive objects such as configmaps or secrets
kubernetes
splunk
legitimate debugging activity. investigate the identity performing the requests and their authorization.
t1609
kubernetes
sigma
modifying a kubernetes job or cronjob may need to be done by a system administrator.
kubernetes
sigma
modifying a kubernetes rolebinding may need to be done by a system administrator.
kubernetes
sigma
modifying the kubernetes admission controller may need to be done by a system administrator.
t1078
t1552
t1552.007
kubernetes
sigma
some container images require the addition of privileged capabilities. this rule leaves space for the exception of trusted container images. to add an exception, add the trusted container image name to the query field, kubernetes.audit.requestobject.spec.containers.image.
T1610
t1611
kubernetes
elastic
system components such as daemon-set-controller and kube-scheduler also create pods in the kube-system namespace
t1036
t1036.005
kubernetes
sigma
the daemonset controller creates pods with hostpath volumes within the kube-system namespace.
t1611
kubernetes
sigma
the kubernetes dashboard occasionally accesses the kubernetes-dashboard-key-holder secret
t1552
t1552.007
kubernetes
sigma
unauthorized requests from service accounts are highly abnormal and more indicative of human behavior or a serious problem within the cluster. this behavior should be investigated further.
T1613
kubernetes
elastic
unknown
t1003
t1003.001
t1003.002
t1003.003
t1003.004
t1003.006
t1005
t1008
t1010
t1012
t1018
t1020
t1021
t1021.001
t1021.002
t1021.003
t1021.005
t1021.006
t1027
t1027.001
t1027.003
t1027.004
t1027.005
t1027.009
t1027.010
t1033
t1036
t1036.003
t1036.005
t1036.007
t1040
t1046
t1047
t1048
t1048.003
t1049
t1053
t1053.002
t1053.005
t1055
t1055.001
t1055.003
t1055.009
t1055.011
t1055.012
t1056
t1056.001
t1057
t1059
t1059.001
t1059.002
t1059.003
t1059.004
t1059.005
t1059.006
t1059.007
t1068
t1069
t1069.001
t1069.002
t1069.003
t1070
t1070.003
t1070.004
t1070.005
t1070.006
t1071
t1071.001
t1071.004
t1072
t1074
t1074.001
t1078
t1078.001
t1078.003
t1078.004
t1082
t1083
t1087
t1087.001
t1087.002
t1087.004
t1090
t1090.001
t1090.003
t1095
t1098
t1102
t1102.001
t1102.003
t1104
t1105
t1106
t1110
t1110.001
t1112
t1113
t1114
t1114.001
t1115
t1119
t1123
t1127
t1127.001
t1133
t1134
t1134.001
t1134.002
t1134.003
t1135
t1136
t1136.001
t1136.002
t1137
t1137.002
t1137.006
t1140
t1176
t1176.001
t1185
t1187
t1190
t1195
t1195.001
t1197
t1199
t1200
t1201
t1202
t1203
t1204
t1204.001
t1204.002
t1204.004
t1207
t1210
t1211
t1212
t1216
t1216.001
t1217
t1218
t1218.001
t1218.002
t1218.003
t1218.005
t1218.007
t1218.009
t1218.010
t1218.011
t1218.013
t1219
t1219.002
t1220
t1222
t1222.001
t1482
t1484
t1485
t1486
t1489
t1490
t1491
t1491.001
t1497
t1497.001
t1498
t1499
t1499.004
t1505
t1505.003
t1505.004
t1518
t1518.001
t1526
t1528
t1529
t1531
t1537
t1539
t1543
t1543.001
t1543.003
t1543.004
t1546
t1546.001
t1546.002
t1546.003
t1546.007
t1546.008
t1546.009
t1546.010
t1546.011
t1546.012
t1546.015
t1547
t1547.001
t1547.003
t1547.004
t1547.005
t1547.006
t1547.008
t1547.009
t1547.010
t1548
t1548.001
t1548.002
t1552
t1552.001
t1552.002
t1552.004
t1552.006
t1553
t1553.004
t1555
t1555.003
t1555.004
t1555.005
t1556
t1556.002
t1557
t1557.001
t1557.003
t1558
t1558.003
t1559
t1559.001
t1559.002
t1560
t1560.001
t1562
t1562.001
t1562.002
t1562.004
t1562.006
t1563
t1563.002
t1564
t1564.001
t1564.002
t1564.003
t1564.004
t1565
t1566
t1566.001
t1566.002
t1567
t1567.002
t1569
t1569.002
t1571
t1572
t1573
t1574
t1574.001
t1574.005
t1574.006
t1574.008
t1574.011
t1584
t1587
t1587.001
t1588
t1588.001
t1588.002
t1589
t1593
t1593.003
t1595
t1595.002
t1608
t1609
t1611
t1615
t1621
t1649
linux
gcp
okta
onelogin
azure
aws
m365
macos
rpc_firewall
kubernetes
qualys
zeek
cisco
windows
sigma