158
The Epistemological Problem of Application Security - James wickett

Epistemological Problem of Application Security

Embed Size (px)

Citation preview

The Epistemological

Problem of

Application Security- James wickett

@wickett #ruggeddevops

James WickettSR. ENGINEER, SIGNAL SCIENCES

AUSTIN, TX

HANDS-ON GAUNTLT BOOK

DEVOPS DAYS GLOBAL AND AUSTIN ORGANIZER

LASCON ORGANIZER

Application Security Monitoring and Instrumentation

Application Security you can use!

An approach that integrates with devops organizations

Team from Etsy: Zane Lackey, Nick Galbreath

signalsciences.com

@wickett #ruggeddevops

Software development has been experimenting how we know anything

Application Security abdicated runtime responsibility and effectively abdicated development responsibility through philosophical approaches and organizational silos

DevOps is here to stay, and security can actually be a part of it

Ops found a way to add value, security needs to find that same path

There are three ways we can add value: at development, at deploy, at runtime

Summary

@wickett #ruggeddevops

A study in how we

know anything in

Application Security

@wickett #ruggeddevops

Spoiler Alert: We don’t !

@wickett #ruggeddevops

once upon a time…

@wickett #ruggeddevops

Epistemological

Problem of Software

Development

@wickett #ruggeddevops

Humans optimize

for the probable

@wickett #ruggeddevops

We optimize for the

probable

@wickett #ruggeddevops

Unit Testing

@wickett #ruggeddevops

Integration Testing

@wickett #ruggeddevops

Happy Path Engineering

@wickett #ruggeddevops

We also optimize

for the possible

@wickett #ruggeddevops

Over Engineering

@wickett #ruggeddevops

The scaling algo

that never got used…

@wickett #ruggeddevops

There is too much to

choose from in the

realm of possible

@wickett #ruggeddevops

Actually, we optimize for

the perceived probable

@wickett #ruggeddevops

How do we know

what to create?

@wickett #ruggeddevops

This is the problem

@wickett #ruggeddevops

Epistemological

Problem of Software

Development

@wickett #ruggeddevops

We gather data and

rhetoric to support

our theories

@wickett #ruggeddevops

There are 3 major

arcs in the history of

Software Development

@wickett #ruggeddevops

First Arc: Agile

@wickett #ruggeddevops

Agile avoids the problem

@wickett #ruggeddevops

Agile reminds that

we dont know what

we are building

@wickett #ruggeddevops

@wickett #ruggeddevops

Behavior Driven

Development

@wickett #ruggeddevops

BDD = Agile + feedback

@wickett #ruggeddevops

Behavior Driven Development is a second-generation, outside–in, pull-

based, multiple-stakeholder, multiple-scale, high-automation, agile

methodology. It describes a cycle of interactions with well-defined

outputs, resulting in the delivery of working, tested software that matters.

Dan North , 2009

@wickett #ruggeddevops

Amplify Feedback

Loop

@wickett #ruggeddevops

Agile emphasizes

feedback to developers

from their overlords and

sometimes even customers

@wickett #ruggeddevops

TLDR;

Rapid Iterations Win

@wickett #ruggeddevops

Agile is our guiding

Light

@wickett #ruggeddevops

The world has

changed since Agile

@wickett #ruggeddevops

We don’t sell

CD’s anymore

@wickett #ruggeddevops

Software as a Service

@wickett #ruggeddevops

The last fifteen years have

brought a complete change in

our delivery cadence,

distribution mechanisms and

revenue models

@wickett #ruggeddevops

Second Arc: DevOps

@wickett #ruggeddevops

DEVOPS IS THE APPLICATION OF AGILE METHODOLOGY TO SYSTEM

ADMINISTRATION - THE PRACTICE OF CLOUD SYSTEM ADMINISTRATION BOOK

@wickett #ruggeddevops

DEVOPS

@wickett #ruggeddevops

Agile Infrastructure

@wickett #ruggeddevops

http://www.slideshare.net/jallspaw/10-deploys-per-day-dev-and-ops-cooperation-at-flickr

@wickett #ruggeddevops

Less WIP

Less technical debt

@wickett #ruggeddevops

Customers actually using

the feature while the

developer is working on it

@wickett #ruggeddevops

Great side effect:

Produces Happy Developers

@wickett #ruggeddevops

@wickett #ruggeddevops

@wickett #ruggeddevops

Devops realized that ops

doesn’t know what devs

know and vice versa

@wickett #ruggeddevops

Dev : Ops 10 : 1

@wickett #ruggeddevops

DevOps is an Epistemological

breakthrough joining people

around a common problem

@wickett #ruggeddevops

Culture is the most

important aspect to devops

succeeding in the enterprise

- Patrick DeBois

@wickett #ruggeddevops

Culture is shaped in

part by values

@wickett #ruggeddevops

@wickett #ruggeddevops

Mutual Understanding

Shared Language

