SlideShare a Scribd company logo
1 of 38
Download to read offline
© 2013 CloudPassage Inc.! 1!
Automating Secure Server
Baselines with Chef
a.k.a. “Making Fixing Stupid Stuff Easy”
!
Andrew Hay!
andrew@cloudpassage.com!
@andrewsmhay | @cloudpassage!
#ChefConf / #CloudSec
© 2013 CloudPassage Inc.! 2!
Topics for today
Why the cloud makes security hard
Why secure the OS?
What is a baseline?
How Chef can be used to create
secure and repeatable server and
application baselines
© 2013 CloudPassage Inc.! 3!
Who are you?
•  My name is Andrew Hay, and I am a chef…!
© 2013 CloudPassage Inc.! 4!
Who are you?
•  Andrew Hay, Director of Applied Security
Research at CloudPassage, Inc.!
•  Former!
–  Senior Industry Analyst @ 451 Research
–  Security Analyst @ UofL and a bank in Bermuda
–  Product, Program and Engineering Manager @ Q1 Labs
© 2013 CloudPassage Inc.! 5!
Goals of
moving to
cloud fail
to mesh
with
security
✔�
✔�
© 2013 CloudPassage Inc.! 6!
dmz dmz
corecore
Firewall
Firewall
DB
Load
Balancer
Auth
Server
App
Server
DB
Load
Balancer
App
Server
DB
We used to rely on perimeter defenses
© 2013 CloudPassage Inc.! 7!
DB
Load
Balancer
App
Server
App
Server
But where is the perimeter in cloud?
Auth
Server
DB
Load
Balancer
DB
public cloud
© 2013 CloudPassage Inc.! 8!
public cloud
The server is adjacent to the perimeter
Load
Balancer
App
Server
App
Server
DB
Master
!�
!�
© 2013 CloudPassage Inc.! 9!
Why secure the OS?
•  A hardened OS often is the last line of
defense in the event of a security
compromise.!
•  It is important to note that hardening is
not a panacea for security. !
–  It is just another layer in a good security
model. 
•  By definition, any machine that is
accessible on a network and running
services is potentially insecure.!
–  (i.e. pretty much any server)
© 2013 CloudPassage Inc.! 10!
Why secure the OS?
•  A hardened OS often is the last line of
defense in the event of a security
compromise.!
•  It is important to note that hardening is
not a panacea for security. !
–  It is just another layer in a good security
model. 
•  By definition, any machine that is
accessible on a network and running
services is potentially insecure.!
–  (i.e. pretty much any server)
© 2013 CloudPassage Inc.! 11!
“Andrew’s Law of Servers”
•  There are 3 kinds of servers:!

1) Secure servers


