rugged devops will help you build ur cloudz

83
RUGGED DEVOPS WILL HELP YOU BUILD UR CLOUDZ by @wickett and @ernestmueller

Upload: james-wickett

Post on 13-May-2015

2.363 views

Category:

Technology


2 download

DESCRIPTION

Talk given by James Wickett and Ernest Mueller at the (ISC)2 Secure SDLC event in Austin, TX.

TRANSCRIPT

Page 1: Rugged DevOps Will help you build ur cloudz

RUGGED DEVOPS WILL HELP YOU BUILD UR CLOUDZ

by @wickett and @ernestmueller

Page 2: Rugged DevOps Will help you build ur cloudz

OUTLINE

• Us, And Why You Care What We Say

• The Cloud, And How It Is Threatening You

• Rugged, And Its New Approach To Security

• DevOps, And How It Is Driving Collaborative Solutions

• Combining Cloud, Rugged, and DevOps To Solve The Problem

• How We Did Cloud Security With DevOps At NI

• Introducing RuggedDevOps Tool: Gauntlt

Page 3: Rugged DevOps Will help you build ur cloudz

NI  CONFIDENTIAL

@wicke'Senior  DevOps  Engineer

CISSP,  GWAPT,  CCSK,  GSEC,  GCFW

james@wicke'.me

@RuggedDevOps

theagileadmin.com

Page 4: Rugged DevOps Will help you build ur cloudz

@ernestmueller

DevOps Platform Manager and Release Manager,

Bazaarvoice

[email protected]

theagileadmin.com

Page 5: Rugged DevOps Will help you build ur cloudz

WHAT IS THE CLOUD?

Page 6: Rugged DevOps Will help you build ur cloudz

(ISP -> colo -> MSP) + virtualization + HPC + (AJAX + SOA -> REST APIs) =

IaaS

IDE/4GLs + (EAI -> SOA) + SaaS + IaaS = PaaS

((web site -> web app) -> ASP) + virtualization + fast ubiquitous

Internet + [RIA browsers && mobile] = SaaS

[IaaS | PaaS | SaaS ] + [ devops | open source | noSQL ] = cloud

THE GRAND UNIFIED THEORY

Page 7: Rugged DevOps Will help you build ur cloudz

CLOUDINESS

• An outsourced managed service

• providing hosted computing or functionality

• delivered over the Internet

• offering extreme scalability

• by using dynamically provisioned, multitenant, virtualized systems, storage, and applications

• controlled via REST APIs

• and billed in a utility manner.

Page 8: Rugged DevOps Will help you build ur cloudz

“Cloud? I’ve been doing that since 1988. It’s just the same old thing

with a new name." - Technohipster

Page 9: Rugged DevOps Will help you build ur cloudz

Pretty new:multitenant

massively scalableelastic self provisioning

pay as you goResulting benefits:

agilityeconomy of scale

low initial investmentscalable cost/opex

resilienceeasy delivery

Not new:virtualizationoutsourcingintegrationinterwebz

Page 10: Rugged DevOps Will help you build ur cloudz
Page 11: Rugged DevOps Will help you build ur cloudz

I recognize that my code will be attacked by talented and persistent adversaries who threaten our physical,

economic, and national security.

I am rugged, not because it is easy, but because it is necessary... and I am up for the challenge.

I recognize that my code will be used in

ways I cannot anticipate, in ways it

was not designed, and for longer than it was

ever intended.

Page 12: Rugged DevOps Will help you build ur cloudz

RUGGEDIZATION THEORY

Building solutions to handle adversity will cause unintended, positive benefits that will provide value that would have been unrealized otherwise.

Page 13: Rugged DevOps Will help you build ur cloudz

No Pain, No Gain

Page 14: Rugged DevOps Will help you build ur cloudz

RUGGED-ITIESMaintainability

AvailabilitySurvivabilityDefensibility

SecurityLongevityPortabilityReliability

Page 15: Rugged DevOps Will help you build ur cloudz

WHAT NEEDS TO HAPPEN

• Focus on real security. FUD doesn’t benefit anyone – figuring out how to “make it happen” – securely – benefits everyone.

• It’ll take time for compliance standards to get with the times – but don’t assume the cloud can’t be compliant – some of your auditors have actually heard of VMs and know what to do

• Organizations have to accept risk to reap rewards.

• Agile has taught orgs the collaborative approach is best

• Lean has taught orgs to experiment and iterate

Page 16: Rugged DevOps Will help you build ur cloudz

