How we Broke PHP, Hacked Pornhub and Earned $20,000
페이지 정보
본문
We've got found two use-after-free vulnerabilities in PHP’s garbage assortment algorithm. Those vulnerabilities were remotely exploitable over PHP’s unserialize operate. We were additionally awarded with $2,000 by the Internet Bug Bounty committee (c.f. Many thanks exit to cutz for co-authoring this article. Pornhub’s bug bounty program and its relatively excessive rewards on Hackerone caught our consideration. That’s why we now have taken the attitude of a complicated attacker with the complete intent to get as deep as doable into the system, focusing on one important aim: gaining remote code execution capabilities. Thus, we left no stone unturned and attacked what Pornhub is constructed upon: PHP. After analyzing the platform we shortly detected the utilization of unserialize on the web site. In all instances a parameter named "cookie" received unserialized from Post data and afterwards reflected via Set-Cookie headers. Standard exploitation techniques require so called Property-Oriented-Programming (POP) that involve abusing already existing classes with specifically outlined "magic methods" to be able to trigger undesirable and malicious code paths.
Unfortunately, it was tough for us to gather any information about Pornhub’s used frameworks and PHP objects basically. Multiple lessons from common frameworks have been tested - all without success. The core unserializer alone is comparatively complex as it involves more than 1200 traces of code in PHP 5.6. Further, many inner PHP courses have their very own unserialize methods. By supporting structures like objects, arrays, integers, strings and even references it is no surprise that PHP’s track report exhibits a tendency for bugs and memory corruption vulnerabilities. Sadly, there were no known vulnerabilities of such kind for newer PHP variations like PHP 5.6 or PHP 7, particularly as a result of unserialize already bought loads of attention previously (e.g. phpcodz). Hence, auditing it may be compared to squeezing an already tightly squeezed lemon. Finally, after so much consideration and so many safety fixes its vulnerability potential ought to have been drained out and xnxx it must be secure, shouldn’t it? To search out an answer Dario implemented a fuzzer crafted particularly for fuzzing serialized strings which had been passed to unserialize.
Running the fuzzer with PHP 7 instantly result in unexpected conduct. This behavior was not reproducible when examined towards Pornhub’s server though. Thus, we assumed a PHP 5 model. However, working the fuzzer against a newer model of PHP 5 just generated more than 1 TB of logs without any success. Eventually, after placing more and more effort into fuzzing we’ve stumbled upon unexpected conduct once more. Several questions needed to be answered: is the problem security associated? In that case can we solely exploit it regionally or additionally remotely? To additional complicate this situation the fuzzer did generate non-printable information blobs with sizes of greater than 200 KB. A tremendous period of time was vital to analyze potential points. In any case, we could extract a concise proof of idea of a working reminiscence corruption bug - a so referred to as use-after-free vulnerability! Upon further investigation we discovered that the basis trigger could possibly be present in PHP’s rubbish assortment algorithm, a component of PHP that is totally unrelated to unserialize.
However, the interplay of each components occurred solely after unserialize had finished its job. Consequently, it was not nicely suited to distant exploitation. After further evaluation, gaining a deeper understanding for the problem’s root causes and plenty of arduous work an analogous use-after-free vulnerability was found that seemed to be promising for remote exploitation. The high sophistication of the found PHP bugs and their discovery made it needed to write down separate articles. You'll be able to read more particulars in Dario’s fuzzing unserialize write-up. As well as, we have now written an article about Breaking PHP’s Garbage Collection and Unserialize. Even this promising use-after-free vulnerability was considerably troublesome to exploit. Particularly, it involved multiple exploitation levels. 1. The stack and heap (which additionally embody any potential person-enter) as well as some other writable segments are flagged non-executable (c.f. 2. Even in case you are in a position to control the instruction pointer it's good to know what you need to execute i.e. it's essential have a legitimate tackle of an executable memory phase.
- 이전글5 Reasons To Be An Online Best 18 Wheeler Accident Lawyer Shop And 5 Reasons To Not 24.05.30
- 다음글Top Tips Of Safest Poker Sites 24.05.30
댓글목록
등록된 댓글이 없습니다.