2) Insecure servers
3) Servers that you think are secure…
server
server
!�
server
?
© 2013 CloudPassage Inc.! 12!
Servers are vulnerable
•  National Vulnerability Database search of CVE and CCE
vulnerabilities:!
–  Ubuntu 
•  Last 3 years: 1,015 matching records!
•  Last 3 months: 145 matching records!
–  Red Hat Enterprise Linux
•  Last 3 years: 50 matching records!
•  Last 3 months: 23 matching records!
–  Microsoft Windows (server)
•  Last 3 years: 319 matching records!
•  Last 3 months: 48 matching records!
•  NVD reported 5, 715 vulnerabilities in 2012.!
•  This means that last year about 16 new security vulnerabilities were
discovered each day. !
© 2013 CloudPassage Inc.! 13!
What is a baseline?
•  base·line /ˈbāsˌlīn/!
–  A minimum or starting point used for comparisons.
•  Think of it as the ‘bare minimum’ configuration
for:!
–  Server settings
–  Application configurations
–  Running services
–  Etc.
•  Ask yourself:!
–  “What do I want of my servers?”
© 2013 CloudPassage Inc.! 14!
What if I only secure one or two things?
© 2013 CloudPassage Inc.! 15!
What if I only secure one or two things?
© 2013 CloudPassage Inc.! 16!
www
Running with baselines…
Gold Master
www wwwwww
!�
www
!�
If your baseline is not secure…
Your servers built off of that baseline are also insecure
www
!�
© 2013 CloudPassage Inc.! 17!
www
?
www
?
www
!�
www
!�
Pushing out a ‘Better Master’ might solve a lot of
problems
But it may (will) eventually fail you
Running with baselines…
www
?
www
?
Better Master
www
?
www
?
www
?
www
?
© 2013 CloudPassage Inc.! 18!
www
?
www
?
www
!�
www
!�
Using our new ‘Gold Master’ we can trust our server’s
security
Letting us focus on other, more pressing tasks
Running with baselines…
wwwwwwwwwwwwwww
Gold Master
© 2013 CloudPassage Inc.! 19!
Running with baselines…
Gold Master
Gold Master updates can be rolled out incrementally
Keeping your operational state…operational
www
!�
www
!�
www wwwwww
?�
wwwwwwwwwwww
www
www
!�
www
© 2013 CloudPassage Inc.! 20!20!
How Chef Can Help
© 2013 CloudPassage Inc.! 21!
Top 5 easy things to start building
your secure baseline
1.  Disable unnecessary services!
2.  Remove unneeded packages!
3.  Restrict access to sensitive files & directories!
4.  Remove insecure/default configurations!
5.  Allow administrative access ONLY from trusted
servers/clients!
© 2013 CloudPassage Inc.! 22!
Disable unnecessary services
•  Only what is needed…is needed!
•  Shutdown and disable $ $ $
unnecessary/insecure services!
–  e.g. telnet, r-services, ftpd, etc.
•  Take a look at:!
–  http://docs.opscode.com/resource_script.html
–  http://docs.opscode.com/resource_execute.html
–  http://docs.opscode.com/dsl_recipe_use_ruby.html
© 2013 CloudPassage Inc.! 23!
Remove unneeded packages
•  If it isn’t being used…why keep it?!
•  If the server doesn’t need to $ $ $ $
serve web pages!
–  Remove PHP, Apache/nginx
•  If it’s not a database server!
–  Remove MySQL/PostgreSQL
•  Take a look at:!
–  http://docs.opscode.com/resource_package.html
–  http://docs.opscode.com/resource_script.html
–  http://docs.opscode.com/resource_execute.html
© 2013 CloudPassage Inc.! 24!
Remove unneeded packages
–  apt_package
–  chef_gem
–  dpkg_package
–  easy_install_package
–  freebsd_package
–  gem_package
–  ips_package
–  macports_package
–  pacman_package
–  portage_package
–  rpm_package
–  smartos_package
–  solaris_package
–  yum_package
http://docs.opscode.com/resource_package.html�
© 2013 CloudPassage Inc.! 25!
Remove unneeded packages
© 2013 CloudPassage Inc.! 26!
Remove unneeded packages
© 2013 CloudPassage Inc.! 27!
Restrict access to sensitive files & directories
•  Protect what’s important from prying/malicious
eyes!
•  Ensure file permissions restrict $ $
access to sensitive files and $ $
directories!
–  e.g. /etc/ssh/sshd_config, /var/log/
–  e.g. C:Windows,	
  C:Inetpub	
  
