SlideShare a Scribd company logo
Automating Compliance with InSpec
Sydney AWS Security Meetup
August 10, 2017
Matt Ray
Manager, Solutions Architect – APJ
Chef Software
matt@chef.io
@mattray
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
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
• Description
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OSType 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 toTest
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
More grep and sed!
grep "^ServerTokens" /etc/httpd/conf/httpd.conf | sed 's/ServerTokens //'
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
C
o
m
p
l
i
a
n
c
e
Automating AWS Compliance with InSpec
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.
Automating AWS Compliance with InSpec
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
We Have A Communications Problem
Automating AWS Compliance with InSpec
Security != Compliance
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
Compliance Language
One Language
Linux
One Language
Linux,Windows
Windows
One Language
Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
Examples of Available Resources
apache_conf
apt
audit_policy
auditd_conf
auditd_rules
bond
bridge
command
crontab
directory
etc_group
file
gem
group
host
inetd_conf
interface
iptables
kernel_module
kernel_parameter
limits_conf
login_defs
mount
mysql_conf
mysql_session
npm
ntp_conf
oneget
os
os_env
package
parse_config
parse_config_file
passwd
pip
port
postgres_conf
postgres_session
powershell
processes
registry_key
security_policy
service
ssh_config
sshd_config
user
windows_feature
yum
What is it not?
• IDS / IPS
• Firewall
• Antivirus
• Pentesting tool
One Language
Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
Bare-metal
One Language
Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
Bare-metal,VMs
One Language
Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
Bare-metal,VMs, Containers
One Language
Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
Bare-metal,VMs, Containers
Nodes
One Language
Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
Bare-metal,VMs, Containers
Nodes, Databases
DB Testing
One Language
Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
Bare-metal,VMs, Containers
Nodes, Databases,APIs
Cloud Testing
InSpec
> inspec exec test.rb
Test a machine remotely via SSH
> inspec exec test.rb -i identity.key -t ssh://root@172.17.0.1
Test your machine locally
> inspec exec test.rb -t winrm://Admin@192.168.1.2 --password super
Test Docker Container
> inspec exec test.rb -t docker://5cc8837bb6a8
Test a machine remotely via WinRM
AGENTLESS
Operating System & Application Coverage
• Microsoft Windows
• Red Hat Enterprise Linux
• Ubuntu Linux
• SUSE Linux Enterprise Server
• Oracle Enterprise Linux
• AIX
• HP-UX
• Solaris
• VMware ESXi
• MySQL
• Oracle
• PostgreSQL
• Tomcat
• SQL Server
• IIS
• HTTP request
One Language
Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
Bare-metal,VMs, Containers
Nodes, Databases,APIs, Cloud Platforms, ...
Open Source Community
•https://inspec.io
•https://github.com/chef/inspec
•https://supermarket.chef.io
•https://learn.chef.io
•#inspec in https://chefcommunity.slack.com
CONTINUOUS COMPLIANCE AUTOMATION
InSpec - Part of your InfoSec toolchain
FIREWALL ANTIVIRUS
INTRUSION
DETECTION/
PREVENTION
PENETRATION
TESTING
Continuous Workflow
Detect
Correct
The Chef Automate Platform
Continuous Automation for High Velocity IT
Workflow • Local development • Integration • Tooling (APIs & SDKs)
COLLABORATE
▪ Package
▪ Test
▪ Approve
BUILD
▪ Provision
▪ Configure
▪ Execute
▪ Update
DEPLOY
▪ Secure
▪ Comply
▪ Audit
▪ Measure
▪ Log
MANAGE
Infrastructure Automation Compliance AutomationApplication Automation
OSS AUTOMATION ENGINES
Increase Speed
▪ Package infrastructure and app
configuration as code
▪ Continuously automate
infrastructure and app updates
Improve Efficiency
▪ Define and execute standard
workflows and automation
▪ Audit and measure effectiveness of
automation
Decrease Risk
▪ Define compliance rules as code
▪ Deliver continuous compliance as
part of standard workflow
AWS OpsWorks for Chef Automate
Native Amazon Service
Managed Chef Server
▪ Utilizes RDS and other native
services
▪ May be externally accessible
AWS Native
▪ Auto Scaling in your VPC
▪ Automatic backups and upgrades
OpsWorks Stacks
▪ New name for previous version of
OpsWorks
● Partnership between Amazon and Chef, jointly
developed and maintained
● Fully managed AWS service with frequent updates
● Fully compatible with open source Chef
● Amazon is your support and billing
● All Chef Automate features will be supported
○ Visibility and Workflow today
○ Compliance soon
○ Currently Northern Virginia, Oregon & Ireland
with more planned
Automating AWS Compliance with InSpec
InSpec-AWS
• https://github.com/chef/inspec-aws
aws_ec2
aws_iam_access_key
aws_iam_password_policy
aws_iam_root_user
aws_iam_user
aws_iam_users
Dig into the new way of learning about
Chef, Automation, and DevOps.
Self-paced training on Linux and Windows and much more!
learn.chef.io
Automating AWS Compliance with InSpec