Shared Views

Collaborative Tooling

@wickett #ruggeddevops

DEVOPS IS THE INEVITABLE RESULT OF NEEDING TO DO EFFICIENT OPERATIONS IN A [DISTRIBUTED COMPUTING AND CLOUD]

ENVIRONMENT. - TOM LIMONCELLI

@wickett #ruggeddevops

http://puppetlabs.com/sites/default/files/2014-state-of-devops-report.pdf

@wickett #ruggeddevops

TLDR; Devops practices

improve IT performance

@wickett #ruggeddevops

Culture Automation

Measurement Sharing

- @damonedwards, @botchagalupe

@wickett #ruggeddevops

Devops gone wrong

@wickett #ruggeddevops

“THAT THE WORD #DEVOPS GETS REDUCED TO TECHNOLOGY IS A MANIFESTATION OF HOW BADLY WE NEED A CULTURAL SHIFT”

- @PATRICKDEBOIShttp://www.slideshare.net/cm6051/london-devops-31-5-years-of-devops

@wickett #ruggeddevops

Third Arc: Continuous

Delivery

@wickett #ruggeddevops

Continuous Delivery is not

merely how often you

deliver but how little

you can deliver at a time

@wickett #ruggeddevops

Delivery Pipelines are rad!

@wickett #ruggeddevops

Batch Size of 1

@wickett #ruggeddevops

Give power to the

Developers

@wickett #ruggeddevops

Allocate time to

enhance the build,

test and deploy system

@wickett #ruggeddevops

Reduce Code Latency

Increase Code Velocity

@wickett #ruggeddevops

That compliance

necessitates Separation

of Duties is a myth

@wickett #ruggeddevops

3 Arcs: Agile DevOps

Continuous Delivery

@wickett #ruggeddevops

The next Arc: Security Rugged

@wickett #ruggeddevops

“…Those stupid developers”

- Security person

@wickett #ruggeddevops

“Security prefers a system

powered off and unplugged”

- Developer

@wickett #ruggeddevops

Cultural Unrest

with security in

most organizations

@wickett #ruggeddevops

Compliance Driven Culture

@wickett #ruggeddevops

“[RISK ASSESSMENT] INTRODUCES A DANGEROUS FALLACY: THAT STRUCTURED

INADEQUACY IS ALMOST AS GOOD AS ADEQUACY AND THAT UNDERFUNDED

SECURITY EFFORTS PLUS RISK MANAGEMENT ARE ABOUT AS GOOD AS PROPERLY FUNDED SECURITY WORK”

@wickett #ruggeddevops

Security is where ops

was 5 years ago…

@wickett #ruggeddevops

In the beginning of

devops, we had the

#noops movement

@wickett #ruggeddevops

Let’s get ready for #nosec

@wickett #ruggeddevops

Actually, it is

already here

@wickett #ruggeddevops

Dev : Ops : Sec 100 : 10 : 1

@wickett #ruggeddevops

Understaffing means

no one thinks security

helps the business win

@wickett #ruggeddevops

DevOps changed that

for Ops, security can

change too

@wickett #ruggeddevops

Netflix demonstrated

that people care about resiliency

@wickett #ruggeddevops

Innately, we all care

@wickett #ruggeddevops

Rugged Software Movement

@wickett #ruggeddevops

I AM RUGGED AND, MORE IMPORTANTLY, MY CODE IS RUGGED.

I RECOGNIZE THAT SOFTWARE HAS BECOME A FOUNDATION OF OUR MODERN WORLD.

I RECOGNIZE THE AWESOME RESPONSIBILITY THAT COMES WITH THIS FOUNDATIONAL ROLE.

@wickett #ruggeddevops

I AM RUGGED BECAUSE MY CODE CAN FACE THESE CHALLENGES AND PERSIST IN SPITE

OF THEM.

@wickett #ruggeddevops

#ruggeddevops

@wickett #ruggeddevops

https://vimeo.com/54250716

@wickett #ruggeddevops

http://www.youtube.com/watch?v=jQblKuMuS0Y

@wickett #ruggeddevops

The best thing security can

do is help developers and

help operations

@wickett #ruggeddevops

Start there

@wickett #ruggeddevops

it’s going to take a

change on our part

@wickett #ruggeddevops

@wickett #ruggeddevops

#BadIdea 1

WAF’s suck, lets do

developer training

@wickett #ruggeddevops

@wickett #ruggeddevops

@wickett #ruggeddevops

Awareness campaign

OWASP Top Ten

@wickett #ruggeddevops

We abandoned knowing

anything useful about

the Runtime

@wickett #ruggeddevops

#BadIdea 2

Developers can’t figure it

out, lets do vuln scanning

instead

@wickett #ruggeddevops

“Developers are stoopid,

here is a 400 page PDF of

our findings to prove it”

- Pen tester

@wickett #ruggeddevops

Even with the emphasis

on appsec training, in

