SlideShare una empresa de Scribd logo
1 de 52
Getting Started with Compliance
Automation
SSH Control
SSH supports two different protocol
versions. The original version,
SSHv1, was subject to a number of
security issues. Please use SSHv2
instead to avoid these.
How will I verify this?
Whip up a one-liner!
grep "^Protocol" /etc/ssh/sshd_config | sed 's/Protocol //'
Apache Server Information Leakage – Server Token
Directive• Description
This Directive Controls weather Server response field is sent back to clients includes a description of Generic OS Type
of the Server.
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security
vulnerabilities are dependent upon specific software versions.
• How to Test
In order to test for ServerToken configuration, one should check the Apache configuration file.
• Misconfiguration
ServerTokens Full
• Remediation
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly. This tells Apache to
only return "Apache" in the Server header, returned on every page request.
ServerTokens Prod
or
ServerTokens ProductOnly
https://www.owasp.org/index.php/SCG_WS_Apache
Whip up a one-liner!
grep "^ServerTokens" /etc/httpd/conf/httpd.conf | sed 's/ServerTokens //'
Whip up a two-liner!
TARGET=2
grep "^Protocol" /etc/ssh/sshd_config | sed 's/Protocol //'
> /dev/null && echo $TARGET
Two-thirds of organizations
did not adequately test the
security of all in-scope
systems
Key Trends
• While individual rule
compliance is up, testing of
security systems is down
• Sustainability is low. Fewer
than a third of companies
were found to be still fully
compliant less than a year
after successful validation.
Shell Scripts
grep "^Protocol" /etc/ssh/sshd_config | sed 's/Protocol //'
grep "^ServerTokens" /etc/httpd/conf/httpd.conf | sed 's/ServerTokens //'
Infrastructure Code
package 'httpd' do
action :install
end
service 'httpd' do
action [ :start, :enable ]
end
What We Have Here Is A Communications Problem
Security != Compliance
©2016 Chef Software Inc. 2-30
Chef Compliance
Identify compliance issues, security risks, and outdated software with
customizable reports. Write your own compliance rules in InSpec or get
started quickly by using built-in profiles – predefined rule sets for a variety of
security frameworks.
©2016 Chef Software Inc. 2-31
Chef Compliance
Chef Automate -
Compliance Your
Infrastructure
LAN/WAN
©2016 Chef Software Inc. 2-32
Chef Compliance
Chef Compliance can run without any other Chef software installed.
The nodes you scan don't even need Chef software on them if you are
scanning them for compliance.
However, you would need Chef software to create and implement
remediation recipes.
©2016 Chef Software Inc. 2-33
Chef Compliance
Reports: Chef Compliance can produce reports that indicate risks and
issues classified by severity and impact levels.
Compliance Profiles: You can get started quickly with pre-built Compliance
profiles for scanning Linux and Windows nodes.
©2016 Chef Software Inc. 2-34
Chef Compliance leverages
InSpec.
InSpec is an open-source
run-time framework and rule
language used to specify
compliance, security, and
policy requirements for
testing any node in your
infrastructure.
Turn Compliance into Code
control 'cis-3.1' do
impact 0.7
title 'Set Daemon umask'
desc '
Set the default umask for all processes
started at boot time.
'
describe file('/etc/sysconfig/init') do
its('content') {should match 'umask 027'}
end
end
©2016 Chef Software Inc. 2-35
InSpec includes a collection of resources to help you write auditing rules quickly and
easily using the Compliance DSL.
Use InSpec to examine any node in your infrastructure; run the tests locally or
remotely.
Any detected security, compliance, or policy issues are flagged in a log and in Chef
Compliance, displayed in a GUI.
Clearly Express Statements of Policy
describe port(80) do
it { should_not be_listening }
end
describe port(443) do
it { should be_listening }
its('protocols') {should include 'tcp'}
end
©2016 Chef Software Inc. 2-36
Find Issues Early
Execute the compliance tests as part of your local development.
Use InSpec as part of the Test Kitchen verification.
Check running systems against your Compliance Profiles.
©2016 Chef Software Inc. 2-37
Write code quickly
InSpec includes a collection of resources that help you write audit controls quickly
and easily.
©2016 Chef Software Inc. 2-38
Write code quickly
describe file('/etc/ssh/sshd_config') do
its(:content) { should match /Protocol 2/ }
end
©2016 Chef Software Inc. 2-39
Write code quickly
describe sshd_config do
its(:content) { should match /Protocol 2/ }
end
©2016 Chef Software Inc. 2-40
Write code quickly
describe sshd_config do
its('Protocol') { should cmp 2 }
end
©2016 Chef Software Inc. 2-41
Available Resources
apache
apache_conf
apt
audit_policy
auditd_conf
auditd_rules
bash
bond
bridge
command
csv
directory
etc_group
file
gem
group
grub_conf
host
iis_site
inetd_conf
ini
interface
iptables
json
kernel_module
kernel_paramet
er
limits_conf
login_def
mount
mssql_session
mysql
mysql_conf
mysql_session
npm
ntp_conf
oneget
os
os_env
package
parse_config
passwd
pip
port
postgres
postgres_conf
postgres_sessi
on
powershell
processes
registry_key
security_policy
service
shadow
ssh_conf
ssl
user
vbscript
windows_feature
wmi
xinetd
yaml
yum
©2016 Chef Software Inc. 2-42
Run Code Anywhere
Test Locally:
$ inspec exec test.rb
©2016 Chef Software Inc. 2-43
Run Code Anywhere
Remote via SSH:
$ inspec exec test.rb -t ssh://54.163.150.246 --user=chef --
password=chef.io
©2016 Chef Software Inc. 2-44
Run Code Anywhere
Remote via WinRM:
$ inspec exec test.rb -t winrm://Admin@192.168.1.2 --password super
©2016 Chef Software Inc. 2-45
Run Code Anywhere
Docker Container
$ inspec exec test.rb -t docker://3dda08e75838
©2016 Chef Software Inc. 2-46
Run Code Anywhere
$ inspec exec test.rb
$ inspec exec test.rb -i ~/.aws/nathen.pem -t ssh://ec2-user@54.152.7.203
$ inspec exec test.rb -t winrm://Admin@192.168.1.2 --password super
$ inspec exec test.rb -t docker://3dda08e75838
©2016 Chef Software Inc. 2-47
Inspect machines, data, & APIs
describe host('example.com', port: 80, proto: 'tcp') do
it { should be_reachable }
end
©2016 Chef Software Inc. 2-48
Inspect machines, data, & APIs
describe mysql_conf do
its('slow_query_log_file') { should eq 'hostname_slow.log' }
its('slow_query_log') { should eq '0' }
its('log_queries_not_using_indexes') { should eq '1' }
its('long_query_time') { should eq '0.5' }
its('min_examined_row_limit') { should eq '100' }
end
©2016 Chef Software Inc. 2-49
Inspect machines, data, & APIs
control 'sg-1' do
impact 1.0
title 'Security Group: No ingress access to CIDR block 0.0.0.0/0'
desc 'Security Groups must not allow inbound access from anywhere'
Vpc.new(id: ENV['vpc_id']).security_groups.each do |security_group|
describe security_group do
it { should_not have_ingress_rule().with_source('0.0.0.0/0') }
end
end
end
©2016 Chef Software Inc. 2-50
Compliance profiles exist for
many scenarios, such as those
created by the Center for
Internet Security (CIS)
Chef Compliance maintains
profiles as a collection of
individual controls that comprise
a complete audit.
You can also create your own
custom Compliance profiles.
Compliance Profiles
©2016 Chef Software Inc. 2-51
Compliance
Web UI
The Chef
Compliance web UI
provides views into
compliance scan
results as well as
views of Chef
Compliance
profiles.
You execute scans
via the Compliance
web UI as well.
©2016 Chef Software Inc.