More Related Content

PDF
Automating Compliance with InSpec - AWS North Sydney
PDF
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
PDF
DevOpsDays Singapore Habitat Ignite
PPTX
Compliance Automation with Inspec Part 4
PPTX
Application Automation with Habitat
PPTX
Chef Hack Day Denver
PPTX
Compliance Automation with Inspec Part 2
PPTX
Achieving DevOps Success with Chef Automate
Automating Compliance with InSpec - AWS North Sydney
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore Habitat Ignite
Compliance Automation with Inspec Part 4
Application Automation with Habitat
Chef Hack Day Denver
Compliance Automation with Inspec Part 2
Achieving DevOps Success with Chef Automate

What's hot (20)

PPTX
Chef Workflow Demo
PDF
Chef Automate Workflow Demo
PPTX
Chef Compliance & Workflow w/Delivery
PPTX
London Community Summit 2016 - Fresh New Chef Stuff
PDF
Nike popup compliance workshop
PDF
Automating Compliance with InSpec - Chef Singapore Meetup
PPTX
Devops journey chefpopup-2016.04.26-v2
PDF
Intermediate/Compliance training Guide
PPTX
Compliance Automation with InSpec
PPTX
Compliance Automation with InSpec - Chef NYC Meetup - April 2017
PPTX
London Community Summit - Chef at SkyBet
PDF
Chef compliance - Intermediate Training
PPTX
Azure handsonlab
PPTX
Compliance Automation with Inspec Part 1
PPTX
Adding Security and Compliance to Your Workflow with InSpec
PPTX
Compliance Automation with Inspec Part 3
PDF
Nike pop up habitat
PPT
Nginx internals
PDF
Compliance Automation Workshop
PPTX
How to Write Chef Cookbook
Chef Workflow Demo
Chef Automate Workflow Demo
Chef Compliance & Workflow w/Delivery
London Community Summit 2016 - Fresh New Chef Stuff
Nike popup compliance workshop
Automating Compliance with InSpec - Chef Singapore Meetup
Devops journey chefpopup-2016.04.26-v2
Intermediate/Compliance training Guide
Compliance Automation with InSpec
Compliance Automation with InSpec - Chef NYC Meetup - April 2017
London Community Summit - Chef at SkyBet
Chef compliance - Intermediate Training
Azure handsonlab
Compliance Automation with Inspec Part 1
Adding Security and Compliance to Your Workflow with InSpec
Compliance Automation with Inspec Part 3
Nike pop up habitat
Nginx internals
Compliance Automation Workshop
How to Write Chef Cookbook
Ad

Similar to Automating AWS Compliance with InSpec (20)

