Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What is Rugged all about?

What is Rugged all about?

goto; Chicago : talk about Rugged, DevOps, Security.

Matt Konda

June 01, 2016
Tweet

More Decks by Matt Konda

Other Decks in Technology

Transcript

  1. What is ‘Rugged’
    all about?
    Matt Konda

    View Slide

  2. View Slide

  3. View Slide

  4. View Slide

  5. View Slide

  6. View Slide

  7. He would want me to tell you
    • Software is eating the world.
    • DevOps and Security is a rare
    opportunity.
    • Makes security positive, cultural+
    • Show the Rugged Manifesto
    • Honey Badger = Security + DevOps …
    • Empathy, Empathy, Empathy
    • Bridge communities!

    View Slide

  8. He would want me to emphasize
    • Instrumentation
    • Be Mean To Your Code
    • Complexity is the Enemy
    • Change Management (Automation
    through tooling)
    • Empathy (Did I say that yet?)

    View Slide

  9. He would want me to mention
    • By updating our software (and it’s
    dependencies) we can address a
    huge amount of attack surface.
    • DevOps should be good at this.
    • Empathy (Did I say that yet?)

    View Slide

  10. View Slide

  11. OWASP?

    View Slide

  12. Introduction
    1997 2006 2014
    Consultant
    Engineer
    Software
    Architect
    Director of
    Engineering
    Rabble Rouser:
    Perl
    Java Applet
    C++
    J2EE
    J2EE

    Spring
    Analytics
    Certificate Authority
    Vulnerability Scanner
    Penetration Test Manager
    Pricing
    Retail
    Banking
    Manufacturing
    Pharma
    Healthcare
    Research
    Ruby
    Rails
    Chicago BSides 2011, 2012
    Defcon Skytalk
    OWASP Chicago, MSP 2013
    AppSec USA 2012, 2013
    ChicagoRuby 2013
    Secure 360
    Lone Star Ruby 2013
    WindyCityRails 2013
    Chicago JUG 2014
    RailsConf 2014
    Converge 2014
    Chicago Coder Conference 2015
    MS in CS
    Founder
    Consultant
    Agile
    Clojure
    Graph Database
    Trying to hack a
    business model that
    succeeds while
    helping developers.
    Domains:
    Projects:
    DevOps / Automation
    Training
    Coaching
    Code Review
    Plugged in to SDLC
    Consulting
    Assessments
    @mkonda
    [email protected]
    DevOps
    Growing

    View Slide

  13. This was a setup. Chicago style.

    View Slide

  14. View Slide

  15. View Slide

  16. But in Chicago, we make the best of every situation.

    View Slide

  17. View Slide

  18. Positive Software
    Security
    Matt Konda

    View Slide

  19. Let’s learn what we can from
    Rugged (applied to DevOps)

    View Slide

  20. I recognize that software has become a foundation of our modern world.
    I recognize the awesome responsibility that comes with this foundational role.
    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.
    I recognize that my code will be attacked by talented and persistent adversaries who
    threaten our physical, economic and national security.
    I recognize these things – and I choose to be rugged.

    View Slide

  21. I recognize that software has become a foundation of our modern world.
    I recognize the awesome responsibility that comes with this foundational role.
    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.
    I recognize that my code will be attacked by talented and persistent adversaries who
    threaten our physical, economic and national security.
    I recognize these things – and I choose to be rugged.

    View Slide

  22. I recognize that software has become a foundation of our modern world.
    I recognize the awesome responsibility that comes with this foundational role.
    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.
    I recognize that my code will be attacked by talented and persistent adversaries
    who threaten our physical, economic and national security.
    I recognize these things – and I choose to be rugged.

    View Slide

  23. Reminiscent of the Agile Manifesto Perhaps?

    View Slide

  24. Let’s talk about adversaries…

    View Slide

  25. View Slide

  26. This year, organized crime became
    the most frequently seen threat actor
    for Web App Attacks.
    Source: Verizon 2015 Data Breach Investigations Report

    View Slide

  27. View Slide

  28. View Slide

  29. Threat model

    View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. Security Examples

    View Slide

  36. SELECT "orders".* FROM "orders"
    WHERE
    (rewards_code = 'a')
    union select id, 'product', 1, 1,
    'cc', 'cvv', 'expiration',
    email as first_name,
    encrypted_password as last_name,
    created_at, updated_at,
    id, 'reward' from users; --')

    View Slide

  37. Getting Rugged?
    Train.
    Search for string concatenation: +, append prefer
    parameterized queries!
    Do code review.
    Use static analysis.
    Use web app scanning.

    View Slide

  38. Output Encoding
    < <
    > >

    View Slide

  39. Getting Rugged?
    Train.
    Search for {{{, innerHTML, .raw, utext, etc.
    Do code review.
    Use static analysis.
    Use web app scanning.

    View Slide

  40. Insecure Direct Object Reference
    Hani Joanne
    Salary Record Salary Record
    ?
    Authorization fail!

    View Slide

  41. View Slide

  42. View Slide

  43. Some Specifics Around Process

    View Slide

  44. Security in the SDLC
    • Building software is a process.
    • The best way to make software secure is to make security
    part of the process.
    • There are many ways to do this - none is perfect.
    • Find a way to make the security fit your process.

    View Slide

  45. Requirements
    Design
    Code
    Test
    Maintenance
    Classic Waterfall Delivery

    View Slide

  46. Requirements
    Design
    Code
    Test
    Maintenance
    Classic Waterfall Delivery
    Security

    View Slide

  47. Story
    Continuous Delivery: The Unit of Work is a Story
    Requirements Design
    Code
    Test

    View Slide

  48. Story
    Continuous Delivery: The Unit of Work is a Story
    Requirements Design
    Code
    Test
    Security Requirements
    Security Unit Tests
    Exploratory Testing
    Static Analysis on Commit
    Code Review
    Threat model / attack surface
    Checklists
    Understand Dependencies

    View Slide

  49. continuous delivery

    View Slide

  50. Classic security sees this
    and wants to …

    View Slide

  51. continuous delivery

    View Slide

  52. Baseline Security
    Requirements

    View Slide

  53. ARE
    STAKEHOLDERS
    ASKING FOR
    SECURITY?

    View Slide

  54. View Slide

  55. View Slide

  56. Story Points

    View Slide

  57. Estimates to Include
    Security Considerations

    View Slide

  58. Here’s why.

    View Slide

  59. Agile metrics
    Credit: rallydev.com

    View Slide

  60. Story Review

    View Slide

  61. Incremental Code Review

    View Slide

  62. Continuous Integration

    View Slide

  63. View Slide

  64. View Slide

  65. View Slide

  66. Static Analysis

    View Slide

  67. Checklists

    View Slide

  68. View Slide

  69. View Slide

  70. View Slide

  71. View Slide

  72. Bug Tracking

    View Slide

  73. Testing

    View Slide

  74. View Slide

  75. View Slide

  76. Operationalize

    View Slide

  77. Understand lifecycle

    View Slide

  78. Think incremental

    View Slide

  79. continuous delivery
    Code Review
    Security Unit Tests
    Security Requirements

    View Slide

  80. Automate security tools

    View Slide

  81. continuous delivery
    Security Tool Automation:
    Code analysis
    Security unit tests
    Dynamic scanning
    etc.

    View Slide

  82. continuous delivery
    Security Tests Run
    Exploratory Testing Includes Security

    View Slide

  83. A detailed example:
    • Let’s say a feature is being developed
    • Then devs and testers are checking a new feature
    • Let them browse through an attack proxy (like Burp or
    ZAP) in passive mode
    • At night or when the system is quiet, use the browsing
    pattern as seeds for overnight attacks

    View Slide

  84. Continuous feedback

    View Slide

  85. continuous delivery
    Feedback!

    View Slide

  86. EVIL
    False
    Positives
    Are
    a Necessary

    View Slide

  87. Optimize for relevance

    View Slide

  88. Provisioning tools

    View Slide

  89. continuous delivery
    Since its easy to provision
    we can do security testing
    safely in a new env.

    View Slide

  90. Audit tools

    View Slide

  91. continuous delivery
    Deployment checks
    includes security
    audit checks.

    View Slide

  92. Self documenting for
    regulatory and
    compliance!

    View Slide

  93. Chaos tools

    View Slide

  94. Change is good

    View Slide

  95. continuous delivery
    Change is happening.
    It can be an
    opportunity
    instead of a hassle.

    View Slide

  96. Complexity is an enemy

    View Slide

  97. continuous delivery
    Small releases reduce complexity.
    Decomposition to micro-services reduces dependencies and complexity.
    Right now, security hurts.

    View Slide

  98. Shared responsibility

    View Slide

  99. continuous delivery
    Another principle of software delivery: build security in!
    Done means
    secure!
    Empowered to
    do security right!

    View Slide

  100. Measure results

    View Slide

  101. Event based model …
    (Reactive)

    View Slide

  102. Commit
    • Security Unit Tests
    • Static Code Analysis (Pipeline)
    • Security Requirements
    • Check Dependencies
    • Code Review
    • Checklists

    View Slide

  103. Deploy
    • Scripted Provisioning / Built in Change Control
    • Provisioning Auditing (Chef Audit, hardening.io)
    • Gauntlt

    View Slide

  104. Periodic
    • Full app analysis (static, manual pen test)
    • Secure Development Training
    • Baseline Security Requirements Review
    • ASVS Review
    • Data Science on Results

    View Slide

  105. Security Incident

    View Slide

  106. Required metasploit struts demo…

    View Slide

  107. /bin/dependency-check.sh -
    a struts2-showcase -
    out /tmp/ -
    s /tomcat-root/struts2-showcase/

    View Slide


  108. CVE-2013-2251
    9.3
    High
    CWE-20 Improper Input Validation
    Apache Struts 2.0.0 through 2.3.15 allows remote
    attackers to execute arbitrary OGNL expressions via a parameter
    with a crafted (1) action:, (2) redirect:, or (3) redirectAction:
    prefix.


    BID
    http://www.securityfocus.com/bid/64758
    64758


    View Slide

  109. Takeaway: lots of your issues might be in
    your dependencies!

    View Slide

  110. So what is Rugged all About?

    View Slide

  111. View Slide

  112. View Slide

  113. View Slide

  114. View Slide

  115. View Slide

  116. View Slide

  117. View Slide

  118. View Slide

  119. Traditional Plan Original
    goal

    View Slide

  120. Traditional Plan Original
    goal
    Actual
    GOAL
    Agile Plan

    View Slide

  121. empathy

    View Slide

  122. accountability

    View Slide

  123. culture

    View Slide

  124. View Slide