practice we made it a

dark art

@wickett #ruggeddevops

#BadIdea 3

Fix Low-Hanging Fruit

@wickett #ruggeddevops

@wickett #ruggeddevops

You probably still have

something the flies want

@wickett #ruggeddevops

we actually don't know

who is attacking us

@wickett #ruggeddevops

We don't actually know

what they are attacking

@wickett #ruggeddevops

Runtime knowledge is

silo’ed at best so devs

fix what they know

@wickett #ruggeddevops

#badidea 4

Put in tooling that no

one outside of security

can understand

@wickett #ruggeddevops

job security!

@wickett #ruggeddevops

usually in the name

of compliance

@wickett #ruggeddevops

“Get a WAF dude!” - PCI-DSS 6.6

@wickett #ruggeddevops

Choose your own

adventure…

@wickett #ruggeddevops

smallest possible

solution you can

consider a WAF…

@wickett #ruggeddevops

CDN added

ModSecurity Ruleset

Huzzah!

@wickett #ruggeddevops

An appliance that

blocks all the things

@wickett #ruggeddevops

And now no one eats

lunch with you anymore

@wickett #ruggeddevops

“every aspect of managing WAFs is an ongoing process. This is the antithesis

of set it and forget it technology. That is the real point of this research. To maximize value from your WAF you need to go in with everyone’s eyes open to the effort required to get and keep

the WAF running productively.” - a whitepaper from a WAF vendor

@wickett #ruggeddevops

Ok, we’re good here…

@wickett #ruggeddevops

If everyone’s is running the

WAF, who is running the

business?

@wickett #ruggeddevops

@wickett #ruggeddevops

Ok, we are sorry…

How do we add value

already?

@wickett #ruggeddevops

Two ways!

@wickett #ruggeddevops

Add value to Devs

Add value to ops

@wickett #ruggeddevops

Pray the business notices

@wickett #ruggeddevops

@wickett #ruggeddevops

Pro-Tip #1

Automate security tooling

to run in testing

@wickett #ruggeddevops

Start with Adding just one

test for XSS on a few pages

in your app

@wickett #ruggeddevops

@wickett #ruggeddevops

gauntlt automates

security tools

@wickett #ruggeddevops

GAUNTLTOpen source, MIT License

Gauntlt comes with pre-canned steps that hook security testing tools

Gauntlt does not install tools

Gauntlt wants to be part of the CI/CD pipeline

Be a good citizen of exit status and stdout/stderr

@wickett #ruggeddevops

@wickett #ruggeddevops

@wickett #ruggeddevops

@wickett #ruggeddevops

@wickett #ruggeddevops

@wickett #ruggeddevops

here’s an XSS attack

you can use

@wickett #ruggeddevops

@slow @finalFeature: Look for cross site scripting (xss) using arachni against a URL

Scenario: Using arachni, look for cross site scripting and verify no issues are found Given "arachni" is installed And the following profile: | name | value | | url | http://localhost:8008 | When I launch an "arachni" attack with: """ arachni --modules=xss --depth=1 --link-count=10 --auto-redundant=2 <url> """ Then the output should contain "0 issues were detected."

@wickett #ruggeddevops

http://theagileadmin.com/2015/06/09/pragmatic-security-and-rugged-devops/

@wickett #ruggeddevops

github.com/gauntlt/gauntlt-demo

@wickett #ruggeddevops

http://bit.ly/gauntlt-book-deal

50% off Hands-on

Gauntlt Book

@wickett #ruggeddevops

Pro-tip #2

Put that security testing

in your continuous

integration system

@wickett #ruggeddevops

@wickett #ruggeddevops

@wickett #ruggeddevops

https://speakerdeck.com/garethr/battle-tested-code-without-the-battle

@wickett #ruggeddevops

Pro-Tip #3

Add Application Security

telemetry to devs and ops

@wickett #ruggeddevops

Convert App Security

Logs into metrics in

the systems dev and

ops use

@wickett #ruggeddevops

Runtime

Instrumentation for

Application Security

@wickett #ruggeddevops

RunTime Correlation

between biz, ops, dev, sec

@wickett #ruggeddevops

SQLi + HTTP 500’s +

login spikes +

transaction decrease

@wickett #ruggeddevops

Pro-Tip #4

Add Security at OS and

config management level

@wickett #ruggeddevops

@wickett #ruggeddevops

Learn some

chef/puppet/ansible

@wickett #ruggeddevops

OS and Config

Management

@wickett #ruggeddevops

reverse the #nosec trend

Add Value to Devs

Add Value to Ops

@wickett #ruggeddevops

Software development has been experimenting how we know anything

Application Security abdicated runtime responsibility and effectively abdicated development responsibility through philosophical approaches and organizational silos

DevOps is here to stay, and security can actually be a part of it

Ops found a way to add value, security needs to find that same path

There are three ways we can add value: at development, at deploy, at runtime

Summary