Live data from Hacker News

How we broke PHP, hacked Pornhub and earned $20k

evonide.com

31–40 of 107 posts

Re: How we broke PHP, hacked Pornhub and earned $20k

#31
post #4

OT: Is there a site that curates these kinds of interestingly detailed hacks? Like Dan Luu does for debugging stories? ( https://github.com/danluu/debugging-stories )

The r/netsec subreddit: https://www.reddit.com/r/netsec/top/?sort=top&t=all

Interestingly, I've noticed just about every well upvoted story on /r/netsec will hit the HN front page 2-3 days later.

Re: How we broke PHP, hacked Pornhub and earned $20k

#32

Earlier quoted context omitted.

Even JSON isn't great. It's still a hash-collision DoS attack vector. https://paragonie.com/blog/2016/04/securely-implementing-de-...

Dude, that's horrific. I figured some secure coders wouldve at least implemented a better JSON one by now since it's relatively simple. Or are they already available but dev's often rely on these broken ones?

Hash functions designed for hash tables are generally not hard to find collisions for, so there's not much that can be done. You could shoehorn in a secure hash function, but that would hurt performance.

Re: How we broke PHP, hacked Pornhub and earned $20k

#33
post #31

Earlier quoted context omitted.

The r/netsec subreddit: https://www.reddit.com/r/netsec/top/?sort=top&t=all

Interestingly, I've noticed just about every well upvoted story on /r/netsec will hit the HN front page 2-3 days later.

Arbitrage opportunity there: submit them to HN yourself.

Re: How we broke PHP, hacked Pornhub and earned $20k

#34
post #28

Earlier quoted context omitted.

I'm certainly positive it's faster than Ruby, Python and Java.

It depends on the code base and use case. For the vast majority of coders, the time/cost savings will be in the usability of the language itself rather than the hardware required to run the code.

Sure, tell that to Reddit.

Re: How we broke PHP, hacked Pornhub and earned $20k

#35

Earlier quoted context omitted.

Dude, that's horrific. I figured some secure coders wouldve at least implemented a better JSON one by now since it's relatively simple. Or are they already available but dev's often rely on these broken ones?

Hash functions designed for hash tables are generally not hard to find collisions for, so there's not much that can be done. You could shoehorn in a secure hash function, but that would hurt performance.

You can randomize some parameters of the hashing function when you detect too many collisions. Which makes a DOS much harder.

The Perl interpreter has been doing that for ages.

Re: How we broke PHP, hacked Pornhub and earned $20k

#36
post #31

Earlier quoted context omitted.

Interestingly, I've noticed just about every well upvoted story on /r/netsec will hit the HN front page 2-3 days later.

Arbitrage opportunity there: submit them to HN yourself.

I've been guilty of doing that before. Also, from top r/reverseengineering, though that subreddit is a little less traveled so doesn't get as many comments, so it's interesting to read what HNers think.

Re: How we broke PHP, hacked Pornhub and earned $20k

#37
post #13

wow From a legal perspective how do companies and hackerone create a binding exemption from laws used to prosecute hackers?

In the US the law is against unauthorized access. If a company agrees to let people try to hack their stuff, then the access is authorized and legal.

To what extent? What if you do something on accident that ends up messing up their stuff? Just the first example I can think of: you figure out a way to reboot an instance which lets you exploit a race condition in some auth code, and don't realize that the instance you're killing is critical for some other function (let's say billing) and you end up causing some real monetary damage, even though you had no idea.

Are there any legal precedents for this?

Re: How we broke PHP, hacked Pornhub and earned $20k

#38

Earlier quoted context omitted.

Dude, that's horrific. I figured some secure coders wouldve at least implemented a better JSON one by now since it's relatively simple. Or are they already available but dev's often rely on these broken ones?

Hash functions designed for hash tables are generally not hard to find collisions for, so there's not much that can be done. You could shoehorn in a secure hash function, but that would hurt performance.

I was thinking more on lines of (a) does JSON handling need hash tables and (b) if do, do they have to be open addressing or something vulnerable to DOS? A No on either can lead to an implementation with better DOS resistance.

Re: How we broke PHP, hacked Pornhub and earned $20k

#39

So does Pornhub's bug bounty program include some number of years of free paid membership along with financial bounties? Kind of a "treat us right and we'll let you treat yourself right" kind of thing?

If you know enough to be able to pull off hacks like this, you surely know enough to get more of this kind of thing than you'd have time to watch in 10 lifetimes. I doubt that such a "reward" would be very appealing to those who participate in the bug bounty program, and it'd honestly be a sleazy business proposition, which would harm the professionalism of operating a successful bug bounty program. And yes, I'm completely serious.

Re: How we broke PHP, hacked Pornhub and earned $20k

#40
post #21

wow From a legal perspective how do companies and hackerone create a binding exemption from laws used to prosecute hackers?

If they prosecute a white hat there will only be black hats left. It's not a legal perspective but it keeps the honour code working.

ehhhhh, a real answer here dictates whether I sign up to hackerone on TOR and request bitcoin payouts, or if I do it on clearnet, fill out 1099s with my real/entity name, and link my bank accounts
Post reply on HN