Más contenido relacionado

La actualidad más candente

Chef Automate Workflow Demo
Chef Automate Workflow DemoChef Automate Workflow Demo
Chef Automate Workflow DemoChef
 
Chef Workflow Demo
Chef Workflow DemoChef Workflow Demo
Chef Workflow DemoChef
 
Chef compliance - Intermediate Training
Chef compliance - Intermediate TrainingChef compliance - Intermediate Training
Chef compliance - Intermediate TrainingSarah Hynes Cheney
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlabChef
 
Compliance Automation with InSpec
Compliance Automation with InSpecCompliance Automation with InSpec
Compliance Automation with InSpec Nathen Harvey
 
Compliance Automation with Inspec Part 1
Compliance Automation with Inspec Part 1Compliance Automation with Inspec Part 1
Compliance Automation with Inspec Part 1Chef
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitatChef
 
Compliance Automation Workshop
Compliance Automation WorkshopCompliance Automation Workshop
Compliance Automation WorkshopChef
 
Bay Area Chef Meetup February
Bay Area Chef Meetup FebruaryBay Area Chef Meetup February
Bay Area Chef Meetup FebruaryJessica DeVita
 
Effective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecEffective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecNathen Harvey
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeMatt Ray
 
Compliance Automation with Inspec Part 3
Compliance Automation with Inspec Part 3Compliance Automation with Inspec Part 3
Compliance Automation with Inspec Part 3Chef
 
Chef Hack Day Denver
Chef Hack Day Denver Chef Hack Day Denver
Chef Hack Day Denver Chef
 
Infrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateInfrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateMatt Ray
 
Automating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyAutomating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyMatt Ray
 
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 GentUsing Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 GentSalim Afiune Maya
 
Chef Compliance & Workflow w/Delivery
Chef Compliance & Workflow w/Delivery Chef Compliance & Workflow w/Delivery
Chef Compliance & Workflow w/Delivery Chef
 
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Matt Ray
 
