How To Achieve Container Security Best Practice - Bitpipe

Transcription

E-guideHow to achievecontainer securitybest practice

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withIn this e-guide:The adoption of containers in the enterprise promises greatorganisational efficiency advantages, but as with any fastevolving technology, their implementation brings newchallenges to cyber security teams for a number of reasons.In a recent series of articles, Computer Weekly’s long-runningSecurity Think Tank assessed some of the issues around thistricky problem and sought to answer the question, what doCISOs need to know to secure containers?good DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 1 of 32In this e-guide, we will explore some of their thoughts. First, PAConsulting experts Alan Taberham and Niall Quinn set out theirideas on what container security best practice looks like, whilethe British Computer Society’s (BCS’s) Petra Wenham weighsin on how the evolution of container security means CISOsmust evolve their thinking, too.Then, Paddy Francis of Airbus Cyber Security outlines howgood container security practice begins with good DevOps

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 2 of 32practice, while Paul Holland of the Information Security Forum(ISF) argues in favour of embedding security-by-design as earlyas possible in the development process, and TurnkeyConsulting’s Andrew Morris shows us why with a littleforethought, securing containers need not be too taxing.Finally, we go in-depth on the relationship between zero-trustcyber security models and containers, calling on multipleexperts to find out why how to apply zero-trust models tocontainers, and why the two make excellent bedfellows.Alex Scroxton, Security Editor

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingSecurity Think Tank: Four steps tocontainer security best practiceAlan Taberham and Niall QuinnContainer concepts began in Linux systems and were made mainstream byDocker in 2013, which launched containerisation into the global developercommunity. Advances in the orchestration layer continue to mature and broadencontainer capabilities – especially within the hyperscale cloud supplier platformsand microservice architecture, such as Netflix or Paypal.For CISOs looking to help their business safely adopt or continue to use thistechnology, they must ensure they are equipped to deal with the threats andrisks they present. The resultant growth in the complexity and size of IT estateis not unique to containers, but there are four areas a CISO should beconsidering:1. Ensure a code pipeline mentality within the security team, usingDevSecOps to keep pace and avoid being overwhelmed with manualrebuildsHow to apply zero-trustmodels to container securityPage 3 of 32Patching a containerised application, external dependencies and the applicationcode, requires an update to the base image and a recreation and redeployment

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 4 of 32of the container. Maintaining the implementation of updates is critical andensuring security experts are part of your developer teams is key to staying ontop of this challenge.As with any DevSecOps pipeline, you should also take precautions aroundleaking hard-coded credentials which are embedded within the containerimages, scanning for vulnerabilities and determining the level of trust in thedependencies packaged with the software. All these activities that help improvethe detection of vulnerabilities save the organisation money. Also, don’t forgetthat in order to patch, you need to be able to replace, stop and restart acontainer.2. Implement configuration management and security tools that can copewith the scaleEffective configuration management is crucial. Orchestration services(Kubernetes, AWS Elastic/Azure Container Service), container nativeconfiguration management databases (CMDBs) such as ConfigurationManagement by MicroFocus, and a labelling/tagging policy for containers assistwith these challenges. Organisations also require a parallel approach formanaging the networking security, logging, host OS and container security.You need a way to protect containers from threats both outside and within yourcontainer ecosystem. A macro-level method is to deploy risk zones (or pods, inDocker language) where containers can freely talk to each other within that

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withzone, but have firewall rules on the boundary of the zone. A micro-level methodis to deploy agents with the container image to allow dynamic updates or buildfirewall rules into the CI/CD pipeline. Either method needs a standardisedapproach across the IT estate, coupled with automated compliance reporting.3. Implement container resource controls, and host blast radiusprotectionsAvailability and scalability are two reasons why organisations have adoptedcontainerisation technology. This presents governance challenges and the needfor effective resource management. Applying resource limits to hosts willincrease container capacity and allow for performance increases, resulting inreduced running costs and security risks.good DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 5 of 32Embedding host protection resource management controls within any containerarchitecture will reduce configuration vulnerabilities and critical risks such asKernel Panic, which can crash hosts and subsequent containers.Deploying containers in the cloud allows organisations to simplify many securitychallenges that would otherwise require more manual processes – hostmanagement, easier security mechanisms, automation and scaling. You cansignificantly reduce the impact radius and overall response times to securityincidents with automated actions and alerts to developers and the necessarysecurity teams.

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securityA concern for anyone deploying container-hosted applications is the risk of anattacker gaining access to the underlying container infrastructure through avulnerable application. Management of container privileges, and having a policyon principle of least privilege, is a simple but effective way to reduce this riskand prevent root-level access in the event that an application is exploited.best practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 6 of 32For all organisations with containerised environments, it is vital to keep an upto-date risk register covering all potential security risks. This enables essentialsecurity teams to monitor and develop underlying issues that could lead to asecurity breach.4. Apply the best practice cyber security guidanceThe most likely route of attacks and incidents is where fundamental and basicprinciples are not followed. This is often the result of outdated or non-existentdisaster recovery and failover plans, which mean incidents are poorly managedand the organisation fails to recognise that tried and tested procedures are avital resource in incidents where there are time pressures.The NIST 800-190 Application container security guide provides best practiceon dealing with the most common threats, including: Major risks for core components of container technologies.Countermeasures for major risks.Container threat scenario examples.Container technology lifecycle security considerations.

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 7 of 32By automating where possible and developing a strong cyber security culture,containers provide the capability to develop a security architecture thatresponds to business development and enables you to keep on top of the everincreasing regulatory burden. By thinking about these four areas, you can putthe necessary safeguards into place and make best use of containers to supportyour business and security objectives.Alan Taberham and Niall Quinn are cyber security experts at PA Consulting.

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 8 of 32Security Think Tank: Container security isevolving, so must CISOsPetra Wenham,A number of articles on containerisation have been published over the pastcouple of years. I wrote one on Linux implementations in January 2019, butsince that time, Microsoft has been flexing its muscles in that area and therehave been a number of new entrants.Prior to containerisation, the only option was to virtualise the server hardware,and in the process create multiple versions of the hardware – each virtual serverthen needed to run its own licensed operating system. In containerisation, ratherthan virtualise a host server’s hardware, you essentially virtualise a server’soperating system (OS). This, in turn, can lead to greater efficiency in an ITinfrastructure as containers are much smaller than a virtual server running itsown OS.In earlier containerisation, the containers were operating system dependant, soa container written for a Linux distribution would not run on a Microsoft system,for example. However, things have moved on apace, and you now can get OSvirtualisation software that is not only available for different OS platforms, but

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 9 of 32offers a common and consistent set of container support functions, such asapplication programming interfaces (APIs).In this way, containers become portable between differing OS platforms. Youcan, of course, run containerisation on virtualised servers, and typically that iswhat you would get when running IT in the cloud.Life is getting quite complex for the chief information security officer (CISO),with containers running on virtualised servers potentially in a cloud supplier’sremote datacentre. The question is, how does the CISO safeguard thecompany’s data? It’s back to basics, together with a realisation that we aredealing with multiple layers of software. The CISO’s job therefore includes, as amain function, ensuring the basics are in place and being adhered to. Thosebasics can be summarised as: Having formal policies, procedures, standards and work practicedocumentation in place. These should be easy to access (intranet, forexample) and regularly maintained to ensure that:o The latest vendor-supported software or firmware is beingemployed, not only at the OS level but at the virtualisation level,server hardware and application level, where appropriate;o All software is routinely patched, with security patches applied asa priority;o All software is configured, not just for function and performance,but also for good security;o Staff are trained and competent not only to undertake effectiveconfiguration of the various levels of software, but also to

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practice Security Think Tank:Container security is evolving,so must CISOs Security Think Tank:Container security starts with good DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 10 of 32understand the interaction between the various software levels –for example, server hardware BIOS, virtualising server hypervisor,server operating system, OS virtualising software and thecontainers themselves;o That comprehensive monitoring and management systems are inplace together with incident reporting, investigation, managementand resolution processes.Having audit mechanisms in place to regularly check that the policies,procedures, standards and work practices comply with companygovernance and compliance requirements, are being used and are fit forpurpose.Ensuring that all systems are regularly and independently checked byexternal professional companies for security, not only from the internet,but also at the infrastructure and server level.Where some or a majority of a company’s IT is outsourced, the CISOmust ensure that:o Contracts accurately reflect a company’s policies and standards,and appropriately addresses a company’s governance andcompliance requirements. The company must have these as acompany cannot outsource its compliance responsibility (forexample, the General Data Protection Regulation and the DataProtection Act 2018);o Security is covered in contracts in detail;o The contract allows for independent testing of the company’soutsourced IT;o The interface between the outsourcer and the company is clearlyidentified and covers not just operation and management issues,but also has a clear definition of which party is responsible forwhat functions. This is particularly important for securitymonitoring and incident reporting and management.

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 11 of 32Security Think Tank: Container securitystarts with good DevOps practicePaddy Francis,It is easy to see why the use of containerisation has increased rapidly in linewith the increase in cloud services and digital transformation initiatives. Theiruse allows rapid development and deployment, portability and scalability, and –in some ways at least – more security.However, the use of containers is a radical change in the approach todeveloping and deploying applications, and in the infrastructure used to managethem. As with any radical change, the approach to security needs to change,taking advantage of the security properties of containers while addressing thenew problems they bring.Containers provide virtualisation of the operating system (OS), rather than of thehardware as in traditional virtualisation, and are compiled with the applicationand any dependent programs, libraries and so on, required by the app.The compiled container is therefore fully self-contained, only needing to accessthe OS using the specific OS calls necessary for the application to run.Containers are also confined to running in user space. These aspects make it

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitymore difficult – but not impossible – for an attacker to compromise the OS, andhence other containerised apps running on the same OS.On the negative side, additional layers of abstraction mean traditional securitytools cannot monitor and protect containerised apps.best practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 12 of 32Also, the production environment contains the orchestration software whichprovides scalability by spinning up containers as required and the registrystoring the images. The protection of the orchestrator and repository are alsosecurity concerns in terms of integrity of the app images and availability of theorchestrator to generate the services.Using microservicesAnother consideration is the use of microservices. This builds on traditionalideals of modularisation of software, but breaks down an application into anumber of separate microservices, each of which can be developed separatelyusing different software environments but communicate with each other(typically over https) to provide an overall service.While having some of the benefits of scalability and agility, and a similardevelopment approach as containers, different microservices making up thesame application can run in a container, on bare metal, on a host OS, or in thecloud. They are typically used for distributed and scalable networking

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 13 of 32applications (load balancing, for example) and can also be used for securitymonitoring applications with the ability to monitor inside a container.Protecting the host OSIn the production environment, the key security considerations are protection ofthe host OS, protection of the orchestration and registry infrastructure andmonitoring of containers. The host OS only needs to respond to calls fromcontainers and the orchestration system, and therefore should be hardened inline with recognised guidelines by removing unnecessary services, and so on.In addition, regular vulnerability scans of the host should be carried out to detectand fix emerging vulnerabilities. A least-privilege model should also be adoptedto limit access to the orchestrator and container registry. Also, any front-endservices should be secured from attack using application whitelisting. Theseand other measures should take account of and defend against the OWASPTop 10 most common web attacks.Monitoring of the containers themselves is more problematic, and currently thebest approach is probably behavioural monitoring of the apps against apreviously established secure state, together with monitoring of thecommunications between them at the network layer.