source: Gene Kim, “When IT says No @SXSW 2012”

Page 17: Rugged DevOps Will help you build ur cloudz

SECURITY SEES...

• They give advice that goes unheeded• Business decisions made w/o regard of risk• Irrelevancy in the organization• Constant bearer of bad news• Feels ignored by their peers (you know,

those devops guys)• Inequitable distribution of labor

Page 18: Rugged DevOps Will help you build ur cloudz

TRADITIONAL SECURITY

Page 19: Rugged DevOps Will help you build ur cloudz

THE CLOUD RESPONSE

Page 20: Rugged DevOps Will help you build ur cloudz

THE SEPARATION MODEL

Page 21: Rugged DevOps Will help you build ur cloudz

DEVOPS

Page 22: Rugged DevOps Will help you build ur cloudz

SERVICE LIFECYCLE

Page 23: Rugged DevOps Will help you build ur cloudz

ANTIPATTERN!

Deploying Software Manually

Page 24: Rugged DevOps Will help you build ur cloudz

ANTIPATTERN!

Deploying to a Production-like Environment Only after Development is

Complete

Page 25: Rugged DevOps Will help you build ur cloudz

ANTIPATTERN!

Manual Configuration

Management of Production

Environments

Page 26: Rugged DevOps Will help you build ur cloudz

CONTINUOUS INTEGRATION

• Check In Regularly

• Create an automated and comprehensive test suite

• Keep build and test short and fast

• All tests must pass before moving on

• Never Go Home on a broken build

• Never comment out failing tests

Page 27: Rugged DevOps Will help you build ur cloudz

CONFIGURATION MANAGEMENT

• Infrastructure as Code (IaC)• Model driven deployment• Version control everything• Know Your Environment if

you want to make it defensible

Page 28: Rugged DevOps Will help you build ur cloudz
Page 29: Rugged DevOps Will help you build ur cloudz
Page 30: Rugged DevOps Will help you build ur cloudz
Page 31: Rugged DevOps Will help you build ur cloudz

RUGGED DEVOPSBRIDGING SECURITY AND DEVOPS

Page 32: Rugged DevOps Will help you build ur cloudz

DEVOPS (+SEC)

• Increased trend driven by agile development towards tight collaboration between developers and operations staff

• Be the “security buddy”

• Embed with projects, don’t be a seagull

• By understanding, be understood

• How secure are things usually when people and teams all work separately?

Page 33: Rugged DevOps Will help you build ur cloudz
Page 34: Rugged DevOps Will help you build ur cloudz

THE 6 R’S RUGGED DEVOPS• repeatable – no manual steps• reliable - no DoS here• reviewable – aka audit• rapid – fast to build, deploy, restore• resilient – automated reconfiguration • reduced - limited attack surface

Page 35: Rugged DevOps Will help you build ur cloudz
Page 36: Rugged DevOps Will help you build ur cloudz
Page 37: Rugged DevOps Will help you build ur cloudz
Page 38: Rugged DevOps Will help you build ur cloudz

APPLY RUGGED DEVOPS TO THE CLOUD

• Start with a Rugged DevOps team

• Use a lot of firewalls

• Scan your code

• Source to system

• Threat modeling

• Watch for changes

• Pen Testing

Page 39: Rugged DevOps Will help you build ur cloudz

BUILD A RUGGED DEVOPS TEAM

Page 40: Rugged DevOps Will help you build ur cloudz

PEOPLE, PROCESS, TECH

Page 41: Rugged DevOps Will help you build ur cloudz

PEOPLE AND PROCESS

• Sit near the dev and ops team, better yet, put them all on the same team• Track security flaws or bugs in the same bug tracking

system• Automate whenever possible• Involve team with vendors• Measurement over time and clear communication

Page 42: Rugged DevOps Will help you build ur cloudz

USE FIREWALLS...(A LOT OF THEM)

Page 43: Rugged DevOps Will help you build ur cloudz

Web

DB

Middle Tier Middle Tier

LDAP

Firewall

Firewall

Firewall

DMZ 1

DMZ 2

DMZ 3

Traditional 3-Tier Web Architecture

Web Web

Page 44: Rugged DevOps Will help you build ur cloudz

firewall

firewallfirewall

firewallfirewall

DB

Middle Tier Middle Tier

LDAP

DMZ x3

DMZ x2

DMZ x2

Cloud Firewalls and DMZfirewall firewall

WebWebWeb

Page 45: Rugged DevOps Will help you build ur cloudz

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

RepeatableVerifiable

