{"id":922,"date":"2018-12-17T05:02:15","date_gmt":"2018-12-17T05:02:15","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw93\/?p=922"},"modified":"2018-12-28T19:39:08","modified_gmt":"2018-12-28T19:39:08","slug":"how-to-monitor-and-secure-containers-in-production","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw93\/index.php\/2018\/12\/17\/how-to-monitor-and-secure-containers-in-production\/","title":{"rendered":"How to Monitor and Secure Containers in Production"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2017\/05\/02160442\/Neuvector-security-300x201.png\" alt=\"\" width=\"522\" height=\"350\" \/><\/p>\n<p>Managing containers requires a broad scope from application development, test, and system OS preparation, and as a result, securing containers can be a<br \/>\nbroad topic with many separate areas. Taking a layered security approach<br \/>\nworks just as well for containers as it does for any IT infrastructure.<br \/>\nThere are many precautions that should be taken before running<br \/>\ncontainers in production.* These include:<\/p>\n<ul>\n<li>Hardening, scanning and signing images<\/li>\n<li>Implementing access controls through management tools<\/li>\n<li>Enable\/switch settings to only use secured communication protocols<\/li>\n<li>Use your own digital signatures<\/li>\n<li>Securing the host, platforms and Docker by hardening, scanning and<br \/>\nlocking down versions<\/li>\n<\/ul>\n<p>*<a href=\"http:\/\/neuvector.com\/container-security-checklist\/\">Download<\/a> \u201c15<br \/>\nTips for Container Security\u201d for a more detailed explanation<\/p>\n<p>But at the end of the day, containers need to run in a production<br \/>\nenvironment where constant vigilance is required to keep them secure. No<br \/>\nmatter how many precautions and controls have been put in place prior to<br \/>\nrunning in production, there is always the risk that a hacker may get<br \/>\nthrough or a malware might try to spread from an internal network. With<br \/>\nthe breaking of applications into microservices, internal<br \/>\n\u2018<a href=\"http:\/\/neuvector.com\/blog\/securing-east-west-traffic-in-container-based-data-center\/\">east-west<\/a>\u2018<br \/>\ntraffic increases dramatically and it becomes more difficult to monitor<br \/>\nand secure traffic. Recent examples include the <a href=\"http:\/\/neuvector.com\/blog\/protect-against-elasticsearch-ransomware-attacks\/\">ransomware<br \/>\nattacks<\/a><br \/>\nwhich can exploit thousands of MongoDB or ElasticSearch servers, include<br \/>\ncontainers, with very simple attack scripts. It\u2019s often reported that<br \/>\nsome serious data leakage or damage also has happened from an internal<br \/>\nmalicious laptop or desktop.<\/p>\n<h4>What is \u2018Run-Time Container Security\u2019?<\/h4>\n<p>Run-time container security focuses on monitoring and securing<br \/>\ncontainers running in a production environment. This includes container<br \/>\nand host processes, system calls, and most importantly, network<br \/>\nconnections. In order to monitor and secure containers during run-time,<\/p>\n<ol>\n<li>Get real-time visibility into network connections.<\/li>\n<li>Characterize application behavior \u2013 develop a baseline.<\/li>\n<li>Monitor for violations or any suspicious activities.<\/li>\n<li>Automatically scan all running containers for vulnerabilities.<\/li>\n<li>Enforce or block without impacting applications and services.<\/li>\n<li>Ensure the security service auto-scales with application containers<\/li>\n<\/ol>\n<h4>Why is it Important?<\/h4>\n<p>Containers can be deployed in seconds and many architectures assume<br \/>\ncontainers can scale up or down automatically to meet demand. This makes<br \/>\nit extremely difficult to monitor and secure containers using<br \/>\ntraditional tools such as host security, firewalls, and VM security. An<br \/>\nunauthorized network connection often provides the first indicator that<br \/>\nan attack is coming, or a hacker is attempting to find the next<br \/>\nvulnerable attack point. But to separate authorized from unauthorized<br \/>\nconnections in a dynamic container environment is extremely difficult.<br \/>\nSecurity veterans understand that no matter how many precautions have<br \/>\nbeen taken before run-time, hackers will eventually find a way in, or<br \/>\nmistakes will lead to vulnerable systems. Here are a few requirements<br \/>\nfor successfully securing containers during run-time:<\/p>\n<ol>\n<li>The security policy must scale as containers scale up or down,<br \/>\nwithout manual intervention<\/li>\n<li>Monitoring must be integrated with or compatible with overlay<br \/>\nnetworks and orchestration services such as load balancers and name<br \/>\nservices to avoid blind spots<\/li>\n<li>Network inspection should be able to accurately identify and<br \/>\nseparate authorized from unauthorized connections<\/li>\n<li>Security event logs must be persisted even when containers are<br \/>\nkilled and no longer visible.<\/li>\n<\/ol>\n<h4>Encryption for Containers<\/h4>\n<p><a href=\"http:\/\/rancher.com\/learn\/business-value-containers\/\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2017\/03\/02163952\/Screen-Shot-2017-03-02-at-3.39.06-PM-150x150.png\" alt=\"\" \/><\/a> A<br \/>\nbusiness guide to effective container app management &#8211; <a href=\"http:\/\/rancher.com\/learn\/business-value-containers\/\">download<br \/>\ntoday\u00a0<\/a>Encryption can be an important layer of a run-time security strategy.<br \/>\nEncryption can protect against stealing of secrets or sensitive data<br \/>\nduring transmission. But it can\u2019t protect against application attacks or<br \/>\nother break outs from a container or host. Security architects should<br \/>\nevaluate the trade-offs between performance, manageability, and security<br \/>\nto determine which, if any connections should be encrypted. Even if<br \/>\nnetwork connections are encrypted between hosts or containers, all<br \/>\ncommunication should be monitored at the network layer to determine if<br \/>\nunauthorized connections are being attempted.<\/p>\n<h4>Getting Started with Run-Time Container Security<\/h4>\n<p>You can try to start doing the actions above manually or with a few open<br \/>\nsource tools. Here\u2019s some ideas to get you started:<\/p>\n<ul>\n<li>Carefully configure VPC\u2019s and security groups if you use AWS\/ECS<\/li>\n<li>Run the CIS Docker Benchmark and Docker Bench test tool<\/li>\n<li>Deploy and configure monitoring tools like Prometheus or Splunk for<br \/>\nexample<\/li>\n<li>Try to configure the network using tools from Kubernetes or<br \/>\nWeaveworks for basic network policies<\/li>\n<li>Load and configure container network plugins from Calico, Flannel or<br \/>\nTigera for example<\/li>\n<li>If needed, use and configure SECCOMP, AppArmor, or SELinux<\/li>\n<li>Adopt the new LinuxKit which has Wireguard, Landlock, Mirage and<br \/>\nother tools built-in<\/li>\n<li>Run tcpdump and Wireshark on a container to diagnose network<br \/>\nconnections and view suspicious activity<\/li>\n<\/ul>\n<p>But often you\u2019ll find that there\u2019s too much glue you have to script to<br \/>\nget everything working together. The good news is that there is a<br \/>\ndeveloping ecosystem of container security vendors, my company NeuVector<br \/>\nincluded, which can provide solutions for the various tasks above. It\u2019s<br \/>\nbest to get started evaluating your options now before your containers<br \/>\nactually go into production. But if that ship has sailed make sure a<br \/>\nsecurity solution will layer nicely on a container deployment already<br \/>\nrunning in production without disrupting it. Here are 10 important<br \/>\ncapabilities to look for in run-time security tools:<\/p>\n<ol>\n<li>Discovery and visualization of containers, network connections, and<br \/>\nsystem services<\/li>\n<li>Auto-creation and adapting whitelist security policies to decrease<br \/>\nmanual configuration and increase accuracy<\/li>\n<li>Ability to segment applications based on layer 7 (application<br \/>\nprotocol), not just layer 3 or 4 network policies<\/li>\n<li>Threat protection against common attacks such as DDoS and DNS<br \/>\nattacks<\/li>\n<li>Ability to block suspicious connections without affecting running<br \/>\ncontainers, but also the ability to completely quarantine a<br \/>\ncontainer<\/li>\n<li>Host security to detect and prevent attacks against the host or<br \/>\nDocker daemon<\/li>\n<li>Vulnerability scanning of new containers starting to run<\/li>\n<li>Integration with container management and orchestration systems to<br \/>\nincrease accuracy and scalability, and improve visualization and<br \/>\nreporting<\/li>\n<li>Compatible and agnostic to virtual networking such as overlay<br \/>\nnetworks<\/li>\n<li>Forensic capture of violations logs, attacks, and packet captures<br \/>\nfor suspicious containers<\/li>\n<\/ol>\n<p>Today, containers are being deployed to production more frequently for<br \/>\nenterprise business applications. Often these deployments have<br \/>\ninadequate pre-production security controls, and non-existent run-time<br \/>\nsecurity capabilities. It is not necessary to take this level of risk to<br \/>\nimportant business critical applications when container security tools<br \/>\ncan be deployed as easily as application containers, using the same<br \/>\norchestration tools as well. <em>Fei Huang is Co-Founder and CEO of<br \/>\nNeuVector. He has over 20 years of experience in enterprise security,<br \/>\nvirtualization, cloud and embedded software. He has held engineering<br \/>\nmanagement positions at VMware, CloudVolumes, and Trend Micro and was<br \/>\nthe co-founder of DLP security company Provilla. Fei holds several<br \/>\npatents for security, virtualization and software architecture.<\/em><\/p>\n<p><a href=\"https:\/\/rancher.com\/monitor-secure-containers-production\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Managing containers requires a broad scope from application development, test, and system OS preparation, and as a result, securing containers can be a broad topic with many separate areas. Taking a layered security approach works just as well for containers as it does for any IT infrastructure. There are many precautions that should be taken &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw93\/index.php\/2018\/12\/17\/how-to-monitor-and-secure-containers-in-production\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Monitor and Secure Containers in Production&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-922","post","type-post","status-publish","format-standard","hentry","category-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/comments?post=922"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/922\/revisions"}],"predecessor-version":[{"id":972,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/922\/revisions\/972"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/media?parent=922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/categories?post=922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/tags?post=922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}