How to achieve container securitybest practiceSecurity in the development environmentIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustThe security of the production environment is only one part of the lifecycle,however, and the security and practices in the development environment areequally important. Traditional waterfall or agile development methods produce asingle, monolithic app, which will be rigorously tested and probably deployed fora significant time without being updated.The DevOps process used for containerised app and microservicesdevelopment, however, is a continuous development process, which providesupdated functionality on an ongoing basis with new versions apps deployed asthey become available.This has advantages and disadvantages from a security point of view – whileevery new iteration of the app could introduce new vulnerabilities, when aproblem is found, it can be fixed quickly without a long patch cycle.Automated testingGood development practices such as establishing coding standards and codecomplexity rules are a first step, but in a fast-paced DevOps environmentautomated security testing is essential to police standards and ensurevulnerabilities are eliminated as far as possible before deployment.models to container securityTesting should be done on external and open source code where possible, aswell as in-house-developed code. While some testing can only be done on aPage 14 of 32

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitycompleted application, testing should be done as early as possible in thedevelopment cycle. Static code analysis can pick up violations of codingstandards and potential vulnerabilities like unprotected buffer overflows.Because it doesn’t need executable code, static code analysis can be runovernight, on code written during the day.best practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withDynamic code analysis should be done on compliable code, but again can bean integral part of development as well as final release testing. Other securitytesting can only be carried out on the full app, including fuzzing and penetrationtesting. While penetration testing and, to some extent, fuzzing are generallyperformed manually, solutions using artificial intelligence (AI) are now emergingto help speed up the process, but today at least, a skilled pen tester will beneeded.good DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 15 of 32Though not specific to containers and DevOps, supply chain security andsecurity of the development environment are also important factors applicable toany software development, as is management of open source software use andlicensing.As with any new technology, there will be some aspects that can be exploited todeliver improved security, and others that give us new security challenges. Thefirst thing we need to do is understand the technology and the environment inwhich it is operating, so we can identify critical assets that need to be protectedand the new security approaches we need to develop or adopt to protect them.

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitySecurity Think Tank: ‘Shift left’ to securecontainersbest practicePaul Holland, Principal Research AnalystSecurity Think Tank:Container security is evolving,The cloud is becoming a vital part of many organisations’ IT roadmap andtransformation programme. The current global situation of remote working hashelped to drive this move to the cloud for many.so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 16 of 32One common method for setting up applications in the cloud environment is touse containers, which are a form of virtualisation but without the traditionalhypervisor or the need for a guest operating system (OS) such as WindowsServer. The build process and the requirements for the application are muchlighter, allowing the application to run much faster since there is no guest OS toconsume memory and processor time.As each container tends to host just the one application, organisations will beresponsible for many more containers as compared to virtual machines (VMs).The adoption of cloud services and containers allows for a fast pace of changeand automation. But security practices need to be tailored to take all of this intoaccount, especially since the use of containers makes it harder to run traditionalsecurity tools such as antivirus as there is nowhere to host it.

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 17 of 32This is not to suggest a need for a dramatic shift in how security best practicesare implemented – rather a refinement and change in focus on when, whereand how to apply them. With agile development and DevOps, many developersare now more involved in the support of the applications they build and thusbecoming a jack of all trades – this includes understanding and embeddingsecurity into their builds.Training in secure coding methods (such as the OWASP Top 10) is the mostimportant aspect here – eliminating vulnerabilities early so that containers aresecure by design. Another key measure is to adopt a ‘shift left’ policy fordevelopment, whereby the responsibility for security is embedded earlier in thedevelopment process – in other words, to the left.The theory of the shift left policy is that the developers rather than securityanalysts now check for vulnerabilities. This is supposed to empower thedeveloper to find and fix issues at an early stage of the software developmentlifecycle and thereafter on a continual basis, as opposed to when the work iscomplete and a penetration test is performed at the last moment. Theoretically,this should make fixing things cheaper, faster and with less of a burden on theoperational teams and infrastructure.Application level security has therefore become vital priority for chief informationsecurity officers (CISOs). It should include implementation of technical solutionssuch as web application firewalls (WAF), which would ideally link into a SecurityOperations Centre (SOC) to help monitor for anomalies.

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitybest practiceSecurity Think Tank:Container security is evolving,Code reviews should also be conducted, whether that be an internal peerreview, external expert review or software review. Such reviews can spotvulnerabilities before code is made live within applications.In the context of agile development and DevOps, speed is often a measure ofsuccess, but secure development of applications should also form part of thecriteria for determining whether a sprint is successful. CISOs need to realisethat developers should be granted time to develop securely and not judge theirperformance solely by the time to build.so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingHow to apply zero-trustmodels to container securityPage 18 of 32Securing containers is not a one stop shop but a multi-faceted undertaking.Combining the above into a cohesive plan and creating a secure developmentlifecycle that is enhanced with technical monitoring will provide the CISO withassurance that containers can be used securely and effectively in anorganisation’s IT environment.

How to achieve container securitybest practiceIn this e-guideSecurity Think Tank: Foursteps to container securitySecurity Think Tank: Securing containersneedn’t be taxingbest practiceAndrew Morris, Managing ConsultantSecurity Think Tank:Container security is evolving,Until relatively recently, security appliances were provided by their suppliers inphysical blades that were installed on an organisation’s system. Today, thissoftware is increasingly likely to be provided in containers.so must CISOsSecurity Think Tank:Container security starts withgood DevOps practiceSecurity Think Tank: ‘Shiftleft’ to secure containersSecurity Think Tank: Securingcontainers needn’t be taxingAt their core, containers are isolated collections of software, gathered t

Effective configuration management is crucial. Orchestration services (Kubernetes, AWS Elastic/Azure Container Service), container native configuration management databases (CMDBs) such as Configuration Management by MicroFocus, and a labelling/tagging policy for containers assist with these challenges.