© 2013 CloudPassage Inc.! 28!
Remove insecure/default configurations
•  Disable password authentication for SSH!
–  Force public key authentication
–  Also, disable empty passwords for users
•  SSH!
–  Ensure only v2 protocol connections are allowed
•  Apache!
–  Minimize loadable modules
–  Disable ServerTokens and ServerSignature directives
© 2013 CloudPassage Inc.! 29!
Remove insecure/default configurations
•  Apache Example!
•  Take a look at:!
–  http://docs.opscode.com/
essentials_cookbook_attribute_files.html
–  http://docs.opscode.com/essentials_roles.html
© 2013 CloudPassage Inc.! 30!
Allow administrative access ONLY from trusted
servers/clients
•  Leverage the firewall and other tools!
–  Source of corporate network / admin 
 
 
network range
–  3rd-party tools like fail2ban
•  Don’t allow (or at least restrict)$ $ $
‘server hopping’!
•  Take a look at:!
–  http://community.opscode.com/cookbooks/fail2ban
–  http://community.opscode.com/cookbooks/firewall
–  http://community.opscode.com/cookbooks/ssh_known_hosts
© 2013 CloudPassage Inc.! 31!
If only we had more time…
•  More documentation to review:!
–  NIST SP800-123: Guide to General Server Security
•  http://csrc.nist.gov/publications/nistpubs/800-123/SP800-123.pdf!
–  Halo Configuration Policy Rule Checks
•  http://support.cloudpassage.com/entries/22033142-configuration-policy-rule-
checks!
–  Center for Internet Security (CIS) Benchmarks
•  http://benchmarks.cisecurity.org/downloads/benchmarks/!
–  Microsoft (yes, that Microsoft)
•  http://www.microsoft.com/en-us/download/details.aspx?id=17606!
!
© 2013 CloudPassage Inc.! 32!32!
In Closing
© 2013 CloudPassage Inc.! 33!
Moral of the Story
Security of your cloud servers is your
responsibility
Security risk in the cloud are real (just
check your ssh/RDP logs)
Security baselining isn’t just a best/
better practice, it makes your life
easier…
…and isn’t that why we started
automating in the first place?
© 2013 CloudPassage Inc.! 34!
What does CloudPassage do?
Firewall Automation
Multi-Factor
Authentication
Account
Management
Security Event
Alerting
Configuration
Security
Vulnerability
Scanning
Security for virtual servers running in
public and private clouds
File Integrity
Monitoring
API Automation
© 2013 CloudPassage Inc.! 35!
The End
•  Ask questions!
–  Lots more info: 
 community.cloudpassage.com
–  Small bits of info: @cloudpassage
•  Tell me what you think!
–  Email: 
andrew@cloudpassage.com
–  Twitter: 
@andrewsmhay
•  We’re hiring!

Email: 
jobs@cloudpassage.com
BTW,
We’re
Hiring!
© 2013 CloudPassage Inc.! 36!
The End+=1
•  Expect a webinar!
–  We plan on presenting a webinar on securely
automating cloud server deployment
–  Follow our Twitter account for details: @cloudpassage
•  Community Chef Code for Halo
–  https://github.com/escapestudios/chef-cloudpassage
–  http://community.opscode.com/cookbooks/
cloudpassage
© 2013 CloudPassage Inc.! 37!
The End+=umm…more
•  GitHub
–  http://github.com/cloudpassage
–  http://github.com/andrewsmhay
© 2013 CloudPassage Inc.! 38!
Thank You!
Andrew Hay
andrew@cloudpassage.com
@andrewsmhay
@cloudpassage
#ChefConf / #CloudSec

More Related Content

What's hot

What's hot (20)

Deploy, scale and manage your application with AWS Elastic Beanstal
Deploy, scale and manage your application with AWS Elastic BeanstalDeploy, scale and manage your application with AWS Elastic Beanstal
Deploy, scale and manage your application with AWS Elastic Beanstal
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
 
London Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef StuffLondon Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef Stuff
 
Compliance Automation with InSpec
Compliance Automation with InSpecCompliance Automation with InSpec
Compliance Automation with InSpec
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
 
Accelerating the Transition to Broadcast and OTT Infrastructure in the Cloud
Accelerating the Transition to Broadcast and OTT Infrastructure in the CloudAccelerating the Transition to Broadcast and OTT Infrastructure in the Cloud
Accelerating the Transition to Broadcast and OTT Infrastructure in the Cloud
 
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
 
Building Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSBuilding Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWS
 
Intermediate/Compliance training Guide
Intermediate/Compliance training GuideIntermediate/Compliance training Guide
Intermediate/Compliance training Guide
 
Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
 
Application Automation with Habitat
Application Automation with HabitatApplication Automation with Habitat
Application Automation with Habitat
 
(WEB305) Migrating Your Website to AWS | AWS re:Invent 2014
(WEB305) Migrating Your Website to AWS | AWS re:Invent 2014(WEB305) Migrating Your Website to AWS | AWS re:Invent 2014
(WEB305) Migrating Your Website to AWS | AWS re:Invent 2014
 
