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

Security is Hard (RedDotRubyConf 2015)

Security is Hard (RedDotRubyConf 2015)

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

June 04, 2015
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. View Slide

  5. Security
    is hard

    View Slide

  6. but we can’t
    go shopping

    View Slide

  7. !

    View Slide

  8. Ruby
    security releases

    View Slide

  9. View Slide

  10. View Slide

  11. View Slide

  12. that is
    a lot of releases

    View Slide

  13. View Slide

  14. Rails
    security releases

    View Slide

  15. View Slide

  16. that is a lot
    of more releases

    View Slide

  17. wait
    what’s a CVE?

    View Slide

  18. common
    vulnerabilities
    and exposures

    View Slide

  19. numbering
    authorities

    View Slide

  20. apple
    adobe
    cisco
    redhat
    etc.

    View Slide

  21. cve.mitre.org
    nvd.nist.gov

    View Slide

  22. minaswan
    security?
    vulnerabilities?

    View Slide

  23. dhh + rails
    not as nice

    View Slide

  24. dhh + rails
    but we can learn
    from them

    View Slide

  25. so many
    gems
    for everything

    View Slide

  26. so many
    chances for
    security issues

    View Slide

  27. rubygems
    bundler
    json
    rexml
    rack

    View Slide

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

    View Slide

  29. what
    should we do?

    View Slide

  30. updating
    is a pain

    View Slide

  31. updating
    blocks feature
    development

    View Slide

  32. updating
    is insurance

    View Slide

  33. a small cost
    to mitigate risk

    View Slide

  34. without it
    failures are
    catastrophic

    View Slide

  35. !

    View Slide

  36. disclosure
    liability
    lawyers

    View Slide

  37. updating
    is hard work
    !

    View Slide

  38. but
    updating is
    worth it

    View Slide

  39. update
    sleep well at night
    !

    View Slide

  40. reporting
    security issues

    View Slide

  41. responsible
    disclosure

    View Slide

  42. the worst
    except for all the
    other options

    View Slide

  43. the best yet
    because everyone
    ends up unhappy

    View Slide

  44. !

    View Slide

  45. but
    no one ends
    up screwed

    View Slide

  46. disclosure
    companies hate it

    View Slide

  47. responsible
    clever, triumphant
    hackers hate it

    View Slide

  48. rewards! !

    View Slide

  49. rewards! !
    maybe everyone
    ends up happy?

    View Slide

  50. google

    View Slide

  51. View Slide

  52. google
    severity scale
    $100 to $20,000

    View Slide

  53. google
    paid over $130k
    so far this year

    View Slide

  54. View Slide

  55. facebook

    View Slide

  56. View Slide

  57. facebook
    $500 minimum
    no maximum

    View Slide

  58. github

    View Slide

  59. View Slide

  60. github
    no stated reward
    $? maximum

    View Slide

  61. engine yard

    View Slide

  62. View Slide

  63. engine yard
    no compensation
    $0 maximum

    View Slide

  64. you
    anyway, back to

    View Slide

  65. find a bug?
    what if you

    View Slide

  66. questions
    ask yourself two

    View Slide

  67. not mine?
    can I access
    something

    View Slide

  68. other people?
    can I disable
    something for

    View Slide

  69. disclose
    responsibly
    if the answer was yes

    View Slide

  70. publicly
    contact an author
    before reporting

    View Slide

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

    View Slide

  72. have empathy
    work together

    View Slide

  73. if all else fails

    View Slide

  74. fix it!
    if all else fails

    View Slide

  75. finally,
    what about
    your gems?

    View Slide

  76. your gems
    are security vulnerabilities
    waiting to happen

    View Slide

  77. unless
    your code is perfect
    (and then I want to sell you this GREAT investment)

    View Slide

  78. easy
    sympathetic discoverer

    View Slide

  79. easy
    write fix, review fix
    release + announce

    View Slide

  80. medium
    problem in the wild

    View Slide

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

    View Slide

  82. hard
    researcher out for glory

    View Slide

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

    View Slide

  84. make it
    as easy as possible

    View Slide

  85. personally
    gemspec email
    github email

    View Slide

  86. on a team
    security address
    PGP key
    disclosure policy

    View Slide

  87. ecosystem
    mailing list for announcing
    security issues and releases

    View Slide

  88. bit.ly/ruby-sec-ann

    View Slide

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

    View Slide

  90. questions?

    View Slide