Prod/Dev/Test MatchingControlledAutomated

Page 46: Rugged DevOps Will help you build ur cloudz

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

firewall

firewallfirewall

firewallfirewall

Web

DB

Middle Tier Middle Tier

LDAP

firewall

Web

firewall

Web

Page 47: Rugged DevOps Will help you build ur cloudz

RUGGED BENEFITS

• Control and traffic whitelisting• Config management• Reproducible, automated and source controlled• No accidental data traversal across products or

dev/test/prod tiers• Dev and Test identical to Prod tier

Page 48: Rugged DevOps Will help you build ur cloudz

SCANTHECODE

Page 49: Rugged DevOps Will help you build ur cloudz

• Scans for OWASP Top Ten and more• Security Scanning as a Service• Static and Dynamic scanning• Integrated into development process• Dynamic and Static scanning

Page 50: Rugged DevOps Will help you build ur cloudz

SOURCETO SYSTEM

Page 51: Rugged DevOps Will help you build ur cloudz

AUTOMATED PROVISIONING - PIE

• Programmable Infrastructure Environment (PIE)• Code can be version controlled• Make Infrastructure as code• Defined once, deployed many times• Eliminate repetitive task and human errors• Rollback capability

Page 52: Rugged DevOps Will help you build ur cloudz

• a framework to define, provision, monitor, and control cloud-based systems

• written in Java, uses SSH as transport, currently supports Amazon AWS (Linux and Windows) and Microsoft Azure

• takes an XML-based model from source control and creates a full running system

• to define, provision, monitor, and control cloud-based systems

Page 53: Rugged DevOps Will help you build ur cloudz

THREATMODELME

Page 54: Rugged DevOps Will help you build ur cloudz

THREAT MODELING

• Understanding the threat profile of a system• Provide a basis for secure design

and implementation• Discover vulnerabilities• Provide feedback for the

application security life cycle

p. 29 in Threat Modeling, Swiderski, Snyder

Page 55: Rugged DevOps Will help you build ur cloudz

WATCHMY CHANGES

Page 56: Rugged DevOps Will help you build ur cloudz

HOST INTRUSION DETECTION SYSTEM

• Watch the file system (using hashing and timestamps)–/etc/–/usr/bin–…

• Change control for applications• Alert on changes and anomalies• PIE watchdog

Page 57: Rugged DevOps Will help you build ur cloudz

PENTESTING

Page 58: Rugged DevOps Will help you build ur cloudz

PENETRATION TESTING

• Use external and internal penetration testing• White box testing vs. Black box testing• Look for automation opportunities

(ruby, python, …)

Page 59: Rugged DevOps Will help you build ur cloudz

BUT WHAT ABOUT SECURITY TESTING IN MY

CONTINUOUS INTEGRATION SYSTEM?

Page 60: Rugged DevOps Will help you build ur cloudz

PUT YOUR CODE THROUGH THE GAUNTLT

Page 61: Rugged DevOps Will help you build ur cloudz

GAUNTLET, N. AN ATTACK FROM ALL SIDES

Page 62: Rugged DevOps Will help you build ur cloudz

Your web app

w3af

fuzzers

nmap

nessus

sqlmapmetasploit

You

dirbustercustom attacks

Page 63: Rugged DevOps Will help you build ur cloudz

GAUNTLT IS BUILT FOR

CONTINUOUS INTEGRATION

Page 64: Rugged DevOps Will help you build ur cloudz

GAUNTLT IS

Page 65: Rugged DevOps Will help you build ur cloudz

AN ALWAYS-ATTACKING ENVIRONMENT FOR

DEVELOPERS

Page 66: Rugged DevOps Will help you build ur cloudz

WITH ATTACKS WRITTEN IN EASY-TO-READ LANGUAGE

Page 67: Rugged DevOps Will help you build ur cloudz

ACCESSIBLE TO EVERYONE INVOLVED IN DEV, OPS, TESTING, SECURITY, ...

Page 68: Rugged DevOps Will help you build ur cloudz

GAUNTLT INCLUDES

Page 69: Rugged DevOps Will help you build ur cloudz

WHY GAUNTLT?

SECURITY DOMAIN KNOWLEDGE IS GENERALLY A MYSTERY TO DEV TEAMS

Page 70: Rugged DevOps Will help you build ur cloudz

GAUNTLT ALLOWS DEV AND OPS AND SECURITY TO COMMUNICATE AND COLLABORATE

Page 71: Rugged DevOps Will help you build ur cloudz