DEV317_Deep Dive on AWS CloudFormation
DEV317_Deep Dive on AWS CloudFormationDEV317_Deep Dive on AWS CloudFormation
DEV317_Deep Dive on AWS CloudFormation
 
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic BeanstalkDeploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
 
Nike popup compliance workshop
Nike popup compliance workshopNike popup compliance workshop
Nike popup compliance workshop
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
London Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetLondon Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBet
 
Understanding serverless architecture
Understanding serverless architectureUnderstanding serverless architecture
Understanding serverless architecture
 

Viewers also liked (7)

Modifying Your AWS Reserved Instances
Modifying Your AWS Reserved InstancesModifying Your AWS Reserved Instances
Modifying Your AWS Reserved Instances
 
Infrastructure modeling with chef
Infrastructure modeling with chefInfrastructure modeling with chef
Infrastructure modeling with chef
 
What's new in chef 12
What's new in chef 12 What's new in chef 12
What's new in chef 12
 
IBM Infosphere Guardium - Database Security
IBM Infosphere Guardium - Database SecurityIBM Infosphere Guardium - Database Security
IBM Infosphere Guardium - Database Security
 
IT Operations Management with OpManager
IT Operations Management with OpManagerIT Operations Management with OpManager
IT Operations Management with OpManager
 
Imágenes de seres vivos unicelulares
Imágenes de seres vivos unicelularesImágenes de seres vivos unicelulares
Imágenes de seres vivos unicelulares
 
Organismos unicelulares y pluricelulares
Organismos unicelulares y pluricelularesOrganismos unicelulares y pluricelulares
Organismos unicelulares y pluricelulares
 

Similar to Automating secure server baselines with Chef

Integrating Security into DevOps
Integrating Security into DevOpsIntegrating Security into DevOps
Integrating Security into DevOps
CloudPassage
 

Similar to Automating secure server baselines with Chef (20)

Security in the cloud Workshop HSTC 2014
Security in the cloud Workshop HSTC 2014Security in the cloud Workshop HSTC 2014
Security in the cloud Workshop HSTC 2014
 
Architecting for Resiliency
Architecting for ResiliencyArchitecting for Resiliency
Architecting for Resiliency
 
[Azure Governance] Lesson 2 : Azure Locks
[Azure Governance] Lesson 2 : Azure Locks[Azure Governance] Lesson 2 : Azure Locks
[Azure Governance] Lesson 2 : Azure Locks
 
Cloud computing fundamentals with Microsoft Azure
Cloud computing fundamentals with Microsoft AzureCloud computing fundamentals with Microsoft Azure
Cloud computing fundamentals with Microsoft Azure
 
Integrating Security into DevOps
Integrating Security into DevOpsIntegrating Security into DevOps
Integrating Security into DevOps
 
Experiences of SOACS
Experiences of SOACSExperiences of SOACS
Experiences of SOACS
 
Secure your web app presentation
Secure your web app presentationSecure your web app presentation
Secure your web app presentation
 
Představení Oracle SPARC Miniclusteru
Představení Oracle SPARC MiniclusteruPředstavení Oracle SPARC Miniclusteru
Představení Oracle SPARC Miniclusteru
 
Secure your Azure Web App 2019
Secure your Azure Web App 2019Secure your Azure Web App 2019
Secure your Azure Web App 2019
 
Cisco + AWS Stronger Security & Greater AWS Adoption
Cisco + AWS Stronger Security & Greater AWS Adoption Cisco + AWS Stronger Security & Greater AWS Adoption
Cisco + AWS Stronger Security & Greater AWS Adoption
 
Azure Fundamentals Part 2
Azure Fundamentals Part 2Azure Fundamentals Part 2
Azure Fundamentals Part 2
 
The Ultimate Guide For Cloud Penetration Testing.pdf
The Ultimate Guide For Cloud Penetration Testing.pdfThe Ultimate Guide For Cloud Penetration Testing.pdf
The Ultimate Guide For Cloud Penetration Testing.pdf
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
 
