55
DevOpsSecFAIL DevOps Security Anti Patterns Dr. Constantine Aaron Cois Carnegie Mellon University

Devopssecfail

  • Upload
    cacois

  • View
    90

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Devopssecfail

DevOpsSecFAILDevOps Security Anti Patterns

Dr. Constantine Aaron Cois

Carnegie Mellon University

Page 2: Devopssecfail

Me

@aaroncois

www.codehenge.net

github.com/cacois

Disclaimer: Though I am an employee of the Software Engineering Institute at Carnegie Mellon University, this work was not funded by the SEI and does not reflect the work or opinions of the SEI or its customers.

Page 3: Devopssecfail

DevOps

Page 4: Devopssecfail

DevOps

Page 5: Devopssecfail

DevOpsSec

DevOps is a

Risk Mitigation strategy,

built on

Situational Awareness,

Automation,and

Repetition

Page 6: Devopssecfail

DevOpsSec

But security is where

a lot of DevOpsimplementations

Fall Down

Page 7: Devopssecfail

THE EXCEPTIONAnti-pattern

Page 8: Devopssecfail

TheException

You automate…

…builds

…functional tests

…deployment

…reporting

Page 9: Devopssecfail

TheException

You automate…

…builds

…functional tests

…deployment

…reporting

…the coffee machine

Image: https://lh4.ggpht.com/z_w-yCMvUcrqZd_6eXlt7E24YvSHEak1k5lNvk5GGNYmzMaBQkH1oe3emhZk0scIWg=w300

Page 10: Devopssecfail

TheException

But security testing is still

manual pen testing, done only

on release

Page 11: Devopssecfail

Automate Security Testing removes…

…Human error

…infrequent execution

…Excuses

Page 12: Devopssecfail

There are great projects out there

OWASP ZAPhttps://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project http://gauntlt.org/

GAUNTLTBE MEAN TO YOUR CODE AND LIKE IT

Help improve them!

Page 13: Devopssecfail

THE MULTIVERSEAnti-pattern

Page 14: Devopssecfail

Image: https://artcritique.files.wordpress.com/2014/01/multiverse-and-schrodingers-cat-in-play.png

Page 15: Devopssecfail

Dev

TheMultiverse

Page 16: Devopssecfail

StagingDev

Test

Prod

TheMultiverse

Page 17: Devopssecfail

Staging

Test

Prod

TheMultiverse

App

Page 18: Devopssecfail

StagingDev

Prod

TheMultiverse

App

Page 19: Devopssecfail

Dev

Test

Prod

TheMultiverse

App

Page 20: Devopssecfail

StagingDev

Test

TheMultiverse

App

Page 21: Devopssecfail

StagingDev

Test

Prod

TheMultiverse

Page 22: Devopssecfail

StagingDev

Test

Prod

TheMultiverse

Page 23: Devopssecfail

StagingDev

Test

Prod

TheMultiverse

Page 24: Devopssecfail

StagingDev

Test

Prod

TheMultiverse

Page 25: Devopssecfail

StagingDev

Test

Prod

TheMultiverse

Page 26: Devopssecfail

StagingDev

Test

TheMultiverse

App

Page 27: Devopssecfail

When nothing

looks the sameyou can never be sure your

app will

behave the same

Page 28: Devopssecfail

When nothing

looks the sameyou can never be sure your

app security features will

behave the same

Page 29: Devopssecfail

THE CONFIGURATORAnti-pattern

Page 30: Devopssecfail

TheConfigurator

Manual configuration, done buy your

best and brightest...

Image: http://2vga1o5mew51s6gu7x0mnk7kf.wpengine.netdna-cdn.com/wp-content/uploads/main/2013_06/A-Cat-Snatching-Wires-Out-of-a-Server.jpg

Page 31: Devopssecfail

TheConfigurator

…will still lead to an

unmanageable, unpredictable,

and

unrepeatablesolution

Image: http://assorted-images.s3.amazonaws.com/datacenterinfrastructure/messy%20data%20center.png

Page 32: Devopssecfail

TheConfigurator

If it’s not

Automatedit’s not

Done

Page 33: Devopssecfail

TheConfigurator

If it’s not

Automatedit’s not

Done Secure

Page 34: Devopssecfail

THE INFILTRATORAnti-pattern

Page 35: Devopssecfail

TheInfiltrator

He sneaks in…

…and alters production

…but he works for you!

http://blog.landesk.com/wp-content/uploads/sites/4/2012/05/ninja.jpg

Page 36: Devopssecfail

There is always a reason to make a manual changes

But don’t do it!

Page 37: Devopssecfail

Unexpected manual changes are often…

Undocumented,

Unauditable,

Unrepeatable

Page 38: Devopssecfail

Unexpected manual changes are often…

Undocumented,

Unauditable,

Unrepeatable

Insecure

Page 39: Devopssecfail

Protip

Configure production to alert the entire team when manually

accessed.

Transparency is key

Page 40: Devopssecfail

THE SURVIVORAnti-pattern

Page 41: Devopssecfail

We’ve all been there…

Intrusions overnight…

…lock it down…

…cascading system failures…

…it’s all crashing…

Page 42: Devopssecfail

It feels like…

Page 43: Devopssecfail

But it ends

You survive

You’re out of the woods. Just glad its over.

Going to go sleep for 18 hours…

…and then back to normal.

Page 44: Devopssecfail

Survivor mentality defeats continuous improvement

When do we analyze what went wrong?

How do we prevent similar failures in the future?

All failures must result in codified change to DevOps process.

Page 45: Devopssecfail

This attitude persists…

…when we don’t expect failure.

We should always expect failure.

Be ready for it.

Plan for it

Page 46: Devopssecfail

After action rules for failure

Understand exactly what went wrong

Never let the same failure happen twice

Propagate fixes across the enterprise

Ensure that you teach the next generation

Page 47: Devopssecfail

THE COLLEGE PARTYAnti-pattern

Page 48: Devopssecfail

TheCollegeParty

Software libraries are

your guests, and

everyone’s invited

http://36.media.tumblr.com/2c189abde1066433264d5038df6172b8/tumblr_mlyab4PZvk1qjgvbto2_1280.jpg

Page 49: Devopssecfail

TheCollegeParty

99%of Global 2000 companies

will be using open source code in

mission-critical apps by 20161

1 http://www.zdnet.com/article/scan-open-source-use-to-minimize-risks-optimize-benefits/

Page 50: Devopssecfail

TheCollegeParty

Do you know what’s in your

app?

Code we wrote

Code someone else wrote

Image: http://acardiac.blogspot.com/

Page 51: Devopssecfail

THE SKYDIVERAnti-pattern

Page 52: Devopssecfail

http://marvinqeleys.blogspot.com/2011/09/skydiving-sky-surf.html

Page 53: Devopssecfail

TheSkydiver

Once you jump, you can’t return to the plane.

You are committed.

Permanently.

This is not how we should model our deployments.

Page 54: Devopssecfail

TheSkydiver

Rollback is

essential

Never be left without an escape route to completely working software.

Page 55: Devopssecfail

QUESTIONS?Any