Live data from Hacker News

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

evonide.com

21–30 of 107 posts

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

#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.

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

#22
post #9

Earlier quoted context omitted.

> binding exception Two words -- honor code. Rock the boat and you will find yourself in an unpleasant situation, so instead everybody does good work and nobody asks too many questions.

Honor codes for stuff that traditionally involve corporations going after individuals for criminal charges. I feel that's a bit of a crazy proposition.

Most people would probably expect Pornhub to be more honorable than e.g. AT&T...

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

#23
post #9

Earlier quoted context omitted.

> binding exception Two words -- honor code. Rock the boat and you will find yourself in an unpleasant situation, so instead everybody does good work and nobody asks too many questions.

Honor codes for stuff that traditionally involve corporations going after individuals for criminal charges. I feel that's a bit of a crazy proposition.

Crazy indeed, but it happens to be the case.

http://blog.erratasec.com/2015/05/how-to-fix-cfaa.html

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

#24
> Using a locally compiled version of PHP we scanned for good candidates for stack pivoting gadgets

Surprised that worked. Guess they got lucky and either got the comiler+optization flags the same as the PHP binary used, or the release process can create higly similar builds.

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

#25
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

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

#26

Earlier quoted context omitted.

I guess the site is served using PHP.

That's funny because in my experience php is one of the fastest languages.

FWIW, it places well across TechEmpower benchmarks:

http://www.techempower.com/benchmarks/

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

#27
post #9

Earlier quoted context omitted.

> binding exception Two words -- honor code. Rock the boat and you will find yourself in an unpleasant situation, so instead everybody does good work and nobody asks too many questions.

Honor codes for stuff that traditionally involve corporations going after individuals for criminal charges. I feel that's a bit of a crazy proposition.

When people say "honor code" around me, it usually means, "Do something honorable, even though it's against your self interest."

For both white hats and Pornhub, the legal/authorized bounty system is in their interest. White hats are making less money than some black hats, but they're not constantly terrified of being prosecuted under intense anti-hacking laws. Pornhub is spending a lot less than they would if they were hacked by black hats. Both parties win.

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

#28

Earlier quoted context omitted.

Must be a funny comparison group you have there.

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.

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

#29
post #8

The takeway: You should never use user input on unserialize. Assuming that using an up-to-date PHP version is enough to protect unserialize in such scenarios is a bad idea. Avoid it or use less complex serialization methods like JSON.

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?
Post reply on HN