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

Security is Hard, But We Can't Go Shopping (Madison Ruby 2014)

Security is Hard, But We Can't Go Shopping (Madison Ruby 2014)

The last year has been brutal for Ruby and security. Ruby has gotten quite popular, which is really exciting! But it also means that we are now square in the crosshairs of security researchers, whether whitehat, blackhat, or some other hat. Before 2013, only the Ruby and Rails core teams had meaningful experience with security issues. This year everyone got meaningful experience. Vulnerabilities are everywhere, and handling security issues responsibly is critical if we want Ruby (and Rubyists) to stay safe and in high demand.

I discuss responsible disclosure, as well as repsonsible ownership of your own code. How do you know if a bug is a security issue, and how do you report it without tipping off someone malicious? As a Rubyist, you probably have at least one library of your own. How do you handle security issues, and fix them without compromising apps running on the old code? Don’t let your site get hacked, or worse yet, let your project allow someone else’s site to get hacked! Learn from the hard-won wisdom of the security community so that we won’t repeat the mistakes of others.

André Arko

August 23, 2014
Tweet

More Decks by André Arko

Other Decks in Technology

Transcript

  1. Security
    is hard

    View Slide

  2. André Arko
    @indirect

    View Slide

  3. View Slide

  4. Bundler

    View Slide

  5. Security
    is hard

    View Slide

  6. but we can’t
    go shopping

    View Slide

  7. !

    View Slide

  8. accelerating
    security issues are

    View Slide

  9. Ruby+Rails
    security releases

    View Slide

  10. ruby CVEs
    0
    1
    2
    3
    4
    5
    6
    2009 2010 2011 2012 2013

    View Slide

  11. rails CVEs
    0
    3
    6
    9
    12
    15
    18
    2009 2010 2011 2012 2013

    View Slide

  12. wait
    what’s a CVE?

    View Slide

  13. common
    vulnerabilities
    and exposures

    View Slide

  14. numbering
    authorities

    View Slide

  15. apple
    adobe
    cisco
    redhat
    etc.

    View Slide

  16. cve.mitre.org
    nvd.nist.gov

    View Slide

  17. minaswan
    security?
    vulnerabilities?

    View Slide

  18. dhh + rails
    not as nice

    View Slide

  19. dhh + rails
    but we can learn
    from them

    View Slide

  20. so many
    gems
    for everything

    View Slide

  21. so many
    chances for
    security issues

    View Slide

  22. rubygems
    bundler
    json
    rexml
    rack

    View Slide

  23. arel
    activerecord
    actionpack
    activesupport
    rdoc (rdoc?! yup.)

    View Slide

  24. what
    should we do?

    View Slide

  25. updating
    is a pain

    View Slide

  26. updating
    blocks feature
    development

    View Slide

  27. updating
    is insurance

    View Slide

  28. a small cost
    to mitigate risk

    View Slide

  29. without it
    failures are
    catastrophic

    View Slide

  30. !

    View Slide

  31. disclosure
    liability
    lawyers

    View Slide

  32. updating
    is hard work
    !

    View Slide

  33. but
    updating is
    worth it

    View Slide

  34. update
    sleep well at night
    !

    View Slide

  35. reporting
    security issues

    View Slide

  36. responsible
    disclosure

    View Slide

  37. the worst
    except for all the
    other options

    View Slide

  38. the best yet
    because everyone
    ends up unhappy

    View Slide

  39. !

    View Slide

  40. but
    no one ends
    up screwed

    View Slide

  41. disclosure
    companies hate it

    View Slide

  42. responsible
    clever, triumphant
    hackers hate it

    View Slide

  43. rewards! !

    View Slide

  44. rewards! !
    maybe everyone
    ends up happy?

    View Slide

  45. facebook

    View Slide

  46. View Slide

  47. facebook
    $500 minimum
    no maximum

    View Slide

  48. github

    View Slide

  49. View Slide

  50. github
    $100 minimum
    $5000 maximum

    View Slide

  51. heroku

    View Slide

  52. View Slide

  53. heroku
    $100 minimum
    $1500 maximum

    View Slide

  54. engine yard

    View Slide

  55. View Slide

  56. engine yard
    no compensation
    $0 maximum

    View Slide

  57. you
    anyway, back to

    View Slide

  58. find a bug?
    what if you

    View Slide

  59. questions
    ask yourself two

    View Slide

  60. I shouldn’t?
    can I access
    something

    View Slide

  61. other people?
    can I disable
    something for

    View Slide

  62. disclose
    responsibly
    if the answer was yes

    View Slide

  63. publicly
    contact an author
    before reporting

    View Slide

  64. look for
    a security policy
    email in gemspec
    email on github

    View Slide

  65. have empathy
    work together

    View Slide

  66. if all else fails

    View Slide

  67. fix it!
    if all else fails

    View Slide

  68. finally,
    what about
    your gems?

    View Slide

  69. your gems
    are security vulnerabilities
    waiting to happen

    View Slide

  70. unless
    your code is perfect
    (and then I have a bridge to sell you)

    View Slide

  71. easy
    sympathetic discoverer

    View Slide

  72. write fix, review fix
    release + announce
    easy

    View Slide

  73. medium
    problem in the wild

    View Slide

  74. medium
    announce if safe
    fix ASAP, test fix
    release + announce

    View Slide

  75. hard
    researcher out for glory

    View Slide

  76. hard
    respond ASAP
    set expectations
    update every 24-48h
    fix + release + thanks

    View Slide

  77. make it
    as easy as possible

    View Slide

  78. personally
    gemspec email
    github email

    View Slide

  79. on a team
    security address
    PGP key
    disclosure policy

    View Slide

  80. ecosystem
    mailing list for announcing
    security issues and releases

    View Slide

  81. bit.ly/ruby-sec-ann

    View Slide

  82. go shopping
    we can
    !"#$
    %&'(

    View Slide

  83. questions?
    bit.ly/ruby-sec-ann
    @indirect

    View Slide