PDF
Melbourne Chef Meetup: Automating Azure Compliance with InSpec
PDF
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
PDF
Melbourne Infracoders: Compliance as Code with InSpec
PDF
Bay Area Chef Meetup February
PDF
Chef Automate - Infracoders Canberra August 8, 2017
PDF
Compliance as Code with InSpec - DevOps Melbourne 2017
PDF
Infrastructure and Compliance Delight with Chef Automate
PPTX
Compliance as Code: Velocity with Security - Fraser Pollock, Chef
PDF
Chef Automate - Wellington DevOps August 2, 2017
PDF
NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
PDF
Compliance as Code Everywhere
PPTX
A Bit of Everything Chef
PDF
Cooking Up Windows with Chef Automate
PPTX
Anatomy of a Build Pipeline
PPTX
Delivering High-Availability Web Services with NGINX Plus on AWS
PDF
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
PDF
.NET Cloud-Native Bootcamp
ODP
Cfengine presentation at the RMLL
PPTX
Using Chef InSpec for Infrastructure Security
PDF
A Byte of Software Deployment
Melbourne Chef Meetup: Automating Azure Compliance with InSpec
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
Melbourne Infracoders: Compliance as Code with InSpec
Bay Area Chef Meetup February
Chef Automate - Infracoders Canberra August 8, 2017
Compliance as Code with InSpec - DevOps Melbourne 2017
Infrastructure and Compliance Delight with Chef Automate
Compliance as Code: Velocity with Security - Fraser Pollock, Chef
Chef Automate - Wellington DevOps August 2, 2017
NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
Compliance as Code Everywhere
A Bit of Everything Chef
Cooking Up Windows with Chef Automate
Anatomy of a Build Pipeline
Delivering High-Availability Web Services with NGINX Plus on AWS
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
.NET Cloud-Native Bootcamp
Cfengine presentation at the RMLL
Using Chef InSpec for Infrastructure Security
A Byte of Software Deployment
Ad

More from Matt Ray (18)

PDF
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
PDF
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
PDF
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
PDF
HashiTalks 2020 - Chef Tools & Terraform: Better Together
PDF
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
PDF
Wellington DevOps: Bringing Your Applications into the Future with Habitat
PDF
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
PDF
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
PDF
DevOpsDays Jakarta: State of DevOps 2018
PDF
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
PDF
Chef Automate - Azure Sydney User Group
PDF
Automating Applications with Habitat - Sydney Cloud Native Meetup
PDF
OpsWorks for Chef Automate - Auckland AWS
PDF
Compliance as Code: Shifting Compliance Left in Continuous Delivery
PDF
DevOps Sydney: Chef Automate
PDF
Brisbane AWS Meetup: OpsWorks for Chef Automate
PDF
Managing Complexity at Velocity
PDF
Habitat & Amazon's ECS
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
HashiTalks 2020 - Chef Tools & Terraform: Better Together
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
Wellington DevOps: Bringing Your Applications into the Future with Habitat
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
DevOpsDays Jakarta: State of DevOps 2018
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
Chef Automate - Azure Sydney User Group
Automating Applications with Habitat - Sydney Cloud Native Meetup
OpsWorks for Chef Automate - Auckland AWS
Compliance as Code: Shifting Compliance Left in Continuous Delivery
DevOps Sydney: Chef Automate
Brisbane AWS Meetup: OpsWorks for Chef Automate
Managing Complexity at Velocity
Habitat & Amazon's ECS

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
A Presentation on Artificial Intelligence
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
PPTX
Cloud computing and distributed systems.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
Teaching material agriculture food technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
Spectral efficient network and resource selection model in 5G networks
Encapsulation_ Review paper, used for researhc scholars
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A Presentation on Artificial Intelligence
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf
Cloud computing and distributed systems.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Teaching material agriculture food technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
20250228 LYD VKU AI Blended-Learning.pptx

