Container Security is just one of seven solutions that make up Trend Micro Cloud One, a security services platform for developers building cloud-native applications, designed to simplify workflow and detect vulnerabilities. It provides security for your containers on the following stages of their lifecycle:
At deployment: Policy-based deployment control ensures that container images are run only when they meet the security criteria that you define.
After deployment: Continuous compliance allows you to intermittently scan your containers after they are deployed.
At runtime: Runtime security provides visibility into any container activity that violates a customizable set of rules.
TrendMicroDevSecOpsWorkshop
A EKS Cluster for the Trend Micro DevSecOps Workshop
Note that this information will not be visible again.
Policies define the rules that are used to control what is allowed to run in your Kubernetes cluster.
In the Cluster-Wide Policy Definition area, configure the rules that you want to enforce with this policy. There are three tabs, corresponding to three different types of rules:
TrendMicroDevSecOpsWorkshopRules
Rulesets for the EKS Cluster used in the Trend Micro DevSecOps Workshop
Check the CheckBox for the rule - (T1610)Launch Privileged Container
Check the CheckBox for the rule - (T1041)Interpreted procs inbound network activity
Click on the blue button Apply
Keep both of them as Log in Mitigation
Click on the blue button Save
TrendMicroDevSecOpsWorkshopPolicy
Policy for the EKS Cluster used in the Trend Micro DevSecOps Workshop
Container Properties - privileged containers - SET TO BLOCK
Container Properties - containers with privilege escalation rights - SET TO LOG
Container Properties - containers that can write to the root filesystem - SET TO LOG
Click on the blue button Save
Continuing in the Deployment tab check the CheckBox for the fields:
Kubectl Access - attempts to execute in/attach to a container - SET TO LOG
Kubectl Access - attempts to establish port-forward on a container - SET TO LOG
Click on the blue button Save
Container properties - privileged containers - SET TO ISOLATE
Click on the blue button Save
Click on the blue button +Add Ruleset
In the search box, search for and select the Ruleset we created earlier TrendMicroDevSecOpsWorkshopRules
Click on the blue button Apply
Click on the button Save
cd ..
touch overrides.yaml
code overrides.yaml
to open the fileDon't forget to put your ApiKey on the line with the name apiKey: your_api_key_here. And replace {cloud_one_region} bellow with the region of your Cloud One Account.
CLICK HERE
to check the region of your Trend Micro Cloud OneLogin into your Trend Micro Cloud One Account-> User Management -> Account Settings -> Region
cloudOne:
apiKey: your_api_key_here
endpoint: https://container.cloud_one_region_here.cloudone.trendmicro.com
runtimeSecurity:
enabled: true
exclusion:
namespaces: [ kube-system, calico-system ]
Paste the following in the terminal
helm install \
trendmicro \
--namespace trendmicro-system --create-namespace \
--values overrides.yaml \
https://github.com/trendmicro/cloudone-container-security-helm/archive/master.tar.gz
If you see an error " helm: command not found " please install helm by using the commands below, then Re-Run the command above.
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
kubectl get pods --namespace=trendmicro-system
cd pygoat-tm/
enter the pygoat directory againkubectl delete deployment pygoat-deploy
to delete the privileged containerskubectl get pods
to check if the pods were deleted kubectl apply -f pygoat-deployment.yaml
kubectl apply -f pygoat-deployment.yaml
to deploy again the app to EKSIn this pod definition, we do not have the securityContext set to privileged = true anymore. So, this policy that we'll create now will not be blocked because we are not deploying privileged containers.
kubectl get pods
kubectl get svc
http://###:8000/