자유게시판

SUNGIL PUNCH

자유게시판

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

페이지 정보

작성자 Rosemary 작성일24-05-28 08:53 조회119회 댓글0건

본문

360_F_314700448_Ckh3uDxLuKEwPNGHIKF1ZgRwuVStqSft.jpgWe now have discovered two use-after-free vulnerabilities in PHP’s garbage assortment algorithm. Those vulnerabilities have been remotely exploitable over PHP’s unserialize operate. We have been also 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 excessive rewards on Hackerone caught our consideration. That’s why now we have taken the angle of a complicated attacker with the full intent to get as deep as potential into the system, specializing in one most important purpose: 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 circumstances a parameter named "cookie" bought unserialized from Post information and afterwards reflected via Set-Cookie headers. Standard exploitation strategies require so referred to as Property-Oriented-Programming (POP) that contain abusing already existing lessons with particularly outlined "magic methods" so as to set off unwanted and malicious code paths.



b9404ca05d4b26a9c18a3f4577b1b9da.10.jpgUnfortunately, it was tough for us to assemble any details about Pornhub’s used frameworks and PHP objects in general. Multiple courses from widespread frameworks have been examined - all without success. The core unserializer alone is comparatively complex because it includes greater than 1200 strains of code in PHP 5.6. Further, many internal PHP classes have their own unserialize methods. By supporting constructions like objects, arrays, integers, strings and xnxx even references it is no shock that PHP’s observe report reveals a tendency for bugs and reminiscence corruption vulnerabilities. Sadly, there were no known vulnerabilities of such kind for newer PHP variations like PHP 5.6 or PHP 7, especially as a result of unserialize already received plenty of consideration up to now (e.g. phpcodz). Hence, auditing it can be in comparison with squeezing an already tightly squeezed lemon. Finally, after so much consideration and so many security fixes its vulnerability potential should have been drained out and it should be secure, shouldn’t it? To find a solution Dario applied a fuzzer crafted particularly for fuzzing serialized strings which were handed to unserialize.



Running the fuzzer with PHP 7 instantly result in unexpected habits. This behavior was not reproducible when examined against Pornhub’s server although. Thus, we assumed a PHP 5 model. However, working the fuzzer against a newer model of PHP 5 simply generated greater than 1 TB of logs without any success. Eventually, after placing increasingly more effort into fuzzing we’ve stumbled upon unexpected behavior once more. Several questions had to be answered: is the difficulty safety associated? In that case can we solely exploit it regionally or also remotely? To further complicate this example the fuzzer did generate non-printable knowledge blobs with sizes of more than 200 KB. An amazing period of time was vital to investigate potential points. In any case, we could extract a concise proof of idea of a working memory corruption bug - a so known as use-after-free vulnerability! Upon additional investigation we found that the foundation trigger may very well be present in PHP’s garbage assortment algorithm, a part of PHP that is totally unrelated to unserialize.



However, the interplay of both parts occurred only after unserialize had finished its job. Consequently, it was not well fitted to distant exploitation. After additional analysis, gaining a deeper understanding for the problem’s root causes and quite a lot of laborious work a similar use-after-free vulnerability was found that appeared to be promising for remote exploitation. The high sophistication of the discovered PHP bugs and their discovery made it essential to write down separate articles. You may read extra 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 tough to take advantage of. Particularly, it concerned multiple exploitation levels. 1. The stack and heap (which also include any potential consumer-input) as well as any other writable segments are flagged non-executable (c.f. 2. Even if you are ready to control the instruction pointer it is advisable to know what you need to execute i.e. you could have a valid address of an executable memory phase.

댓글목록

등록된 댓글이 없습니다.

렌트요금

해피카렌트카에 보유중인 차종, 가격을 확인해보세요.

온라인상담

카카오톡 상담

카카오톡으로 상담을 도와드립니다.

카카오톡 상담하기

실제차량 둘러보기

해피카렌트카의 실제 차량을 둘러보실 수 있습니다.

웹스리 수술후기

온라인예약

온라인으로 미리 상담하고 렌트예약문의해주시면 보다 편리합니다.

온라인예약안내