• Twitter

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @
  • Language: English
    • Bahasa Indonesia
    • Bahasa Melayu
    • Čeština
    • Dansk
    • Deutsch
    • EnglishUK
    • Español
    • Filipino
    • français
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • română
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Русский
    • Українська мова
    • עִבְרִית
    • العربية
    • فارسی
    • हिन्दी
    • বাংলা
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Have an account? Log in New to Twitter? Join Today »
    Log in

    Forgot password?
    Already using Twitter via text message?

Egor Homakov ‏@homakov 3 Jan 2013

everyone! MAYDAY! ActionDispatch::ParamsParser::DEFAULT_PARSERS={} http://homakov.blogspot.com/2013/01/rails-security-digest-eli5.html …

0 replies 9 retweets 2 favorites
  • Retweets 9
  • Favorites 2
  • Anatoly Karp Patrik Ragnarsson Harish Reddy Christer Johansson Jason Weathered Rob Howard ┐( ˘_˘)┌ ziromr Mike Mazur kamal
7:55 PM - 3 Jan 2013
  1. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @homakov it doesn't look like Rails 3.2.9 supports parsing YAML POSTS/PUTS by default. https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/params_parser.rb#L16-L19 …

    View summary Hide summary 0 replies 0 retweets 0 favorites
  2. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @homakov request.content_mime_type is "application/x-yaml" but action_dispatch.request.request_parameters is always {}.

    Expand Collapse 0 replies 0 retweets 0 favorites
  3. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @homakov after adding ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime::YAML] = :yaml request.request_parameters could be populated.

    Expand Collapse 0 replies 0 retweets 0 favorites
  4. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @homakov however, any Hash that is fetched from params will be coerced into ActiveSupport::HashWithIndifferentAccess and Symbols -> Strings.

    Expand Collapse 0 replies 0 retweets 0 favorites
  5. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @homakov also I seem to remember @tenderlove making a commit that used Strings over Symbols to prevent any memory DoS.

    Expand Collapse 0 replies 0 retweets 0 favorites
  6. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @homakov https://github.com/rails/rails/blob/7c7fb3a862651d87c4071e40a1799b973f626b11/actionpack/lib/action_dispatch/http/parameters.rb#L68-L80 … this is what stops us.

    View summary Hide summary 0 replies 0 retweets 0 favorites
  7. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @homakov I almost got a Struct instance (has a #[] method) through via YAML, but ActionDispatch::Parameters#parameters calls merge on it.

    Expand Collapse 0 replies 0 retweets 0 favorites
  8. Egor Homakov ‏@homakov 3 Jan 2013

    @postmodern_mod3 your tweets are exactly my tweets yesterday. 1 yaml 2 yes, it's off by default 3 yaml inside xml 4 DDOS YEAH!

    Expand Collapse 0 replies 0 retweets 0 favorites
  9. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @homakov I was hoping to exploit find_by_* methods, but doesn't look like ActionDispatch::Parameters will let me.

    Expand Collapse 0 replies 0 retweets 0 favorites
  10. Egor Homakov ‏@homakov 3 Jan 2013

    @postmodern_mod3 IMHO this find_by_* exploit is impossible through params. Only authlogic case(from cookie) makes sense.

    Expand Collapse 0 replies 2 retweets 0 favorites
  11. Jordon Bedwell ‏@envygeeks 3 Jan 2013

    @homakov @postmodern_mod3 Which is surprising because authlogic is pretty big, you would think somebody would have caught it before now.

    Expand Collapse 0 replies 0 retweets 0 favorites
  12. Egor Homakov ‏@homakov 3 Jan 2013

    @envygeeks @postmodern_mod3 it STILL relies solely on session_secret. This CVE is very rare

    Expand Collapse 0 replies 1 retweet 0 favorites
  13. Jordon Bedwell ‏@envygeeks 3 Jan 2013

    @homakov @postmodern_mod3 Well as demonstrated not too long ago, most programmers don't know what "secret" is if you watch Github last week.

    Expand Collapse 0 replies 0 retweets 0 favorites
  14. Egor Homakov ‏@homakov 3 Jan 2013

    @envygeeks @postmodern_mod3 posted tweets about it 6 months ago, inurl:config/session_secret is also rare case. some devs are just idiots

    Expand Collapse 0 replies 1 retweet 0 favorites
  15. Postmodern ‏@postmodern_mod3 3 Jan 2013

    @envygeeks never understood why the session secret wasn't put into a YAML/txt file and gitignored. @homakov

    Expand Collapse 0 replies 0 retweets 1 favorite
  16. Egor Homakov ‏@homakov 3 Jan 2013

    @postmodern_mod3 @envygeeks dunno lol. @dhh ?

    Expand Collapse 0 replies 0 retweets 0 favorites
  17. Charlie Somerville ‏@charliesome 3 Jan 2013

    @postmodern_mod3 @envygeeks @homakov it is convenient to check it in if you have a closed source app

    Expand Collapse 0 replies 0 retweets 0 favorites
  18. Postmodern ‏@postmodern_mod3 4 Jan 2013

    @charliesome @envygeeks @homakov you should keep credentials out of version-control, in case it gets compromised. I symlink database.yml in

    Expand Collapse 0 replies 0 retweets 0 favorites
  19. Jordon Bedwell ‏@envygeeks 4 Jan 2013

    @postmodern_mod3 @homakov That's actually what I do on my client sites, I always create a app.yml and load it and .gitignore for security.

    Expand Collapse 0 replies 0 retweets 0 favorites

    Don’t miss any updates from Egor Homakov

    • © 2014 Twitter
    • About
    • Help
    • Ads info

    Flag this media

    This has already been marked as containing sensitive content.

    Learn more about flagging media
    Dismiss
    Previous
    Next

    Go to a person's profile

    Saved searches

    • Remove
    • Verified account @
    Suggested users
    • Verified account @
    • Verified account @

    Retweet this to your followers?

    Are you sure you want to delete this Tweet?

    Block

    • Add a location to your Tweets

      When you tweet with a location, Twitter stores that location. You can switch location on/off before each Tweet and always have the option to delete your location history. Learn more

    • Turn off location

    Profile summary

    Your lists

    Create a new list


    Under 100 characters, optional

    Privacy

    Embed this Tweet

    Add this Tweet to your website by copying the code below. Learn more

    Hmm, there was a problem reaching the server.

    Preview

    Sign up for Twitter

    Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.

    Have an account? Log in »

    Two-way (sending and receiving) short codes:

    Country Code For customers of
    United States 40404 (any)
    Canada 21212 (any)
    United Kingdom 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Ireland 51210 Vodafone, O2
    India 53000 Bharti Airtel, Videocon, Reliance
    Indonesia 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italy 4880804 Wind
    3424486444 Vodafone
    » See SMS short codes for other countries

    Confirmation

    Buy Now

    Hmm... Something went wrong. Please try again.