GAUNTLT JOINS:

THE PHILOSOPHY OF RUGGED SOFTWARE

&OUTSIDE-IN

TESTING

Page 72: Rugged DevOps Will help you build ur cloudz

LETS LOOK INSIDE A COUPLE OF THESE FILES

Page 73: Rugged DevOps Will help you build ur cloudz

@gauntlet @run

Feature: Run nmap against a target and pass the value of the hostname from the profile.xml.

Background: Given nmap is installed

Scenario: Verify server is available on standard web ports Given the hostname in the profile.xml When I run nmap against the hostname in the profile on ports 80,443 Then the output should contain: """ 80/tcp open http 443/tcp open https """

feature for nmap:nmap.feature

Page 74: Rugged DevOps Will help you build ur cloudz

Given /^nmap is installed$/ do steps %{ When I run `which nmap` Then the output should contain: """ nmap """ } end

When /^I run nmap against the hostname in the profile on ports (\d+),(\d+)$/ do |arg2, arg3| steps %{ When I run `nmap \"#{@hostname}\" -p80,443` }end

step definition for nmap:nmap.rb

Page 75: Rugged DevOps Will help you build ur cloudz

lets run gauntlt with the nmap.feature

against google.com

Page 76: Rugged DevOps Will help you build ur cloudz

wickett$ gauntlt

@gauntlet @runFeature: Run nmap against a target and pass the value of the hostname from the profile.xml.

Background: # features/nmap/nmap.feature:5 Given nmap is installed # features/step_definitions/nmap.rb:2

Scenario: Verify server is available on standard web ports # features/nmap/nmap.feature:8 Given the hostname in the profile.xml # features/step_definitions/profile.rb:1 When I run nmap against the hostname in the profile on ports 8080,443 # features/step_definitions/nmap.rb:12 Then the output should contain: # aruba-0.4.11/lib/aruba/cucumber.rb:98 """ 8080/tcp open http 443/tcp open https """...

Failing Scenarios:cucumber features/nmap/nmap.feature:8 # Scenario: Verify server is available on standard web ports

1 scenario (1 failed)4 steps (1 failed, 3 passed)0m0.341s

running gauntlt with failing tests

Page 77: Rugged DevOps Will help you build ur cloudz

wickett$ gauntlt

@gauntlet @runFeature: Run nmap against a target and pass the value of the hostname from the profile.xml.

Background: # features/nmap/nmap.feature:5 Given nmap is installed # features/step_definitions/nmap.rb:2

Scenario: Verify server is available on standard web ports # features/nmap/nmap.feature:8 Given the hostname in the profile.xml # features/step_definitions/profile.rb:1 When I run nmap against the hostname in the profile on ports 80,443 # features/step_definitions/nmap.rb:12 Then the output should contain: # aruba-0.4.11/lib/aruba/cucumber.rb:98 """ 80/tcp open http 443/tcp open https """

1 scenario (1 passed)4 steps (4 passed)0m1.117s

running gauntlt with passing tests

Page 78: Rugged DevOps Will help you build ur cloudz

WALK VS. RUN

• gauntlt has two modes: walk and run

• meaning fast and slow or smoke and full

• This is done by labels in cucumber

• For each feature you will get to decide if it is a @walk or a @run test or both

Page 79: Rugged DevOps Will help you build ur cloudz

SOME REALIZATIONS

• The core of gauntlt needs to provide a set of functionality that encourages contributors to write extensions for their pen testing tools

• A gauntlt DSL (Domain Specific Language) will arise with words like target, scan, attack, host...

• Smoke tests and validation vs. long running testing (nightly/weekly)

Page 80: Rugged DevOps Will help you build ur cloudz

JOIN THE PARTY!!FORK GAUNTLT ON GITHUB

Page 82: Rugged DevOps Will help you build ur cloudz

CLOUD & SECURITY RESOURCES

• Book: Cloud Security and Privacy (Mather, Kumraswamy, Latif)

• Jericho Forum (collaboration.opengroup.org/jericho/)

• Amazon AWS Security Center (aws.amazon.com/security)

• Austin Cloud User Group (acug.cloudug.org)

• Cloud Security Alliance (cloudsecurityalliance.org)

• CSA Austin Chapter (austincloud.org)

• CSA Security Guidance for Critical Areas in Cloud Computing

• ENISA Cloud Computing Risk Assessment

Page 83: Rugged DevOps Will help you build ur cloudz

@ERNESTMUELLER

@WICKETT

CONTACT US!