News for hackers. Stuff that matters.
Re:The security hole I found on Amazon.com by euank on Friday June 06, 2014 @08:33PM (#7860867)
I find it ironic that the wikipedia page on clickjacking [0] lists exactly this exploit as the example, and yet noone has reported it or fixed it in all this time.

[0]: https://en.wikipedia.org/wiki/Clickjacking#Examples

Edit: This example was added to the wiki page in December 2009. Relevant link: https://en.wikipedia.org/w/index.php?title=Clickjacking&oldi...

Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @08:36PM (#7860874)
Wow, I hadn't even noticed that.
Re:The security hole I found on Amazon.com by joev_ on Friday June 06, 2014 @06:22PM (#7860557)
Unfortunately x-frame-options does not always fix these kinds of problems. If you can get the user to click more than once on your page, you can open a tab in the background on the first click (google for popunder.js), and if you can predict click #2 a split second before it happens (e.g. zalewski's game PoC), you can bring the popunder to the front and reposition it right under their cursor.

(note: amazon could fix this by detecting when opener is xdomain and requiring some minimum number of mouseover events in the page before the button is clickable).

Re:The security hole I found on Amazon.com by erikano on Saturday June 07, 2014 @07:29AM (#7861846)
>zalewski's game PoC

I googled this but found nothing relevant. Do you have a link?

Re:The security hole I found on Amazon.com by joev_ on Saturday June 07, 2014 @12:14PM (#7862362)
Re:The security hole I found on Amazon.com by erikano on Sunday June 08, 2014 @05:19AM (#7864306)
Thanks :)
Re:The security hole I found on Amazon.com by jarrett on Friday June 06, 2014 @06:19PM (#7860547)
Clickjacking is especially scary because most web apps are probably vulnerable. The default httpd.conf that ships with most package managers doesn't include the X-Frame-Options header. (Perhaps it should.)

Based on my testing, it appears Rails does not add that header either. Do any other frameworks?

Re:The security hole I found on Amazon.com by garethadams on Saturday June 07, 2014 @08:53AM (#7861972)
Rails 4 includes that as a default header[1] and has done since August 2012[2]

[1]: https://github.com/rails/rails/blob/master/guides/source/sec... [2]: https://github.com/rails/rails/commit/2a290f7f7cdf775491eda0...

Re:The security hole I found on Amazon.com by jarrett on Monday June 09, 2014 @10:40AM (#7868665)
It appears we're each partially right: If you generated a new Rails app after August 2012, you get the header by default. If you generated the app before August 2012, you do not get the header by default.

So PSA: Updating Rails in an existing app does not cause this header to be added. You must add it yourself in application.rb if it's not already there. See garethadams' footnote #2 above.

Re:The security hole I found on Amazon.com by ludwigvan on Friday June 06, 2014 @11:35PM (#7861177)
Django has a middleware: https://docs.djangoproject.com/en/dev/ref/clickjacking/

However, it is not turned on by default on old versions (<1.6) I believe, but latest versions should be fine: https://docs.djangoproject.com/en/dev/topics/http/middleware... .

Re:The security hole I found on Amazon.com by homakov on Saturday June 07, 2014 @01:44PM (#7862579)
Most frameworks/servers don't do that. It's bad design of web specs, not a bug actually. Developers don't have to remember about it... And yeah, I added default_headers to Rails a while ago.
Re:The security hole I found on Amazon.com by 0h139 on Friday June 06, 2014 @06:09PM (#7860516)
Hope you got a bounty!
Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @06:11PM (#7860519)
Nope. Not even a t-shirt.
Re:The security hole I found on Amazon.com by ohashi on Friday June 06, 2014 @08:11PM (#7860832)
That sucks. It makes responsible disclosure seem marginally less attractive without any type of reward. I am sure most people would either do it or not, but there's probably some on the fence. And some people might actually start looking knowing there was a legitimate reward.
Re:The security hole I found on Amazon.com by DougBTX on Saturday June 07, 2014 @08:13AM (#7861921)
There's a bit of back and forth between intrinsic and extrinsic motivation, where an external reward can reduce intrinsic motivation more than it increases extrinsic motivation. That is, if the reward is known but small, someone could go form, "I'll submit this since I want to help them out," to, "I'm not going to work for below minimum wage!"

http://en.wikipedia.org/wiki/Motivation#Intrinsic_and_extrin...

Re:The security hole I found on Amazon.com by ohashi on Saturday June 07, 2014 @04:55PM (#7863077)
So make it more than minimum wage. Problem solved.
Re:The security hole I found on Amazon.com by mathattack on Friday June 06, 2014 @06:17PM (#7860537)
D'oh! I think you deserve at least a gift certificate!
Re:The security hole I found on Amazon.com by fletchowns on Friday June 06, 2014 @05:50PM (#7860457)
Why did it take months for Amazon to fix it?
Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @05:54PM (#7860475)
I have no idea. Adding a single HTTP header seems simple to me, but I have no idea what their architecture looks like. It took them an entire month to send me a "thanks, we're working on it" email and that was only after I followed up with them.
Re:The security hole I found on Amazon.com by mike-cardwell on Friday June 06, 2014 @06:23PM (#7860561)
They probably spent most of the time investigating to make sure that adding the header wasn't going to break anything.
Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @06:28PM (#7860580)
Yep, they may have had widgets or legitimate framing that they needed to handle.
Re:The security hole I found on Amazon.com by greenyoda on Friday June 06, 2014 @10:51PM (#7861107)
Probably because you can't do much by exploiting this security hole besides annoying people, so there's little incentive to do so. If you can get me to click on an item and buy it, the item will be shipped to my physical address, not yours. Even if was a product you were selling, I could return it for a refund and your account would be charged back. It doesn't seem like a very profitable scheme.
Re:The security hole I found on Amazon.com by phil21 on Friday June 06, 2014 @09:41PM (#7860979)
Sounds about the right amount of time for a dev cycle in a large corporation.

Yes, I may be a bit bitter...

Re:The security hole I found on Amazon.com by fletchowns on Friday June 06, 2014 @11:50PM (#7861215)
Yeah for a normal dev cycle. Security fixes do not need to follow a normal dev cycle.
Re:The security hole I found on Amazon.com by id on Friday June 06, 2014 @05:36PM (#7860395)
Blog appears to have some issues:

"Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @05:41PM (#7860419)
Sorry about that. I tried to push the POC code to my blog and forgot that Heroku doesn't like the version of Wordpress I'm running. Should be back up now.
Re:The security hole I found on Amazon.com by themodelplumber on Friday June 06, 2014 @05:41PM (#7860416)
Gutsy move, posting to HN about a security vulnerability at Amazon. And using WordPress to do it. I'll bet this guy loves playing on cliffs, too.
Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @05:51PM (#7860461)
I would hope my blog would be easier to hack than Amazon. Playing on cliffs and rock climbing is fun, btw. :)
Re:The security hole I found on Amazon.com by rabino on Friday June 06, 2014 @06:26PM (#7860572)
Why? You have a lot of ways to hack a WordPress site?
Re:The security hole I found on Amazon.com by daeken on Friday June 06, 2014 @09:14PM (#7860934)
> <azonenberg> wordpress is an unauthenticated remote shell that, as a useful side feature, also contains a blog

That's an old joke and obviously an exaggeration, but it's not horribly far off. Wordpress instances fall to attack constantly, due to a combination of bugs in the base application itself (not terribly common) and extensions (not just common -- CONSTANT). In terms of breakability, I would rank Wordpress in the top 1% of applications without a second thought.

Re:The security hole I found on Amazon.com by georgestephanis on Saturday June 07, 2014 @12:28AM (#7861270)
If you believe you're aware of any security issues with WordPress core itself, Automattic is running a Bug Bounty program over on HackerOne here: https://hackerone.com/automattic/ -- responsible disclosure, bug bounties, and making the web a safer place is awesome.
Re:The security hole I found on Amazon.com by nomedeplume on Saturday June 07, 2014 @04:38AM (#7861636)
You really think some piddling Automattic bounty is more valuable than a WordPress 0day?!?!?!?!? (Conscious punctuation.)

I'm at a loss for words, scaredy-cat.

Re:The security hole I found on Amazon.com by notfoss on Saturday June 07, 2014 @05:36AM (#7861707)
So you are implying that there are no honest people out there, and on top of that everyone that finds a vulnerability has the guts and resources to make money off a 0day bug?
Re:The security hole I found on Amazon.com by shiven on Saturday June 07, 2014 @09:05AM (#7861997)
What's so hard in making money off 0days? Especially in this day and age of SilkRoute clones and Cryptocurrencies.

I was under the impression that a big reason why 0day exploits are not popping up all over is because the folks who discover them can now sell them (for way more than any bounty program), whereas earlier the only way to monetize was to use them as advertisement for selling your skills. Instant payment vs Contractual jobs. I'd say now the 0day vulns end up in the hands of professionals (criminal networks/state actors) rather than script kiddies.

Re:The security hole I found on Amazon.com by judk on Saturday June 07, 2014 @10:52AM (#7862217)
More than one person can rediscover an exploit. Paying all of them gets expensive
Re:The security hole I found on Amazon.com by rhgraysonii on Friday June 06, 2014 @05:30PM (#7860368)
Anyone have a link to a more detailed writeup on exactly how this was implemented?
Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @05:31PM (#7860373)
I can post the code. It just doesn't work anymore since they fixed the hole.

Edit: https://gist.github.com/joshfraser/819308dbae43ff70d892

Re:The security hole I found on Amazon.com by canadaj on Friday June 06, 2014 @05:35PM (#7860387)
Please do, it would be interesting to see how it works.
Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @05:45PM (#7860439)
This hack is classic clickjacking. I created a transparent iframe containing a product page on amazon.com that had been carefully positioned so when you think you’re clicking on my page, you’re actually clicking the “Buy now” button on their site instead. Here’s the link to the code for the no longer working proof of concept: https://gist.github.com/joshfraser/819308dbae43ff70d892
Re:The security hole I found on Amazon.com by driverdan on Saturday June 07, 2014 @11:57AM (#7862342)
Simple solution: all browsers should have 3rd party cookies disabled, including iframes.
Re:The security hole I found on Amazon.com by mappum on Saturday June 07, 2014 @02:08PM (#7862625)
If the fix was that easy, it would have been implemented by now. Doing so would prevent some useful behavior. For instance, an embeddable Facebook like button needs to run in an iframe and uses facebook.com cookies to be able to associate the like with the user.
Re:The security hole I found on Amazon.com by junto on Saturday June 07, 2014 @03:54PM (#7862913)
Funnily enough, I would see that as a good thing rather than a bad thing!
Re:The security hole I found on Amazon.com by homakov on Saturday June 07, 2014 @07:16AM (#7861826)
"Security hole" is a loud title. Is it worth a blog post at all? meh
Re:The security hole I found on Amazon.com by joshfraser on Monday June 09, 2014 @12:57PM (#7869253)
I'm a big fan of your research. I debated whether to go with a more specific title like "Clickjacking with one click purchases on Amazon" but decided to keep it simple for people unfamiliar with the concept.
Re:The security hole I found on Amazon.com by homakov on Friday June 13, 2014 @09:38AM (#7888727)
In fact it is a security issue but IMO you also should have emphasized: 1) amazon sucks at fixing bugs 2) clickjacking can be a serious issue
Re:The security hole I found on Amazon.com by micahgoulart on Friday June 06, 2014 @06:27PM (#7860578)
> I resisted the temptation to use the exploit to send myself a million dollars worth of free Amazon gift cards

Sorry, but that's not how Amazon's "Buy It Now" option works. It sends the item to the default address on file. So it would not be possible for the clickjacker to get it mailed to their own address.

Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @06:31PM (#7860587)
You can send a gift card to an email address that you specify. I can't seem to do it now, but I remember being able to pre-populate the email address using a GET variable:

https://www.amazon.com/gp/product/B004LLIKVU/gcrnsts?ie=UTF8...

Re:The security hole I found on Amazon.com by giulianob on Friday June 06, 2014 @06:36PM (#7860603)
Would it be possible to use this to sell items with you as a referral and get paid commission?
Re:The security hole I found on Amazon.com by joshfraser on Friday June 06, 2014 @06:40PM (#7860613)
Yes, but even better, you could list your own products on Amazon and get paid whatever amount you want. Of course, there's no way to stop the email receipts from Amazon, but you might be able to get away with it for short period of time.