Compliance as Code - Using the Open Source InSpec testing Framework
Compliance as Code - Using the Open Source InSpec testing FrameworkCompliance as Code - Using the Open Source InSpec testing Framework
Compliance as Code - Using the Open Source InSpec testing FrameworkSonatype
 
Devops journey chefpopup-2016.04.26-v2
Devops journey chefpopup-2016.04.26-v2Devops journey chefpopup-2016.04.26-v2
Devops journey chefpopup-2016.04.26-v2Chef
 

La actualidad más candente (20)

Chef Automate Workflow Demo
Chef Automate Workflow DemoChef Automate Workflow Demo
Chef Automate Workflow Demo
 
Chef Workflow Demo
Chef Workflow DemoChef Workflow Demo
Chef Workflow Demo
 
Chef compliance - Intermediate Training
Chef compliance - Intermediate TrainingChef compliance - Intermediate Training
Chef compliance - Intermediate Training
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlab
 
Compliance Automation with InSpec
Compliance Automation with InSpecCompliance Automation with InSpec
Compliance Automation with InSpec
 
Compliance Automation with Inspec Part 1
Compliance Automation with Inspec Part 1Compliance Automation with Inspec Part 1
Compliance Automation with Inspec Part 1
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitat
 
Compliance Automation Workshop
Compliance Automation WorkshopCompliance Automation Workshop
Compliance Automation Workshop
 
Bay Area Chef Meetup February
Bay Area Chef Meetup FebruaryBay Area Chef Meetup February
Bay Area Chef Meetup February
 
Effective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecEffective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpec
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
 
Compliance Automation with Inspec Part 3
Compliance Automation with Inspec Part 3Compliance Automation with Inspec Part 3
Compliance Automation with Inspec Part 3
 
Chef Hack Day Denver
Chef Hack Day Denver Chef Hack Day Denver
Chef Hack Day Denver
 
Infrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateInfrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef Automate
 
Automating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyAutomating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North Sydney
 
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 GentUsing Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
Using Habitat to Unify Dev to CI to Production - Configmgmt Camp Feb/2018 Gent
 
Chef Compliance & Workflow w/Delivery
Chef Compliance & Workflow w/Delivery Chef Compliance & Workflow w/Delivery
Chef Compliance & Workflow w/Delivery
 
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
 
Compliance as Code - Using the Open Source InSpec testing Framework
Compliance as Code - Using the Open Source InSpec testing FrameworkCompliance as Code - Using the Open Source InSpec testing Framework
Compliance as Code - Using the Open Source InSpec testing Framework
 
Devops journey chefpopup-2016.04.26-v2
Devops journey chefpopup-2016.04.26-v2Devops journey chefpopup-2016.04.26-v2
Devops journey chefpopup-2016.04.26-v2
 

Destacado

Inspec, or how to translate compliance spreadsheets into code
Inspec, or how to translate compliance spreadsheets into codeInspec, or how to translate compliance spreadsheets into code
Inspec, or how to translate compliance spreadsheets into codeMichael Goetz
 
2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpec2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpecdevopsdaysaustin
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateAlex Pop
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with ChefAdam Jacob
 
Automating secure server baselines with Chef
Automating secure server baselines with ChefAutomating secure server baselines with Chef
Automating secure server baselines with ChefChef Software, Inc.
 
Successful Practices for Continuous Delivery CodeCPH
Successful Practices for Continuous Delivery CodeCPHSuccessful Practices for Continuous Delivery CodeCPH
Successful Practices for Continuous Delivery CodeCPHMandi Walls
 
Our DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural ChangeOur DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural ChangeChef
 
Validation driven change
Validation driven changeValidation driven change
Validation driven changeMichael Goetz
 
London Community Summit 2016 - Community Update
London Community Summit 2016 - Community UpdateLondon Community Summit 2016 - Community Update
London Community Summit 2016 - Community UpdateChef
 
Learning from Configuration Management
Learning from Configuration Management Learning from Configuration Management
Learning from Configuration Management Chef
 
London Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef ComplianceLondon Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef ComplianceChef
 
Ficha inscricao aluno_cisja
Ficha inscricao aluno_cisjaFicha inscricao aluno_cisja
Ficha inscricao aluno_cisjaamirpajm
 
大葉簡報
大葉簡報大葉簡報
大葉簡報wcliao21
 
スペシャルクーポンガチャによって中高生に家計簿の習慣をつけさせる
スペシャルクーポンガチャによって中高生に家計簿の習慣をつけさせるスペシャルクーポンガチャによって中高生に家計簿の習慣をつけさせる
スペシャルクーポンガチャによって中高生に家計簿の習慣をつけさせるstucon
 
#CannesLions 2014: Day 5 Recap #OgilvyCannes
#CannesLions 2014: Day 5 Recap #OgilvyCannes #CannesLions 2014: Day 5 Recap #OgilvyCannes
#CannesLions 2014: Day 5 Recap #OgilvyCannes Ogilvy
 

Destacado (18)

