How we Broke PHP, Hacked Pornhub and Earned $20,000
페이지 정보

본문
Now we have found two use-after-free vulnerabilities in PHP’s garbage assortment algorithm. Those vulnerabilities were remotely exploitable over PHP’s unserialize operate. We have been additionally awarded with $2,000 by the Internet Bug Bounty committee (c.f. Many thanks go out to cutz for co-authoring this article. Pornhub’s bug bounty program and its relatively high rewards on Hackerone caught our attention. That’s why we have taken the attitude of an advanced attacker with the total intent to get as deep as possible into the system, focusing on one foremost purpose: gaining remote code execution capabilities. Thus, we left no stone unturned and attacked what Pornhub is built upon: PHP. After analyzing the platform we shortly detected the usage of unserialize on the web site. In all cases a parameter named "cookie" acquired unserialized from Post information and afterwards mirrored via Set-Cookie headers. Standard exploitation methods require so referred to as Property-Oriented-Programming (POP) that contain abusing already present courses with specifically defined "magic methods" as a way to set off undesirable and malicious code paths.
Unfortunately, it was tough for us to collect any information about Pornhub’s used frameworks and PHP objects normally. Multiple courses from frequent frameworks have been examined - all with out success. The core unserializer alone is comparatively advanced because it includes greater than 1200 strains of code in PHP 5.6. Further, many inner PHP lessons have their very own unserialize methods. By supporting constructions like objects, arrays, integers, strings and even references it is not any surprise that PHP’s monitor file exhibits a tendency for bugs and reminiscence corruption vulnerabilities. Sadly, there were no known vulnerabilities of such type for newer PHP versions like PHP 5.6 or PHP 7, particularly as a result of unserialize already bought numerous consideration prior to now (e.g. phpcodz). Hence, auditing it can be in comparison with squeezing an already tightly squeezed lemon. Finally, after so much attention and so many security fixes its vulnerability potential should have been drained out and it needs to be secure, shouldn’t it? To seek out a solution Dario carried out a fuzzer crafted particularly for fuzzing serialized strings which have been handed to unserialize.

Running the fuzzer with PHP 7 immediately lead to unexpected conduct. This conduct was not reproducible when examined towards Pornhub’s server although. Thus, we assumed a PHP 5 model. However, running the fuzzer in opposition to a newer version of PHP 5 just generated greater than 1 TB of logs with none success. Eventually, after putting increasingly effort into fuzzing we’ve stumbled upon unexpected habits again. Several questions had to be answered: is the problem security associated? In that case can we solely exploit it locally or also remotely? To further complicate this situation the fuzzer did generate non-printable knowledge blobs with sizes of greater than 200 KB. An incredible amount of time was crucial to investigate potential issues. In spite of everything, we might extract a concise proof of idea of a working reminiscence corruption bug - a so called use-after-free vulnerability! Upon additional investigation we discovered that the root trigger could possibly be present in PHP’s garbage assortment algorithm, a element of PHP that is totally unrelated to unserialize.
However, the interaction of both parts occurred solely after unserialize had finished its job. Consequently, xnxx it was not nicely suited to remote exploitation. After further analysis, gaining a deeper understanding for the problem’s root causes and plenty of laborious work an identical use-after-free vulnerability was found that gave the impression to be promising for distant exploitation. The excessive sophistication of the discovered PHP bugs and their discovery made it mandatory to write down separate articles. You can read more particulars in Dario’s fuzzing unserialize write-up. As well as, now we have written an article about Breaking PHP’s Garbage Collection and Unserialize. Even this promising use-after-free vulnerability was considerably troublesome to use. Particularly, it involved a number of exploitation levels. 1. The stack and heap (which also include any potential person-input) in addition to another writable segments are flagged non-executable (c.f. 2. Even in case you are ready to control the instruction pointer you should know what you wish to execute i.e. you want to have a sound address of an executable memory section.
- 이전글The Proper Weight Reduction Succulent Caralluma Fimbriata 24.05.29
- 다음글20 Tools That Will Make You More Effective At Affordable SEO Services London 24.05.29
댓글목록
등록된 댓글이 없습니다.