Live data from Hacker News

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

evonide.com

11–20 of 107 posts

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

#11

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

Pornhub have active bug bounties. In general you have to sign up to abide by the rules, which generally say how far you can take an exploit, ie prove it works but don't fuck with the actual data just to show you can. Your exploit would show that you could and that's what they want you to do.

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

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

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

#14
post #9

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

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

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

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

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

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

Reminds me of a post that mocked how Php 7 "improves" security of unserialize function and people at reddit, at /r/php defending it....

[1] https://www.reddit.com/r/PHP/comments/3j88v4/something_about...

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

#19

Earlier quoted context omitted.

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

Must be a funny comparison group you have there.

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

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

#20

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.

Ruby and python aren't exactly known to be fast.

In my experience php is fast enough until you start generating lots of garbage. It seems it wasn't really designed to garbage collect at all, but to rely on the per-request cleanup.

Post reply on HN