Inspec, or how to translate compliance spreadsheets into code
Inspec, or how to translate compliance spreadsheets into codeInspec, or how to translate compliance spreadsheets into code
Inspec, or how to translate compliance spreadsheets into code
 
2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpec2016 - Compliance as Code - InSpec
2016 - Compliance as Code - InSpec
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release update
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
Automating secure server baselines with Chef
Automating secure server baselines with ChefAutomating secure server baselines with Chef
Automating secure server baselines with Chef
 
Vagrant and chef
Vagrant and chefVagrant and chef
Vagrant and chef
 
Successful Practices for Continuous Delivery CodeCPH
Successful Practices for Continuous Delivery CodeCPHSuccessful Practices for Continuous Delivery CodeCPH
Successful Practices for Continuous Delivery CodeCPH
 
Our DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural ChangeOur DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural Change
 
Validation driven change
Validation driven changeValidation driven change
Validation driven change
 
London Community Summit 2016 - Community Update
London Community Summit 2016 - Community UpdateLondon Community Summit 2016 - Community Update
London Community Summit 2016 - Community Update
 
Learning from Configuration Management
Learning from Configuration Management Learning from Configuration Management
Learning from Configuration Management
 
London Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef ComplianceLondon Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef Compliance
 
UX Team Of One
UX Team Of OneUX Team Of One
UX Team Of One
 
Ficha inscricao aluno_cisja
Ficha inscricao aluno_cisjaFicha inscricao aluno_cisja
Ficha inscricao aluno_cisja
 
大葉簡報
大葉簡報大葉簡報
大葉簡報
 
スペシャルクーポンガチャによって中高生に家計簿の習慣をつけさせる
スペシャルクーポンガチャによって中高生に家計簿の習慣をつけさせるスペシャルクーポンガチャによって中高生に家計簿の習慣をつけさせる
スペシャルクーポンガチャによって中高生に家計簿の習慣をつけさせる
 
#CannesLions 2014: Day 5 Recap #OgilvyCannes
#CannesLions 2014: Day 5 Recap #OgilvyCannes #CannesLions 2014: Day 5 Recap #OgilvyCannes
#CannesLions 2014: Day 5 Recap #OgilvyCannes
 
煩惱就是菩提
煩惱就是菩提煩惱就是菩提
煩惱就是菩提
 

Similar a Compliance Automation with Inspec Part 2

DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017AgileNZ Conference
 
Melbourne Infracoders: Compliance as Code with InSpec
Melbourne Infracoders: Compliance as Code with InSpecMelbourne Infracoders: Compliance as Code with InSpec
Melbourne Infracoders: Compliance as Code with InSpecMatt Ray
 
Compliance as Code: Velocity with Security - Fraser Pollock, Chef
Compliance as Code: Velocity with Security - Fraser Pollock, ChefCompliance as Code: Velocity with Security - Fraser Pollock, Chef
Compliance as Code: Velocity with Security - Fraser Pollock, ChefAlert Logic
 
Melbourne Chef Meetup: Automating Azure Compliance with InSpec
Melbourne Chef Meetup: Automating Azure Compliance with InSpecMelbourne Chef Meetup: Automating Azure Compliance with InSpec
Melbourne Chef Meetup: Automating Azure Compliance with InSpecMatt Ray
 
OSDC 2017 | Building Security Into Your Workflow with InSpec by Mandi Walls
OSDC 2017 | Building Security Into Your Workflow with InSpec by Mandi WallsOSDC 2017 | Building Security Into Your Workflow with InSpec by Mandi Walls
OSDC 2017 | Building Security Into Your Workflow with InSpec by Mandi WallsNETWAYS
 
OSDC 2017 - Mandi Walls - Building security into your workflow with inspec
OSDC 2017 - Mandi Walls - Building security into your workflow with inspecOSDC 2017 - Mandi Walls - Building security into your workflow with inspec
OSDC 2017 - Mandi Walls - Building security into your workflow with inspecNETWAYS
 
Adding Security to Your Workflow with InSpec (MAY 2017)
Adding Security to Your Workflow with InSpec (MAY 2017)Adding Security to Your Workflow with InSpec (MAY 2017)
Adding Security to Your Workflow with InSpec (MAY 2017)Mandi Walls
 
Philly security shell meetup
Philly security shell meetupPhilly security shell meetup
Philly security shell meetupNicole Johnson
 
Automating Compliance with InSpec - Chef Singapore Meetup
Automating Compliance with InSpec - Chef Singapore MeetupAutomating Compliance with InSpec - Chef Singapore Meetup
Automating Compliance with InSpec - Chef Singapore MeetupMatt Ray
 
Security and dev ops for high velocity organizations
Security and dev ops for high velocity organizationsSecurity and dev ops for high velocity organizations
Security and dev ops for high velocity organizationsChef
 
BuildStuff.LT 2018 InSpec Workshop
BuildStuff.LT 2018 InSpec WorkshopBuildStuff.LT 2018 InSpec Workshop
BuildStuff.LT 2018 InSpec WorkshopMandi Walls
 
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy
2015-06-25 Red Hat Summit 2015 - Security Compliance Made EasyShawn Wells
 
InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017Mandi Walls
 
DevSecCon London 2017: Inspec workshop by Mandi Walls
DevSecCon London 2017: Inspec workshop by Mandi WallsDevSecCon London 2017: Inspec workshop by Mandi Walls
DevSecCon London 2017: Inspec workshop by Mandi WallsDevSecCon
 
Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Miguel Zuniga
 
Compliance as Code Everywhere
Compliance as Code EverywhereCompliance as Code Everywhere
Compliance as Code EverywhereMatt Ray
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation ToolsEdwin Beekman
 
InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017Mandi Walls
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rulesFreddy Buenaño
 

Similar a Compliance Automation with Inspec Part 2 (20)

DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
 
Melbourne Infracoders: Compliance as Code with InSpec
Melbourne Infracoders: Compliance as Code with InSpecMelbourne Infracoders: Compliance as Code with InSpec
Melbourne Infracoders: Compliance as Code with InSpec
 
Compliance as Code: Velocity with Security - Fraser Pollock, Chef
Compliance as Code: Velocity with Security - Fraser Pollock, ChefCompliance as Code: Velocity with Security - Fraser Pollock, Chef
Compliance as Code: Velocity with Security - Fraser Pollock, Chef
 
Melbourne Chef Meetup: Automating Azure Compliance with InSpec
Melbourne Chef Meetup: Automating Azure Compliance with InSpecMelbourne Chef Meetup: Automating Azure Compliance with InSpec
Melbourne Chef Meetup: Automating Azure Compliance with InSpec
 
OSDC 2017 | Building Security Into Your Workflow with InSpec by Mandi Walls
OSDC 2017 | Building Security Into Your Workflow with InSpec by Mandi WallsOSDC 2017 | Building Security Into Your Workflow with InSpec by Mandi Walls
OSDC 2017 | Building Security Into Your Workflow with InSpec by Mandi Walls
 
OSDC 2017 - Mandi Walls - Building security into your workflow with inspec
OSDC 2017 - Mandi Walls - Building security into your workflow with inspecOSDC 2017 - Mandi Walls - Building security into your workflow with inspec
OSDC 2017 - Mandi Walls - Building security into your workflow with inspec
 
Adding Security to Your Workflow with InSpec (MAY 2017)
Adding Security to Your Workflow with InSpec (MAY 2017)Adding Security to Your Workflow with InSpec (MAY 2017)
Adding Security to Your Workflow with InSpec (MAY 2017)
 
Philly security shell meetup
Philly security shell meetupPhilly security shell meetup
Philly security shell meetup
 
Automating Compliance with InSpec - Chef Singapore Meetup
Automating Compliance with InSpec - Chef Singapore MeetupAutomating Compliance with InSpec - Chef Singapore Meetup
Automating Compliance with InSpec - Chef Singapore Meetup
 
Security and dev ops for high velocity organizations
Security and dev ops for high velocity organizationsSecurity and dev ops for high velocity organizations
Security and dev ops for high velocity organizations
 
BuildStuff.LT 2018 InSpec Workshop
BuildStuff.LT 2018 InSpec WorkshopBuildStuff.LT 2018 InSpec Workshop
BuildStuff.LT 2018 InSpec Workshop
 
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy
 
InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017InSpec Workshop DevSecCon 2017
InSpec Workshop DevSecCon 2017
 
DevSecCon London 2017: Inspec workshop by Mandi Walls
DevSecCon London 2017: Inspec workshop by Mandi WallsDevSecCon London 2017: Inspec workshop by Mandi Walls
DevSecCon London 2017: Inspec workshop by Mandi Walls
 
Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014
 
InSpec Keynote at ChefConf
InSpec Keynote at ChefConfInSpec Keynote at ChefConf
InSpec Keynote at ChefConf
 
Compliance as Code Everywhere
Compliance as Code EverywhereCompliance as Code Everywhere
Compliance as Code Everywhere
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 

Más de Chef

Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed ChefChef
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps TourChef
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps TourChef
 
London Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to AuthorshipLondon Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to AuthorshipChef
 
London Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef AutomateLondon Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef AutomateChef
 
London Community Summit 2016 - Habitat
London Community Summit 2016 -  HabitatLondon Community Summit 2016 -  Habitat
London Community Summit 2016 - HabitatChef
 
The caseforawesome
The caseforawesomeThe caseforawesome
The caseforawesomeChef
 
Netflix's Could Migration
Netflix's Could MigrationNetflix's Could Migration
Netflix's Could MigrationChef
 
Alaska Airlines DevOps Journey
Alaska Airlines DevOps JourneyAlaska Airlines DevOps Journey
Alaska Airlines DevOps JourneyChef
 
And The Slow Suffer What They Must
And The Slow Suffer What They MustAnd The Slow Suffer What They Must
And The Slow Suffer What They MustChef
 
