owasp joy of proactive security

48
THE JOY OF PROACTIVE SECURITY SCOTT BEHRENS

Upload: scott-behrens

Post on 14-Aug-2015

40 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Owasp joy of proactive security

THE JOY OF PROACTIVE SECURITYSCOTT BEHRENS

Page 2: Owasp joy of proactive security

EHLO• Scott Behrens

• Application Security Engineer at Netflix

• Likes automation

• Torn between breaking and making

• Loves research and open source

Page 3: Owasp joy of proactive security

What We Will Cover• Challenges of a modern infrastructure

• Proactive security as a solution

• Examination of mature security program

• How to get started

• Conclusion

Page 4: Owasp joy of proactive security

Terminology Primer• Define technology terms:

• Application

• Instance

• Autoscaling groups (ASGs) / Load balancers (ELBs)

• AMI

• SecurityGroups

• Regions / Availability Zones (AZs)

Page 5: Owasp joy of proactive security

Netflix Primer• 100's of Developers

• Over 1,000 applications

• Hundreds of production pushes a day

• Over 50k instances

• No Security Gates!

Page 6: Owasp joy of proactive security

Continuous Deployment• Can be fully automated

• Immutable Platform

• Looks like:

• git -> Create deb (Jenkins) -> AMI Snapshot -> Deploy

Page 7: Owasp joy of proactive security

Potential Pitfalls• Multiple concurrent code-bases (A/B testing,

regional functionality, etc.)

• New applications brought online/old applications retired constantly

• Insecure third party dependencies

Page 8: Owasp joy of proactive security

More Pitfalls• How do we identify and catalog assets (IP?, DNS

Name?, Application?, ELB?...)

• How do we profile and provide baseline security to new applications?

• How do we monitor security policy changes and configurations in AWS

• Monitoring the web for credential dumps, hacktivism, sensitive data exposure?

Page 9: Owasp joy of proactive security

The List Goes On...• Many of these problems are not unique to

Netflix/the cloud

• Some are unique or can be solved in different ways

• We have coined our approach to these and other problems as...

Page 10: Owasp joy of proactive security

Proactive Security• Dictionary.com

• Proactive - "serving to prepare for, intervene in, or control an expected occurrence or situation, especially a negative or difficult one; anticipatory"

Page 11: Owasp joy of proactive security

Proactive Security• Security controls should be:

• Integrated, automated, scalable, adaptive, actionable, and intelligent

• Time is limited

• End goal: Less babysitting, more time for harder problems

Page 12: Owasp joy of proactive security

Proactive Security• Find problems early and address them

• Know your weaknesses and work to improve them

• Monitor for anomalies and be prepared to respond

• Collect meaningful data and use it to improve

• Simplify make security the easy path

• Reevaluate your approach

• Share what you learn with others

Page 13: Owasp joy of proactive security

Find• Identify issues early

• Old hat:

• Static asset lists, fileshare with old pentest reports

problems early and address them

Page 14: Owasp joy of proactive security

Find - New Way• Define what an asset is:

• Application

• ELB

• FQDN

• IP

Page 15: Owasp joy of proactive security

Find - New Way• Have an intelligent way to collect/

track assets and vulns

Monterey

Page 16: Owasp joy of proactive security

Monterey• Provides way to automatically define and scan

assets

• Soon to be open sourced

• Asset groups as application name:

• Contain any ELBs or FQDN

• Do not contain instance

Page 17: Owasp joy of proactive security

Monterey• Monterey queries AWS for new assets and

changes

• Monterey runs "Monklets" for things like vulnerability scanning

• Store vulns centrally in S3

Page 18: Owasp joy of proactive security

Monterey Demo

Page 19: Owasp joy of proactive security

Monitor• Monitor, detect, and respond to security issues

• Old hat:

• Reactionary

• New hat:

• Less reactionary aka. more proactive

• Automatic

• Intelligent

for anomalies and be prepared to respond

Page 20: Owasp joy of proactive security

Simian Army• aka The Monkeys!

• Open source

• Proactively wreck your environment to simulate outages

• Take down apps, instances, ELBs, even entire regions

• Ensures developers write resilient code

Page 21: Owasp joy of proactive security

"Dirty Laundry" Project• Look for assets unintentionally exposed

• Leverages Monterey for assets

• Uses Scumblr for actioning findings

• Uses Sketchy for collecting status codes, generating screenshots, and text scrapes

• Both Sketchy/Scumblr are open source

Page 22: Owasp joy of proactive security

Scumblr

• Intelligent automation platform aka. our swiss army knife

• Monitor things by using plugins

• Credential Dumps

• Hacktivism

• Brand Reputation

• Full Disclosure

• Leverages Sketchy for screen shots and text scrapes

• Custom Workflows

Page 23: Owasp joy of proactive security

Dirty Laundry Demo

Page 24: Owasp joy of proactive security

Speedbump• Mechanism to detect attacks and enforce security policies

automatically

• You define what you want to monitor/filter

• Security policies can be time delays, blocking, routing, etc.

• A WAF, proxy and firewall on steroids because it has application intelligence (business logic)

• Ensnare

Page 25: Owasp joy of proactive security

Security Monkey

