로고

완도명사십리오토캠핑장
로그인 회원가입
  • 자유게시판
  • 자유게시판

    자유게시판

    How we Broke PHP, Hacked Pornhub and Earned $20,000

    페이지 정보

    profile_image
    작성자 Margie Boyle
    댓글 댓글 0건   조회Hit 89회   작성일Date 24-05-28 19:50

    본문

    360_F_314700448_Ckh3uDxLuKEwPNGHIKF1ZgRwuVStqSft.jpgWe now have found two use-after-free vulnerabilities in PHP’s rubbish assortment algorithm. Those vulnerabilities have been remotely exploitable over PHP’s unserialize function. 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 consideration. That’s why we've got taken the angle of a sophisticated attacker with the complete intent to get as deep as attainable into the system, focusing on one principal 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 quickly detected the usage of unserialize on the website. In all cases a parameter named "cookie" got unserialized from Post data and afterwards reflected by way of Set-Cookie headers. Standard exploitation strategies require so referred to as Property-Oriented-Programming (POP) that involve abusing already current lessons with specifically outlined "magic methods" in order to trigger undesirable and malicious code paths.



    51337023982_856d885a2a.jpgUnfortunately, it was tough for us to assemble any information about Pornhub’s used frameworks and PHP objects in general. Multiple lessons from widespread frameworks have been tested - all with out success. The core unserializer alone is relatively advanced as it entails more than 1200 traces of code in PHP 5.6. Further, many inside PHP courses have their very own unserialize methods. By supporting buildings like objects, arrays, integers, strings or even references it is no surprise that PHP’s monitor file exhibits a tendency for bugs and memory corruption vulnerabilities. Sadly, there have been no identified vulnerabilities of such type for newer PHP variations like PHP 5.6 or PHP 7, especially as a result of unserialize already bought numerous attention previously (e.g. phpcodz). Hence, auditing it may be in comparison with squeezing an already tightly squeezed lemon. Finally, after a lot consideration and so many security fixes its vulnerability potential ought to have been drained out and it must be safe, shouldn’t it? To seek out an answer Dario implemented a fuzzer crafted specifically for fuzzing serialized strings which have been passed to unserialize.



    Running the fuzzer with PHP 7 immediately result in unexpected conduct. This behavior was not reproducible when tested towards Pornhub’s server though. Thus, we assumed a PHP 5 model. However, running the fuzzer in opposition to a newer model of PHP 5 just generated more than 1 TB of logs without any success. Eventually, after putting increasingly more effort into fuzzing we’ve stumbled upon unexpected habits once more. Several questions needed to be answered: xnxx is the problem safety related? In that case can we solely exploit it regionally or also remotely? To additional complicate this example the fuzzer did generate non-printable knowledge blobs with sizes of greater than 200 KB. An incredible amount of time was obligatory to investigate potential issues. After all, 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 found in PHP’s garbage collection algorithm, a part of PHP that is completely unrelated to unserialize.



    However, the interplay of both components occurred only after unserialize had completed its job. Consequently, it was not well suited for distant exploitation. After additional evaluation, gaining a deeper understanding for the problem’s root causes and plenty of laborious work a similar use-after-free vulnerability was found that gave the impression to be promising for remote exploitation. The high sophistication of the found PHP bugs and their discovery made it necessary to jot down separate articles. You can read more particulars in Dario’s fuzzing unserialize write-up. In addition, now we have written an article about Breaking PHP’s Garbage Collection and Unserialize. Even this promising use-after-free vulnerability was significantly tough to use. Particularly, it concerned multiple exploitation stages. 1. The stack and heap (which additionally embrace any potential person-input) as well as another writable segments are flagged non-executable (c.f. 2. Even if you're ready to manage the instruction pointer it is advisable know what you wish to execute i.e. you could have a valid address of an executable memory segment.

    댓글목록

    등록된 댓글이 없습니다.