Infrastructure automation-in-the-cloud-130613045624-phpapp02
Infrastructure automation-in-the-cloud-130613045624-phpapp02Infrastructure automation-in-the-cloud-130613045624-phpapp02
Infrastructure automation-in-the-cloud-130613045624-phpapp02
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
 
Cloud Computing and Microsoft Azure
Cloud Computing and Microsoft AzureCloud Computing and Microsoft Azure
Cloud Computing and Microsoft Azure
 
Azure + DataStax Enterprise (DSE) Powers Office365 Per User Store
Azure + DataStax Enterprise (DSE) Powers Office365 Per User StoreAzure + DataStax Enterprise (DSE) Powers Office365 Per User Store
Azure + DataStax Enterprise (DSE) Powers Office365 Per User Store
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017
 
Securing the Heart of Automated Infrastructure
Securing the Heart of Automated InfrastructureSecuring the Heart of Automated Infrastructure
Securing the Heart of Automated Infrastructure
 

More from Chef Software, Inc.

Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Software, Inc.
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Software, Inc.
 
Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013
Chef Software, Inc.
 
Utility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right ScienceUtility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right Science
Chef Software, Inc.
 

More from Chef Software, Inc. (20)

Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with Chef
 
Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft Windows
 
Opscode tech festa july 2013
Opscode tech festa   july 2013Opscode tech festa   july 2013
Opscode tech festa july 2013
 
Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013
 
Utility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right ScienceUtility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right Science
 
The Berkshelf Way
The Berkshelf WayThe Berkshelf Way
The Berkshelf Way
 
Using Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey HultenUsing Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey Hulten
 
SDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad HedlundSDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
 
ChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam JacobChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam Jacob
 
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
 
The InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleThe InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo Schlossnagle
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK Box
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of Chef
 