Visualizing your journey with chef
Visualizing your journey with chefVisualizing your journey with chef
Visualizing your journey with chefChef
 
The New IT Game
The New IT GameThe New IT Game
The New IT GameChef
 
How to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your OrganizationHow to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your OrganizationChef
 
Chef andwindows reactor
Chef andwindows reactorChef andwindows reactor
Chef andwindows reactorChef
 

Más de Chef (14)

Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed Chef
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps Tour
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps Tour
 
London Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to AuthorshipLondon Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to Authorship
 
London Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef AutomateLondon Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef Automate
 
London Community Summit 2016 - Habitat
London Community Summit 2016 -  HabitatLondon Community Summit 2016 -  Habitat
London Community Summit 2016 - Habitat
 
The caseforawesome
The caseforawesomeThe caseforawesome
The caseforawesome
 
Netflix's Could Migration
Netflix's Could MigrationNetflix's Could Migration
Netflix's Could Migration
 
Alaska Airlines DevOps Journey
Alaska Airlines DevOps JourneyAlaska Airlines DevOps Journey
Alaska Airlines DevOps Journey
 
And The Slow Suffer What They Must
And The Slow Suffer What They MustAnd The Slow Suffer What They Must
And The Slow Suffer What They Must
 
Visualizing your journey with chef
Visualizing your journey with chefVisualizing your journey with chef
Visualizing your journey with chef
 
The New IT Game
The New IT GameThe New IT Game
The New IT Game
 
How to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your OrganizationHow to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
 