• Open Source

• Monitor events/changes within AWS

• Changes to IAM users

• Security groups

• Policy changes

• Notify when things change

Page 26: Owasp joy of proactive security

Have you noticed a trend?

• A more proactive approach

• Identify something interesting automatically

• Notify automatically

• Provide workflows for more complex remediations

Page 27: Owasp joy of proactive security

Know• None of us have unlimited time or resources--we all have

weaknesses

• Work to automatically identify blindspots

• Leverage tools and information where useful

• Old hat:

• Spreadsheet containing static list of apps and manually created risk rankings

• Not scalable when we are talking 100's or 1000's of apps

your weaknesses and work to improve them

Page 28: Owasp joy of proactive security

Penguin Shortbread• Catalog assets

• Measure attributes

• Calculate risk

• Will be open sourced if we can make it more generic (TBD)

Page 29: Owasp joy of proactive security

Case Study: Monklet Your Way To Infinity

• Shellshock

• Vulnerable vs exploitable?

• Some commercial scanners only hit root of webpage

• What about other scripts?

Page 30: Owasp joy of proactive security

Case Study: Monklet Your Way To Infinity

• Monterey Monklet!

• Spiders a provided asset (gevented)

• Checks each page for exploitability of Shellshock

• Stores results in S3 centrally

• Deploy N instances of Monklet to cover 100's of apps

Page 31: Owasp joy of proactive security

Collect• Collect data from intelligent systems

• Actually use it to:

• Drive initiatives

• Find what is/isn't working

meaningful data and use it to improve

Page 32: Owasp joy of proactive security

Example

Page 33: Owasp joy of proactive security

Simplify• If it's easy developers will do it

• Make security an enabler and not a burden

• Encourage developers to come to you

• Also: v0.1 doesn't need to be perfect

make security the easy path

Page 34: Owasp joy of proactive security

Immutable Base AMI• Make your platform consistent

• For non-cloud users: system image/template

• Conformity Monkey for AWS users (open source)

Page 35: Owasp joy of proactive security

Danger! Danger!• Applications often use legacy/outdated dependencies

• Make it clear to developers they are using dangerous stuff

• Netflix leverages an API based on OWASP Dependency Checker

• API will eventually be open sourced

• Provides information into our Dependency tool

• Work in progress...

Page 36: Owasp joy of proactive security

Danger! Danger!

Page 37: Owasp joy of proactive security

FindSecBugs• Allow users to opt-in to static analysis

• FindSecBugs is lightweight and pretty useful (for Java)

• They can still deploy regardless but no one likes seeing red

Page 38: Owasp joy of proactive security

Reevaluate• Environment is always changing--what works today

may be ineffective tomorrow

• Developers are agile, which means we must be too

• Be willing to start simple, knowing the initial solution is temporary (Don't over-engineer!)

• Use the data you've collected to determine when an approach is no longer sufficient

your approach

Page 39: Owasp joy of proactive security

Share• We (security professionals) are all working to solve

similar problems

• Sharing tools and information make all of our lives easier

• Allows improvement through the collective consciousness of the industry

• Prevents duplicate effort

what you learn with others

Page 40: Owasp joy of proactive security

http://netflix.github.io/

(More to come!)

Page 41: Owasp joy of proactive security

Proactive Security: Level 1

• Create a list of assets

• Rank by sensitivity

• Automate

Page 42: Owasp joy of proactive security

Proactive Security: Level 2

• Strategize security based on asset risk. Ex:

1. Sensitive assets: Examine thoroughly

2. Frequently used components: Secure by default

3. Everything else: Find a good baseline level of due diligence

Page 43: Owasp joy of proactive security

Proactive Security: Level 3• Identify weak links

• Architectural: Poor network segmentation

• Cultural: Developers don't understand XSS

• Specific: "Application X" relies on an outdated version of Struts

• Determine how to measure the weaknesses and put in place a plan to address or manage

Page 44: Owasp joy of proactive security

Proactive Security: Level 4

• Monitor, alert, and gather more intel

• Detect anomalies in security relevant functionality: Login successes/failures, password resets, authorization failures...

• Dashboards are fun, but intelligent alerting is better

• "Effective Approaches to Web Application Security" by Zane Lackey

Page 45: Owasp joy of proactive security

Proactive Security: All Levels

• Continually drive improvements into your tools and processes

• Be flexible and ready to adapt

• Share what you've learned and done!

Page 46: Owasp joy of proactive security

Works Cited• http://www.netbraintech.com/products/feature-

guide/images/asset-report-step-5-2.png

• http://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_web_01.pdf

• http://www.slideshare.net/zanelackey/effective-approaches-to-web-application-security

Page 47: Owasp joy of proactive security

Tools• Netflix OSS

https://netflix.github.io/

• OWASP Dependency Check https://www.owasp.org/index.php/OWASP_Dependency_Check

• Ensnare https://github.com/ahoernecke/ensnare

• FindSecBugshttps://github.com/h3xstream/find-sec-bugs

Page 48: Owasp joy of proactive security

Thanks!• Contact Us:

[email protected]

• @helloarbit

• OSS: http://netflix.github.io/

• Want to be part of the team? We're hiring!

• Questions?