|
| 1 | +# Don't be Famous Study Group |
| 2 | + |
| 3 | +## Part 1: Introduction: |
| 4 | +Famous breaches |
| 5 | +Tesla Cloud Resources Are Hacked To Run Cryptocurrency Mining Malware |
| 6 | +https://arstechnica.com/information-technology/2018/02/tesla-cloud-resources-are-hacked-to-run-cryptocurrency-mining-malware/ |
| 7 | +Shopify |
| 8 | +https://www.eweek.com/security/how-shopify-avoided-a-data-breach-thanks-to-a-bug-bounty |
| 9 | +Legacy Security |
| 10 | +Physical Access |
| 11 | +Network Perimeter |
| 12 | +Updated Machines |
| 13 | +Workload Isolation |
| 14 | +Could be Dev, Staging and production. Could also be separating production environments. |
| 15 | + |
| 16 | +## Part 2: Security through Architecture |
| 17 | +https://kubernetes.io/blog/2018/07/18/11-ways-not-to-get-hacked/#1-tls-everything |
| 18 | +Everywhere that can be TLS should be TLS inside the cluster. |
| 19 | +Worker nodes should never have access to etcd for any reason. |
| 20 | +Even Better, Etcd should be completely separate from the controls and firewall-ed. |
| 21 | +Upgrades |
| 22 | +Upgrade in place |
| 23 | +Lower infrastructure cost |
| 24 | +More “dangerous” |
| 25 | +Configuration Drift |
| 26 | +External Access is Easier |
| 27 | +Stand up a new cluster |
| 28 | +Higher infrastructure cost |
| 29 | +Less “dangerous” |
| 30 | +Immutable Clusters |
| 31 | +External Access is harder. |
| 32 | +Command to know: |
| 33 | +https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/ |
| 34 | +kubectl cordon |
| 35 | +kubectl drain |
| 36 | + |
| 37 | +Projects to know: |
| 38 | +Velero (arc) – backups and restores for k8s objects |
| 39 | + |
| 40 | +## Part 3: RBAC |
| 41 | +RBAC relies on a series of well defined and standard concepts that are commonly found in all implementations. |
| 42 | + |
| 43 | +Subjects – A person, agent or group |
| 44 | +Roles- A role is made of a set of permissions (an approval of a mode of access to a resource) |
| 45 | +Assignments – Role assignment grants a subject right to execute a transaction by assigning to the subject an active role |
| 46 | +Kubernetes has Role and Cluster Roles |
| 47 | +Using RBAC Authorizaiton |
| 48 | +https://kubernetes.io/docs/reference/access-authn-authz/rbac/ |
| 49 | +Authorization Overview |
| 50 | +https://kubernetes.io/docs/reference/access-authn-authz/authorization/ |
| 51 | +Roles are defined at the Kubernetes namespace level. |
| 52 | +Batteries Included |
| 53 | +Cluster-Admin |
| 54 | +Admin |
| 55 | +Edit |
| 56 | +View |
| 57 | +Role Sprawl Insanity |
| 58 | +Use groups |
| 59 | +Tools that help : |
| 60 | +Dex |
| 61 | +https://github.com/dexidp/dex/blob/master/Documentation/kubernetes.md |
| 62 | +https://github.com/dexidp/dex |
| 63 | +Gangway |
| 64 | +https://github.com/heptiolabs/gangway |
| 65 | + |
| 66 | +## Part 4: “Policies” |
| 67 | +Network Policy |
| 68 | +Default is ALLOW ALL ANYWHERE |
| 69 | +Remember network plugins |
| 70 | +http://github.com/ahmetb/kubernetes-network-policy-recipes |
| 71 | +Pod Security Policy |
| 72 | +Runs on the cluster as an admission controller. |
| 73 | +Linked to RBAC roles |
| 74 | +RBAC defines what policies users have access to. |
| 75 | +Permissive vs Restricted |
| 76 | +Default |
| 77 | +Kube-System |
| 78 | +Networking |
| 79 | + |
| 80 | + |
| 81 | +## Part 5: Audit Everything |
| 82 | +https://kubernetes.io/docs/tasks/debug-application-cluster/audit/ |
| 83 | +API Server will log ALL REQUEST for auditing purpose |
| 84 | +Audit logs can be VERY NOISY, so you only log what you need. |
| 85 | +Stages of a Request to the API server |
| 86 | +RequestReceived |
| 87 | +ResponseStated |
| 88 | +ResponseComplete |
| 89 | +Panic |
| 90 | +Audit log levels |
| 91 | +None |
| 92 | +Metadata |
| 93 | +Requests |
| 94 | +RequestResponse |
| 95 | + |
| 96 | + |
| 97 | +## Closing: |
| 98 | +Previous Study groups |
| 99 | +[History of Linux](https://youtu.be/qJ1CrzLS7Ak) |
| 100 | +[Ansible](https://youtu.be/0WfYpWl01VQ) |
| 101 | +[Command Line Threat Hunting](https://youtu.be/jy9SAUHEWdU) |
| 102 | +[Feedback form](https://forms.gle/oXAa1VYjsJJBsZD78) |
| 103 | +[Free k8s courses](https://linuxacademy.com/blog/linux-academy/freemay2019/) |
| 104 | +[Hearts twitter](@hhover) |
0 commit comments