Chef andwindows reactor
Chef andwindows reactorChef andwindows reactor
Chef andwindows reactor
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Último (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Compliance Automation with Inspec Part 2

  • 1. Getting Started with Compliance Automation
  • 2.
  • 3.
  • 4.
  • 5. SSH Control SSH supports two different protocol versions. The original version, SSHv1, was subject to a number of security issues. Please use SSHv2 instead to avoid these.
  • 6. How will I verify this?
  • 7. Whip up a one-liner! grep "^Protocol" /etc/ssh/sshd_config | sed 's/Protocol //'
  • 8. Apache Server Information Leakage – Server Token Directive• Description This Directive Controls weather Server response field is sent back to clients includes a description of Generic OS Type of the Server. This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities are dependent upon specific software versions. • How to Test In order to test for ServerToken configuration, one should check the Apache configuration file. • Misconfiguration ServerTokens Full • Remediation Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly. This tells Apache to only return "Apache" in the Server header, returned on every page request. ServerTokens Prod or ServerTokens ProductOnly https://www.owasp.org/index.php/SCG_WS_Apache
  • 9. Whip up a one-liner! grep "^ServerTokens" /etc/httpd/conf/httpd.conf | sed 's/ServerTokens //'
  • 10.
  • 11. Whip up a two-liner! TARGET=2 grep "^Protocol" /etc/ssh/sshd_config | sed 's/Protocol //' > /dev/null && echo $TARGET
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Two-thirds of organizations did not adequately test the security of all in-scope systems
  • 18. Key Trends • While individual rule compliance is up, testing of security systems is down • Sustainability is low. Fewer than a third of companies were found to be still fully compliant less than a year after successful validation.
  • 19.
  • 20. Shell Scripts grep "^Protocol" /etc/ssh/sshd_config | sed 's/Protocol //' grep "^ServerTokens" /etc/httpd/conf/httpd.conf | sed 's/ServerTokens //'
  • 21. Infrastructure Code package 'httpd' do action :install end service 'httpd' do action [ :start, :enable ] end
  • 22. What We Have Here Is A Communications Problem
  • 23.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. ©2016 Chef Software Inc. 2-30 Chef Compliance Identify compliance issues, security risks, and outdated software with customizable reports. Write your own compliance rules in InSpec or get started quickly by using built-in profiles – predefined rule sets for a variety of security frameworks.
  • 31. ©2016 Chef Software Inc. 2-31 Chef Compliance Chef Automate - Compliance Your Infrastructure LAN/WAN
  • 32. ©2016 Chef Software Inc. 2-32 Chef Compliance Chef Compliance can run without any other Chef software installed. The nodes you scan don't even need Chef software on them if you are scanning them for compliance. However, you would need Chef software to create and implement remediation recipes.
  • 33. ©2016 Chef Software Inc. 2-33 Chef Compliance Reports: Chef Compliance can produce reports that indicate risks and issues classified by severity and impact levels. Compliance Profiles: You can get started quickly with pre-built Compliance profiles for scanning Linux and Windows nodes.
  • 34. ©2016 Chef Software Inc. 2-34 Chef Compliance leverages InSpec. InSpec is an open-source run-time framework and rule language used to specify compliance, security, and policy requirements for testing any node in your infrastructure. Turn Compliance into Code control 'cis-3.1' do impact 0.7 title 'Set Daemon umask' desc ' Set the default umask for all processes started at boot time. ' describe file('/etc/sysconfig/init') do its('content') {should match 'umask 027'} end end
  • 35. ©2016 Chef Software Inc. 2-35 InSpec includes a collection of resources to help you write auditing rules quickly and easily using the Compliance DSL. Use InSpec to examine any node in your infrastructure; run the tests locally or remotely. Any detected security, compliance, or policy issues are flagged in a log and in Chef Compliance, displayed in a GUI. Clearly Express Statements of Policy describe port(80) do it { should_not be_listening } end describe port(443) do it { should be_listening } its('protocols') {should include 'tcp'} end
  • 36. ©2016 Chef Software Inc. 2-36 Find Issues Early Execute the compliance tests as part of your local development. Use InSpec as part of the Test Kitchen verification. Check running systems against your Compliance Profiles.
  • 37. ©2016 Chef Software Inc. 2-37 Write code quickly InSpec includes a collection of resources that help you write audit controls quickly and easily.
  • 38. ©2016 Chef Software Inc. 2-38 Write code quickly describe file('/etc/ssh/sshd_config') do its(:content) { should match /Protocol 2/ } end
  • 39. ©2016 Chef Software Inc. 2-39 Write code quickly describe sshd_config do its(:content) { should match /Protocol 2/ } end
  • 40. ©2016 Chef Software Inc. 2-40 Write code quickly describe sshd_config do its('Protocol') { should cmp 2 } end
  • 41. ©2016 Chef Software Inc. 2-41 Available Resources apache apache_conf apt audit_policy auditd_conf auditd_rules bash bond bridge command csv directory etc_group file gem group grub_conf host iis_site inetd_conf ini interface iptables json kernel_module kernel_paramet er limits_conf login_def mount mssql_session mysql mysql_conf mysql_session npm ntp_conf oneget os os_env package parse_config passwd pip port postgres postgres_conf postgres_sessi on powershell processes registry_key security_policy service shadow ssh_conf ssl user vbscript windows_feature wmi xinetd yaml yum
  • 42. ©2016 Chef Software Inc. 2-42 Run Code Anywhere Test Locally: $ inspec exec test.rb
  • 43. ©2016 Chef Software Inc. 2-43 Run Code Anywhere Remote via SSH: $ inspec exec test.rb -t ssh://54.163.150.246 --user=chef -- password=chef.io
  • 44. ©2016 Chef Software Inc. 2-44 Run Code Anywhere Remote via WinRM: $ inspec exec test.rb -t winrm://Admin@192.168.1.2 --password super
  • 45. ©2016 Chef Software Inc. 2-45 Run Code Anywhere Docker Container $ inspec exec test.rb -t docker://3dda08e75838
  • 46. ©2016 Chef Software Inc. 2-46 Run Code Anywhere $ inspec exec test.rb $ inspec exec test.rb -i ~/.aws/nathen.pem -t ssh://ec2-user@54.152.7.203 $ inspec exec test.rb -t winrm://Admin@192.168.1.2 --password super $ inspec exec test.rb -t docker://3dda08e75838
  • 47. ©2016 Chef Software Inc. 2-47 Inspect machines, data, & APIs describe host('example.com', port: 80, proto: 'tcp') do it { should be_reachable } end
  • 48. ©2016 Chef Software Inc. 2-48 Inspect machines, data, & APIs describe mysql_conf do its('slow_query_log_file') { should eq 'hostname_slow.log' } its('slow_query_log') { should eq '0' } its('log_queries_not_using_indexes') { should eq '1' } its('long_query_time') { should eq '0.5' } its('min_examined_row_limit') { should eq '100' } end
  • 49. ©2016 Chef Software Inc. 2-49 Inspect machines, data, & APIs control 'sg-1' do impact 1.0 title 'Security Group: No ingress access to CIDR block 0.0.0.0/0' desc 'Security Groups must not allow inbound access from anywhere' Vpc.new(id: ENV['vpc_id']).security_groups.each do |security_group| describe security_group do it { should_not have_ingress_rule().with_source('0.0.0.0/0') } end end end
  • 50. ©2016 Chef Software Inc. 2-50 Compliance profiles exist for many scenarios, such as those created by the Center for Internet Security (CIS) Chef Compliance maintains profiles as a collection of individual controls that comprise a complete audit. You can also create your own custom Compliance profiles. Compliance Profiles
  • 51. ©2016 Chef Software Inc. 2-51 Compliance Web UI The Chef Compliance web UI provides views into compliance scan results as well as views of Chef Compliance profiles. You execute scans via the Compliance web UI as well.

Notas del editor

  1. I’m an application developer! When I build apps, they go through various stages to get to my production environment.
  2. I heard we were going to be audited. The auditor showed up and wanted to audit our environment. I was a little nervous also self-assured. I was managing my infrastructure on AWS, everything is automated with Chef, how bad could it be.
  3. The auditor handed me a list of controls to verify.
  4. The auditor handed me a list of controls to verify.
  5. This took forever…but once it was done I took solace in the fact that the auditors wouldn’t return for at least another six months. We could get back to our normal development process.
  6. “Not so fast!” said our security team. We had to introduce a Security Review phase to our delivery.
  7. This is how I think of “security reviews” – they slow down the flow and change backs up. The more changes back up, the more we need to “expedite” or “force” things through the dam in order to satisfy LoB needs. Which leads to…
  8. Ok, so we still need to assure ourselves that things are "secure", right? So what we do is replace this security 'gate" with "scanning" At some later date Not with the same cadence as we're flowing changes through the system Usually only when the auditors are on site Which is why the sustainability is low – same thing as mentioned in the PCI report from Verizon
  9. How many of you are in regulated industries? It's so bad that you don't have to go past the first page of this report…
  10. 80% of companies still fail at interim assessment CAGR of 66% in security incidents since 2009.
  11. The auditor handed me a list of controls to verify.
  12. I think we need to stop whatever we’re doing and go back to first principles for a second.
  13. First I want to start defining security and compliance. These are not the same thing, although obviously they are related. Up until now we have been primarily concerned with compliance activities. Actually in many cases you could be “compliant” without achieving the intended aims of standards, which is to assure security. The objective isn't to pass the compliance audit, the objective is to actually make our systems more secure. You can spend a lot of time negotiating with auditors and getting them to accept "compensating controls" and the like in order to pass a compliance audit, but this is what Jez Humble would call "compliance theatre". How much can you pull the wool over the eyes of your auditors while still having a company that still has huge risks?
  14. Before you can be compliant, you first have to truly be secure. Compliance is about: Don’t get hacked Don’t lose data Compliance activities aren’t just about “making auditors go away” which is how we’ve treated them.
  15. We always talk about how in DevOps it's not about the tools, it's about the culture. But you want to choose tools that will help you reinforce the culture you want. I've spent the first part of this presentation talking about how that it's the culture and mindset of how to do security and compliance culture that are problematic these days. Now I'll talk about how you can use tools and processes to help get to the culture you want, which is to build in security as part of the quality of getting a thing to production.
  16. One of our beliefs is that the world of humans acting directly on computers is over – it’s not scalable, it’s not reproducible, it’s not testable
  17. So the future is clearly humans acting on code, and code acting on machines – that’s the era that Chef grew up in.
  18. For the purposes of compliance, we actually wanted a common language, in code, that would allow all audiences – compliance, security, and devops – to collaborate on. And this code will then act on systems. And for this I’d like to turn it over to my colleague Galen Emery to show you Chef Compliance, and that language we invented, called InSpec.
  19. By now you are probably aware of how Chef automates the configuration and management of your infrastructure. But what about risks and compliance issues of your infrastructure? Regulatory compliance is a fact of life for every enterprise. With Chef Compliance you can scan for risks and compliance issues with easy-to-understand, customizable reports and visualization. You can then use Chef to automate the remediation of issues and use Chef Compliance to implement a continuous audit of applications and infrastructure.
  20. The Chef Compliance server is a centralized location from which all aspects of the state or your infrastructure’s compliance can be managed. With Chef Compliance you can test any node in your infrastructure, including all of the common UNIX and Linux platforms and most versions of Microsoft Windows. Chef Compliance can continuously test any node against the goals of your organization’s security management lifecycle for risks and compliance issues.
  21. Chef Compliance can run without any other Chef software installed on the Chef Compliance server machine. The nodes you scan don't even need Chef software on them if you are scanning them for compliance. However, you would need Chef software to create and implement remediation recipes if you choose to use recipes to remediate compliance issues.
  22. Chef Compliance leverages InSpec. InSpec is an open-source run-time framework and rule language used to specify compliance, security, and policy requirements for testing any node in your infrastructure. The InSpec name refers to “infrastructure specification InSpec includes a collection of resources to help you write auditing rules quickly and easily using the Compliance DSL. Use InSpec to examine any node in your infrastructure; run the tests locally or remotely. Any detected security, compliance, or policy issues are flagged in a log and displayed in reports. The InSpec audit resource framework is fully compatible with Chef Compliance. Instructor note: InSpec is similar to ServerSpec but learners who have no experience with Serverspec may be confused by the reference.
  23. This works but is sub-optimal. The location of the sshd_config file must be known A regular expression (RegEx) is used
  24. This works but is sub-optimal. The location of the sshd_config file must be known – InSpec knows the default location for this file A regular expression (RegEx) is used
  25. This works but is sub-optimal. The location of the sshd_config file must be known – InSpec knows the default location for this file A regular expression (RegEx) is used – InSpec understands how this file works, it’s a set of keys and values
  26. Compliance profiles exist for many scenarios, such as those created by the Center for Internet Security (CIS), a non-profit organization that is focused on enhancing the cyber security readiness and response of public and private sector entities. Chef Compliance maintains profiles as a collection of individual controls that comprise a complete audit. For example, CIS benchmark 8.1.1.1 recommends testing for the maximum size of the audit log.  You can also create your own custom Compliance profiles.