Push jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private ChefPush jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private Chef
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and more
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Automating secure server baselines with Chef

  • 1. © 2013 CloudPassage Inc.! 1! Automating Secure Server Baselines with Chef a.k.a. “Making Fixing Stupid Stuff Easy” ! Andrew Hay! andrew@cloudpassage.com! @andrewsmhay | @cloudpassage! #ChefConf / #CloudSec
  • 2. © 2013 CloudPassage Inc.! 2! Topics for today Why the cloud makes security hard Why secure the OS? What is a baseline? How Chef can be used to create secure and repeatable server and application baselines
  • 3. © 2013 CloudPassage Inc.! 3! Who are you? •  My name is Andrew Hay, and I am a chef…!
  • 4. © 2013 CloudPassage Inc.! 4! Who are you? •  Andrew Hay, Director of Applied Security Research at CloudPassage, Inc.! •  Former! –  Senior Industry Analyst @ 451 Research –  Security Analyst @ UofL and a bank in Bermuda –  Product, Program and Engineering Manager @ Q1 Labs
  • 5. © 2013 CloudPassage Inc.! 5! Goals of moving to cloud fail to mesh with security ✔� ✔�
  • 6. © 2013 CloudPassage Inc.! 6! dmz dmz corecore Firewall Firewall DB Load Balancer Auth Server App Server DB Load Balancer App Server DB We used to rely on perimeter defenses
  • 7. © 2013 CloudPassage Inc.! 7! DB Load Balancer App Server App Server But where is the perimeter in cloud? Auth Server DB Load Balancer DB public cloud
  • 8. © 2013 CloudPassage Inc.! 8! public cloud The server is adjacent to the perimeter Load Balancer App Server App Server DB Master !� !�
  • 9. © 2013 CloudPassage Inc.! 9! Why secure the OS? •  A hardened OS often is the last line of defense in the event of a security compromise.! •  It is important to note that hardening is not a panacea for security. ! –  It is just another layer in a good security model. •  By definition, any machine that is accessible on a network and running services is potentially insecure.! –  (i.e. pretty much any server)
  • 10. © 2013 CloudPassage Inc.! 10! Why secure the OS? •  A hardened OS often is the last line of defense in the event of a security compromise.! •  It is important to note that hardening is not a panacea for security. ! –  It is just another layer in a good security model. •  By definition, any machine that is accessible on a network and running services is potentially insecure.! –  (i.e. pretty much any server)
  • 11. © 2013 CloudPassage Inc.! 11! “Andrew’s Law of Servers” •  There are 3 kinds of servers:! 1) Secure servers 2) Insecure servers 3) Servers that you think are secure… server server !� server ?
  • 12. © 2013 CloudPassage Inc.! 12! Servers are vulnerable •  National Vulnerability Database search of CVE and CCE vulnerabilities:! –  Ubuntu •  Last 3 years: 1,015 matching records! •  Last 3 months: 145 matching records! –  Red Hat Enterprise Linux •  Last 3 years: 50 matching records! •  Last 3 months: 23 matching records! –  Microsoft Windows (server) •  Last 3 years: 319 matching records! •  Last 3 months: 48 matching records! •  NVD reported 5, 715 vulnerabilities in 2012.! •  This means that last year about 16 new security vulnerabilities were discovered each day. !
  • 13. © 2013 CloudPassage Inc.! 13! What is a baseline? •  base·line /ˈbāsˌlīn/! –  A minimum or starting point used for comparisons. •  Think of it as the ‘bare minimum’ configuration for:! –  Server settings –  Application configurations –  Running services –  Etc. •  Ask yourself:! –  “What do I want of my servers?”
  • 14. © 2013 CloudPassage Inc.! 14! What if I only secure one or two things?
  • 15. © 2013 CloudPassage Inc.! 15! What if I only secure one or two things?
  • 16. © 2013 CloudPassage Inc.! 16! www Running with baselines… Gold Master www wwwwww !� www !� If your baseline is not secure… Your servers built off of that baseline are also insecure www !�
  • 17. © 2013 CloudPassage Inc.! 17! www ? www ? www !� www !� Pushing out a ‘Better Master’ might solve a lot of problems But it may (will) eventually fail you Running with baselines… www ? www ? Better Master www ? www ? www ? www ?
  • 18. © 2013 CloudPassage Inc.! 18! www ? www ? www !� www !� Using our new ‘Gold Master’ we can trust our server’s security Letting us focus on other, more pressing tasks Running with baselines… wwwwwwwwwwwwwww Gold Master
  • 19. © 2013 CloudPassage Inc.! 19! Running with baselines… Gold Master Gold Master updates can be rolled out incrementally Keeping your operational state…operational www !� www !� www wwwwww ?� wwwwwwwwwwww www www !� www
  • 20. © 2013 CloudPassage Inc.! 20!20! How Chef Can Help
  • 21. © 2013 CloudPassage Inc.! 21! Top 5 easy things to start building your secure baseline 1.  Disable unnecessary services! 2.  Remove unneeded packages! 3.  Restrict access to sensitive files & directories! 4.  Remove insecure/default configurations! 5.  Allow administrative access ONLY from trusted servers/clients!
  • 22. © 2013 CloudPassage Inc.! 22! Disable unnecessary services •  Only what is needed…is needed! •  Shutdown and disable $ $ $ unnecessary/insecure services! –  e.g. telnet, r-services, ftpd, etc. •  Take a look at:! –  http://docs.opscode.com/resource_script.html –  http://docs.opscode.com/resource_execute.html –  http://docs.opscode.com/dsl_recipe_use_ruby.html
  • 23. © 2013 CloudPassage Inc.! 23! Remove unneeded packages •  If it isn’t being used…why keep it?! •  If the server doesn’t need to $ $ $ $ serve web pages! –  Remove PHP, Apache/nginx •  If it’s not a database server! –  Remove MySQL/PostgreSQL •  Take a look at:! –  http://docs.opscode.com/resource_package.html –  http://docs.opscode.com/resource_script.html –  http://docs.opscode.com/resource_execute.html
  • 24. © 2013 CloudPassage Inc.! 24! Remove unneeded packages –  apt_package –  chef_gem –  dpkg_package –  easy_install_package –  freebsd_package –  gem_package –  ips_package –  macports_package –  pacman_package –  portage_package –  rpm_package –  smartos_package –  solaris_package –  yum_package http://docs.opscode.com/resource_package.html�
  • 25. © 2013 CloudPassage Inc.! 25! Remove unneeded packages
  • 26. © 2013 CloudPassage Inc.! 26! Remove unneeded packages
  • 27. © 2013 CloudPassage Inc.! 27! Restrict access to sensitive files & directories •  Protect what’s important from prying/malicious eyes! •  Ensure file permissions restrict $ $ access to sensitive files and $ $ directories! –  e.g. /etc/ssh/sshd_config, /var/log/ –  e.g. C:Windows,  C:Inetpub  
  • 28. © 2013 CloudPassage Inc.! 28! Remove insecure/default configurations •  Disable password authentication for SSH! –  Force public key authentication –  Also, disable empty passwords for users •  SSH! –  Ensure only v2 protocol connections are allowed •  Apache! –  Minimize loadable modules –  Disable ServerTokens and ServerSignature directives
  • 29. © 2013 CloudPassage Inc.! 29! Remove insecure/default configurations •  Apache Example! •  Take a look at:! –  http://docs.opscode.com/ essentials_cookbook_attribute_files.html –  http://docs.opscode.com/essentials_roles.html
  • 30. © 2013 CloudPassage Inc.! 30! Allow administrative access ONLY from trusted servers/clients •  Leverage the firewall and other tools! –  Source of corporate network / admin network range –  3rd-party tools like fail2ban •  Don’t allow (or at least restrict)$ $ $ ‘server hopping’! •  Take a look at:! –  http://community.opscode.com/cookbooks/fail2ban –  http://community.opscode.com/cookbooks/firewall –  http://community.opscode.com/cookbooks/ssh_known_hosts
  • 31. © 2013 CloudPassage Inc.! 31! If only we had more time… •  More documentation to review:! –  NIST SP800-123: Guide to General Server Security •  http://csrc.nist.gov/publications/nistpubs/800-123/SP800-123.pdf! –  Halo Configuration Policy Rule Checks •  http://support.cloudpassage.com/entries/22033142-configuration-policy-rule- checks! –  Center for Internet Security (CIS) Benchmarks •  http://benchmarks.cisecurity.org/downloads/benchmarks/! –  Microsoft (yes, that Microsoft) •  http://www.microsoft.com/en-us/download/details.aspx?id=17606! !
  • 32. © 2013 CloudPassage Inc.! 32!32! In Closing
  • 33. © 2013 CloudPassage Inc.! 33! Moral of the Story Security of your cloud servers is your responsibility Security risk in the cloud are real (just check your ssh/RDP logs) Security baselining isn’t just a best/ better practice, it makes your life easier… …and isn’t that why we started automating in the first place?
  • 34. © 2013 CloudPassage Inc.! 34! What does CloudPassage do? Firewall Automation Multi-Factor Authentication Account Management Security Event Alerting Configuration Security Vulnerability Scanning Security for virtual servers running in public and private clouds File Integrity Monitoring API Automation
  • 35. © 2013 CloudPassage Inc.! 35! The End •  Ask questions! –  Lots more info: community.cloudpassage.com –  Small bits of info: @cloudpassage •  Tell me what you think! –  Email: andrew@cloudpassage.com –  Twitter: @andrewsmhay •  We’re hiring! Email: jobs@cloudpassage.com BTW, We’re Hiring!
  • 36. © 2013 CloudPassage Inc.! 36! The End+=1 •  Expect a webinar! –  We plan on presenting a webinar on securely automating cloud server deployment –  Follow our Twitter account for details: @cloudpassage •  Community Chef Code for Halo –  https://github.com/escapestudios/chef-cloudpassage –  http://community.opscode.com/cookbooks/ cloudpassage
  • 37. © 2013 CloudPassage Inc.! 37! The End+=umm…more •  GitHub –  http://github.com/cloudpassage –  http://github.com/andrewsmhay
  • 38. © 2013 CloudPassage Inc.! 38! Thank You! Andrew Hay andrew@cloudpassage.com @andrewsmhay @cloudpassage #ChefConf / #CloudSec