Automating AWS Compliance with InSpec

  • 1. Automating Compliance with InSpec Sydney AWS Security Meetup August 10, 2017
  • 2. Matt Ray Manager, Solutions Architect – APJ Chef Software matt@chef.io @mattray
  • 6. 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."
  • 7. How will I verify this?
  • 8. Whip up a one-liner! grep "^Protocol" /etc/ssh/sshd_config | sed 's/Protocol //'
  • 9. Apache Server Information Leakage • Description This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OSType 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 toTest 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
  • 10. More grep and sed! grep "^ServerTokens" /etc/httpd/conf/httpd.conf | sed 's/ServerTokens //'
  • 18. Two-thirds of organizations did not adequately test the security of all in-scope systems
  • 19. 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.
  • 21. Shell Scripts grep "^Protocol" /etc/ssh/sshd_config | sed 's/Protocol //' grep "^ServerTokens" /etc/httpd/conf/httpd.conf | sed 's/ServerTokens //'
  • 22. Infrastructure Code package 'httpd' do action :install end service 'httpd' do action [ :start, :enable ] end
  • 23. We Have A Communications Problem
  • 36. One Language Linux,Windows, BSD, Solaris,AIX, HP-UX, ...
  • 37. Examples of Available Resources apache_conf apt audit_policy auditd_conf auditd_rules bond bridge command crontab directory etc_group file gem group host inetd_conf interface iptables kernel_module kernel_parameter limits_conf login_defs mount mysql_conf mysql_session npm ntp_conf oneget os os_env package parse_config parse_config_file passwd pip port postgres_conf postgres_session powershell processes registry_key security_policy service ssh_config sshd_config user windows_feature yum
  • 38. What is it not? • IDS / IPS • Firewall • Antivirus • Pentesting tool
  • 39. One Language Linux,Windows, BSD, Solaris,AIX, HP-UX, ... Bare-metal
  • 40. One Language Linux,Windows, BSD, Solaris,AIX, HP-UX, ... Bare-metal,VMs
  • 41. One Language Linux,Windows, BSD, Solaris,AIX, HP-UX, ... Bare-metal,VMs, Containers
  • 42. One Language Linux,Windows, BSD, Solaris,AIX, HP-UX, ... Bare-metal,VMs, Containers Nodes
  • 43. One Language Linux,Windows, BSD, Solaris,AIX, HP-UX, ... Bare-metal,VMs, Containers Nodes, Databases
  • 45. One Language Linux,Windows, BSD, Solaris,AIX, HP-UX, ... Bare-metal,VMs, Containers Nodes, Databases,APIs
  • 47. InSpec > inspec exec test.rb Test a machine remotely via SSH > inspec exec test.rb -i identity.key -t ssh://root@172.17.0.1 Test your machine locally > inspec exec test.rb -t winrm://Admin@192.168.1.2 --password super Test Docker Container > inspec exec test.rb -t docker://5cc8837bb6a8 Test a machine remotely via WinRM AGENTLESS
  • 48. Operating System & Application Coverage • Microsoft Windows • Red Hat Enterprise Linux • Ubuntu Linux • SUSE Linux Enterprise Server • Oracle Enterprise Linux • AIX • HP-UX • Solaris • VMware ESXi • MySQL • Oracle • PostgreSQL • Tomcat • SQL Server • IIS • HTTP request
  • 49. One Language Linux,Windows, BSD, Solaris,AIX, HP-UX, ... Bare-metal,VMs, Containers Nodes, Databases,APIs, Cloud Platforms, ...
  • 51. CONTINUOUS COMPLIANCE AUTOMATION InSpec - Part of your InfoSec toolchain FIREWALL ANTIVIRUS INTRUSION DETECTION/ PREVENTION PENETRATION TESTING
  • 53. The Chef Automate Platform Continuous Automation for High Velocity IT Workflow • Local development • Integration • Tooling (APIs & SDKs) COLLABORATE ▪ Package ▪ Test ▪ Approve BUILD ▪ Provision ▪ Configure ▪ Execute ▪ Update DEPLOY ▪ Secure ▪ Comply ▪ Audit ▪ Measure ▪ Log MANAGE Infrastructure Automation Compliance AutomationApplication Automation OSS AUTOMATION ENGINES Increase Speed ▪ Package infrastructure and app configuration as code ▪ Continuously automate infrastructure and app updates Improve Efficiency ▪ Define and execute standard workflows and automation ▪ Audit and measure effectiveness of automation Decrease Risk ▪ Define compliance rules as code ▪ Deliver continuous compliance as part of standard workflow
  • 54. AWS OpsWorks for Chef Automate Native Amazon Service Managed Chef Server ▪ Utilizes RDS and other native services ▪ May be externally accessible AWS Native ▪ Auto Scaling in your VPC ▪ Automatic backups and upgrades OpsWorks Stacks ▪ New name for previous version of OpsWorks ● Partnership between Amazon and Chef, jointly developed and maintained ● Fully managed AWS service with frequent updates ● Fully compatible with open source Chef ● Amazon is your support and billing ● All Chef Automate features will be supported ○ Visibility and Workflow today ○ Compliance soon ○ Currently Northern Virginia, Oregon & Ireland with more planned
  • 63. Dig into the new way of learning about Chef, Automation, and DevOps. Self-paced training on Linux and Windows and much more! learn.chef.io